Use different interpolation methods on variables within the same .nc file
Added by Giorgio Sperandio over 3 years ago
Dears,
I have a file.nc containing gridded hourly measurements of temperature, precipitation and pressure for a single year (thus 8760 measurements for each variable).
I would like to interpolate each variable using a different method (e.g. nearest neigbhbor for temperature, bilinear interpolation for precipitation and so on).
Would that be possible to do that using CDO commands?
So far, I am able to interpolate all the different variables using a single interpolation method (e.g. bilinear interpolation for all variables).
Thank you for your help.
Best,
Giorgio Sperandio
Replies (2)
RE: Use different interpolation methods on variables within the same .nc file - Added by Karin Meier-Fleischer over 3 years ago
Hi Giorgio,
it is best to select the variables first that you want to process with the same interpolation method and merge all the files at the end.
For example interpolate to r360x180 grid
cdo -remapnn,r360x180 -selname,temp infile.c temp_360x180.nc cdo -remapbil,r360x180 -selname,prec infile.c prec_360x180.nc cdo -O -merge temp_360x180.nc prec_360x180.nc outfile_360x180.nc
-Karin
RE: Use different interpolation methods on variables within the same .nc file - Added by Giorgio Sperandio over 3 years ago
Dear Karin,
As always, thank you very much for your support.
So basically it is possible to select single variables from my big file and make single interpolation.
Very useful.
Best,
Giorgio