relative_humidity_from_dewpoint#

metpy.calc.relative_humidity_from_dewpoint(temperature, dewpoint, *, phase='liquid')[source]#

Calculate the relative humidity.

Uses temperature and dewpoint to calculate relative humidity as the ratio of vapor pressure to saturation vapor pressures.

Parameters:
  • temperature (pint.Quantity) – Air temperature

  • dewpoint (pint.Quantity) – Dewpoint temperature

  • phase ({'liquid', 'solid', 'auto'}) – Where applicable, adjust assumptions and constants to make calculation valid in 'liquid' water (default) or 'solid' ice regimes. 'auto' will change regime based on determination of phase boundaries, eg temperature relative to freezing.

Returns:

pint.Quantity – Relative humidity

Examples

>>> from metpy.calc import relative_humidity_from_dewpoint
>>> from metpy.units import units
>>> relative_humidity_from_dewpoint(25 * units.degC, 12 * units.degC).to('percent')
<Quantity(44.2998365, 'percent')>

Notes

\[RH = \frac{e(T_d)}{e_s(T)}\]

Changed in version 1.0: Renamed dewpt parameter to dewpoint

Examples using metpy.calc.relative_humidity_from_dewpoint#

Hydrostatic Thickness

Hydrostatic Thickness

Sounding Calculation Examples

Sounding Calculation Examples