xarray-contrib / xarray-regrid

Regridding utility for xarray
https://xarray-regrid.readthedocs.org/
Apache License 2.0
71 stars 7 forks source link

Aggregate all dims simultaneously in conservative #51

Closed slevang closed 1 month ago

slevang commented 1 month ago

I was looking at weatherbench's conservative regridding implementation here and realized we could also einsum over all dimensions simultaneously. This simplifies the code and also makes the NaN tracking implementation way more efficient.

I added a benchmarking notebook following from the example in #42 and I think the results look quite good now.