SUBROUTINE BT_TSC2 ( lenrpt, report, istsc2, istrs3, iret ) C************************************************************************ C* BT_TSC2 * C* * C* This subroutine decodes the groups in section 2 of the tesac report. * C* The section 2 groups contain the type of instrumentation, the method * C* of salinity/depth measurement, and the temperatures and salinity at * C* either significant or selected depths. * C* * C* BT_BSC2 ( LENRPT, REPORT, ISTSC2, ISTRS3, IRET ) * C* * C* Input parameters: * C* * C* REPORT CHAR* Report array * C* LENRPT INTEGER Length of report minus section 4* C* ISTSC2 INTEGER Points to start of 888k(1)k(2) * C* group in section 2 * C* * C* Output parameters: * C* * C* ISTRS3 INTEGER Pointer set to 0, if no section * C* 3; else, set to blank which pre-* C* cedes '66' at start of section 3* C* RIVALS(IRIDGT) REAL Indicator for digitization * C* RIVALS(IRMSDM) REAL Method of salinity/depth meas * C* IRET INTEGER Return code * C* 0 = Normal return * C* 1 = No section 2 data * C* * C** * C* Log: * C* R. Hollern/NCEP 1/99 * C* R. Hollern/NCEP 4/00 Added call to BT_INST * C* R. Hollern/NCEP 8/00 Redefined istrt * C* C. Caruso Magee/NCEP 03/02 Corrected comment above which states * C* what istrs3 points to on output. * C************************************************************************ INCLUDE 'btcmn.cmn' C* CHARACTER*(*) report C* CHARACTER fld1*1 C------------------------------------------------------------------------ iret = 0 ip = istsc2 istrs3 = 0 C C* Check if section 2 data. C IF ( report(ip-1:ip+2) .ne. ' 888' ) THEN iret = 1 RETURN END IF C C* Get the indicator for digitization. C ip = ip + 3 C fld1 = report ( ip:ip ) C CALL ST_INTG ( fld1, ival, ier ) IF ( ier .eq. 0 ) THEN rivals ( iridgt ) = FLOAT ( ival ) END IF C ip = ip + 1 C C* Get the method of salinity/depth measurement. C fld1 = report ( ip:ip ) C* CALL ST_INTG ( fld1, ival, ier ) IF ( ier .eq. 0 ) THEN rivals ( irmsdm ) = FLOAT ( ival ) END IF C ip = ip + 2 C IF ( irptyp .eq. 5 ) THEN C C* Get the instrument type for water temperature measurements. C CALL BT_INST( report, ip, iret ) IF ( iret .eq. 1 ) THEN RETURN END IF END IF C C* Check if there is a section 3 in the report. C ii = index ( report(ip:lenrpt), ' 66' ) C IF ( ii .gt. 0 ) THEN C iends2 = ip + ii - 2 istrs3 = ip + ii - 1 ELSE iends2 = lenrpt END IF C C* Decode the TESAC groups. C istrt = ip - 2 CALL BT_TESA ( istrt, iends2, report, ierr1 ) C IF ( ierr1 .eq. 1 ) THEN iret = 1 RETURN END IF C* RETURN END