Interpolating Curvilinear Data

Hello! I have a curvilinear grid consisting of (258 x 182) points in xArray with a latitude and longitude value at each point. I have data at 36 random points within the grid. I am looking to interpolate over the rest of the grid using a bilinear or bicubic interpolation algorithm. I attempted to do this using xESMF, however I am not sure if this is the appropriate package since it was designed for regriding. The output grid values did not interpolate correctly. I am still new to working with xArray, so I am not sure if this was user error on my part or if I should be looking into a different package. I searched Pangeo but I could not find anything that did exactly what I was looking for. Does anyone have any suggestions for how I could accomplish this task? Thank you!

Use GDAL warp, either command line or via API (rasterio or osgeo.gdal). The -r resample arg can be set to “bilinear”, and target grid by -te, -ts/-te and -t_sts.

Is there a file involved before xarray? If it can be a file you need to see that the coordinate arrays present as Geolocation Arrays, or they can be assigned virtually.

If there’s no file or you can’t arrange that you can use DATAPOINTER to craft MEM sources from numpy references. I’m interested to try this out if you have an example, it’s kind of easier to do than describe :pray:

Ow, I think I misread. For GDAL to create a grid from points needs gdal_grid or associated API, I have much less experience with that…

I would also look at Verde.