SUBROUTINE UA_TEMP ( field, t, td, iret ) C************************************************************************ C* UA_TEMP * C* * C* This subroutine decodes a temperature/dewpoint group of the * C* form TTTDD. * C* * C* UA_TEMP ( FIELD, T, TD, IRET ) * C* * C* Input parameters: * C* FIELD CHAR* Temperature/dewpoint group * C* * C* Output parameters: * C* T REAL Temperature * C* TD REAL Dewpoint * C* IRET INTEGER Return code: * C* 0 = normal return * C** * C* Log: * C* J. Ator/NCEP 03/96 * C* J. Ator/NCEP 12/97 New interface format, style changes * C* J. Ator/NCEP 10/99 Clean up function declarations * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'uacmn.cmn' C* CHARACTER*(*) field C------------------------------------------------------------------------ C C* Initialize variables. C iret = 0 t = RMISSD td = RMISSD C CALL ST_INTG ( field (1:3), itemp, ier ) IF ( ier .eq. 0 ) THEN C C* Compute the temperature. C isign = MOD ( itemp, 2 ) IF ( isign .eq. 1 ) THEN itemp = itemp * (-1) END IF t = FLOAT ( itemp ) / 10. C C* Compute the dewpoint. C CALL ST_INTG ( field (4:5), idep, ier ) IF ( ier .eq. 0 ) THEN IF ( idep .le. 50 ) THEN td = t - ( FLOAT ( idep ) / 10. ) ELSE IF ( idep .ge. 56 ) THEN td = t - ( FLOAT ( idep - 50 ) ) END IF END IF END IF C* RETURN END