function GetVaporPressureDeficit(TDryBulb, HumRatio, Pressure) result(VaporPressureDeficit)
!+ Return Vapor pressure deficit given dry-bulb temperature, humidity ratio, and pressure.
!+ Reference:
!+ Oke (1987) eqn 2.13a
real, intent(in) :: TDryBulb
!+ Dry-bulb temperature in °F [IP] or °C [SI]
real, intent(in) :: HumRatio
!+ Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
real, intent(in) :: Pressure
!+ Atmospheric pressure in Psi [IP] or Pa [SI]
real :: VaporPressureDeficit
!+ Vapor pressure deficit in Psi [IP] or Pa [SI]
real :: RelHum
!+ Relative humidity in range [0, 1]
if (HumRatio < 0.0) then
error stop "Error: humidity ratio is negative"
end if
RelHum = GetRelHumFromHumRatio(TDryBulb, HumRatio, Pressure)
VaporPressureDeficit = GetSatVapPres(TDryBulb) * (1.0 - RelHum)
end function GetVaporPressureDeficit