SUBROUTINE BT_TEMP ( report, ipt, iret ) C************************************************************************ C* BT_TEMP * C* * C* This subroutine decodes the air temperature group 4sTTT, where s is * C* the sign of the temperature and TTT is the temperature in tenths of * C* a degree celsius. * C* * C* BT_TEMP ( REPORT, IPT, IRET ) * C* * C* Input parameters: * C* REPORT CHAR* Report array * C* * C* Input and Output parameters: * C* IPT INTEGER On input, points to s in 4sTTT * C* group; on output, points to * C* start of next group * C* * C* Output parameters: * C* RIVALS(IRTMPC) REAL Air temperature, degrees C * C* IRET INTEGER Return code * C* 0 = Normal return * C* 1 = Problems * C* * C** * C* Log: * C* R. Hollern/NCEP 11/98 * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'btcmn.cmn' C* CHARACTER*(*) report C* CHARACTER fld3*3 C------------------------------------------------------------------------ iret = 0 C C* Get the sign of air temperature C IF ( report ( ipt:ipt ) .eq. '0' ) THEN xsign = 1.0 ELSE IF ( report ( ipt:ipt ) .eq. '1' ) THEN xsign = -1.0 ELSE ipt = ipt + 5 RETURN END IF C C* Get temperature value. C ipt = ipt + 1 j1 = ipt + 2 IF ( report ( j1:j1 ) .eq. '/' ) report ( j1:j1 ) = '0' fld3 = report ( ipt:ipt+2 ) CALL ST_INTG ( fld3, ival, ier ) ipt = ipt + 4 IF ( ier .eq. 0 ) THEN rval = .1 * xsign * FLOAT ( ival ) rivals ( irtmpc ) = rval ELSE RETURN END IF C* RETURN END