Climate-REF / Climate-REF/climate-ref

ERA-5 obs4MIPs `grid` facet disagrees with the regridded filename in PMP annual-cycle catalogs

Open
#758 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
14
Avg merge
1d 10h
Merged PRs (30d)
36

Description

### Summary

The obs4MIPs ERA-5 surface-temperature reference used by the PMP annual-cycle diagnostic carries a `grid` facet that disagrees with the resolution encoded in its own filename. The catalog entry advertises three different resolution signals for the same file:

- `filename: ts_mon_ERA-5_PCMDI_gr_198101-200412_AC_v20250224_2.5x2.5.nc` (suggests **2.5x2.5**)
- `grid: 1.5x1.5 degree latitude x longitude` (says **1.5x1.5**)
- `nominal_resolution: 100 km` and `instance_id: obs4MIPs.obs4MIPs.ECMWF.ERA-5.mon.ts.100km.gn.v20250224` (say **~100 km / ~1 degree**)

### Locations

- `packages/climate-ref-pmp/tests/test-data/annual-cycle/cmip6-ts/catalog.yaml`
- `packages/climate-ref-pmp/tests/test-data/annual-cycle/cmip7-ts/catalog.yaml`

Both reference the same ERA-5 annual-cycle file, so both share the discrepancy.

### Likely cause

The `grid` / `nominal_resolution` facets are most likely populated from the obs4MIPs source netCDF global attributes (describing the native product), while the `_2.5x2.5` filename suffix reflects a PMP regrid step applied for the annual-cycle comparison. If so, the facet describes the source grid while the file on disk is the regridded one.

### Why it matters

`grid` and `nominal_resolution` are user-facing dataset facets. When they disagree with the file they describe, downstream consumers (and reviewers) can be misled about what was actually evaluated. Impact on the regression baselines themselves is low — the catalog is recorded input provenance, not a compared artefact — so this is metadata-correctness rather than a test failure.

### Suggested investigation

- Confirm how REF derives the `grid` / `nominal_resolution` facets during obs4MIPs ingest (source attributes vs on-disk grid).
- Decide whether `grid` should reflect the actual (regridded) grid of the file, or whether the regridded reference should not carry the source product's grid metadata at all.
- Apply the fix at ingest so it propagates to all obs4MIPs references, not just these two fixtures.

Surfaced by CodeRabbit on #756 (catalog.yaml:19).

Contributor guide

Open the contributing guide

Research direction

Compare the ERA-5 entry in packages/climate-ref-pmp/tests/test-data/annual-cycle/cmip6-ts/catalog.yaml and cmip7-ts/catalog.yaml, then trace how REF's obs4MIPs ingest populates the grid and nominal_resolution facets. Determine whether those facets should describe the regridded file or the source product; done means the ingest handles this consistently and the catalog no longer reports conflicting resolution metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.