Helper functions for vapour pressure

w2q(w)

q2w(q, Pa = atm)

q2ea(q, Pa = atm)

w2ea(w, Pa = atm)

ea2VPD(ea, RH)

vapour_press(q, Pa = atm)

q2RH(q, Tair, Pa = atm)

RH2q(RH, Tair, Pa = atm)

q_from_RH(RH, Tair, Pa = atm)

cal_qs(Tair, Pa = atm)

cal_ws(Tair, Pa = atm)

ea2w(ea, Pa = atm)

ea2q(ea, Pa = atm)

RH2q(RH, Tair, Pa = atm)

Tdew2q(Tdew, Pa = atm)

Tdew2w(Tdew, Pa = atm)

Tdew2RH(Tdew, Tair)

Tdew_from_q(q, Pa = atm)

Tdew_from_w(w, Pa = atm)

Arguments

w

mix ratio, m_w / m_d

q

specific humidity in kg/kg or g/g

Pa

surface air pressure

ea

actual vapor pressure (kPa)

RH

relative humidity, in %

Tair

air temperature, in degC

Tdew

dew temperature (in degC)

Value

e in the same unit as Pa

References

  1. https://www.eol.ucar.edu/projects/ceop/dm/documents/refdata_report/eqns.html, Eq-17

  2. Bolton, David. “The Computation of Equivalent Potential Temperature.” Monthly Weather Review 108, no. 7 (July 1980): 1046–53. <https://doi.org/10.1175/1520-0493(1980)108<1046:TCOEPT>2.0.CO;2>.

https://earthscience.stackexchange.com/questions/2360/how-do-i-convert-specific-humidity-to-relative-humidity

Examples

RH = 90
Pa = atm
Tair = 30
q = RH2q(RH, Pa, Tair)
RH2 = q2RH(q, Pa, Tair)
e = q2ea(q, Pa)
es = cal_es(Tair)