mixsea.nsq.nsqfcn
- mixsea.nsq.nsqfcn(s, t, p, p0, dp, lon, lat)[source]
Calculate square of buoyancy frequency [rad/s]^2 for profile of temperature, salinity and pressure.
- The Function: (1) low-pass filters t,s,p over dp,
linearly interpolates t and s onto pressures, p0, p0+dp, p0+2dp, ….,
computes upper and lower potential densities at p0+dp/2, p0+3dp/2,…,
converts differences in potential density into nsq
returns NaNs if the filtered pressure is not monotonic.
If you want to have the buoyancy frequency in [cyc/s] then calculate sqrt(n2)./(2*pi). For the period in [s] do sqrt(n2).*2.*pi
Adapted from Gregg and Alford.
Gunnar Voet gvoet@ucsd.edu
- Parameters:
s (float) – Salinity
t (float) – In-situ temperature
p (float) – Pressures
p0 (float) – Lower bound (start) pressure for output values (not important…)
dp (float) – Pressure interval of output data
lon (float) – Longitude of observation
lat (float) – Latitude of observation
- Returns:
n2 (Buoyancy frequency squared in (rad/s)^2)
pout (Pressure vector for n2)