-
Notifications
You must be signed in to change notification settings - Fork 45
Bilinear Remapping #1016
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
Bilinear Remapping #1016
Conversation
…into zedwick/dual_mesh
…into zedwick/dual_mesh
…AY/uxarray into zedwick/bilinear-remapping
philipc2
left a comment
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.
Fantastic work @aaronzedwick
The results look excellent and the performance is really good. Takes about 30s to go from a 15km MPAS grid to a HEALPix zoom of 8 on my laptop.
There may be some opportunities for some smaller optimizations later, and to expose the weights to the user to allow them to store and reuse them, but for now this is looking great.
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.
Pull Request Overview
This PR implements bilinear remapping in UXarray, integrating it into the .remap accessor, adding supporting geometry routines, updating tests, docs, and benchmarks.
- Core bilinear remap logic added (
_bilinear, barycentric weight routines) .remap.bilinearaccessor method introduced- Tests, documentation, API reference, and benchmarks updated for bilinear
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uxarray/remap/bilinear.py | Added _bilinear function and supporting barycentric routines |
| uxarray/remap/accessor.py | Exposed .remap.bilinear method |
| uxarray/plot/utils.py | Removed stray debug print |
| uxarray/grid/grid.py | Extended get_dual signature with optional duplicate check |
| uxarray/grid/geometry.py | Introduced barycentric_coordinates_cartesian and helpers |
| uxarray/grid/neighbors.py | Trimmed extraneous whitespace |
| test/test_remap.py | Added bilinear remap tests |
| docs/user-guide/remapping.ipynb | Updated notebook to include bilinear examples |
| docs/api.rst | Registered remap.bilinear in API docs |
| benchmarks/mpas_ocean.py | Added benchmarking for bilinear remapping |


Closes #678
Overview
Adds bilinear remapping functionality to UXarray.
Expected Usage
PR Checklist
General
Testing
Documentation
_) and have been added todocs/internal_api/index.rstdocs/user_api/index.rst