Skip to content

Support curvilinear and projected grids in GridToSparseInterpolation. - #269

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_974639218
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_974639218

Conversation

@copybara-service

Copy link
Copy Markdown

Support curvilinear and projected grids in GridToSparseInterpolation.

  • Generalize GridToSparseInterpolation to support 2D curvilinear/projected grids.
  • Precompute Delaunay simplex indices and barycentric weights, caching geometry for fast repeated evaluation.
  • Add unit tests for 2D curvilinear interpolation correctness and out-of-bounds masking.

- Generalize GridToSparseInterpolation to support 2D curvilinear/projected grids.
- Precompute Delaunay simplex indices and barycentric weights, caching geometry for fast repeated evaluation.
- Add unit tests for 2D curvilinear interpolation correctness and out-of-bounds masking.

PiperOrigin-RevId: 974639218
@google-cla

google-cla Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interpolation cache key is not geometry-safe: it includes only array shapes plus the first grid/target latitude, and omits longitudes and the remaining coordinates. Reusing one interpolator with a same-sized reference whose station coordinates changed can silently reuse stale corners and weights. Could the key include the full grid/target geometry (or a stable fingerprint/identity)? A two-call test with the same shapes and first latitude but a changed second point or longitude would expose this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant