Skip to content

Feature/global trends figs: global_trends trend-fields figure + teleconnections HadISST SST reference - #54

Open
armellereca wants to merge 4 commits into
mainfrom
feature/global-trends-figs
Open

Feature/global trends figs: global_trends trend-fields figure + teleconnections HadISST SST reference#54
armellereca wants to merge 4 commits into
mainfrom
feature/global-trends-figs

Conversation

@armellereca

Copy link
Copy Markdown
Collaborator

Summary

Two independent diagnostic improvements for the EERIE/CMIP6 evaluation:

  1. global_trends: add an absolute trend-fields figure alongside the existing trend-difference figure.
  2. teleconnections: use HadISST as the SST reference for the SST-based variability modes (ENSO, IOD, PDO), replacing ESA-CCI whose file only spans 1990–2014.

1. Global trends — absolute trend fields

The global_trends diagnostic previously produced only the observed trend plus model−obs trend difference panels per variable/period. It now also emits a second figure, {var}_{period}_trend_fields, showing the observed trend and each simulated trend field directly on a shared symmetric colorbar (no differencing), so absolute warming/cooling and precipitation-change patterns can be compared side by side.

  • Reuses already-computed field data (model annual_regrid/seasonal_regrids, benchmark MMM and individual CMIP6 regrids) and the shared field colorbar range — no extra computation.
  • Obs panel label is now derived from var_info.obs_dataset instead of hardcoded ERA5.
  • run()'s skip-existing check covers both combined and fields figure ids.
  • LLM figure-type prompt updated to describe both trend-map variants so Gemini interprets the new panels correctly.
  • The website renders the new figures automatically (it collects PNGs generically and groups by the group metadata field) — no template changes needed.

2. Teleconnections — HadISST SST reference

The SST-based teleconnection indices (ENSO Niño 3.4, IOD, PDO) loaded their obs reference from tos → ESA-CCI, whose configured file only spans 1990–2014. Against models running from 1980 this left the observed ENSO index empty before ~1990, and the panel — hardcoded as "ERA5" — was actually ESA-CCI.

  • Added an optional obs_dataset/obs_variable override to ModeDefinition and pointed the three SST modes at HadISST (HADISST/sst, full 1870–present record). Non-SST modes (SLP/wind) already resolve to ERA5 and are unchanged.
  • Added a per-mode obs_label so the observation panel, spectrum legend, seasonal-variance legend, pattern panel, and metadata stats keys all read "HadISST" for SST modes and "ERA5" for the rest.
  • Fill-value masking: HadISST flags land/sea-ice cells with sentinel values (-1000.0, -1e30). These are masked to NaN right after loading the override so they cannot corrupt Niño/IOD box means or the PDO North-Pacific EOF. Both EOF paths already drop non-finite columns and box means skip NaN, so the change is safe downstream.
  • Deseasonalised anomalies are unit-invariant, so K-vs-K needs no conversion.

Tests

  • global_trends: updated figure-count assertions (5 → 10 per variable), skip-existing pre-creation, and the summary-stats filter.
  • teleconnections: added a load() method to the mock obs loader, registry assertions for the HadISST override + labels, and a fill-value masking test.
  • All tests/test_global_trends.py (107) and tests/test_teleconnections.py (69) pass.

Regeneration

Full-resolution runs — execute in a compute environment, not the login node:

feather --config configs/eerie_all_members_cmip6_highresmip.yaml \
  --diagnostics global_trends teleconnections --benchmarks CMIP6 \
  --steps diagnostics -v

🤖 Generated with Claude Code

Armelle Reca Cabase Remedio and others added 4 commits July 22, 2026 17:43
The global_trends diagnostic previously produced only the observed trend
plus model-obs trend *difference* panels per variable/period. Add a second
figure ({var}_{period}_trend_fields) rendering the observed trend and each
simulated trend field directly on a shared symmetric colorbar (no
differencing), so absolute warming/cooling and precipitation-change
patterns can be compared side by side.

- Reuses already-computed field data (model annual_regrid/seasonal_regrids,
  benchmark MMM and individual CMIP6 regrids) and the shared field colorbar
  range — no extra computation.
- Obs panel label now derived from var_info.obs_dataset instead of hardcoded
  ERA5.
- run() skip-existing check expects both combined and fields figure ids.
- LLM figure-type prompt updated to describe both trend-map variants.
- Tests updated for the new figure count (5 -> 10 per variable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SST-based teleconnection indices (ENSO Nino 3.4, IOD, PDO) loaded
their obs reference from tos -> ESA-CCI, whose configured file only spans
1990-2014. Against models running from 1980 this left the observed ENSO
index empty before ~1990, and the panel — hardcoded as "ERA5" — was
actually ESA-CCI.

Add an optional obs_dataset/obs_variable override to ModeDefinition and
point the three SST modes at ERA5 sst (full 1940-2024 record, already
configured). This fills the pre-1990 gap and makes the "ERA5" label
truthful. Deseasonalised anomalies are unit-invariant, so K-vs-K needs no
conversion. Non-SST modes (SLP/wind) already resolve to ERA5 and are
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
HadISST provides a long, homogeneous SST record (1870-present) better
suited to variability-mode analysis than ERA5 SST. Point the ENSO/IOD/PDO
obs override at HADISST/sst and add a per-mode obs_label so the observation
panel, spectrum, seasonal-variance legend, pattern panel, and metadata
stats keys all read "HadISST" for SST modes while non-SST modes keep
"ERA5". Fixes the pre-1990 gap that ESA-CCI (1990-2014 only) left in the
observed ENSO index.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
HadISST flags land/sea-ice cells with sentinel fill values (-1000.0,
-1e30). Mask any non-physical SST to NaN right after loading the obs
override so sentinels cannot corrupt Nino/IOD box means or the PDO
North-Pacific EOF. The mask window covers either °C or K storage. Both
EOF paths already drop non-finite columns and box means skip NaN, so the
change is safe downstream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@armellereca
armellereca requested a review from koldunovn July 23, 2026 06:30
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