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.
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.