source: palm/trunk/TUTORIAL/SOURCE/program_control.tex @ 921

Last change on this file since 921 was 915, checked in by maronga, 13 years ago

added first LaTeX source code for the new tutorial

  • Property svn:keywords set to Id
File size: 16.5 KB
Line 
1% $Id: program_control.tex 915 2012-05-30 15:11:11Z maronga $
2\input{header_tmp.tex}
3%\input{header_lectures.tex}
4
5\usepackage[utf8]{inputenc}
6\usepackage{ngerman}
7\usepackage{pgf}
8\usetheme{Dresden}
9\usepackage{subfigure}
10\usepackage{units}
11\usepackage{multimedia}
12\usepackage{hyperref}
13\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
14\usepackage{xmpmulti}
15\usepackage{tikz}
16\usetikzlibrary{shapes,arrows,positioning,decorations.pathreplacing}
17\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
18
19%---------- neue Pakete
20\usepackage{amsmath}
21\usepackage{amssymb}
22\usepackage{multicol}
23\usepackage{pdfcomment}
24
25\institute{Institut fÌr Meteorologie und Klimatologie, Leibniz UniversitÀt Hannover}
26\date{last update: \today}
27\event{PALM Seminar}
28\setbeamertemplate{navigation symbols}{}
29
30\setbeamertemplate{footline}
31  {%
32    \begin{beamercolorbox}[rightskip=-0.1cm]&
33     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
34    \end{beamercolorbox}
35    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
36      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}%
37      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}%
38    \end{beamercolorbox}%
39%    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}%
40%    \end{beamercolorbox}
41  }%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.eps}}
42
43\title[Program Control by Physical Parameters]{Program Control by Physical Parameters}
44\author{Siegfried Raasch}
45
46% Notes:
47% jede subsection bekommt einen punkt im menu (vertikal ausgerichtet.
48% jeder frame in einer subsection bekommt einen punkt (horizontal ausgerichtet)
49\begin{document}
50
51\begin{frame}
52\titlepage
53\end{frame}
54
55% Folie 1
56\begin{frame}
57   \frametitle{Steering of PALM and Interpreting the Output}
58   \begin{itemize}
59      \item<1->{This section section describes how to steer the model and how to interpret the model output (\textbf{it does not explain, how to start and control model runs}).}
60      \item<2->{It gives a general overview of the input and output files and explaines the contents of the most important files in some detail.}
61   \end{itemize}
62\end{frame}
63
64% Folie 2
65
66\begin{frame}
67   \frametitle{PALM Input/Output Overview (I)}
68   \tikzstyle{start} = [ellipse, draw, fill=green!20, font=\small]   
69   \tikzstyle{yellow1} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, font=\Tiny]
70   \tikzstyle{yellow2} = [rectangle, draw, fill=yellow!20, text width=0.1\textwidth, font=\Tiny]
71   \tikzstyle{yellow3} = [rectangle, draw, fill=yellow!20, text width=0.03\textwidth, font=\Tiny]
72   \tikzstyle{red} = [rectangle, draw, fill=red!100, text width=0.1\textwidth, font=\Tiny]
73   \tikzstyle{red2} = [rectangle, draw, fill=red!100, text width=0.03\textwidth, font=\Tiny]
74   \tikzstyle{orange1} = [rectangle, draw, fill=orange!50, text width=0.1\textwidth, font=\Tiny]
75   \tikzstyle{orange2} = [rectangle, draw, fill=orange!50, text width=0.11\textwidth, font=\Tiny]
76   \tikzstyle{orange3} = [rectangle, draw, fill=orange!50, text width=0.03\textwidth, font=\Tiny]
77
78   \tikzstyle{line} = [draw, -latex']
79   
80   \begin{tikzpicture} [auto]
81    \node[start] (palm) {\textbf{PALM}};
82
83    \uncover<2->{\node[yellow1] (parameterfile) [above left=1.5cm of palm] {parameter file \\ for steering};}
84    \uncover<6->{\node[red] (restartdata1) [above right=1.8cm of palm] {restart data};}
85    \uncover<5->{\node[red] (restartdata2) [below=4.5cm of restartdata1] {restart data};}
86
87    \uncover<3->{\node[yellow1] (runcontrol) [below=1.0cm of palm]{run control output\\ (parameter settings + \\ timestep informations)};}
88    \uncover<3->{\node[yellow2] (headerfile) [left=0.5cm of runcontrol]{header file};}
89    \uncover<3->{\node[yellow2] (cpumeasure) [left=0.5cm of headerfile]{cpu\\ measurements};}
90
91    \uncover<4->{\node[orange1] (1dmean) [below=0.5cm of cpumeasure] {1D mean \\ profiles};
92    \node[orange1] (2dsections) [right=0.5cm of 1dmean] {2D sections};
93    \node[orange1] (3ddata) [right=0.5cm of 2dsections] {3D data};
94
95    \node[orange1] (timeseries) [below=0.2cm of 1dmean] {time series};
96    \node[orange2] (2dsectionstime) [right=0.5cm of timeseries] {2D sections \\ time averaged};
97    \node[orange2] (3ddatatime) [right=0.39cm of 2dsectionstime] {3D data \\ time averaged};}
98
99    \node (program) [right=3.1cm of palm] {program};
100    \uncover<2->{\node (steeringdata) [right=0.6cm of restartdata1] {steering data};}
101    \uncover<3->{\node (run) [right=2.5cm of runcontrol] {run informations};}
102    \uncover<4->{\node (analysis) [right=3.6cm of 3ddata] {analysis data};}
103
104    \uncover<7->{
105    \node[yellow3] (yellow) [below=0.5 of timeseries] {};
106    \node (ascii) [right=0.1cm of yellow] {ASCII};
107    \node[orange3] (orange) [right=0.4cm of ascii] {};
108    \node (netcdf) [right=0.1cm of orange] {netCDF};
109    \node[red2] (red) [right=0.4cm of netcdf] {};
110    \node (binary) [right=0.1cm of red] {binary};}
111
112    \path<2->[line] (parameterfile) -- (palm);
113    \path<3->[line] (palm) -- (cpumeasure);
114    \path<3->[line] (palm) -- (headerfile);
115    \path<3->[line] (palm) -- (runcontrol);
116    \path<4->[line] (palm) -- (1dmean);
117    \path<4->[line] (palm) -- (2dsections);
118    \path<4->[line] (palm) -- (3ddata);
119    \path<4->[line] (palm) -- (timeseries);
120    \path<4->[line] (palm) -- (2dsectionstime);
121    \path<4->[line] (palm) -- (3ddatatime);
122    \path<5->[line] (palm) -- (restartdata2);
123    \path<6->[line] (restartdata1) -- (palm);
124    \path<6->[line,dashed] (restartdata2) -- (restartdata1);   
125   \end{tikzpicture}
126\end{frame}
127
128% Folie 3
129\begin{frame}
130   \frametitle{PALM Input/Output Overview (I)}
131   \tikzstyle{start} = [ellipse, draw, fill=green!20, font=\small]   
132   \tikzstyle{yellow1} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, font=\Tiny]
133   \tikzstyle{yellow2} = [rectangle, draw, fill=yellow!20, text width=0.1\textwidth, font=\Tiny]
134   \tikzstyle{yellow3} = [rectangle, draw, fill=yellow!20, text width=0.03\textwidth, font=\Tiny]
135   \tikzstyle{yellow4} = [rectangle, draw, fill=yellow!100, text width=1.8cm, font=\Tiny]
136   \tikzstyle{red} = [rectangle, draw, fill=red!100, text width=0.1\textwidth, font=\Tiny]
137   \tikzstyle{red2} = [rectangle, draw, fill=red!100, text width=0.03\textwidth, font=\Tiny]
138   \tikzstyle{orange1} = [rectangle, draw, fill=orange!50, text width=0.1\textwidth, font=\Tiny]
139   \tikzstyle{orange2} = [rectangle, draw, fill=orange!50, text width=0.11\textwidth, font=\Tiny]
140   \tikzstyle{orange3} = [rectangle, draw, fill=orange!50, text width=0.03\textwidth, font=\Tiny]
141
142   \tikzstyle{line} = [draw, -]
143   
144   \begin{tikzpicture} [auto]
145    \node[start] (palm) {\textbf{PALM}};
146
147    \node[yellow1] (parameterfile) [above left=1cm of palm] {parameter file \\ for steering};
148    \node[red] (restartdata1) [above right=1.3cm of palm] {restart data};
149    \node[red] (restartdata2) [below=2.5cm of restartdata1] {restart data};
150
151    \node[yellow1] (runcontrol) [below=0.4cm of palm]{run control output\\ (parameter settings + \\ timestep informations)};
152    \node[yellow2] (headerfile) [left=0.5cm of runcontrol]{header file};
153    \node[yellow2] (cpumeasure) [left=0.5cm of headerfile]{cpu\\ measurements};
154
155    \node[orange1] (1dmean) [below=0.3cm of cpumeasure] {1D mean \\ profiles};
156    \node[orange1] (2dsections) [right=0.5cm of 1dmean] {2D sections};
157    \node[orange1] (3ddata) [right=0.5cm of 2dsections] {3D data};
158
159    \node[orange1] (timeseries) [below=0.2cm of 1dmean] {time series};
160    \node[orange2] (2dsectionstime) [right=0.5cm of timeseries] {2D sections \\ time averaged};
161    \node[orange2] (3ddatatime) [right=0.39cm of 2dsectionstime] {3D data \\ time averaged};
162
163    \node (program) [right=3.1cm of palm] {program};
164    \node (steeringdata) [right=0.6cm of restartdata1] {steering data};
165    \node (run) [right=2.5cm of runcontrol] {run informations};
166    \node (analysis) [right=3.6cm of 3ddata] {analysis data};
167   
168    \node[yellow3] (yellow) [below=0.3 of timeseries] {};
169    \node (ascii) [right=0.1cm of yellow] {ASCII};
170    \node[orange3] (orange) [right=0.4cm of ascii] {};
171    \node (netcdf) [right=0.1cm of orange] {netCDF};
172    \node[red2] (red) [right=0.4cm of netcdf] {};
173    \node (binary) [right=0.1cm of red] {binary};
174
175    %--------- neue Ordner
176    \node[yellow4] (currentversion) [above=0.6cm of parameterfile] {current\_version/};
177    \node[yellow4] (jobs) [right=0.3cm of currentversion] {JOBS/};
178    \node[yellow4] (runidentifier) [right=0.4cm of jobs] {\textless run\_identifier \textgreater/};
179    \node[yellow4] (input) [above right=1cm of runidentifier] {INPUT/};
180    \node[yellow4] (monitoring) [below=0.1cm of input] {MONITORING/};
181    \node[yellow4] (output) [below=0.1cm of monitoring] {OUTPUT/};
182    \node[yellow4] (restart) [below=0.1cm of output] {RESTART\_DATA/};
183
184    \node[yellow4] (input2) [below=0.1cm of parameterfile] {INPUT/};
185    \node[yellow4] (monitoring2) [above=0.6cm of headerfile] {MONITORING/};
186    \node[yellow4] (restart2) [below=0.1cm of restartdata1] {RESTART\_DATA/};
187    \node[yellow4] (tmpdata) [below=0.1cm of restart2] {/tmp\_data\_catalog/};
188    \node[yellow4] (output2) [below=0.5cm of restartdata2] {OUTPUT/};
189
190    \path[line] (currentversion) -- (jobs);
191    \path[line] (jobs) -- (runidentifier);
192    \path[line] (runidentifier.east) -- (input.west);
193    \path[line] (runidentifier.east) -- (monitoring.west);
194    \path[line] (runidentifier.east) -- (output.west);
195    \path[line] (runidentifier.east) -- (restart.west);
196
197    \draw[decorate,decoration={brace,raise=6pt,amplitude=9pt},thick]
198       (-4.5,-0.95)--(-1,-0.95) ;
199    \draw[decorate,decoration={brace,mirror,raise=5pt,amplitude=6pt},thick]
200       (0.45,-3)--(0.45,-1.9) ;
201
202
203%     \path[line] (monitoring2.south) -- (cpumeasure.north);
204%     \path[line] (monitoring2.south) -- (headerfile.north);
205%     \path[line] (monitoring2.south) -- (runcontrol.north);
206   
207   \end{tikzpicture}
208\end{frame}
209
210%---------------------------------------------------
211\begin{frame}
212   \frametitle{The Parameter File}
213   \tikzstyle{box} = [rectangle, draw, text width=\textwidth, font=\tiny]
214   \footnotesize
215   \begin{itemize}
216      \item{Physical and numerical features of a PALM run (e.g. initial and boundary conditions, numerical methods)
217            are controlled by a so called \textbf{parameter file} which uses FORTRAN-NAMELIST syntax.} 
218      \item{General structure of a FORTRAN-NAMELIST file}
219   \end{itemize}   
220   \begin{tikzpicture}[auto]     
221      \node[box](firstbox){ \begin{tabbing}       
222         \&abcd \quad \=no\_of\_eggs = 100, litres\_of\_milk = 50.0, \= \\
223                 \>kilos\_of\_butter = 20.0, \> /  \end{tabbing}};       
224   \end{tikzpicture}
225   \begin{itemize}
226      \item{This file can be read from a FORTRAN program in the following way:} 
227   \end{itemize}
228   \begin{tikzpicture}[auto, node distance=0]     
229      \node[box](secondbox){ \begin{tabbing} 
230         INTEGER :: \=no\_of\_eggs = 30 \\
231         REAL :: \> litres\_of\_milk = 0.0, kilos\_of\_butter, kilos\_of\_cream = 33.0 \\
232         NAMELIST /abcd/ \quad no\_of\_eggs, litres\_of\_milk, kilos\_of\_butter, kilos\_of\_cream \\
233         \par\bigskip
234         OPEN ( 1, FILE='Filename' ) \\
235         READ ( 1, abcd ) \end{tabbing}};       
236   \end{tikzpicture}
237   \normalsize 
238\end{frame}
239
240
241%-----------------------------------------------------
242\begin{frame}
243   \frametitle{The Run Control File}
244   \scriptsize
245   \begin{itemize}
246      \item{For initial runs, the parameter settings and many additional informations about the run (header informations) are printed at the beginning of this file.}
247      \item<2->{The parameter settings are followed by values of specific model variables for certain timesteps (one line for each timestep, the output intervall can be
248            controlled by run parameter {\tt dt\_run\_control}).}
249   \end{itemize}
250   \onslide<3->{
251   \textbf{Contents of this timestep output should be carefully checked after each run, because it allows a first control, if the model had run correctly, or if any
252           errors have occurred!}}
253   \includegraphics[width=1.6\textwidth]{program_control_figures/run_control_file.png}
254   \normalsize
255\end{frame}
256
257%-----------------------------------------------------
258\begin{frame}
259   \frametitle{The Header File}
260   \scriptsize
261   \begin{itemize}
262      \item{The header file contains nearly the same informations as the header of the run control file of the initial run.} 
263      \item<2->{It is generated for \textbf{every} run (initial run as well as restart runs).}
264      \item<3->{It is created at the beginning \textbf{and} at the end of a run (overwrites the file created at beginning).}
265      \item<4->{Only at the end, cpu time information is included!}
266   \end{itemize}
267   \begin{center}
268   \includegraphics[width=0.9\textwidth]{program_control_figures/header_file.png}
269   \end{center}
270   \normalsize
271\end{frame}
272
273%-------------------------------
274\begin{frame}
275   \frametitle{CPU Measurements File}
276   \begin{columns}[c]
277   \column{0.42\textwidth}
278      \scriptsize
279      \begin{itemize}
280         \item{Contains informations about the CPU requirements of single parts of the program.}
281         \item<2->{It should be inspected regularly in order to find out, if the code is still well optimized (e.g. load balance).} 
282         \item<3->{Prognostic-equations and pressure solver ({\tt pres}) should be the main consumer.}
283         \item<4->{For larger grids ($400^3$ points), {\tt pres} may need up to 50\% of the total time.}
284         \item<5->{Time needed for communication (sum of {\tt exchange\_horiz}({\tt \_2d}) and {\tt mpi\_alltoall}) should not exceed about 10-15\% of the total time.}
285      \end{itemize}
286      \normalsize
287   \column{0.58\textwidth}
288      \includegraphics[width=\textwidth]{program_control_figures/cpu_measurements_file.png}
289   \end{columns}
290\end{frame}
291
292%-----------------------------------------------------
293\begin{frame}
294   \frametitle{Other Files}
295   \begin{itemize}
296      \item<1->{Data output files (1D profiles and timeseries, 2D cross sections, 3D volume data) are by default in \textbf{netCDF} format which is suitable to be processed by
297            public domain graphics software like \textbf{ncview}, \textbf{ferret}, \textbf{ncl} (used by PALM group),\\
298            \textbf{IDL}, etc. \\
299            For a first look, {\tt ncview} is a convenient tool.}
300      \item<2->{{\tt ncdump} can be used to display the netCDF file contents in ASCII format ({\tt ncdump -c} displays only header informations).}
301      \item<3->{The simple viewer for netCDF-data - {\tt ncview} - as well as ncl graphic software is available on the IMUK-cluster.}
302   \end{itemize}
303\end{frame}
304
305%----------------------------------------------------
306\begin{frame}
307   \frametitle{Steering by Unix Environment Variables}
308   \footnotesize
309   Most features of PALM are controlled by the parameter file but a few are exclusively controlled by unix environment variables. The most important one is  {\tt write\_binary}. \\
310   Setting \\
311   \begin{centering} {\tt write\_binary = true} \end{centering} \\
312   within the shell causes PALM to write binary data for restart runs at the end of a run.
313   
314   Setting of these environment variables is automatically done by  mrun. It generates a local file (named {\tt ENVPAR}) in FORTRAN-NAMELIST-format, which is then read by PALM. This file
315   includes the following variables: \\
316 
317   \tiny
318   \begin{tabular}{|p{3cm}|p{5cm}|p{2cm}|} \hline
319      \textbf{Variable}                 & \textbf{Meaning} & \textbf{Value set by {\tt mrun}-option} \\
320      \hline
321      {\tt host}                        & host identifier that mrun is using for the host on which the job is running & {\tt -h}    \\
322      {\tt maximum\_cpu\_time\_allowed} & cpu time allowed for the job                                                & {\tt -t}    \\
323      {\tt run\_identifier}             & identification string for the run    & {\tt -d}    \\
324      {\tt tasks\_per\_node}            & number of MPI tasks to be started on each node     & {\tt -T}     \\
325      {\tt write\_binary}               & switch for writing binary data to be used for restart runs     & {\tt -r} (+setting in configuration file {\tt .mrun.config)}       \\
326      \hline
327   \end{tabular}
328   \normalsize
329\end{frame}
330
331%-----------------------------------------
332\begin{frame}
333   \frametitle{PALM / netCDF Documentation}
334   \begin{itemize}
335      \item<1->{A detailed description of how to use PALM and a complete list of steering parameters and their meaning can be found on the PALM-server: \\
336            \par\bigskip
337            \textbf{http://palm.muk.uni-hannover.de/wiki/doc/toc}}
338      \par\bigskip
339      \item<2->{General information about the netCDF data format can be found under \\
340            \par\bigskip
341            \textbf{http://www.unidata.ucar.edu/software/netcdf/}}
342   \end{itemize}
343\end{frame}
344
345\end{document}
Note: See TracBrowser for help on using the repository browser.