brunt_vaisala_period#
- metpy.calc.brunt_vaisala_period(height, potential_temperature, vertical_dim=0)[source]#
Calculate the Brunt-Vaisala period.
This function is a helper function for
brunt_vaisala_frequency
that calculates the period of oscillation as in Exercise 3.13 of [Hobbs2006]:\[\tau = \frac{2\pi}{N}\]Returns NaN when \(N^2 > 0\).
- 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
– Brunt-Vaisala period. 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