PSAT_0D Function

public function PSAT_0D(PT) result(PPSAT)

Arguments

Type IntentOptional AttributesName
real, intent(in) :: PT

Return Value real


Contents

Source Code


Source Code

      FUNCTION PSAT_0D(PT) RESULT(PPSAT)
!     ######################################
!-------------------------------------------------------------------------------
!
!*       0.    DECLARATIONS
!              ------------
!
USE MODD_CSTS
USE MODD_REPROD_OPER, ONLY : CQSAT
!
IMPLICIT NONE
!
!*       0.1   Declarations of arguments and results
!
!
REAL, INTENT(IN)                :: PT     ! Temperature (Kelvin)
REAL                            :: PPSAT  ! saturation vapor 
                                          ! specific humidity
                                          ! with respect to
                                          ! water (kg/kg)
!
REAL            :: ZALP, ZBETA, ZGAM
!
REAL(KIND=JPRB) :: ZHOOK_HANDLE                                          
!-------------------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('MODE_THERMOS:PSAT_0D',0,ZHOOK_HANDLE)
!
!*       1.    COMPUTE SATURATION VAPOR PRESSURE
!              ---------------------------------
!
ZALP  = XALPW
ZBETA = XBETAW
ZGAM  = XGAMW
!
IF(CQSAT=='NEW'.AND.PT<=XTT)THEN
 ZALP  = XALPI
 ZBETA = XBETAI
 ZGAM  = XGAMI       
ENDIF
!
PPSAT = EXP( ZALP - ZBETA/PT - ZGAM*LOG(PT) )
!
!-------------------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('MODE_THERMOS:PSAT_0D',1,ZHOOK_HANDLE)
!
END FUNCTION PSAT_0D