pcmdi_metrics.variability_mode.eof_classification
- pcmdi_metrics.variability_mode.eof_classification(ea_ctrl_file=None, sca_ctrl_file=None, eof_globs=None, kmeans_centers_file=None, output_root=None)[source]
Classify model EOFs as East Atlantic (EA) or Scandinavian (SCA) patterns.
All parameters are optional. When None, they fall back to the CONFIG defaults at the top of this module. This allows the function to be called with no arguments (standalone use) or with explicit paths (programmatic use from PMP or other frameworks).
- Parameters:
ea_ctrl_file (
strorNone) – Path to the EA control pattern netCDF file.sca_ctrl_file (
strorNone) – Path to the SCA control pattern netCDF file.eof_globs (
dictorNone) – Dictionary mapping EOF number to glob pattern, e.g. {2: “/path/to/EOF2_*.nc”, 3: “/path/to/EOF3_*.nc”, 4: “/path/to/EOF4_*.nc”}.kmeans_centers_file (
strorNone) – Path to pre-computed k-means cluster centers JSON file. If the file exists, saved centers are applied. If it does not exist, k-means trains from the full ensemble and saves centers to this path (requires scikit-learn).output_root (
strorNone) – Prefix for output filenames (produces {output_root}_consensus.tsv and {output_root}_consensus.txt).
- Returns:
dict– Consensus results keyed by model name, with per-EOF classification labels, confidences, and quality flags.