Open
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new remap.to_rectilinear(...) convenience API to remap UXarray data onto 1-D rectilinear lon/lat targets, returning standard xarray output on lat/lon dimensions, with support for both the native UXarray backend and YAC (including YAC rectilinear grid registration).
Changes:
- Added a rectilinear target normalization/reshape utility (
RectilinearGridSpec, edge inference, and lat/lon reshaping). - Implemented YAC rectilinear target registration and a dedicated YAC remap-to-rectilinear path.
- Exposed
to_rectilinear()on the remap accessor, added tests, and documented the new API in user guide + generated API docs.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uxarray/remap/yac.py | Adds rectilinear-target detection/registration and _yac_remap_to_rectilinear() returning xarray output. |
| uxarray/remap/structured.py | Introduces rectilinear target spec normalization (centers→edges) and reshaping utilities + native backend helper. |
| uxarray/remap/accessor.py | Adds public to_rectilinear() method to the remap accessor (backend switch between yac and uxarray). |
| test/test_remap_yac.py | Adds YAC-backed to_rectilinear() tests for node data and extra dimensions. |
| test/test_remap.py | Adds native backend to_rectilinear() test and direct reshape utility coverage. |
| docs/user-guide/remapping.ipynb | Mentions the new .remap.to_rectilinear(...) workflow for YAC. |
| docs/generated/uxarray.UxDataset.remap.to_rectilinear.rst | Adds generated API stub for UxDataset.remap.to_rectilinear. |
| docs/generated/uxarray.UxDataArray.remap.to_rectilinear.rst | Adds generated API stub for UxDataArray.remap.to_rectilinear. |
| docs/api.rst | Adds to_rectilinear to the API reference listings for both UxDataArray and UxDataset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #95.
Adds native UXarray support for remapping to rectilinear structured latitude-longitude grids through
remap.to_rectilinear(...), and adds YAC support for the same workflow using YAC rectilinear grid registration. The method returns regular xarray output onlat/londimensions, with tests and API docs for both backends. Also addresses the structured-grid YAC workflow discussed in #768 (comment).Native UXarray backend:
YAC backend: