- ctdfjorder.CTD.CTD.add_dynamic_height(self, p_ref: float | ndarray = 0) None#
Calculates and adds dynamic height anomaly to the CTD data using the TEOS-10 formula.
This method computes the dynamic height anomaly, which represents the geostrophic streamfunction that indicates the difference in horizontal velocity between the pressure at the measurement point (p) and a reference pressure (p_ref).
- Raises:
NoSamplesError – When the function is called on a CTD object with no data.
- Parameters:
p_ref (Union[float, np.ndarray], optional) – Reference pressure, in dbar. The default is 0 dbar, corresponding to the sea surface.
Notes
The gsw.geo_strf_dyn_height 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.
Examples
ctd_data = CTD('example.csv') ctd_data.add_dynamic_height() # This will add a new column with dynamic height values to the dataset, calculated using the TEOS-10 formula.