RV_FROM_TPTWB_0D Function

public function RV_FROM_TPTWB_0D(PT, PP, PTWB) result(PRV)

Arguments

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

Return Value real


Contents

Source Code


Source Code

function RV_FROM_TPTWB_0D(PT, PP, PTWB) RESULT(PRV)
!!    MODIFICATIONS
!!    -------------
!!       D.Meyer and R. Schoetter 2018: see a9c4c46889dca998ea9ca40e5e0edc62ecc75715
USE MODE_THERMOS
USE MODD_CSTS
!arguments and result
REAL, INTENT(IN) :: PT !Air temperature (K)
REAL, INTENT(IN) :: PP !Atmos. Pressure (Pa)
REAL, INTENT(IN) :: PTWB !Wet Bulb Temp. (K)
REAL :: PRV !water vapor mixing ratio (kg/kg)
REAL :: ZRVSAT !saturation water vapor mixing ratio
REAL(KIND=JPRB) :: ZHOOK_HANDLE

IF (LHOOK) CALL DR_HOOK('MODE_PSYCHRO:RV_FROM_TPTWB_0D',0,ZHOOK_HANDLE)
ZRVSAT = QSAT(PT, PP) / (1. - QSAT(PT, PP))
PRV = ((2501. - 2.326*(PTWB-XTT))*ZRVSAT - 1.006*(PT - PTWB)) &
        / (2501. + 1.86*(PT - XTT) -4.186*(PTWB - XTT))
IF (LHOOK) CALL DR_HOOK('MODE_PSYCHRO:RV_FROM_TPTWB_0D',1,ZHOOK_HANDLE)
end function RV_FROM_TPTWB_0D