relative_humidity_from_mixing_ratio

metpy.calc.relative_humidity_from_mixing_ratio(mixing_ratio, temperature, pressure)[source]

Calculate the relative humidity from mixing ratio, temperature, and pressure.

Parameters:
  • mixing_ratio (pint.Quantity) – Dimensionless mass mixing ratio
  • temperature (pint.Quantity) – Air temperature
  • pressure (pint.Quantity) – Total atmospheric pressure
Returns:

pint.Quantity – Relative humidity

Notes

Formula based on that from [Hobbs1977] pg. 74.

\[RH = \frac{w}{w_s}\]
  • \(RH\) is relative humidity as a unitless ratio
  • \(w\) is mixing ratio
  • \(w_s\) is the saturation mixing ratio