last modified Nov 22, 2018 12:28
You are here: Home / DICAD / Subproject 1 (DKRZ) / Data Workflows / Production Phase / Data Standard / cdo cmor Operator

cdo cmor Operator

Functionality of the 'cdo cmor' operator

In order to explain the functionality of the 'cdo cmor' operator, the data stream through the program is divided into a data and a metadata stream. The actual data is modified in the program only in two cases: If the sign of the variable has to be changed due to a wrong (in the sense of the project standard) flow direction or the unit of the target variable has to be changed. However, rewriting by CMOR involves possibly a change of the data shape (order of dimensions) or of the data precision.

The metadata workflow is illustrated in the slides below under 'Configuration and data streams'. The metadata can be divided into variable attributes, coordinates and their attributes, and global attributes according to the types of metadata that are defined within the netCDF format. The project standard defines variables and their attributes, summarized in tables which CMOR is able read. For CMOR to process correctly - e.g. finding the appropriate tables and table rows, information have to be provided by the user. This can be through the input file, through metadata files, or in the command line.

For the creation of metadata files, which are explained below, tools have been developed and provided. Attributes of the project variables, which are checked by CMOR againt the above mentionned tables, can be set in so-called 'mapping' tables. The global attributes that are used to describe the dataset can be passed to the operator through info tables. Grid info files are suitable for providing missing or replacing wrong coordinates.

The 'cmor' operator will retrieve required information as far as possible in the input data file and prepare it for input to the CMOR functions. This includes possibly axis types and directions, registration of auxiliary variables, calculation of bounds and time values, as well as grid constructions.

The CMOR library can either append its output data to an existing matching file (append mode) or write it to a new file (replace mode). The user can control the output mode by passing the control keyword 'output_mode' or specify a maximum file size. If the size of the existing file plus the volume of the data to be appended exceeds the maximum file size, the 'cmor' operator sets the output mode to 'replace'.