Steps#
Steps are the individual operations that make up a pipeline. They are executed in the order they appear in your configuration file. Each step can be customised with parameters to suit your specific dataset.
A step is defined in Python and configured through the pipeline config file. Examples include:
I/O steps — e.g. reading in data with Load OG1.
Variable processing steps — e.g. adjusting existing salinity measurements with the Salinity Adjustment step.
Steps are not limited to one per file — a single module can define multiple steps — and any step can be called multiple times within a single config.
Some steps can filter out bad data before processing, using the QC handling mechanism. The pipeline preserves the original dataset dimensions, so filtered data is either replaced or reinserted once the step completes. For how to build a step with this behaviour, see Contributing to pelagos-py.
Raw and Adjusted Variables#
Correction steps never overwrite variables loaded from the input file. A step that changes the values of an existing variable, such as CHLA, writes the result to CHLA_ADJUSTED instead, and every variable keeps its own QC column (CHLA_QC and CHLA_ADJUSTED_QC). The derived CTD variables (PSAL, ASAL, CONS_TEMP, DENSITY and DEPTH) are always written with the _ADJUSTED suffix, so a value shipped in the file stays alongside the one the pipeline computed. The final oxygen product is DOXY_ADJUSTED. Two steps do change a variable in place: Interpolate Data fills gaps in the variables it is given (in the default config only LATITUDE and LONGITUDE), and BBP from Beta overwrites its input when apply_to and output_as are the same.
Measured variables keep values only on the rows their sensor sampled. Only the coordinates are filled onto every row and flagged interpolated (8): LATITUDE/LONGITUDE by Interpolate Data, and DEPTH_ADJUSTED, derived from PRES by Derive CTD (to_derive: [DEPTH]). A step that needs another sensor’s values on its own rows (e.g. oxygen or BBP needing TEMP and PSAL) interpolates them internally and does not save them.
Steps and QC tests read the _ADJUSTED version of a variable when it exists, and the raw one otherwise. This means a config can name PSAL and still use PSAL_ADJUSTED once a step has produced it, and corrections stack: a second correction of CHLA is applied to CHLA_ADJUSTED. Because of this the order of the steps matters. Before running, the pipeline warns when a step reads a raw variable whose _ADJUSTED version is only produced by a later step, and when a config names an _ADJUSTED variable that will not exist yet, so the raw one is used instead.
Some steps make working variables along the way, for example the intermediate stages of the oxygen processing. Data Export leaves these out of the exported file unless include_intermediates: true is set.
Input and Output Steps#
Loading, preparing, checking and exporting data.
Load OG1: Loads an OG1 NetCDF file and removes records outside the deployment time window (see user guide).
Prepare OG1: Normalises a loaded file’s variable names and units onto what the other steps expect.
Format Checker: Runs the IOOS compliance checker on the file and reports the result.
Correct Values: Applies a linear correction (slope and intercept) to a variable, e.g. a cross-calibration, unit conversion or rename (see user guide).
Data Export: Saves the processed dataset to file.
Write Data Report: Writes a PDF report summarising the data, plots and QC at the end of a pipeline.
Generate Data: Generates random synthetic data for development and testing.
General Processing Steps#
Steps that are not tied to one sensor.
Apply QC: Runs one or more QC tests and merges their flags (see Quality Control).
Derive CTD: Derives depth, practical and absolute salinity, conservative temperature and density with TEOS-10 (see user guide).
Find Profiles: Labels each sample with an OG1 phase and numbers profiles and dive cycles (see user guide).
Interpolate Data: Fills short gaps in variables by linear interpolation in time (see user guide).
Mixed Layer Depth: Calculates the mixed layer depth of each profile with a density or temperature threshold (see user guide).
Deep Correction: Subtracts a deep dark offset from a profile variable (e.g. chlorophyll fluorescence) (see user guide).
Variable-specific Steps#
Salinity
Salinity Adjustment: Corrects the conductivity-temperature lag and thermal-mass error, and derives
PSAL_ADJUSTED(see user guide).
Oxygen (all in the oxygen module; see the user guide)
Derive Uncalibrated Phase: Derives the optode’s uncalibrated phase from the blue (and red) phase.
Derive Optode Temperature: Derives optode temperature from its temperature voltage.
Phase Pressure Correction: Corrects the uncalibrated phase for pressure.
Shift Oxygen To CTD: Time-shifts optode measurements onto the CTD sampling, correcting for the sensors’ separation.
Derive Calibrated Phase: Derives the calibrated phase from the uncalibrated phase.
Derive Oxygen Concentration: Converts calibrated phase to molar oxygen concentration.
Molar DOXY Salinity Correction: Corrects molar oxygen for salinity.
Molar DOXY Pressure Correction: Corrects molar oxygen for pressure.
Derive DOXY: Converts molar oxygen (µmol/L) to
DOXY_ADJUSTED(µmol/kg).
PAR
Interpolate PAR: Derives the euphotic depth (
ZEU) and iPAR isolume depth (Z_IPAR) per profile (see user guide).
Chlorophyll-a
CHLA Quenching: Corrects non-photochemical quenching of chlorophyll fluorescence (see user guide).
Backscatter (both in the bbp module; see the user guide)
BBP from Beta: Converts measured beta backscatter to the particulate backscattering coefficient (BBP).
Isolate BBP Spikes: Splits a backscatter record into a smooth baseline and isolated spikes.
Quality Control (QC)#
Quality Control is handled differently from other steps. Rather than performing a single calculation, the Apply QC step acts as a manager for multiple sub-steps called QC.
When you add Apply QC to your configuration, you define a list of QC (such as range checks or spike tests) within its parameters. This step is responsible for:
Running QC: Executing individual quality checks on your variables.
Merging Flags: Combining results from multiple QC into a single QC column using standardised Argo flagging logic.
Diagnostics: Generating visualisations to show which data points were flagged and why.
For a full list of available QC and how to configure them, please refer to the Quality Control page.