Project

General

Profile

Interpolate data to a specific location with coordinates

Added by Sébastien Barthélémy 8 months ago

Hi,

I wonder if there is a command CDO that allows for interpolating data at a specific location. For example, let's say that I want to interpolate the surface air temperature at the point of coordinates: 5.514595°E, 60.320246°N. Is there a command similar to that one:

cdocommand -v temp 5.514595°E-60.320246°N input_file.nc output_file.nc

Best,
Sébastien


Replies (3)

RE: Interpolate data to a specific location with coordinates - Added by Karin Meier-Fleischer 8 months ago

Try

cdo -remapnn,lon=5.514595_lat=60.320246 -selname,temp infile outfile

RE: Interpolate data to a specific location with coordinates - Added by Sébastien Barthélémy 8 months ago

Hi,

I just tried the command on the data I wanted to interpolate and got the following warning message:

cdo    remapnn (Warning): Using a non-thread-safe NetCDF4/HDF5 library in a multi-threaded environment may lead to erroneous results!
cdo    remapnn (Warning): Use a thread-safe NetCDF4/HDF5 library or the CDO option -L to avoid such errors.

Therefore, I added the option -L and could get the command to work:

cdo -remapnn,lon=5.514595_lat=60.320246 -selname,TREFHT norcpm1_assim-i1_19800115_mem01.cam2.h1.1980-01-16-00000.nc essai.nc

Thanks again

    (1-3/3)