Project

General

Profile

merge 100 files

Added by nadia rehman over 10 years ago

Hi,
I am a new user of CDO. I have to merge 100 .nc files in a single file. Can anyone help me to do this in simple way rather to write all the 100 files?

Regards
Nadia


Replies (1)

RE: merge 100 files - Added by Uwe Schulzweida over 10 years ago

Assuming the files have the name file001.nc file002.nc ... file099.nc file100.nc.
Then you can use the CDO operator cat to concatenate all files:

cdo cat file*.nc result.nc
In this case all files need to have the same contents on different timesteps.
If the timesteps are not sorted by file name, use the operator mergetime:
cdo mergetime file*.nc result.nc

    (1-1/1)