Skip to content

Recognize CDM vertical direction metadata - #678

Open
nawaaaaaAaar wants to merge 1 commit into
xarray-contrib:mainfrom
nawaaaaaAaar:track15/cdm-vertical
Open

nawaaaaaAaar wants to merge 1 commit into
xarray-contrib:mainfrom
nawaaaaaAaar:track15/cdm-vertical

Conversation

@nawaaaaaAaar

Copy link
Copy Markdown
Contributor

Refs #316.

Scope

The existing criteria already recognize CDM _CoordinateAxisType values. The missing narrow case is _CoordinateZisPositive: the documented "up" / "down" values should identify a vertical coordinate just as CF positive does.

Add that criterion and document exactly what is recognized. This is not a claim to implement CDM coordinate transforms, _CoordinateAxes, or the entire conventions system, so it does not automatically close #316.

Regression coverage

  • Four failure-first cases: up/down on Dataset and DataArray.
  • Reject unsupported direction values; retain all eight existing CDM axis-type mappings.
  • Ensure a transform variable alone is not inferred to be a vertical coordinate.
  • Full suite: 318 passed, 1 skipped on Python 3.12 / xarray 2026.9.0.
  • CDM-focused tests: 17 passed on xarray 2024.7.0 (declared minimum).
  • Relevant pre-commit hooks and git diff --check.

Convention reference: https://docs.unidata.ucar.edu/netcdf-java/current/userguide/coord_attr_conv.html

AI-assisted implementation and regression tests. The broader convention scope is left to maintainers.

Copilot AI balanced review requested due to automatic review settings October 22, 2026 14:32

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.14%. Comparing base (a9cebee) to head (a932760).
⚠️ Report is 132 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #678      +/-   ##
==========================================
+ Coverage   85.78%   87.14%   +1.35%     
==========================================
  Files          13       16       +3     
  Lines        2364     3352     +988     
  Branches      183      313     +130     
==========================================
+ Hits         2028     2921     +893     
- Misses        303      385      +82     
- Partials       33       46      +13     
Flag Coverage Δ
mypy 46.09% <100.00%> (+7.56%) ⬆️
unittests 92.84% <ø> (-1.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dcherian
dcherian added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 23, 2026

This branch has not been deployed

No deployments
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.

Add Unidata CDM conventions to coordinate_criteria

2 participants