Skip to content

Power spectra plots#170

Draft
frazane wants to merge 1 commit into
mainfrom
feat/power-spectra
Draft

Power spectra plots#170
frazane wants to merge 1 commit into
mainfrom
feat/power-spectra

Conversation

@frazane

@frazane frazane commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Adds an optional power-spectra diagnostic to the experiment pipeline, so we can compare the effective resolution of model outputs against the truth and spot over-smoothing or spurious small-scale noise that point metrics like RMSE do not reveal.

The diagnostic computes 2D variance spectra (DCT by default, FFT optional) per participant and lead time, averages over initialisation times, and overlays each model against the truth with grid-resolution, effective-resolution and Nyquist reference lines.

What changed

  • New src/spectra package: numpy-only spectral core (DCT/FFT with variance-conserving normalisation and radial averaging), ICON native-to-regular regridding with runtime grid detection, plus field extraction and IO helpers.
  • Snakemake wiring (rules/spectra.smk): per-participant compute, aggregate over inits, overlay plot, gated behind an experiment target.
  • Config: new experiment.spectra section (enable flag, method, lead times, variables, optional init-hour subset) with validation and regenerated JSON schema.
  • Unit tests for the spectral core, regridding and IO.

Notes

  • Disabled by default; opt in with experiment.spectra.enabled: true.
  • ICON native grids are regridded to a regular grid before the transform; the eckit grid file is fetched automatically.

Example output, T_2M at +24h:

T_2M power spectrum at +24h

@frazane frazane changed the title add power-spectra QC diagnostic Power spectra plots Jun 5, 2026
@frazane frazane marked this pull request as draft June 5, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant