aiqclib.nrtqc.step3_concat_flags package
Submodules
aiqclib.nrtqc.step3_concat_flags.concat_base module
This module provides the ConcatFlagsBase class, the core of the NRT QC module’s step 3: aggregating the per-item flag columns into a final NRT flag per variable and writing the module’s output.
For each configured variable, the final {variable}_nrt_flag is the
most severe flag among that variable’s item columns plus the profile-level
(variable-independent) item columns. The deferred temperature-to-salinity
propagation item runs afterwards, on the aggregated temperature flag, and
raises the salinity flag where needed. The output parquet holds all
original input columns, every item column, and the final NRT flags.
- class aiqclib.nrtqc.step3_concat_flags.concat_base.ConcatFlagsBase(config, qc_data=None)[source]
Bases:
DataSetBaseBase class for aggregating QC item flags (step
"concat").Takes the flag frame produced by step 2 and computes the final
{variable}_nrt_flagcolumns, applying the deferred propagation items (e.g.temp_to_psal) last. The result is stored inmerged_dataand written bywrite_merged_data().- Parameters:
config (ConfigBase)
qc_data (DataFrame | None)
- concat_flags()[source]
Compute the final NRT flag per variable and apply propagation.
For every configured variable,
{variable}_nrt_flagis the most severe flag among its applicable item columns (or good when no item produced a column for it). Deferred propagation items run last, on the aggregated flags.- Raises:
ValueError – If
qc_datais empty.- Return type:
None
- default_file_name: str
The default name for the final output file.
- merged_data: DataFrame | None
input columns, item columns, and NRT flags.
- Type:
The final frame
- output_file_name: str
The resolved output path for the final output file.
- write_merged_data()[source]
Write the final output frame to a Parquet file.
- Raises:
ValueError – If
merged_datais empty, indicating the flags have not been aggregated.- Return type:
None
aiqclib.nrtqc.step3_concat_flags.dataset_all module
This module defines the ConcatDataSetAll class, the concrete implementation of the NRT QC module’s step 3 (flag aggregation and output) for Copernicus CTD data.
- class aiqclib.nrtqc.step3_concat_flags.dataset_all.ConcatDataSetAll(config, qc_data=None)[source]
Bases:
ConcatFlagsBaseA specialized implementation of
aiqclib.nrtqc.step3_concat_flags.concat_base.ConcatFlagsBasethat aggregates the QC item flags of all observations.- Variables:
expected_class_name (str) – The class identifier used for configuration matching.
- Parameters:
config (ConfigBase)
qc_data (DataFrame | None)
- expected_class_name: str = 'ConcatDataSetAll'