Repository navigation
Upgrade YAC to v3.21.0 and YAXT to v0.12.2.2, expose more YAC methods - #1907
Conversation
Both versions build and pass test/test_remap_yac.py locally with no source changes.
bilinear(backend='yac') used YAC's default arithmetic average, which is not bilinear. It now uses barycentric weights and matches the native result.
Adds the methods to yac_method, an optional creep_distance fill, tests, and docs.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
🟡 Changes recommended
The injected default reduction_type overrides an explicit yac_options weight_type, silently using barycentric weights instead of the caller’s requested weighting.
1 open issue
What changed in this PR
Updates UXarray’s optional YAC remapping backend and expands its interpolation options, addressing issue #1906.
Changes:
- Upgrades CI to YAC v3.21.0 and YAXT v0.12.2.2, with clone retries.
- Adds
ncc,rbf,bernstein_bezier, creep filling, and validation for unsupported grid locations. - Defaults YAC bilinear remapping to barycentric weights and adds tests and documentation.
| File | Description |
|---|---|
uxarray/remap/yac.py |
Adds interpolation methods, creep filling, and input validation. |
uxarray/remap/accessor.py |
Sets barycentric bilinear defaults and documents expanded options. |
test/test_remap_yac.py |
Tests new methods, creep filling, validation, and bilinear agreement. |
docs/user-guide/remapping.ipynb |
Updates supported methods and backend guidance. |
.github/workflows/yac-optional.yml |
Upgrades dependency pins and retries source clones. |
Review effort: Balanced
erogluorhan
left a comment
There was a problem hiding this comment.
This looks good to me as it only touches the YAC pieces. Thanks!
cmdupuis3
left a comment
There was a problem hiding this comment.
AC calls MPI_ABORT for these two cases, so a script or Jupyter kernel dies with no Python exception.
| Case | YAC error | Fix |
|---|---|---|
bernstein_bezier on edge-centered data (yac.py:303) |
only supports CORNER or CELL sources | raise if the source is edge-centered |
creep_distance with remap_to="edges" (yac.py:322) |
target must be CELL or CORNER | raise if the target is edge-centered |
A dataset that mixes face and edge variables also triggers the first case.
# Conflicts: # test/test_remap_yac.py

Closes #1906
Overview
bilinear(backend="yac")now defaults toreduction_type="AVG_BARY"(barycentric) instead of YAC's arithmetic average, and matches the native backend. A useryac_optionsvalue still overrides it.yac_methodvalues:"ncc"(nearest corner cells):weight_type("YAC_INTERP_NCC_AVG"default |"YAC_INTERP_NCC_DIST", also accepted asreduction_type),partial_coverage(bool, defaultFalse)."rbf"(radial basis function):n(default 9 source points),max_search_distance(default 0.0, unlimited),scale(default 14.87973)."bernstein_bezier": no options.creep_distance(newyac_optionskey): adds a creep fill after the chosen method, so targets it left empty (for example DNN with a small search distance) are filled from filled neighbors. It is the maximum number of neighbor steps,-1means unlimited, and it is not applied to"conservative".n_min(new in v3.21.0, butyac.coredoes not take it yet),spmap,user_file,check.dnnto nodes or edges without aFIXEDsearch distance, andnccfrom a non-face source, now raiseValueError. YAC aborts the whole process on both.docs/user-guide/remapping.ipynb.Expected Usage
PR Checklist
General
Testing & Benchmarking
Documentation and Examples
docs/api.rst; internal (private) function names start with an underscore (_)AI Disclosure
AI Usage: AI assisted with code and testing. I reproduced the results locally and reviewed the changes.