Project

General

Profile

Merging more than one file

Added by Jeisson Javier Leal Rojas about 1 year ago

Hi everyone.

I recently use `cdo merge grid` to combine two basins into one (https://code.mpimet.mpg.de/boards/1/topics/14370).

Now I would like to combine more than two input nc files. I have a total of 10 nc files.

cdo mergegrid [ basin1.nc ... basin10.nc ] all_in_one.nc

Gives me
cdo (Abort): Too many streams specified! Operator mergegrid needs 2 input streams and 1 output stream!

And

cdo mergegrid basin*.nc all_in_one.nc

Gives me

cdo (Abort): Unprocessed Input, could not process all Operators/Files

What am I missing? or is it that `cdo merge grid` works just with two input files (given the first cdo abort message I've got)?

Regards,

Jeisson Leal.


Replies (2)

RE: Merging more than one file - Added by Karin Meier-Fleischer about 1 year ago

Hi Jeisson,

mergegrid accepts only two input files, see https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsection.2.2.8.

mergegrid infile1 infile2 outfile

RE: Merging more than one file - Added by Jeisson Javier Leal Rojas about 1 year ago

Hi Karin.

Thanks for your answer.

It is as I thought then.

In the end I created a while loop in bash to do the trick.

Thanks a lot :)

    (1-2/2)