GetTDewPointFromRelHum Function

public function GetTDewPointFromRelHum(TDryBulb, RelHum) result(TDewPoint)

Return dew-point temperature given dry-bulb temperature and relative humidity. References: ASHRAE Handbook - Fundamentals (2017) ch. 1

Arguments

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

Dry-bulb temperature in °F [IP] or °C [SI]

real, intent(in) :: RelHum

Relative humidity in range [0, 1]

Return Value real

Dew-point temperature in °F [IP] or °C [SI]


Calls

proc~~gettdewpointfromrelhum~~CallsGraph proc~gettdewpointfromrelhum GetTDewPointFromRelHum proc~gettdewpointfromvappres GetTDewPointFromVapPres proc~gettdewpointfromrelhum->proc~gettdewpointfromvappres proc~getvappresfromrelhum GetVapPresFromRelHum proc~gettdewpointfromrelhum->proc~getvappresfromrelhum proc~dlnpws_ dLnPws_ proc~gettdewpointfromvappres->proc~dlnpws_ proc~isip isIP proc~gettdewpointfromvappres->proc~isip proc~getsatvappres GetSatVapPres proc~gettdewpointfromvappres->proc~getsatvappres proc~getvappresfromrelhum->proc~getsatvappres proc~dlnpws_->proc~isip proc~gettrankinefromtfahrenheit GetTRankineFromTFahrenheit proc~dlnpws_->proc~gettrankinefromtfahrenheit proc~gettkelvinfromtcelsius GetTKelvinFromTCelsius proc~dlnpws_->proc~gettkelvinfromtcelsius proc~getsatvappres->proc~isip proc~getsatvappres->proc~gettrankinefromtfahrenheit proc~getsatvappres->proc~gettkelvinfromtcelsius

Contents


Source Code

  function GetTDewPointFromRelHum(TDryBulb, RelHum) result(TDewPoint)
    !+ Return dew-point temperature given dry-bulb temperature and relative humidity.
    !+ References:
    !+ ASHRAE Handbook - Fundamentals (2017) ch. 1

    real, intent(in)  ::  TDryBulb
      !+ Dry-bulb temperature in °F [IP] or °C [SI]
    real, intent(in)  ::  RelHum
      !+ Relative humidity in range [0, 1]
    real              ::  TDewPoint
      !+ Dew-point temperature in °F [IP] or °C [SI]
    real              ::  VapPres
      !+ Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]

    if (RelHum < 0.0 .or. RelHum > 1.0) then
      error stop "Error: relative humidity is outside range [0,1]"
    end if

    VapPres   = GetVapPresFromRelHum(TDryBulb, RelHum)
    TDewPoint = GetTDewPointFromVapPres(TDryBulb, VapPres)
  end function GetTDewPointFromRelHum