I am trying to use xesmf for regridding an image with a projected coordinate system (UTM Easting/Northing in meters, instead of lat/lon in degrees) but I’m not able to accurately transform my data. I am able to create a Regridder function and run it, but the plot of my transformed data does not match the plot of my input data.
All of the examples of curvilinear coordinate transformation I have found use lat/lon, so my question is: is using projected/UTM grids not supported by xESMF or is this probably an issue in my code?
This is indeed a tricky problem to sort through. We’ve recently managed to make something work using xesmf and custom projections.
We’ve done this by manually creating a target dataset with coordinates that xesmf can interpret. Below is an example from our code base that does this for the web-mercator projection (epsg:3857).
Once we have this target grid dataset generated, we use xesmf directly: