Conversation
…into zedwick/dual_mesh
…into zedwick/dual_mesh
Member
Member
Author
…AY/uxarray into zedwick/bilinear-remapping
philipc2
approved these changes
May 21, 2025
Member
philipc2
left a comment
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
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 |
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 #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