mixsea.nsq.adiabatic_leveling
- mixsea.nsq.adiabatic_leveling(P, S, T, lon, lat, bin_width=100.0, order=1, return_diagnostics=False, cap=None)[source]
Generate smooth buoyancy frequency profile by adiabatic leveling.
- Parameters:
P (1-D ndarray) – Pressure [dbar]
S (1-D ndarray) – Practical salinity [-]
T (1-D ndarray) – Temperature [degrees C]
lon (float) – Longitude [-180…+360]
lat (float) – Latitude [-90…+90]
bin_width (float, optional) – Pressure bin width [dbar]
order (int, optional) – Degree of polynomial fit.
return_diagnostics (bool, optional) – Flag to return additional argument pcoefs. False by default.
cap ({None, ‘left’, ‘right’, ‘both’}, optional) – Flag to change proceedure at ends of array where bins may be partially filled. None by default, meaning they are included. Can also specify ‘left’, ‘right’ or ‘both’ to cap method before partial bins.
- Returns:
N2_ref (1-D ndarray) – Reference buoyancy frequency [s-2]
pcoefs (2-D ndarray) – Fitting coefficients, returned only when the flag return_diagnostics is set True.
Notes
Based on method of Bray and Fofonoff (1981) [1].