Skip to content

fix(esa-cci-lc): use the CF method area: mean in cell_methods - #25

Merged
turban merged 1 commit into
mainfrom
fix/cf-cell-methods-names
Oct 20, 2026
Merged

turban merged 1 commit into
mainfrom
fix/cf-cell-methods-names

Conversation

@turban

@turban turban commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

The ESA CCI land cover fraction template set cell_methods to area: fraction, which is not a CF method, so CF-aware readers do not understand it. Each value is the share of a cell's observed pixels in a class group, which is a mean of a 1/0 indicator over the area: area: mean.

A new test in tests/test_discovery.py checks that every template's cell_methods uses CF method names. It fails on the old value. OCS core has the same check for its built-in templates since PR #484 (CLIM-1484).

Existing stores keep the old value until re-ingested.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused metadata correction and regression check have no identified blocking issues; tests were not executed.

No open issues 🎉

What changed in this PR

Corrects ESA CCI land-cover metadata so CF-aware readers can interpret the fraction values.

Changes:

  • Replaces area: fraction with area: mean.
  • Adds a regression check for CF method names across templates.
File Description
tests/​test_discovery.py Validates template cell_methods against CF method names.
ocs_plugins/​rasters/​esa_cci_lc.yaml Uses area: mean for land-cover fractions.

Review effort: Balanced

@turban
turban merged commit 1b3ea4c into main Oct 20, 2026
2 checks passed
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.

2 participants