moist_air_gas_constant#

metpy.calc.moist_air_gas_constant(specific_humidity)[source]#

Calculate R_m, the specific gas constant for a parcel of moist air.

Parameters:

specific_humidity (pint.Quantity)

Returns:

pint.Quantity – Specific gas constant

Examples

>>> from metpy.calc import moist_air_gas_constant
>>> from metpy.units import units
>>> moist_air_gas_constant(11 * units('g/kg'))
<Quantity(288.966723, 'joule / kelvin / kilogram')>

Notes

Adapted from

\[R_m = (1 - q_v) R_a + q_v R_v\]

Eq 16, [Romps2017] using MetPy-defined constants in place of cited values.