New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalise units of coordinate bounds #5746
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5746 +/- ##
==========================================
+ Coverage 89.71% 89.74% +0.02%
==========================================
Files 90 91 +1
Lines 22815 22925 +110
Branches 5438 5462 +24
==========================================
+ Hits 20468 20573 +105
- Misses 1617 1620 +3
- Partials 730 732 +2 ☔ View full report in Codecov by Sentry. |
81d39e7
to
ba36f80
Compare
❤ |
786212b
to
34338f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a small suggestion about warnings. This is a warning that already existed, so there may be a case for seperating it out into its own issue if changing it impacts a lot of the existing tests.
34338f1
to
a3a0aeb
Compare
a3a0aeb
to
35a629f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
…umpydoc-pre-commit * 'numpydoc-pre-commit' of github.com:tkknight/iris: Update CF standard names to v84. (SciTools#5761) Regrid docs fix (SciTools#5758) Improve ncdata and CF information on "iris heart xarray" page (SciTools#5752) Pin ASV - airspeed-velocity/asv#1385. (SciTools#5756) Normalise units of coordinate bounds (SciTools#5746) Add "Which Regridder?" Documentation (SciTools#5742) Document `Coord.ignore_axis` (SciTools#5744) Disable navidation with keys for docs HTML theme options (SciTools#5747) Shapefile masking (SciTools#5470) [pre-commit.ci] pre-commit autoupdate (SciTools#5739) DOCS: Add whatsnew for ruff pydocstyle compliance (SciTools#5700) update docstring (SciTools#5737) Updated environment lockfiles (SciTools#5738) Consider NaNs equal when comparing cubes (SciTools#5713)
🚀 Pull Request
Description
This pull request ensures that during the NetCDF loading pipeline, coordinates are constructed with points and bounds equal to the units of the points.
This is to resolve the issue where coordinates can be constructed and attached to a cube, but the units of the points and bounds of the coordinate are encoded differently within the source NetCDF file.
The following cases are handled:
cf-units
, will result in a warning being raised and the bounds attached "as-is" to the coordinate. This provides the user to option to keep, remove or replace the bounds as they choose.Note that, the
test_build_auxiliary_coordinate.TestBoundsVertexDim
andtest_build_dimension_coordinate.TestBoundsVertexDim
tests have been extended to include test coverage of converting bounds to the units of the points, [2] above. This is to avoid heavy replication of boiler-plate mocking infrastructure.TODO:
whatsnew
entry.Finally, this one's for you @andreas-h.
Closes #1801
Consult Iris pull request check list