Project

General

Profile

interpolate one file from another one

Added by Noelia Otero over 8 years ago

Hi!

I wanted to ask for some help regarding an interpolation issue. I have two files with different grids, and I would like to interpolate one of them to get the same grid:
The first one would be:
cdo griddes file1.nc

#
  1. gridID 26 #

gridtype = lonlat
gridsize = 17328
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
xsize = 114
ysize = 152
xfirst = -16.75
xinc = 0.5
yfirst = 32.125
yinc = 0.25

And the second one:

cdo griddes file2.nc

#
  1. gridID 2 #
    gridtype = lonlat
    gridsize = 21736
    xname = lon
    xlongname = longitude
    xunits = degrees_east
    yname = lat
    ylongname = latitude
    yunits = degrees_north
    xsize = 143
    ysize = 152
    xfirst = -17
    xinc = 0.4
    yfirst = 32
    yinc = 0.25

Then, I would like to apply an interpolation to file2 to get the same grid that file1.
It comes to my mind to create a template with the same grid that file1...but I don't know how to get the same resolution that file1..I am not sure how I could do it..

I really appreciate some help!

Many thanks in advance

cheers
Noelia


Replies (1)

RE: interpolate one file from another one - Added by Uwe Schulzweida about 8 years ago

Dear Noelia,

You can simple use file1.nc as the target grid. Here is an example with remapbil:

cdo remapbil,file1.nc file2.nc result
Cheers,
Uwe

    (1-1/1)