Project

General

Profile

cdo sub (Abort): Grid size of the input parameters do not match!

Added by SANJUKTA RANI PADHI over 5 years ago

HELLO all,
I have two having different grid size. When i used cdo sub infile1.nc infile2.nc outfile.nc . It show cdo sub (Abort): Grid size of the input parameters do not match!.

dell@dell-Inspiron-15-3567:~/work/rf/composite/drought$ cdo sinfo drgt.djf.mean.nc
File format : netCDF
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown instant 1 1 65160 1 F64 : -1
Grid coordinates :
1 : lonlat : points=65160 (362x180)
lon : -0.5 to 360.5 by 1 degrees_east
lat : -89.5 to 89.5 by 1 degrees_north
Vertical coordinates :
1 : surface : levels=1
Time coordinate : 1 step
RefTime = 1979-12-01 00:00:00 Units = minutes Calendar = standard Bounds = true
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
1983-01-01 00:00:00
cdo sinfo: Processed 1 variable over 1 timestep ( 0.00s )
dell@dell-Inspiron-15-3567:~/work/rf/composite/drought$ cdo sinfo precip.djf.mean.nc
File format : netCDF4
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown instant 1 1 64800 1 F32 : -1
Grid coordinates :
1 : lonlat : points=64800 (360x180)
lon : 0.5 to 359.5 by 1 degrees_east circular
lat : 89.5 to -89.5 by -1 degrees_north
Vertical coordinates :
1 : surface : levels=1
Time coordinate : 1 step
RefTime = 1800-01-01 00:00:00 Units = days Calendar = standard Bounds = true
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
1957-07-02 12:00:00
cdo sinfo: Processed 1 variable over 1 timestep ( 0.00s )
dell@dell-Inspiron-15-3567:~/work/rf/composite/drought$ cdo sub drgt.djf.mean.nc precip.djf.mean.nc precip.djf.anom.nc

cdo sub (Abort): Grid size of the input parameters do not match!

Please help me in this topic. And also I am attaching the info of two files. Please find the attachment. Kindly help me. I am running out of time for submitting my reports.

Thank You

1.png (203 KB) 1.png

Replies (1)

RE: cdo sub (Abort): Grid size of the input parameters do not match! - Added by Uwe Schulzweida over 5 years ago

To subtract to fields you have to take care that both grid have the same orientation on the same grid points. You have to delete the first and last column of the first field and flip the latitude orientation form south/north to north/south. Here is an example:

cdo invertlat -selindexbox,2,361,1,180 drgt.djf.mean.nc tmpfile
cdo sub tmpfile precip.djf.mean.nc result
rm tmpfile
The same in one line:
cdo sub -invertlat -selindexbox,2,361,1,180 drgt.djf.mean.nc precip.djf.mean.nc result

    (1-1/1)