Skip to content

Commit

Permalink
Merge pull request #1381 from rpmanser/update_docs
Browse files Browse the repository at this point in the history
Update saturation_mixing_ratio docstring
  • Loading branch information
dopplershift committed Jul 14, 2020
2 parents 71b3e29 + 2847b25 commit f29088e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/metpy/calc/thermo.py
Expand Up @@ -909,20 +909,26 @@ def mixing_ratio(partial_press, total_press, molecular_weight_ratio=mpconsts.eps
def saturation_mixing_ratio(total_press, temperature):
r"""Calculate the saturation mixing ratio of water vapor.
This calculation is given total pressure and the temperature. The implementation
uses the formula outlined in [Hobbs1977]_ pg.73.
This calculation is given total atmospheric pressure and air temperature.
Parameters
----------
total_press: `pint.Quantity`
Total atmospheric pressure
temperature: `pint.Quantity`
air temperature
Air temperature
Returns
-------
`pint.Quantity`
The saturation mixing ratio, dimensionless
Saturation mixing ratio, dimensionless
Notes
-----
This function is a straightforward implementation of the equation given in many places,
such as [Hobbs1977]_ pg.73:
.. math:: r_s = \epsilon \frac{e_s}{p - e_s}
"""
return mixing_ratio(saturation_vapor_pressure(temperature), total_press)
Expand Down

0 comments on commit f29088e

Please sign in to comment.