- I have an NC file that has global data with a high resolution (about 25 minutes) so a lot of coordinates.
- I have some measured values of some region with irregularly spaced coordinates.
- In order to mathematically operate between the two, I am aiming to interpolate the global data to the local irregular grid, instead of the opposite, to minimize the uncertainty.
- How do I achieve this? I was thinking of Scipy's griddata module but cannot seem to initiate the process. Thanks a lot.
EDIT:
I tried the following, a little heavy on resources but I think it works.
from scipy.interpolate import interp2d
f = interp2d(longw,latw,Zw)
where longw,latw,Zw are the world coordinates of the NETCDF file and the 2D variable respectively.
Then I applied f(lon,lat)
to all my irregular observations y iteration to interpolate. The lon and lat are the observed coordinates of the local region.