Open bouweandela opened 2 weeks ago
See here (and click the _Regrid_Iris_EsmfNearest tab) for an overview of which CMIP6 models currently cannot be regridded using the ESMFNearest
scheme. That is approximately 40% of the 46 models, so quite a large fraction, making the ESMFNearest
regridding scheme almost unusable with CMIP6 ocean data. This is regardless of whether use_src_mask=True
(issue here occurs) or use_src_mask=False
(regridding fails because the bounds are discontiguous, this would be solved by #276).
Regarding our discussion at the @SciTools/peloton today: I checked the ocean component of a few of the Earth System Models that failed to regrid and the issue does not seem limited to ORCA grids.
The
nearest
regridding scheme in ESMF skips masked points. Therefore, this scheme cannot be used to regrid the mask and special treatment is needed. Example of the issue with the current code:results in the following plot, note that the mask is missing:![image](https://github.com/SciTools-incubator/iris-esmf-regrid/assets/5430937/3747d4ba-f221-4d64-ad8a-247953adc07b)
while I would expect a plot that looks like this:![image](https://github.com/SciTools-incubator/iris-esmf-regrid/assets/5430937/f2016cc5-803c-44db-b9b0-ab2da6be16d9)
The file in the example can be downloaded from one of the following URLs: