Project

General

Profile

horizonta interpolation from orca1l to regular grid

Added by Estanislao Gavilan about 2 years ago

Hi community,

I would like to interpolate the runoff output from cmpi6 models to a regular grid. The runoff uses the orca1l grid. I have tried to interpolate using the cdo but I lose information during the process. Maybe I have made a mistake in my script but I cannot find it. This is the process that I followed.

1) Merging the nc files using

cdo mergetime *.nc friver_1978-2014.nc

2) I divide over 1000 to remove the density and regrid

cdo -divc,1000 -remapbil,grid.txt friver_1978-2014.nc friver_remapped_1978-2014.nc

my grid.txt is

gridtype = lonlat
xsize = 1440
ysize = 721
xfirst = 0
xinc = 0.25
yfirst = -90
yinc = 0.25

3) I compare the total runoff between the original f_river file and the new one.

3.1 Original grid

for 1 in range(0,T):
Total[t,:,:]=friver[t,:,:]*areacello

3.2 New grid. I compute the area of the grid following this equation

for j in range(0,ny):
latc=ra*0.25*np.pi/180
lonc=ra*np.cos(latg[j]*np.pi/180)*0.25*np.pi/180
cellgridremap[j,:]=lonc*latc

for 1 in range(0,T):
Total_new[t,:,:]=friver_new[t,:,:]*cellgridremap

Then if I compare the total runoff, I observe that the regridd runoff is about 25-30% lower.

Thanks again for all your help and support