Normalise units of coordinate bounds#5746
Merged
stephenworsley merged 7 commits intoSciTools:mainfrom Feb 16, 2024
Merged
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
Contributor
❤ |
786212b to
34338f1
Compare
stephenworsley
requested changes
Feb 16, 2024
Contributor
stephenworsley
left a comment
There was a problem hiding this comment.
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
Member
Author
tkknight
added a commit
to tkknight/iris
that referenced
this pull request
Feb 20, 2024
…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)
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🚀 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.TestBoundsVertexDimandtest_build_dimension_coordinate.TestBoundsVertexDimtests 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:
whatsnewentry.Finally, this one's for you @andreas-h.
Closes #1801
Consult Iris pull request check list