Interpolate data to a non-regular grid
Added by Giorgio Sperandio over 3 years ago
Dears,
Sorry if the question is not relevant but I am quite new to CDO Commands.
I would like to interpolate hourly gridded temperature data (e.g. 10x10km) to a set of scattered point.
I have issues in creating the file that contains the information about the scattered points.
For instance, it is quite easy for me to provide the file with a description of a regular grid (please, see griddesc attachment).
How can i produce a .txt file describing the location of the scattered points in which I would like to interpolate my data?
Thank you for your support.
Best,
Giorgio
Replies (2)
RE: Interpolate data to a non-regular grid - Added by Karin Meier-Fleischer over 3 years ago
Hi Giorgio,
you have to write a grid descriptor file which contains the lon/lat coordinate data. This grid descriptor file can be used to remap the input data.
The grid descriptor file should have the following structure (you have to modify the values)
gridtype = unstructured gridsize = 20480 xname = lon xlongname = "longitude" xunits = "degrees east" yname = lat ylongname = "latitude" yunits = "degrees north" xvals = 0.62831853071796 0.62831853071796 0.597460108083514 0.659176953352405 ... yvals = 0.91843818701053 0.940383349874093 0.907233232931261 0.907233232931261 ...
Remap:
cdo -remapnn,your_gridfile.txt infile outfile
-Karin
RE: Interpolate data to a non-regular grid - Added by Giorgio Sperandio over 3 years ago
Thank you very much Karin,
That was really helpful.
Best,
Giorgio