Project

General

Profile

cdo cmor - Generating nc files in append mode

Added by Fabrizio Antonio about 7 years ago

Hi all,

I need to generate a single nc file starting from N nc input files.
I'm using cdo/cmor by iterating over all nc input files and by running the following commands for each of them:

cdo-1.8.0 --cmor -r -f nc selvar,ps -setpartabn,mappingTable.txt -settbounds,month $input_filename TEMP.nc
cdo-1.8.0 cmor,cmip6-cmor-tables-master/Tables/CMIP6_Amon.json,__info=myFile.rc,__oflag=a TEMP.nc

I also tried with 'chunk=a', '__chunk=append' and all the other combinations.

I'm following this link [[https://code.zmaw.de/projects/cdo/wiki/CDO_CMOR3_Operator]] and the corresponding .rc file,
and this link [[https://code.zmaw.de/projects/cdo/wiki/CMOR]] and the corresponding pptx.

Anyone could suggest me which is the right command?

In addition, which documentation I have to take into account (for example, oflag or chunk option) ?

Thanks in advance and Best Regards,
Fabrizio


Replies (1)

RE: cdo cmor - Generating nc files in append mode - Added by Fabian Wachsmann almost 7 years ago

Fabrizio Antonio wrote:

Hi all,

I need to generate a single nc file starting from N nc input files.
I'm using cdo/cmor by iterating over all nc input files and by running the following commands for each of them:

cdo-1.8.0 --cmor -r -f nc selvar,ps -setpartabn,mappingTable.txt -settbounds,month $input_filename TEMP.nc
cdo-1.8.0 cmor,cmip6-cmor-tables-master/Tables/CMIP6_Amon.json,__info=myFile.rc,__oflag=a TEMP.nc

I also tried with 'chunk=a', '__chunk=append' and all the other combinations.

I'm following this link [[https://code.zmaw.de/projects/cdo/wiki/CDO_CMOR3_Operator]] and the corresponding .rc file,
and this link [[https://code.zmaw.de/projects/cdo/wiki/CMOR]] and the corresponding pptx.

Anyone could suggest me which is the right command?

In addition, which documentation I have to take into account (for example, oflag or chunk option) ?

Thanks in advance and Best Regards,
Fabrizio

Hi Fabrizio,

since you are using CMOR3 you want to produce CMIP6 compliant data, correct?
Unfortunately, in CMOR3 the append mode changes in comparison to CMOR2. To set '__chunk=append' is correct for enabling the append mode in cdo1.8.0
however it is not clear how CMOR selects the chunk because of the changes between CMOR2 and CMOR3. I already asked the CMOR developer and let you know
if I get an answer.

I updated the cdo cmor documentations. Since last year I developed a cdo cmor with CMOR2.
In CDO version 1.8.2 it replaces the operator from 1.8.0 however in the next weeks, I try to enable CMOR3 for cdo cmor in 1.8.3.
The right documentation for CDO 1.8.0 is here: [https://code.zmaw.de/projects/cdo/wiki/CDO_CMOR_Operator_old].

So I only can give you two workaround advices:
- If possible you can merge the files before you use cdo cmor to avoid the append mode.
- If the CMIP5 standard is OK for you you can follow the new documentation pdf at the bottom of [https://code.zmaw.de/projects/cdo/wiki/CDO_CMOR_Operator]
and use cdo cmor with output_mode=a,last_chunk=chunkfile .

Best regards and I keep you informed,

Fabi

    (1-1/1)