Skip to content

feat(ilamb): use obs4REF reference data for standard diagnostics#779

Open
lewisjared wants to merge 6 commits into
feat/obs4ref-ceda-datasetsfrom
feat/ilamb-obs4ref-references
Open

feat(ilamb): use obs4REF reference data for standard diagnostics#779
lewisjared wants to merge 6 commits into
feat/obs4ref-ceda-datasetsfrom
feat/ilamb-obs4ref-references

Conversation

@lewisjared

Copy link
Copy Markdown
Contributor

Summary

Points ten ILAMB standard diagnostics at their newly published obs4REF reference files instead of the legacy ilamb/iomb registry paths. Stacked on #778, which registers and uploads the underlying obs4REF data — merge that first.

Diagnostics rewired

Land (ilamb.yaml): gpp-WECANN (WECANN-1-0 v20250902), gpp-FLUXNET2015 (Fluxnet-2015-1-0), mrro-LORA (LORA-1-0), cSoil-HWSD2 (HWSD-2-0), nbp-Hoffman (Hoffman-1-0), snc-ESACCI (CCI-CryoClim-FSC-1), burntFractionAll-GFED (GFED-5-0). Ocean (iomb.yaml): thetao-WOA2023-surface and so-WOA2023-surface (WOA-23), amoc-RAPID (RAPID-2023-1a).

The bare-path form is used throughout because the obs4REF key parser (_parse_obs4ref_key) cannot yet parse the monC frequency (WOA-23 climatologies) or the single-year fx time range (HWSD cSoil), so the ingested obs_source: obs4ref dict form is not an option for those. Bare paths resolve directly against the concatenated obs4REF registry at execute time, matching the existing GPCP reference in emp-GLEAMGPCP2.3.

Two edits that are more than a path swap

burntFractionAll-GFED now reads the CMIP burntFractionAll variable directly and drops the burntArea alternate, because the obs4REF file carries burntFractionAll. amoc-RAPID switches its reference to the raw RAPID-2023-1a msftmz field and relies on the existing msftmz_to_rapid transform to derive the AMOC index, replacing the pre-derived legacy amoc file.

Versioning and baselines

ILAMBStandard.version is bumped 2 -> 3. This attribute is shared by every ILAMB diagnostic, so all ILAMB regression baselines (not only the ten rewired here) must be re-minted before the coupling gate passes.

Validation done

All obs4REF source keys resolve against the registry, all diagnostics construct, the ILAMB unit suite passes (28 passed), and ruff/mypy are clean. Not yet validated: an end-to-end run against the real reference data. amoc-RAPID in particular is unverified — it carries both the transform-semantics question above and the known upstream ilamb3 trim_time crash, and needs a real run to confirm. WOA-23 is a 2005-2022 monthly climatology replacing a 2005-2014 monthly field, which interacts with the surface-variable time-coverage handling in execute().

Point ten ILAMB standard diagnostics at their obs4REF reference files
instead of the legacy ilamb/iomb registry paths: gpp-WECANN,
gpp-FLUXNET2015, mrro-LORA, cSoil-HWSD2, nbp-Hoffman, snc-ESACCI and
burntFractionAll-GFED on land, plus thetao/so-WOA2023-surface and
amoc-RAPID in the ocean suite.

burntFractionAll-GFED now reads the CMIP burntFractionAll variable
directly rather than the legacy burntArea alternate, and amoc-RAPID
derives the AMOC index from the RAPID-2023-1a msftmz field through the
existing msftmz_to_rapid transform.

Bumps ILAMBStandard.version to 3: the reference change alters diagnostic
outputs, so the ILAMB regression baselines must be re-minted.
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 47e92c8c-6c59-49d9-ba72-2f834f00a14a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ilamb-obs4ref-references

Comment @coderabbitai help to get the list of available commands.

…er diagnostic

Replace the bare obs4REF registry paths with the ingested obs4MIPs data
requirement form, pinning each reference to a single file by
source_id + variable_id + grid_label + version. This routes the reference
through the obs4MIPs catalogue as a first-class dataset rather than a raw
registry key.

Loosen the obs4REF key parser to accept monthly-climatology (monC)
frequencies and single-year fixed-field (fx) time ranges so WOA-23 and
HWSD-2-0 files resolve.

Give each rewired diagnostic its own version (3) via a per-diagnostic
``version`` config key, so changing one diagnostic's reference data no
longer forces every ILAMB baseline to be re-minted; the untouched
diagnostics stay at version 2.

The esgf-catalog test fixture and solve-regression snapshots are
regenerated to include the newly ingested obs4REF reference datasets.
obs4REF is the REF-specific observational product and follows the same
metadata conventions as obs4MIPs, but its files carry
``activity_id = "obs4REF"``. The obs4MIPs adapter rejected them, so
obs4REF references could not be ingested and any diagnostic that requests
an obs4REF dataset as an obs4MIPs source solved to nothing.

Accept ``activity_id`` of either ``obs4MIPs`` or ``obs4REF`` so these
references ingest as first-class datasets.
…urce_id

The FLUXNET2015 obs4REF file spells its source_id three different ways
across the registry path (FLUXNET2015-1-0), the filename (Fluxnet-2015-1-0)
and the internal attribute (Fluxnet-2015), so the ingested facet form
cannot match both the fetch and solve stages. Reference it by exact
registry key until the upstream metadata is reconciled.
Add the nine ingested obs4REF reference datasets to the obs4MIPs test
catalogue and regenerate the ILAMB solve-regression snapshots so the
rewired diagnostics resolve their reference through the obs4MIPs
requirement.
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