src.toolbox.steps.custom.derive_ctd#
Classes#
A processing step class for deriving oceanographic variables from CTD data. |
Module Contents#
- class src.toolbox.steps.custom.derive_ctd.DeriveCTDVariables[source]#
Bases:
toolbox.steps.base_step.BaseStep,toolbox.utils.qc_handling.QCHandlingMixinA processing step class for deriving oceanographic variables from CTD data.
This class processes Conductivity, Temperature, and Depth (CTD) data to derive additional oceanographic variables such as salinity, density, and depth using the Gibbs SeaWater (GSW) Oceanographic Toolbox functions.
Inherits from BaseStep and processes data stored in the context dictionary.
- Attributes:
step_name (str): Identifier for this processing step (“Derive CTD”)
- run()[source]#
Execute the CTD variable derivation process. The following variables are required: [“TIME”, “LATITUDE”, “LONGITUDE”, “CNDC”, “PRES”, “TEMP”]
This method performs the following operations: 1. Validates that data exists in the context 2. Applies unit conversions to raw measurements 3. Optionally interpolates missing position data 4. Derives oceanographic variables using GSW functions 5. Adds metadata to derived variables 6. Updates the context with processed data
- Returns:
dict: Updated context dictionary containing original and derived variables
- Raises:
ValueError: If no data is found in the context