Skip to content
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

laplace_interpolate and interpolate_na should broadcast over dimensions using apply_ufunc #292

Closed
Huite opened this issue Aug 23, 2024 · 0 comments · Fixed by #293
Closed

Comments

@Huite
Copy link
Collaborator

Huite commented Aug 23, 2024

Currently, both interpolation methods only work on UgridDataArray with a single UGRID dimension.

It should work over additional dimensions, such as time and layer. xarray apply_ufunc takes care of this nicely.

A straightforward implementation would just process them one slice at a time. This is a bit inefficient if the NoData values are persistent over e.g. time. In that case, we could setup and query a KDTree only once, and assign values across dimensions with a single .isel. This has the obvious downside of needing to load and check all values immediately.

Huite added a commit that referenced this issue Aug 23, 2024
…erpolate. Fixes #292

Also changes dims into a set, consistent with xarray (future) behavior.
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 a pull request may close this issue.

1 participant