(I know next to nothing about GDAL, so my views might be a misconception)
The reason why right now we can’t really rely on esmf
/ xesmf
is that it is still tricky to install them, even from conda-forge
(which made things better but not perfect), and it is still not possible to compute the weights in parallel on a dask
cluster: we’d need to use MPI and a command line program for this, which means we’re back to the old paradigm of transformations between files – i.e. no streaming of the data. It might be possible to resolve both of these issues, but I don’t know how easy that would be (but see also the reasoning given in Conservative Region Aggregation with Xarray, Geopandas and Sparse on why a lighter-weight library might be preferable).
For similar reasons I’m somewhat sceptical about using GDAL for this (though again, I just might not know GDAL well enough): my conception is that GDAL had similar issues with installing in the past (not sure about now). More fundamentally, though, I was under the impression that GDAL warp worked mostly on images, is that right? This would mean rectangular pixels arranged in 2D arrays, which would exclude the DGGS that I’d very much like to support as well, and which can typically only be represented as a 1D array of faces.
To be fully explicit, I think the requirements we have for a general regridding packages are (and I might be missing some):
- cross-platform
- easy to install (
conda-forge
helps a lot here) - works with
dask
or other chunked arrays (both when computing weights as well as when applying them) - allows regridding between large, potentially larger than memory grids
- close to arbitrary cell geometries (my personal motivation for this are DGGS)
- (sufficiently) high performance