static_stability#
- metpy.calc.static_stability(pressure, temperature, vertical_dim=0)#
Calculate the static stability within a vertical profile.
\[\sigma = -\frac{RT}{p} \frac{\partial \ln \theta}{\partial p}\]This formula is based on equation 4.3.6 in [Bluestein1992].
- Parameters:
pressure (
pint.Quantity
) – Profile of atmospheric pressuretemperature (
pint.Quantity
) – Profile of temperaturevertical_dim (int, optional) – The axis corresponding to vertical in the pressure and temperature arrays, defaults to 0.
- Returns:
pint.Quantity
– The profile of static stability
Examples
>>> from metpy.calc import static_stability >>> from metpy.units import units >>> # pressure >>> p = [1008., 1000., 950., 900., 850., 800., 750., 700., 650., 600., ... 550., 500., 450., 400., 350., 300., 250., 200., ... 175., 150., 125., 100., 80., 70., 60., 50., ... 40., 30., 25., 20.] * units.hPa >>> # temperature >>> T = [29.3, 28.1, 23.5, 20.9, 18.4, 15.9, 13.1, 10.1, 6.7, 3.1, ... -0.5, -4.5, -9.0, -14.8, -21.5, -29.7, -40.0, -52.4, ... -59.2, -66.5, -74.1, -78.5, -76.0, -71.6, -66.7, -61.3, ... -56.3, -51.7, -50.7, -47.5] * units.degC >>> # Static Stability Parameter >>> static_stability(p, T).to('m^2 s^-2 Pa^-2') <Quantity([-2.06389302e-06 -1.60051176e-06 5.29948840e-07 1.35399713e-06 1.62475780e-06 1.80616992e-06 1.95909329e-06 2.12257341e-06 2.35051280e-06 2.86326649e-06 3.44288781e-06 3.95797199e-06 4.15532473e-06 4.32460872e-06 4.70381191e-06 4.60700187e-06 4.80962228e-06 7.72162917e-06 1.13637163e-05 1.89412484e-05 5.12162481e-05 1.59883754e-04 3.74228296e-04 5.30145977e-04 7.20889325e-04 1.00335001e-03 1.48043778e-03 2.32777913e-03 3.43878993e-03 5.74908298e-03], 'meter ** 2 / pascal ** 2 / second ** 2')>
Changed in version 1.0: Renamed
axis
parametervertical_dim
Examples using metpy.calc.static_stability
#
Static Stability