Stability
Vertical stability functions.
These work with ndarrays of profiles; use the axis keyword argument to specify the axis along which pressure varies. For example, the default, following the Matlab versions, is axis=0, meaning the pressure varies along the first dimension. Use axis=-1 if pressure varies along the last dimension–that is, along a row, as the column index increases, in the 2-D case.
Docstrings will be added later, either manually or via an automated mechanism.
- gsw.stability.IPV_vs_fNsquared_ratio(SA, CT, p, p_ref=0, axis=0)[source]
Calculates the ratio of the vertical gradient of potential density to the vertical gradient of locally-referenced potential density. This is also the ratio of the planetary Isopycnal Potential Vorticity (IPV) to f times N^2, hence the name for this variable, IPV_vs_fNsquared_ratio (see Eqn. (3.20.17) of IOC et al. (2010)).
- Parameters
- SAarray-like
Absolute Salinity, g/kg
- tarray-like
In-situ temperature (ITS-90), degrees C
- parray-like
Sea pressure (absolute pressure minus 10.1325 dbar), dbar
- p_reffloat
Reference pressure, dbar
- Returns
- IPV_vs_fNsquared_ratioarray
The ratio of the vertical gradient of potential density referenced to p_ref, to the vertical gradient of locally-referenced potential density, dimensionless.
- p_midarray
Pressure at midpoints of p, dbar. The array shape matches IPV_vs_fNsquared_ratio.
- gsw.stability.Nsquared(SA, CT, p, lat=None, axis=0)[source]
Calculate the square of the buoyancy frequency.
- Parameters
- SAarray-like
Absolute Salinity, g/kg
- CTarray-like
Conservative Temperature (ITS-90), degrees C
- parray-like
Sea pressure (absolute pressure minus 10.1325 dbar), dbar
- latarray-like, 1-D, optional
Latitude, degrees.
- axisint, optional
The dimension along which pressure increases.
- Returns
- N2array
Buoyancy frequency-squared at pressure midpoints, 1/s^2. The shape along the pressure axis dimension is one less than that of the inputs. (Frequency N is in radians per second.)
- p_midarray
Pressure at midpoints of p, dbar. The array shape matches N2.
- gsw.stability.Turner_Rsubrho(SA, CT, p, axis=0)[source]
Calculate the Turner Angle and the Stability Ratio.
- Parameters
- SAarray-like
Absolute Salinity, g/kg
- CTarray-like
Conservative Temperature (ITS-90), degrees C
- parray-like
Sea pressure (absolute pressure minus 10.1325 dbar), dbar
- axisint, optional
The dimension along which pressure increases.
- Returns
- Tuarray
Turner Angle at pressure midpoints, degrees. The shape along the pressure axis dimension is one less than that of the inputs.
- Rsubrhoarray
Stability Ratio, dimensionless. The shape matches Tu.
- p_midarray
Pressure at midpoints of p, dbar. The array shape matches Tu.