Project

General

Profile

adding two files with undefined value

Added by S BR about 5 years ago

Dear All,
I have global gridded file with data only over 60E-100E and 5N-30N and all remaining regions have undefined value.
Similarly, I have another global gridded file with the data only over 60E-100E and 30N-60N and other regions have undefined value.
How can I add these two files so that I will have data over the two regions together, i.e. over the region 60E-100E and 5N-60N and all other regions have undefined value.

File1: data_60E-100E_5N-30N_global.nc
File2: data_60E-100E_30N-60N_global.nc

I have tried to use 'add' command but I get a file with completely undefined value.

Thank you.
S


Replies (3)

RE: adding two files with undefined value - Added by S BR about 5 years ago

I would like to mention that both the files (File1 and File2) are generated from the same global gridded data using 'setlonlat' command and then 'remapycon' command to expand it to the global grid.

Thank you.
S

RE: adding two files with undefined value - Added by Karin Meier-Fleischer about 5 years ago

Hi S,

unfortunately you didn't upload your data, so I can only guess.

Try

cdo mergegrid infile1 infile2 outfile

-Karin

RE: adding two files with undefined value - Added by S BR about 5 years ago

Hi Karin,
You guessed correct and that worked fantastic. It is nice to know that CDO has so many useful commands to manipulate the data in easy and quick way.

Best,
S

    (1-3/3)