FUNCTION DPSAT_1D(PT) RESULT(PDPSAT)
! ######################################
!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_CSTS
USE MODD_REPROD_OPER, ONLY : CQSAT
!
IMPLICIT NONE
!
!* 0.1 Declarations of arguments and results
!
!
REAL, DIMENSION(:), INTENT(IN) :: PT ! Temperature (Kelvin)
!
REAL, DIMENSION(SIZE(PT)) :: PDPSAT
!
REAL, DIMENSION(SIZE(PT)) :: ZBETA, ZGAM
!
REAL(KIND=JPRB) :: ZHOOK_HANDLE
!-------------------------------------------------------------------------------
!
IF (LHOOK) CALL DR_HOOK('MODE_THERMOS:DPSAT_1D',0,ZHOOK_HANDLE)
!
!* 1. COMPUTE SATURATION VAPOR PRESSURE
! ---------------------------------
!
ZBETA(:) = XBETAW
ZGAM (:) = XGAMW
!
IF(CQSAT=='NEW')THEN
WHERE(PT<=XTT)
ZBETA (:) = XBETAI
ZGAM (:) = XGAMI
ENDWHERE
ENDIF
!
PDPSAT(:) = ZBETA(:)/PT(:)**2 - ZGAM(:)/PT(:)
!
!-------------------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('MODE_THERMOS:DPSAT_1D',1,ZHOOK_HANDLE)
!
END FUNCTION DPSAT_1D