Skip to content

Adding variable checks - #16

Merged
Ayoubnac1 merged 3 commits into
ESGF:developfrom
swarnaleem:master
Jun 26, 2026
Merged

Ayoubnac1 merged 3 commits into
ESGF:developfrom
swarnaleem:master

Conversation

@swarnaleem

Copy link
Copy Markdown
Contributor

This PR adds new variable checks from QC Checks Table that are not covered by the CF Conventions Checker.

JanStreffing and others added 3 commits June 5, 2026 11:45
The 1-D branch of check_bounds_shape required shape (N, 2), rejecting
FESOM2 / ICON / MPAS native output where lat(nod2) carries polygon-
vertex bounds lat_bnds(nod2, m). CF 1.11 §7.1 permits both layouts on
1-D coords. Relax to bvar.shape[1] >= 2; update the failure message.
Addresses @sol1105's review on PR ESGF#38. The 1-D branch now uses the
parent dimension as the discriminator: another 1-D coord sharing the
same dimension and declaring bounds means unstructured topology (allow
polygon vertices), otherwise it is a classic 1-D coord on its own
dimension and only interval bounds (N, 2) are valid.

Behaviour:
- FESOM2 / ICON / MPAS unstructured (lat(ncell) + lon(ncell), both with
  bounds): sibling clause triggers, polygon bounds (N, m>=2) accepted.
- Regular grid lat(lat) with malformed lat_bnds(lat, 3): no sibling on
  dim 'lat', strict branch applies, flagged.
- 2-D curvilinear: unchanged, handled by the existing ndim >= 2 branch.
- Lone 1-D coord with no companion on its dim: strict branch.
  Conservative default that matches historic behaviour.
…-bounds

Accept polygon-vertex bounds in VAR004 shape check
@Ayoubnac1
Ayoubnac1 merged commit beb00ce into ESGF:develop Jun 26, 2026
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.

3 participants