ctdfjorder.CTD.CTD.add_potential_temperature(self, p_ref: float | ndarray = 0) None#

Calculates and adds potential temperature to the CTD data using the TEOS-10 formula.

This method computes the potential temperature of seawater, which is the temperature a parcel of water would have if moved adiabatically to the sea surface pressure.

Raises:

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

Notes

The gsw.pt_from_t 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.

This method adds a new column for potential temperature in the dataset.

Examples

ctd_data = CTD('example.csv')
ctd_data.add_potential_temperature()
# This will add a new column with potential temperature values to the dataset, calculated using the TEOS-10 formula.