ctdfjorder.CTD.CTD.add_n_squared(self) None#

Calculates buoyancy frequency squared and adds it to the CTD data. Requires potential density to be calculated first.

Raises:
  • NoSamplesError – When the function is called on a CTD object with no data.

  • ValueError – When buoyancy frequency could not be calculated because of malformed data.

Notes

This method computes the buoyancy frequency squared (also known as the Brunt-Väisälä frequency squared) for each profile in the dataset using the TEOS-10 standard. This parameter is essential for understanding the stability of the water column and its propensity to mix vertically.

The procedure is as follows:

  1. Initialize new columns for buoyancy frequency squared and the mid-pressure values in the dataset.

  2. For each unique profile identified by profile_id, extract the profile’s data.

  3. Use the gsw.Nsquared function to compute buoyancy frequency squared and mid-pressure values from absolute salinity, conservative temperature, pressure, and latitude.

  4. Update the profile with the computed buoyancy frequency squared and mid-pressure values.

  5. Reintegration of the updated profile into the main dataset.

The gsw.Nsquared function from the Gibbs SeaWater (GSW) Oceanographic Toolbox is utilized for this calculation. More information about this function can be found at the TEOS-10 website.

The buoyancy frequency squared \(( N^2 )\) is calculated using the formula:

\[N_2 = g_2 \cdot \frac{\beta \cdot d(SA) - \alpha \cdot d(CT)}{\text{specvol_local} \cdot dP}\]

This routine uses rho from “gsw_specvol”, which is the computationally efficient 75-term expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Note also that the pressure increment, dP, in the above formula is in Pa, so that it is 104 times the pressure increment dp in dbar.

Examples

ctd_data = CTD('example.csv')
ctd_data.add_brunt_vaisala_squared()
# This will add new columns with buoyancy frequency squared values and mid-pressure values to the dataset,
# calculated using the TEOS-10 formula.

See also

gsw.Nsquared

Function used for the calculation of buoyancy frequency squared.