You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When regridding from low resolution UGRID data (C4 cubed sphere) to a higher resolution grid (e.g. n216e), masked data points are introduced in the result, despite there being no masked data in the source.
How To Reproduce
Steps to reproduce the behaviour:
Sample C4 data is available here. (see screenshots section for plots)
Expect there to be no masked points in the regridded result. See actual results in screenshots section.
Screenshots
Click to expand this section...
Source data: C4 cubed sphere
Regridded data: n96e
Environment
OS and version: RHEL 7
esmf_regrid version: 0.9.0
iris version: 3.9.0
Additional context
We have a use case in UG-ANTS for regridding from a low resolution mesh to a high resolution grid. We would expect there to be no masked data introduced by regridding, or at least for a warning/error to be raised if this does occur.
The text was updated successfully, but these errors were encountered:
It looks like this is due to these points lying somewhere in the cracks between bilinear cells. Since these points are considered out of bounds by ESMF, it should be possible to fill these in by passing ESMF a suitable extrapolation method. After a bit of experimentation, I think this would be the NEAREST_IDAVG method with the ESMF Regrid arguments extrap_num_src_pnts=2 and extrap_dist_exponent=1 in order to best approximate the behaviour of bilinear regridding at these points (i.e. taking the weighted average of the two nearest points). Below is a sample of the results different extrapolation methods and arguments passed to ESMF.
This was generated by hacking iris-esmf-regrid to allow extra arguments to be passed to ESMF with the below code:
Changing the default behaviour may have the unintended consequence that out of bounds behaviour changes when dealing with local grids, and there is a more general application for passing ESMF arguments so #375 may be the way to go for solving this.
With that said, passing the above suggsted kwargs is a bit cumbersome and non-obvious, so there's still a good case to make for at least providing some sort of shortcut to choose these arguments via the API.
🐛 Bug Report
When regridding from low resolution UGRID data (C4 cubed sphere) to a higher resolution grid (e.g. n216e), masked data points are introduced in the result, despite there being no masked data in the source.
How To Reproduce
Steps to reproduce the behaviour:
Example script:
Expected behaviour
Expect there to be no masked points in the regridded result. See actual results in screenshots section.
Screenshots
Click to expand this section...
Source data: C4 cubed sphere
Regridded data: n96e
Environment
esmf_regrid
version: 0.9.0iris
version: 3.9.0Additional context
We have a use case in UG-ANTS for regridding from a low resolution mesh to a high resolution grid. We would expect there to be no masked data introduced by regridding, or at least for a warning/error to be raised if this does occur.
The text was updated successfully, but these errors were encountered: