xarray-contrib / xarray-regrid

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

User should receive a warning when the given data set can not cover the target grid. #14

Open BSchilperoort opened 1 year ago

BSchilperoort commented 1 year ago

I think the user should receive a warning when the given data set can not cover the target grid. So it is better to have an extra check here. Currently, if that is the case, the regridder still works, but user will get a field with only 0 outside of the area covered by the original data.

_Originally posted by @geek-yang in https://github.com/EXCITED-CO2/xarray-regrid/pull/12#discussion_r1341126349_

BSchilperoort commented 9 months ago

Additionally, we should check if the new resolution is finer than the old one. In that case an error should be raised instructing the user to use something like nearest-neighbor

BSchilperoort commented 4 months ago

31 made sure that the code won't fail. However, we should still give a warning.