cmor_int.tex 3.39 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
5
6
7
8
9
\chapter{Introduction}

The Climate Data Operators ({\CDO}) software is a collection of operators
for standard processing of climate and forecast model data.

This document describes the additional {\CDO} operator cmor. This
operator is an interface to the CMOR library version 3 from PCMDI.
The CMOR support is available with {\CDO} release 1.8.0 or later.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
The \cite{CMOR} (Climate Model Output Rewriter) library comprises a set of
Uwe Schulzweida's avatar
Uwe Schulzweida committed
11
12
13
14
15
16
17
18
19
20
21
22
23
functions, that can be used to produce CF-compliant NetCDF files that 
fulfill the requirements of many of the climate community's standard
model experiments. These experiments are collectively referred to as
MIP's and include, for example, AMIP, CMIP, CFMIP, PMIP, APE, and IPCC 
scenario runs. The output resulting from CMOR is "self-describing" and
facilitates analysis of results across models.

Much of the metadata written to the output files is defined in
MIP-specific tables, typically made available from each MIP's web
site. CMOR relies on these tables to provide much of the metadata 
that is needed in the MIP context, thereby reducing the programming 
effort required of the individual MIP contributors.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
24
25
26
The  {\CDO} operator cmor was developed at the DKRZ and MPI for
Meteorology to provide an easy interface to the \cite{CMOR} library for a
standardized preparation of CMIP6 data.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
28
29
30
31
32
33
34
35
36

\chapter{Building CDO with CMOR}

This section describes how to build and install {\CDO} with CMOR
support on a UNIX system.

\section{CMOR}
 
CMOR version 3 needs to be installed before building {\CDO}.
CMOR depends on the following external libraries:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
37
netCDF4, HDF5, UDUNITS2, zlib and uuid.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
38
39
40
41
42
Make sure that you use exactly the same libraries for the {\CDO}
installation, otherwise the operator cmor will possibly not working correctly.

\section{Compilation}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
44
First go to the {\CDO}  \href{https://code.zmaw.de/projects/cdo}{\texttt{download}} page
(\texttt{https://code.zmaw.de/projects/cdo}) to get the latest distribution,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
if you do not have it yet.
Compilation is done by performing the following steps:

\begin{enumerate}
\item Unpack the archive, if you haven't done that yet:
   
\begin{verbatim}
    gunzip cdo-$VERSION.tar.gz    # uncompress the archive
    tar xf cdo-$VERSION.tar       # unpack it
    cd cdo-$VERSION
\end{verbatim}

\item Configure {\CDO} with CMOR support:

The configuration depends on the location of the external libraries. Here is one example:

\begin{verbatim}
./configure --with-cmor=<CMOR root directory> --with-netcdf=<NetCDFroot directory> \
            --with-uuid --with-udunits2 LIBS=-lossp-uuid                           \
            CPPFLAGS="-I<CMOR root dir>/include/cdTime -I<CMOR root dir>/include/json-c"
\end{verbatim}

For an overview of other configuration options use

\begin{verbatim}
    ./configure --help
\end{verbatim}

\item Compile the program by running make:

\begin{verbatim}
    make
\end{verbatim}

\end{enumerate}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
81
82
The program should compile without problems and the binary (\texttt{cdo}) 
should be available in the \texttt{src} directory of the distribution.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
83
84
85
86


\section{Installation}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
87
After the compilation of the source code do a \texttt{make install},
Uwe Schulzweida's avatar
Uwe Schulzweida committed
88
89
90
91
92
93
possibly as root if the destination permissions require that.

\begin{verbatim}
    make install
\end{verbatim} 

Uwe Schulzweida's avatar
Uwe Schulzweida committed
94
95
96
The binary is installed into the directory \texttt{$<$prefix$>$/bin}.
\texttt{$<$prefix$>$} defaults to \texttt{/usr/local} but can be changed with 
the \texttt{--prefix} option of the configure script.