saturation_mixing_ratio#
- metpy.calc.saturation_mixing_ratio(total_press, temperature)[source]#
Calculate the saturation mixing ratio of water vapor.
This calculation is given total atmospheric pressure and air temperature.
- Parameters:
total_press (
pint.Quantity
) – Total atmospheric pressuretemperature (
pint.Quantity
) – Air temperature
- Returns:
pint.Quantity
– Saturation mixing ratio, dimensionless
Examples
>>> from metpy.calc import saturation_mixing_ratio >>> from metpy.units import units >>> saturation_mixing_ratio(983 * units.hPa, 25 * units.degC).to('g/kg') <Quantity(20.7079932, 'gram / kilogram')>
Notes
This function is a straightforward implementation of the equation given in many places, such as [Hobbs1977] pg.73:
\[r_s = \epsilon \frac{e_s}{p - e_s}\]Changed in version 1.0: Renamed
tot_press
parameter tototal_press