specific_humidity_from_dewpoint#
- metpy.calc.specific_humidity_from_dewpoint(pressure, dewpoint)[source]#
Calculate the specific humidity from the dewpoint temperature and pressure.
- Parameters:
pressure (
pint.Quantity
) – Pressuredewpoint (
pint.Quantity
) – Dewpoint temperature
- Returns:
pint.Quantity
– Specific humidity
Examples
>>> from metpy.calc import specific_humidity_from_dewpoint >>> from metpy.units import units >>> specific_humidity_from_dewpoint(988 * units.hPa, 15 * units.degC).to('g/kg') <Quantity(10.7975828, 'gram / kilogram')>
Changed in version 1.0: Changed signature from
(dewpoint, pressure)
See also