Commit 6e027146 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added Magplot docu

parent 12fb91ea
......@@ -58,6 +58,7 @@ doc/tex/cdo_adv.tex -text
doc/tex/cdo_con.tex -text
doc/tex/cdo_eca.tex -text
doc/tex/cdo_int.tex -text
doc/tex/cdo_magics.tex -text
doc/tex/cdo_openmp.tex -text
doc/tex/cdo_ref.tex -text
doc/tex/cdo_ref_over.tex -text
......@@ -95,10 +96,13 @@ doc/tex/grids/plotjobgmt -text
doc/tex/install.tex -text
doc/tex/logo/cdo_logo.eps -text
doc/tex/logo/cdo_logo.pdf -text
doc/tex/magics_int.tex -text
doc/tex/magics_ref.tex -text
doc/tex/makedoc -text
doc/tex/makehtml -text
doc/tex/makepdf -text
doc/tex/makepdfeca -text
doc/tex/makepdfmagics -text
doc/tex/makerefcard -text
doc/tex/missval.tex -text
doc/tex/mod/Adisit -text
......@@ -192,6 +196,7 @@ doc/tex/mod/Inttime -text
doc/tex/mod/Intyear -text
doc/tex/mod/Invert -text
doc/tex/mod/Invertlev -text
doc/tex/mod/Magplot -text
doc/tex/mod/Maskbox -text
doc/tex/mod/Maskregion -text
doc/tex/mod/Mastrfu -text
......
......@@ -538,6 +538,12 @@ Operator catalog:
Strbre strbre Strong breeze days index per time period
Strgal strgal Strong gale days index per time period
Hurr hurr Hurricane days index per time period
-------------------------------------------------------------
Magics
-------------------------------------------------------------
Magplot contour Contour plot
Magplot shaded Shaded contour plot
Magplot grfill Shaded grid boxes
-------------------------------------------------------------
Climate indices
-------------------------------------------------------------
......
......@@ -137,6 +137,7 @@ Strwin Miscellaneous
Strbre Miscellaneous
Strgal Miscellaneous
Hurr Miscellaneous
Magplot Magics
EcaCdd Climate indices
EcaCfd Climate indices
EcaCsu Climate indices
......
\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 Magics++ 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{XXX \\ January 2016}
\end{flushright}
\vfill
\Large{\bf Kameswarrao Modali, Ralf M\"uller, Uwe Schulzweida}
\Large{\sl Max Planck Institute for Meteorology}
\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{magics_int}
\input{magics_ref}
\input{bibmagics}
%\input{appendix}
\clearpage
\ifpdfx
\phantomsection
\addcontentsline{toc}{chapter}{\indexname}
\printindex
\else
\input{catalog}
\input{alphabetic_list}
\fi
\end{document}
......@@ -88,3 +88,9 @@
\input{ref_list_miscel}
\input{ref_man_miscel}
\newpage
\section{Magics}
\input{ref_intro_magics}
\input{ref_list_magics}
\input{ref_man_magics}
\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 additional {\CDO} operators to ....
Magics++ is the latest generation of the ECMWF's Meteorological plotting software MAGICS.
Magics++ supports the plotting of contours, wind fields, observations, satellite images, symbols, text,
axis and graphs (including box plots). Data fields to be plotted may be presented in various formats, for
instance GRIB 1 and 2 code data, gaussian grid, regularly spaced grid and fitted data,BUFR and
NetCDF format or retrieved from an ODB database. The produced meteorological plots can be saved in
various formats, such as PostScript, EPS, PDF, GIF, PNG and SVG.[1]
In order to rapidly generate high quality pictures from the data obtained from the existing CDO
operators, the CDO has been interfaced with Magics++ library. As a first step,some new CDO plotting
operators are created to cater to the most essential/ frequently used plotting features viz., graph,
contour, vector. These operators rely on the Magics++ and generate output files in the various formats
supported by Magics++.
Magics++ provides a vast number of parameters to control the attributes of various plotting
features. Keeping in view, the usability of CDO users, currently only a few of these parameters are
supported and accessible to the CDO users as command line arguments for the respective operators.
The users are requested to refer to the Magics++ manual[1] for detailed description of the various
parameters available for the various features. An option is provided to CDO users to input some of
these parameters in an XML file which can be passed as an argument for the CDO plotting operators.
The description of the new plotting operators and the various arguments that can be passed for these
operators is provided in the subsequent sections.
\chapter{\label{refman}Graphic reference manual}
This section gives a description of all {\CDO} operators to ...
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_magics}
\input{ref_man_magics}
pdflatex cdo_magics.tex
pdflatex cdo_magics.tex
cat > cdo_magics.ist << 'EOF'
delim_0 "{\\idxdotfill} "
headings_flag 1
heading_prefix "{\\centerline {\\Large \\bf "
%heading_prefix "{\\centerline {\\bfseries "
heading_suffix "}}"
EOF
makeindex -s cdo_magics.ist cdo_magics.idx
pdflatex cdo_magics
#thumbpdf cdo
pdflatex cdo_magics
@BeginModule
@NewPage
@Name = Magplot
@Title = Lat/Lon plot
@Section = Magics
@Arguments = ifile ofile
@Operators = contour shaded grfill
@BeginDescription
This operator generates 2D Lon/Lat plots.
The data for the plot is read from @file{ifile}.
The result is written to @file{ofile}. The default format is XXX, this can be changed with the device parameter.
The type of the plot depends on the choosen operator.
Here is a list of all common plot parameters:
@BeginTable
@bold{Keyname} & @bold{Type} & @bold{Description}
device & STRING & Output device (ps, eps, pdf, png, gif, gif_animation, jpeg, svg, kml)
projection & STRING & Projection (cylindrical, polar_stereographic, robinson, mercator)
style & STRING & Contour line style (solid, dash, dot, chain_dash, chain_dot)
min & FLOAT & Minimum value
max & FLOAT & Maximum value
@EndTable
@EndDescription
@EndModule
@BeginOperator_contour
@Title = Contour plot
@Parameter = params
@BeginDescription
Contour plot
@EndDescription
@EndOperator
@BeginOperator_shaded
@Title = Shaded contour plot
@Parameter = params
@BeginDescription
Shaded contour plot
@EndDescription
@EndOperator
@BeginOperator_grfill
@Title = Shaded grid boxes
@Parameter = params
@BeginDescription
Shaded grid boxes
@EndDescription
@EndOperator
@BeginParameter
@Item = params
STRING Comma separated list of plot parameters
@EndParameter
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "par_io.h"
#include "pstream.h"
#if defined(HAVE_LIBCMOR)
......
......@@ -556,7 +556,8 @@ void *Maggraph(void *argument);
static modules_t Modules[] =
{
/* stream out -1 means usage of obase */
// stream in -1 means: unlimited number of input streams
// stream out -1 means: usage of obase
/*
function help function operator names number num streams
type in out
......
......@@ -4814,6 +4814,41 @@ static const char *HurrHelp[] = {
NULL
};
static const char *MagplotHelp[] = {
"NAME",
" contour, shaded, grfill - Lat/Lon plot",
"",
"SYNOPSIS",
" <operator>,params ifile ofile",
"",
"DESCRIPTION",
" This operator generates a 2D Lon/Lat plot.",
" The data for the plot is read from ifile.",
" The result is written to ofile. The default format is XXX, this can be changed with the device parameter.",
" The type of the plot depends on the choosen operator.",
" ",
" Here is a list of all common plot parameters:",
" ",
" Keyname & Type & Description ",
" device & STRING & Output device (ps, eps, pdf, png, gif, gif_animation, jpeg, svg, kml)",
" projection & STRING & Projection (cylindrical, polar_stereographic, robinson, mercator)",
" style & STRING & Contour line style (solid, dash, dot, chain_dash, chain_dot)",
" min & FLOAT & Minimum value",
" max & FLOAT & Maximum value",
"",
"OPERATORS",
" contour Contour plot",
" Contour plot",
" shaded Shaded contour plot",
" Shaded contour plot",
" grfill Shaded grid boxes",
" Shaded grid boxes",
"",
"PARAMETER",
" params STRING Comma separated list of plot parameters",
NULL
};
static const char *EcaCddHelp[] = {
"NAME",
" eca_cdd - Consecutive dry days index per time period",
......
Supports Markdown
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