Project

General

Profile

can we do cdo cmor multiple_netcdf_inputfiles.nc?

Added by arnold sullivan over 5 years ago

Hi there,

can we do something like:

cdo cmor multiple_netcdf_inputfiles.nc

or can we do

cdo cmor /data_directory/ocean_directory/ocean_monthly_data_from_year0000_to_yearxxxx*

or we have to loop through all the files, say order by the year month and day?

Cheers,

Arnold


Replies (2)

RE: can we do cdo cmor multiple_netcdf_inputfiles.nc? - Added by Fabian Wachsmann over 5 years ago

Hi Arnold,

thanks for this idea, I will check if we can implement it. Right now, only one argument is allowed for that operator and you need to loop over time.

Note that recent 'cdo cmor' runs in append mode per default: A chunk info file is written containing the path to the latest file written by cdo cmor. If you afterwards process the subsequent time step, 'cdo cmor' will automatically append the record to the already existing file.
For example:

cdo cmor,$MIP_TABLE tas_1980.nc

will create a file named CHUNK_FILE_tas$MIP_TABLE*.txt_ with
cat CHUNK_FILE_tas_$MIP_TABLE*.txt
$DIR_TO_CHUNK_FILE/tas*185001-185101.nc

If you afterwards call

 cdo cmor,$MIP_TABLE tas_1981.nc 

the operator will read the chunk info file, it will append data to the chunk file if it exists and it will create
$DIR_TO_CHUNK_FILE/tas*185001-185201.nc

You can switch that off by specifying 'output_mode=r'. r is for replace and 'cdo cmor' will always creates a new file in that mode.

Best regards,
Fabi

RE: can we do cdo cmor multiple_netcdf_inputfiles.nc? - Added by arnold sullivan over 5 years ago

Hi Fabi,

Many thanks and will give a try.

Regards,

Arnold

    (1-2/2)