lair.meteorology.mixing_ratio#
- lair.meteorology.mixing_ratio(e, p)[source]#
Calculate the mixing ratio.
w = ε e / (p - e), with ε = Rd / Rv (exact; the common approximation ε e / p is about 1-3% low near the surface).
- Parameters:
- Returns:
float – Mixing ratio in kg/kg.
- Return type:
See also
sat_vapor_presThe vapor pressure at saturation.
Examples
The saturation mixing ratio at 20 degrees Celsius and sea-level pressure:
>>> from lair.meteorology import mixing_ratio, sat_vapor_pres >>> round(float(mixing_ratio(sat_vapor_pres(293.15), 101325.0)), 5) 0.01485