      FUNCTION DWPT(T,RH)
C
C**********************************************************************
C
C   NAME- DWPT
C
C   LANGUAGE- FORTRAN 77  TYPE- FUNCTION        COMPUTER- CRAY
C
C   VERSION- 1.0    DATE- 03/13/87   PROGRAMMER- DIANE MARSICO (SMSRC)
C   VERSION- 3.0    DATE- 05/16/96   PROGRAMMER- FRANK TILLEY (SMSRC)
C     FOR REHOSTING TO CRAY, CHANGED R*4 TO REAL. DECLARED FUNCTION
C     TYPE INTERNALLY.
C
C   FUNCTION-
C   THIS FUNCTION RETURNS THE DEW POINT (CELCIUS) GIVEN THE TEMPERATURE
C   (CELCIUS) AND RELATIVE HUMIDITY (%).  THE FORMULA IS USED IN THE
C   PROCESSING OF U.S. RAWINSONDE DATA AND IS REFERENCED IN PARRY,
C   H. DEAN, 1969:  "THE SEMIAUTOMATIC COMPUTATION OF RAWINSONDES",
C   TECHNICAL MEMORANDUM WBTM EDL 10, U.S. DEPARTMENT OF COMMERCE,
C   ENVIRONMENTAL SCIENCE SERVICES ADMINISTRATION, WEATHER BUREAU,
C   OFFICE OF SYSTEMS DEVELOPMENT,EQUIPMENT DEVELOPMENT LABORATORY,
C   SILVER SPRING, MD (OCTOBER), PAGE 9 AND PAGE II-4, LINE 460.
C
C   CALLING SEQUENCE PARAMETERS-
C     VARIABLE          TYPE  I/O  FUNCTION
C     --------          ----  ---  --------
C     T                 REAL   I   TEMPERATURE (CELSIUS)
C     RH                REAL   I   RELATIVE HUMIDITY (%)
C
      REAL        DWPT, T, RH 
C
C   LOCAL PARAMETERS-
C     VARIABLE          TYPE  FUNCTION
C     --------          ----  --------
C     X                 REAL  RH USED FOR COMPUTING DPD.
C     DPD               REAL  DEW POINT DEPRESSION.
C
      REAL         X,DPD
C
C**********************************************************************
C
      IF(RH .GT. 99.99) RH = 100.
      X = 1.-0.01*RH
C
C   COMPUTE DEW POINT DEPRESSION
C
      DPD = (14.55+0.144*T)*X+((2.5+0.007*T)*X)**3+(15.9+0.117*T)*X**14
      DWPT = T-DPD
      RETURN
      END
