Closed lemieuxbenedicte closed 8 months ago
Thanks for the PR. The fix seems to create test failures. Could you address those and add a unit test exposing the issue you're fixing?
Same comment as on the other PR: With xESMF 0.8.3, xarray 2023.12 and sparse 0.14, I haven't been able to reproduce the issue. My guess is that some incompability between xarray and sparse has now been fixed and the issue of weights being transformed to a numpy array unexpectedly is now gone.
I'll close this PR/issue for now. Hopefully, the fix is simply a question of upgrading the environment.
Quick description
Issues connected to the handling of the regridding weights as a sparse.COO array and/or an xarray.DataArray backed by a sparse.COO array.
Issue 1 :
Arises when the regriding involves source/destination grids with masked data (extrapolation).
Issue 2 :
Arises when writing the regridding weights to a netCDF file with the dedicated Class BaseRegridder method.
Full description
Demonstration with jupyter-notebook : package versions, raised error, proposed fix and tests...