Quality Control#
Quality control (QC) are sub-steps run within the Apply QC process. These do not modify your data values: they update a corresponding QC column (e.g. TEMP_QC) to indicate the reliability of each measurement.
Every QC check is run through the Apply QC step, which transfers the individual results onto the existing QC columns. A given check can only be called once per Apply QC, but you can include multiple Apply QC steps in a single config.
QC checks come in two types:
Static checks always operate on the same variable(s) and produce the same QC outputs — e.g. Impossible Date always checks
TIME.Dynamic checks let the user choose which variables they apply to, so the QC output is not pre-determined — e.g. Range and Stuck Value.
To add your own QC check, see Extending pelagos_py.
The pelagos_py follows the standardised Argo flagging system:
0: No QC performed.
1: Good data.
2: Probably good data.
3: Probably bad data (potentially correctable).
4: Bad data (not correctable).
9: Missing value.
Configuration#
QC os defined inside the qc_settings block of the Apply QC step. You can specify parameters for each QC, such as thresholds or which variables to target.
- name: "Apply QC"
parameters:
qc_settings:
"range qc":
variable_ranges: {"TEMP": {4: [-2, 35, "outside"]}}
also_flag: {"TEMP": ["CNDC"]}
Available QC#
Spatiotemporal Checks#
These verify that the data was collected at a logical time and place.
Impossible Date: Checks that the timestamps fall within a realistic range (typically from 1985 to the present day).
Impossible Location: Verifies that latitude and longitude coordinates are within global bounds.
Impossible Speed: Calculates the velocity between points to ensure the platform is not moving at unphysical speeds.
Position on Land: Uses a bathymetry mask to check if coordinates incorrectly place the platform on land.
Range and Value Checks#
These identify data points that fall outside expected physical or sensor limits.
Range: Flags values by range, per variable. Each band carries an
inside/outsidekeyword:[low, high, "outside"]is a band of good values (data outside it is flagged), while[low, high, "inside"]is an impossible band (data within it is flagged). A flag may list several bands. If the keyword is omitted the bound order is the fallback (ascending → outside, descending → inside). A single scalar flags exact matches (e.g. fill values).Stuck Value: Identifies sensor “freezing” by looking for sequences of identical values where variation is expected.
Spike: Detects sudden, unrealistic jumps in data values between adjacent measurements.
PAR Irregularity: A specialised check for Photosynthetically Active Radiation sensors to identify inconsistent light readings.
Profile Integrity#
These assess the quality of a vertical profile as a whole.
Valid Profile: Ensures a profile contains enough data points or covers a sufficient depth range to be useful.
Flag Full Profile: If a certain percentage of points in a profile are flagged as bad, this qc can be configured to flag the entire profile.