scale_height#
- metpy.calc.scale_height(temperature_bottom, temperature_top)[source]#
Calculate the scale height of a layer.
\[H = \frac{R_d \overline{T}}{g}\]This function assumes dry air, but can be used with the virtual temperature to account for moisture.
- Parameters:
temperature_bottom (
pint.Quantity
) – Temperature at bottom of layertemperature_top (
pint.Quantity
) – Temperature at top of layer
- Returns:
pint.Quantity
– Scale height of layer
Examples
>>> from metpy.calc import scale_height >>> from metpy.units import units >>> scale_height(20 * units.degC, -50 * units.degC) <Quantity(7556.2307, 'meter')>