Commit 1c9c5de3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cmor: added draft docu.

parent 3d9dbad2
......@@ -555,6 +555,10 @@ Operator catalog:
Magplot grfill Shaded gridfill plot
Magvector vector Vector arrows plot
Maggraph graph Line graph plot
-------------------------------------------------------------
CMOR
-------------------------------------------------------------
CMOR cmor CMOR
-------------------------------------------------------------
Climate indices
-------------------------------------------------------------
......
......@@ -142,6 +142,7 @@ Hurr Miscellaneous
Magplot Magics
Magvector Magics
Maggraph Magics
CMOR CMOR
EcaCdd Climate indices
EcaCfd Climate indices
EcaCsu Climate indices
......
\begin{thebibliography}{xx}
\bibitem[CDI]{CDI} \ \\
\href{https://code.zmaw.de/projects/cdi}
{Climate Data Interface},
from the
\href{http://www.mpimet.mpg.de}
{Max Planck Institute for Meteorologie}
\bibitem[CDO]{CDO} \ \\
\href{https://code.zmaw.de/projects/cdo}
{Climate Data Operators},
from the
\href{http://www.mpimet.mpg.de}
{Max Planck Institute for Meteorologie}
\bibitem[CMOR]{CMOR} \ \\
\href{git://github.com/PCMDI/cmor.git}
{Climate Model Output Rewriter},
from the
\href{https://www-pcmdi.llnl.gov}
{ Program For Climate Model Diagnosis and Intercomparison (PCMDI)}
\end{thebibliography}
\documentclass[DIV16,BCOR1cm,10pt,a4paper,fleqn,twoside]{scrreprt} % for pdf output
%\documentclass[DIV16,BCOR1cm,10pt,a4paper,fleqn]{scrreprt} % for pdf output
%\documentclass[DIV16,BCOR1cm,11pt,a4paper,fleqn]{report} % for pdf output
% To allow automatic selection of the right graphics type ...
% preset \pdfoutput for older latex installation, it is allways definted for
% news ones
\ifx\pdfoutput\undefined
\gdef\pdfoutput{0}
\fi
\newif\ifpdfx
\ifnum\pdfoutput=0
% latex is called for dvi output
\pdfxfalse
\usepackage{graphicx}
\else
% pdflatex is called for pdf output
\pdfxtrue
\usepackage[pdftex]{graphicx}
\usepackage[pdftex]{hyperref}
\fi
\usepackage{textcomp}
%\newcommand{\CDO}{{\bfseries\sffamily CDO\ }}
\newcommand{\CDO}{{\bfseries\sffamily CDO}}
\newcommand{\cdologo}{\includegraphics{logo/cdo_logo}}
\graphicspath{{figures/}}
% To define headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
% Headers and footers personalization using the `fancyhdr' package
\fancyhf{} % Clear all fields
\renewcommand{\headrulewidth}{0.2mm}
\renewcommand{\footrulewidth}{0.2mm}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}
%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
%\renewcommand{\sectionmark}[1]{\markleft{#1}}
\fancyhead[LO,RE]{\slshape \leftmark}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyfoot[LE,RO]{\Large\thepage}
%\fancyfoot[LO,RE]{\raisebox{-2.8mm}{\scalebox{0.17}{\cdologo}}}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt}
}
%\setlength{\footnotesep}{0cm}
%\setlength{\footskip}{-2cm}
%\renewcommand{\footnoterule}{\rule{0cm}{0cm}}
\usepackage{exscale}
\usepackage{array,colortbl} % color table
\usepackage{listings}
\usepackage{longtable}
\usepackage{color}
\definecolor{pcolor1}{rgb}{0.992, 0.980, 0.875} % rgb: 253/250/223
\definecolor{pcolor2}{rgb}{1.000, 0.925, 0.700} % rgb: 255/236/278
\definecolor{pcolor3}{rgb}{0.968, 0.756, 0.623} % rgb: 247/193/159
%\usepackage{ae} % fuer die "almost european" computer modern fonts
%\usepackage{url} % Standard-Paket fuer WWW-Adressen
%\typearea{10} % Einen sinnvollen Satzspiegel aktivieren
%Usage:
%pdflatex cdo.tex
%pdflatex cdo.tex
%cat > cdo.ist << 'EOF'
%delim_0 "{\\idxdotfill} "
%headings_flag 1
%heading_prefix "{\\centerline {\\Large \\bf "
%heading_suffix "}}"
%EOF
%makeindex -s cdo.ist cdo.idx
%pdflatex cdo
%thumbpdf cdo
%pdflatex cdo
\usepackage{thumbpdf}
%\usepackage{html}
\usepackage{makeidx}
%\ifpdf
%\usepackage[a4paper, colorlinks=true, pdfstartview=FitV, bookmarks=true, linkcolor=blue,
% citecolor=blue, urlcolor=blue, latex2html=true]{hyperref}
%\fi
\usepackage{hyperref}
\hypersetup{pdftoolbar=true,
pdfmenubar=true,
pdfwindowui=true,
% pdffitwindow=true,
pdfauthor={Uwe Schulzweida},
pdftitle={CDO Climate Data Operators},
pdfcreator={pdflatex + hyperref},
pdfstartview=FitV,
% pdfpagemode=FullScreen,
a4paper,
bookmarks=true,
linkcolor=blue,
citecolor=blue,
urlcolor=blue,
colorlinks=true}
\setlength{\parindent}{0em}
\setlength{\parskip}{1.5ex plus0.5ex minus0.5ex}
\extrarowheight1pt
\makeindex
%\newcommand{\ii}[1]{\textit{#1}} \newcommand{\nn}[1]{#1n}
%\renewcommand{\dotfill}{\leaders\hbox to 5p1{\hss.\hss}\hfill}
%\newcommand{\idxdotfill}{5p1{\hss.\hss}\hfill}
\newcommand{\idxdotfill}{\ \dotfill \ }
%\def\idxdotfill{\leaders\hbox to.6em{\hss .\hss}\hskip 0pt plus 1fill}
%\MakeShortVerb{\@}
\renewcommand{\indexname}{Operator index}
\newenvironment{defalist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1\ \ }
\setlength{\itemsep}{0mm}
\setlength{\itemindent}{0mm}
%\setlength{\listparindent}{25mm}
\setlength{\leftmargin}{\labelwidth}
%\setlength{\leftmargin}{25mm}
\setlength{\labelsep}{2mm}
\addtolength{\leftmargin}{\labelsep}
%\addtolength{\leftmargin}{8mm}
}}
{\end{list}}
\newenvironment{defalist2}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1\ \ }
\setlength{\itemsep}{0mm}
\setlength{\itemindent}{0mm}
%\setlength{\listparindent}{25mm}
\setlength{\leftmargin}{\labelwidth}
%\setlength{\leftmargin}{25mm}
\setlength{\labelsep}{2mm}
\addtolength{\leftmargin}{\labelsep}
\addtolength{\leftmargin}{8mm}
}}
{\end{list}}
\newcommand{\miniwidth}{\textwidth}
\setcounter{secnumdepth}{3}
\begin{document}
\begin{titlepage}
\vspace*{50mm}
{\Huge{\bf CMOR support in \CDO}}
\setlength{\unitlength}{1cm}
\begin{picture}(16,0.4)
\linethickness{1.5mm}
%\put(0,0.1){\line(1,0){15.85}}
\put(0,0.1){\line(1,0){16.3}}
\end{picture}
\begin{flushright}
\large\bf{CMORizing of climate model data \\ October 2016}
\end{flushright}
\vfill
\Large{\bf Karl--Hermann Wieners, Uwe Schulzweida}
\Large{\sl Max Planck Institute for Meteorology}
\Large{\bf Mathis Rosenhauer}
\Large{\sl Deutsches Klimarechenzentrum (DKRZ)}
\begin{picture}(16,1)
\linethickness{1.0mm}
%\put(0,0.7){\line(1,0){15.85}}
\put(0,0.7){\line(1,0){16.3}}
\end{picture}
\end{titlepage}
\tableofcontents
\input{cmor_int}
\input{cmor_ref}
\input{bibcmor}
%\input{appendix}
\clearpage
\ifpdfx
\phantomsection
\addcontentsline{toc}{chapter}{\indexname}
\printindex
\else
\input{catalog}
\input{alphabetic_list}
\fi
\end{document}
\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.
The CMOR (Climate Model Output Rewriter) library comprises a set of
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.
The CDO operator cmor reads the data with the internal IO library CDI
and writes the NetCDF result directly with the CMOR library.
\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:
netCDF-4.0 , HDF5, UDUNITS-2, zlib and uuid.
Make sure that you use exactly the same libraries for the {\CDO}
installation, otherwise the operator cmor will possibly not working correctly.
\section{Compilation}
First go to the {\CDO} \href{https://code.zmaw.de/projects/cdo}{\tt download} page
({\tt https://code.zmaw.de/projects/cdo}) to get the latest distribution,
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}
The program should compile without problems and the binary ({\tt cdo})
should be available in the {\tt src} directory of the distribution.
\section{Installation}
After the compilation of the source code do a {\tt make install},
possibly as root if the destination permissions require that.
\begin{verbatim}
make install
\end{verbatim}
The binary is installed into the directory {\tt $<$prefix$>$/bin}.
{\tt $<$prefix$>$} defaults to {\tt /usr/local} but can be changed with
the {\tt --prefix} option of the configure script.
\chapter{\label{refman}CMOR operator reference manual}
This section gives a description of all {\CDO} operators to generate plots.
Related operators are grouped to modules.
For easier description all single input files are named {\tt ifile} or {\tt ifile1}, {\tt ifile2}, etc.,
and an arbitrary number of input files are named {\tt ifiles}.
All output files are named {\tt ofile} or {\tt ofile1}, {\tt ofile2}, etc.
\hspace{3mm}
\input{ref_list_cmor}
\input{ref_man_cmor}
......@@ -264,14 +264,14 @@ while (<MOFILE>) {
print TRLIST "Here is a short overview of all operators in this section:\\\\\n";
print TRLIST "\n";
if ( $shortname ne "climat" && $shortname ne "magics" ) {
if ( $shortname ne "climat" && $shortname ne "magics" && $shortname ne "cmor" ) {
print TROVER "\\newpage\n";
print TROVER "\\section{$chap}\n";
print TROVER "\\input{ref_intro_${shortname}}\n";
print TROVER "\\input{ref_list_${shortname}}\n";
print TROVER "\\input{ref_man_${shortname}}\n\n";
}
if ( $shortname eq "climat" || $shortname eq "magics" ) {
if ( $shortname eq "climat" || $shortname eq "magics" || $shortname eq "cmor" ) {
# print "find eca!";
$refskip = 1;
}
......
pdflatex cdo_cmor.tex
pdflatex cdo_cmor.tex
cat > cdo_cmor.ist << 'EOF'
delim_0 "{\\idxdotfill} "
headings_flag 1
heading_prefix "{\\centerline {\\Large \\bf "
%heading_prefix "{\\centerline {\\bfseries "
heading_suffix "}}"
EOF
makeindex -s cdo_cmor.ist cdo_cmor.idx
pdflatex cdo_cmor
#thumbpdf cdo
pdflatex cdo_cmor
......@@ -2,7 +2,7 @@
@NewPage
@Name = CMOR
@Title = CMOR
@Section = Miscellaneous
@Section = CMOR
@Arguments = ifile
@Operators = cmor
......
......@@ -578,7 +578,7 @@ static modules_t Modules[] =
{ Change, ChangeHelp, ChangeOperators, 1, CDI_REAL, 1, 1 },
{ Change_e5slm, NULL, Change_e5slmOperators, 0, CDI_REAL, 1, 1 },
{ Cloudlayer, NULL, CloudlayerOperators, 1, CDI_REAL, 1, 1 },
{ CMOR, NULL, CMOROperators, 1, CDI_REAL, 1, 0 },
{ CMOR, CMORHelp, CMOROperators, 1, CDI_REAL, 1, 0 },
{ Collgrid, CollgridHelp, CollgridOperators, 1, CDI_REAL, -1, 1 },
{ Command, NULL, CommandOperators, 0, CDI_REAL, 1, 0 },
{ Comp, CompHelp, CompOperators, 1, CDI_REAL, 2, 1 },
......
......@@ -5130,6 +5130,25 @@ static const char *MaggraphHelp[] = {
NULL
};
static const char *CMORHelp[] = {
"NAME",
" cmor - CMOR",
"",
"SYNOPSIS",
" cmor,tab[,options] ifile",
"",
"DESCRIPTION",
" Options is a comma separated list of \"key=value\" pairs with optional parameters.",
"",
"PARAMETER",
" tab STRING Name of the CMOR table as specified from PCMDI",
" var STRING Comma separated list of variables",
" expinfo STRING Experiment specific parameter file",
" modinfo STRING Model specific parameter file",
" userinfo STRING User/institute specific parameter file",
NULL
};
static const char *EcaCddHelp[] = {
"NAME",
" eca_cdd - Consecutive dry days index per time period",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment