brunt_vaisala_frequency_squared#
- metpy.calc.brunt_vaisala_frequency_squared(height, potential_temperature, vertical_dim=0)#
Calculate the square of the Brunt-Vaisala frequency.
Brunt-Vaisala frequency squared (a measure of atmospheric stability) is given by the formula:
\[N^2 = \frac{g}{\theta} \frac{d\theta}{dz}\]This formula is based off of Equations 3.75 and 3.77 in [Hobbs2006].
- Parameters
height (
xarray.DataArray
orpint.Quantity
) – Atmospheric (geopotential) heightpotential_temperature (
xarray.DataArray
orpint.Quantity
) – Atmospheric potential temperaturevertical_dim (int, optional) – The axis corresponding to vertical in the potential temperature array, defaults to 0, unless height and
potential_temperature
given asxarray.DataArray
, in which case it is automatically determined from the coordinate metadata.
- Returns
pint.Quantity
orxarray.DataArray
– The square of the Brunt-Vaisala frequency. Given aspint.Quantity
, unless both height andpotential_temperature
arguments are given asxarray.DataArray
, in which case will bexarray.DataArray
.
Changed in version 1.0: Renamed
heights
,axis
parameters toheight
,vertical_dim