function GetVapPresFromRelHum(TDryBulb, RelHum) result(VapPres)
!+ Return partial pressure of water vapor as a function of relative humidity and temperature.
!+ References:
!+ ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 12, 22
real, intent(in) :: TDryBulb
!+ Dry-bulb temperature in °F [IP] or °C [SI]
real, intent(in) :: RelHum
!+ Relative humidity in range [0, 1]
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 = RelHum * GetSatVapPres(TDryBulb)
end function GetVapPresFromRelHum