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

Last change on this file since 1258 was 973, checked in by maronga, 12 years ago

tutorial updates

  • Property svn:keywords set to Id
File size: 18.2 KB
Line 
1% $Id: program_control.tex 973 2012-08-07 16:03:47Z raasch $
2\input{header_tmp.tex}
3%\input{header_LECTURE.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% Folie 1
51\begin{frame}
52\titlepage
53\end{frame}
54
55% Folie 2
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 3
65\begin{frame}
66   \frametitle{PALM Input/Output Overview (I)}
67   \tikzstyle{start} = [ellipse, draw, fill=green!20, font=\small]   
68   \tikzstyle{yellow1} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, font=\Tiny]
69   \tikzstyle{yellow2} = [rectangle, draw, fill=yellow!20, text width=0.1\textwidth, font=\Tiny]
70   \tikzstyle{yellow3} = [rectangle, draw, fill=yellow!20, text width=0.03\textwidth, font=\Tiny]
71   \tikzstyle{red} = [rectangle, draw, fill=red!100, text width=0.1\textwidth, font=\Tiny]
72   \tikzstyle{red2} = [rectangle, draw, fill=red!100, text width=0.03\textwidth, font=\Tiny]
73   \tikzstyle{orange1} = [rectangle, draw, fill=orange!50, text width=0.1\textwidth, font=\Tiny]
74   \tikzstyle{orange2} = [rectangle, draw, fill=orange!50, text width=0.11\textwidth, font=\Tiny]
75   \tikzstyle{orange3} = [rectangle, draw, fill=orange!50, text width=0.03\textwidth, font=\Tiny]
76
77   \tikzstyle{line} = [draw, -latex']
78   
79   \begin{tikzpicture} [auto]
80    \node[start] (palm) {\textbf{PALM}};
81
82    \uncover<2->{\node[yellow1] (parameterfile) [above left=1.5cm of palm] {parameter file \\ for steering};}
83    \uncover<6->{\node[red] (restartdata1) [above right=1.8cm of palm] {restart data};}
84    \uncover<5->{\node[red] (restartdata2) [below=4.5cm of restartdata1] {restart data};}
85
86    \uncover<4->{
87    \node[orange1] (timeseries) [below left=4.4cm of palm] {time series};
88    \node[orange2] (2dsectionstime) [right=0.5cm of timeseries] {2D sections \\ time averaged};
89    \node[orange2] (3ddatatime) [right=0.39cm of 2dsectionstime] {3D data \\ time averaged};
90
91    \path<4->[line] (palm) -- (timeseries);
92    \path<4->[line] (palm) -- (2dsectionstime);
93    \path<4->[line] (palm) -- (3ddatatime);
94   
95    \node[orange1] (1dmean) [above=0.2cm of timeseries] {1D mean \\ profiles};
96    \node[orange1] (2dsections) [right=0.5cm of 1dmean] {2D sections};
97    \node[orange1] (3ddata) [right=0.5cm of 2dsections] {3D data};}
98
99    \path<4->[line] (palm) -- (1dmean);
100    \path<4->[line] (palm) -- (2dsections);
101    \path<4->[line] (palm) -- (3ddata);
102
103    \uncover<3->{\node[yellow2] (headerfile) [above=0.5cm of 2dsections]{header file};}
104    \uncover<3->{\node[yellow1] (runcontrol) [right=0.5cm of headerfile]{run control output\\ (parameter settings + \\ timestep informations)};}
105    \uncover<3->{\node[yellow2] (cpumeasure) [left=0.5cm of headerfile]{cpu\\ measurements};}
106
107    \node (program) [right=2.8cm of palm] {program};
108    \uncover<2->{\node (steeringdata) [right=0.45cm of restartdata1] {steering data};}
109    \uncover<3->{\node (run) [right=2.7cm of runcontrol] {run informations};}
110    \uncover<4->{\node (analysis) [right=3.8cm of 3ddata] {analysis data};}
111
112    \uncover<7->{
113    \node[yellow3] (yellow) [below=0.5 of timeseries] {};
114    \node (ascii) [right=0.1cm of yellow] {ASCII};
115    \node[orange3] (orange) [right=0.4cm of ascii] {};
116    \node (netcdf) [right=0.1cm of orange] {netCDF};
117    \node[red2] (red) [right=0.4cm of netcdf] {};
118    \node (binary) [right=0.1cm of red] {binary};}
119
120    \path<2->[line] (parameterfile) -- (palm);
121    \path<3->[line] (palm) -- (cpumeasure);
122    \path<3->[line] (palm) -- (headerfile);
123    \path<3->[line] (palm) -- (runcontrol);
124    \path<5->[line] (palm) -- (restartdata2);
125    \path<6->[line] (restartdata1) -- (palm);
126    \path<6->[line,dashed] (restartdata2) -- (restartdata1);   
127   \end{tikzpicture}
128\end{frame}
129
130% Folie 4
131\begin{frame}
132   \frametitle{PALM Input/Output Overview (II)}
133   \tikzstyle{start} = [ellipse, draw, fill=green!20, font=\small]   
134   \tikzstyle{yellow1} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, font=\Tiny]
135   \tikzstyle{yellow2} = [rectangle, draw, fill=yellow!20, text width=0.1\textwidth, font=\Tiny]
136   \tikzstyle{yellow3} = [rectangle, draw, fill=yellow!20, text width=0.03\textwidth, font=\Tiny]
137   \tikzstyle{yellow4} = [rectangle, draw, fill=yellow!100, text width=1.8cm, font=\Tiny]
138   \tikzstyle{red} = [rectangle, draw, fill=red!100, text width=0.1\textwidth, font=\Tiny]
139   \tikzstyle{red2} = [rectangle, draw, fill=red!100, text width=0.03\textwidth, font=\Tiny]
140   \tikzstyle{orange1} = [rectangle, draw, fill=orange!50, text width=0.1\textwidth, font=\Tiny]
141   \tikzstyle{orange2} = [rectangle, draw, fill=orange!50, text width=0.11\textwidth, font=\Tiny]
142   \tikzstyle{orange3} = [rectangle, draw, fill=orange!50, text width=0.03\textwidth, font=\Tiny]
143
144   \tikzstyle{line} = [draw, -]
145   
146   \begin{tikzpicture} [auto]
147    \node[start] (palm) {\textbf{PALM}};
148
149    \node[yellow1] (parameterfile) [above left=1cm of palm] {parameter file \\ for steering};
150    \node[red] (restartdata1) [above right=1.3cm of palm] {restart data};
151    \node[red] (restartdata2) [below=2.5cm of restartdata1] {restart data};
152
153    \node[yellow1] (runcontrol) [below=0.4cm of palm]{run control output\\ (parameter settings + \\ timestep informations)};
154    \node[yellow2] (headerfile) [left=0.5cm of runcontrol]{header file};
155    \node[yellow2] (cpumeasure) [left=0.5cm of headerfile]{cpu\\ measurements};
156
157    \node[orange1] (1dmean) [below=0.3cm of cpumeasure] {1D mean \\ profiles};
158    \node[orange1] (2dsections) [right=0.5cm of 1dmean] {2D sections};
159    \node[orange1] (3ddata) [right=0.5cm of 2dsections] {3D data};
160
161    \node[orange1] (timeseries) [below=0.2cm of 1dmean] {time series};
162    \node[orange2] (2dsectionstime) [right=0.5cm of timeseries] {2D sections \\ time averaged};
163    \node[orange2] (3ddatatime) [right=0.39cm of 2dsectionstime] {3D data \\ time averaged};
164
165    \node (program) [right=2.8cm of palm] {program};
166    \node (steeringdata) [right=0.8cm of restartdata1] {steering data};
167    \node (run) [right=2.5cm of runcontrol] {run informations};
168    \node (analysis) [right=3.6cm of 3ddata] {analysis data};
169   
170    \node[yellow3] (yellow) [below=0.3 of timeseries] {};
171    \node (ascii) [right=0.1cm of yellow] {ASCII};
172    \node[orange3] (orange) [right=0.4cm of ascii] {};
173    \node (netcdf) [right=0.1cm of orange] {netCDF};
174    \node[red2] (red) [right=0.4cm of netcdf] {};
175    \node (binary) [right=0.1cm of red] {binary};
176
177    %--------- neue Ordner
178    \uncover<2->{
179    \node[yellow4] (currentversion) [above=0.6cm of parameterfile] {current\_version/};
180    \node[yellow4] (jobs) [right=0.3cm of currentversion] {JOBS/};
181    \node[yellow4] (runidentifier) [right=0.4cm of jobs] {\textless run\_identifier \textgreater/};
182    \node[yellow4] (input) [above right=1cm of runidentifier] {INPUT/};
183    \node[yellow4] (monitoring) [below=0.1cm of input] {MONITORING/};
184    \node[yellow4] (output) [below=0.1cm of monitoring] {OUTPUT/};
185    \node[yellow4] (restart) [below=0.1cm of output] {RESTART\_DATA/};}
186
187    \uncover<3->{\node[yellow4] (input2) [below=0.1cm of parameterfile] {INPUT/};}
188    \uncover<4->{\node[yellow4] (monitoring2) [above=0.6cm of headerfile] {MONITORING/};}
189    \uncover<6->{\node[yellow4] (restart2) [below=0.1cm of restartdata1] {RESTART\_DATA/};}
190    \uncover<7->{\node[yellow4] (tmpdata) [below=0.1cm of restart2] {/tmp\_data\_catalog/};}
191    \uncover<5->{\node[yellow4] (output2) [below=0.5cm of restartdata2] {OUTPUT/};}
192
193    \path[line]<2-> (currentversion) -- (jobs);
194    \path[line]<2-> (jobs) -- (runidentifier);
195    \path[line]<2-> (runidentifier.east) -- (input.west);
196    \path[line]<2-> (runidentifier.east) -- (monitoring.west);
197    \path[line]<2-> (runidentifier.east) -- (output.west);
198    \path[line]<2-> (runidentifier.east) -- (restart.west);
199
200    \draw<4->[decorate,decoration={brace,raise=6pt,amplitude=9pt},thick]
201       (-4.5,-0.95)--(-1,-0.95) ;
202    \draw<5->[decorate,decoration={brace,mirror,raise=5pt,amplitude=6pt},thick]
203       (0.45,-3)--(0.45,-1.9) ;   
204   \end{tikzpicture}
205\end{frame}
206
207% Folie 5
208\begin{frame}
209   \frametitle{The Parameter File}
210   \tikzstyle{box} = [rectangle, draw, text width=0.9\textwidth, font=\tiny]
211   \tikzstyle{line} = [draw, thick, -latex']
212   \footnotesize
213   \begin{itemize}
214      \item<1->{Physical and numerical features of a PALM run (e.g. initial and boundary conditions, numerical methods)
215            are controlled by a so called \textbf{parameter file} which uses FORTRAN-NAMELIST syntax.} 
216      \item<2->{General structure of a FORTRAN-NAMELIST file}
217   \end{itemize}   
218   \begin{tikzpicture}[auto] 
219   \uncover<3->{   
220      \node[box](firstbox){ \begin{tabbing}       
221         \quad \&abcd \quad \=no\_of\_eggs = 100, litres\_of\_milk = 50.0, \= \\
222                 \>kilos\_of\_butter = 20.0, \> /  \end{tabbing}}
223   \node[font=\tiny] (leading_blank) at (-5,0.8) {\textbf{leading blank}};
224   \node[font=\tiny] (namelist) at (-2,0.8) {\textbf{NAMELIST group}};
225   \node[font=\tiny] (terminating) at (3,0.8) {\textbf{terminating character}};
226   \path[line] (-5,0.7) -- (-4.8,0); 
227   \path[line] (-2,0.7) -- (-4,0);
228   \path[line] (3,0.7) -- (0.2,-0.3);}
229   \end{tikzpicture}
230   \begin{itemize}
231      \item<4->{This file can be read from a FORTRAN program in the following way:} 
232   \end{itemize}
233   \begin{tikzpicture}[auto, node distance=0]
234   \uncover<4->{     
235      \node[box](secondbox){ \begin{tabbing} 
236         INTEGER :: \=no\_of\_eggs = 30 \\
237         REAL :: \> litres\_of\_milk = 0.0, kilos\_of\_butter, kilos\_of\_cream = 33.0 \\
238         \\
239         NAMELIST /abcd/ \quad no\_of\_eggs, litres\_of\_milk, kilos\_of\_butter, kilos\_of\_cream \\
240         \\
241         OPEN ( 1, FILE='Filename' ) \\
242         \\
243         READ ( 1, abcd ) \end{tabbing}};}       
244   \end{tikzpicture}
245   \normalsize 
246\end{frame}
247
248% Folie 6
249\begin{frame}
250   \frametitle{An Example of PALM - NAMELIST Input}
251   \tikzstyle{box} = [rectangle, draw, text width=\textwidth, font=\tiny]
252   \begin{tikzpicture}[auto, node distance=0]     
253      \node[box](box){ \begin{tabbing} 
254         \&inipar \=nx = 39, ny = 39, nz = 40, \\
255                  \>dx = 50.0, dy = 50.0, dz = 50.0, \\
256                  \\
257                  \>initializing\_actions = 'set\_constant\_profiles', \\ 
258                  \>ug\_surface = 0.0, vg\_surface = 0.0, \\
259                  \\
260                  \>pt\_vertical\_gradient  \qquad = 0.0, 1.0, \\
261                  \>pt\_vertical\_gradient\_level = 0.0, 800.0, \\
262                  \\
263                  \>surface\_heatflux = 0.1, bc\_pt\_b ='neumann', / \\
264                  \\
265                  \\
266         \&d3par  \>end\_time = 3600.0, \\
267                  \\
268                  \>dt\_dopr = 900.0, averaging\_interval\_pr = 600.0, \\
269                  \>data\_output\_pr = 'pt', 'u', 'v', / \\ \end{tabbing}};       
270   \end{tikzpicture}
271   \footnotesize
272   \begin{itemize}
273      \item<2->{There are two NAMELIST groups ({\tt \&inipar} and {\tt \&d3par}).} 
274      \item<3->{Assignments to parameters in {\tt\&inipar} are ignored within restart runs \\
275            (exception: {\tt initializing\_actions} = {\tt'read\_restart\_data'} is obligatory for restart runs).}
276      \item<4->{Values of {\tt \&d3par} parameters can be changed for restart runs.}
277   \end{itemize}
278\end{frame}
279
280% Folie 7
281\begin{frame}
282   \frametitle{The Run Control File}
283   \scriptsize
284   \begin{itemize}
285      \item<1->{For initial runs, the parameter settings and many additional informations about the run (header informations) are printed at the beginning of this file.}
286      \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
287            controlled by run parameter {\tt dt\_run\_control}).}
288   \end{itemize}
289   \onslide<3->{\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
290      errors have occurred!}}
291   \par\bigskip
292   \includegraphics[width=1.08\textwidth]{program_control_figures/run_control_file.png}
293   \normalsize
294\end{frame}
295
296% Folie 8
297\begin{frame}
298   \frametitle{The Header File}
299   \scriptsize
300   \begin{itemize}
301      \item{The header file contains nearly the same informations as the header of the run control file of the initial run.} 
302      \item<2->{It is generated for \textbf{every} run (initial run as well as restart runs).}
303      \item<3->{It is created at the beginning \textbf{and} at the end of a run (overwrites the file created at beginning).}
304      \item<4->{Only at the end, cpu time information is included!}
305   \end{itemize}
306   \begin{center}
307   \includegraphics[width=0.9\textwidth]{program_control_figures/header_file.png}
308   \end{center}
309   \normalsize
310\end{frame}
311
312% Folie 9
313\begin{frame}
314   \frametitle{CPU Measurements File}
315   \begin{columns}[c]
316   \column{0.42\textwidth}
317      \scriptsize
318      \begin{itemize}
319         \item{Contains informations about the CPU requirements of single parts of the program.}
320         \item<2->{It should be inspected regularly in order to find out, if the code is still well optimized (e.g. load balance).} 
321         \item<3->{Prognostic-equations and pressure solver ({\tt pres}) should be the main consumer.}
322         \item<4->{For larger grids ($400^3$ points), {\tt pres} may need up to 50\% of the total time.}
323         \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.}
324      \end{itemize}
325      \normalsize
326   \column{0.58\textwidth}
327      \includegraphics[width=1.1\textwidth]{program_control_figures/cpu_measurements_file.png}
328   \end{columns}
329\end{frame}
330
331% Folie 10
332\begin{frame}
333   \frametitle{Other Files}
334   \small
335   \begin{itemize}
336      \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
337            public domain graphics software like \textbf{ncview}, \textbf{ferret}, \textbf{ncl} (used by PALM group), \textbf{IDL}, etc. \\
338            \par\bigskip
339            For a first look, {\tt ncview} is a convenient tool.}
340      \item<2->{{\tt ncdump} can be used to display the netCDF file contents in ASCII format ({\tt ncdump -c} displays only header informations).}
341      \item<3->{The simple viewer for netCDF-data - {\tt ncview} - as well as ncl graphic software is available on the IMUK-cluster.}
342   \end{itemize}
343\end{frame}
344
345% Folie 11
346\begin{frame}
347   \frametitle{Steering by Unix Environment Variables}
348   \scriptsize
349   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}. \\
350   \par\bigskip
351   Setting \\
352   \par\medskip
353   {\centering \texttt{ write\_binary = true} \\
354   \par\medskip
355   within the shell causes PALM to write binary data for restart runs at the end of a run.}
356   \par\bigskip
357   \uncover<2->{Setting of these environment variables is automatically done by  {\tt mrun}. It generates a local file (named {\tt ENVPAR}) in FORTRAN-NAMELIST-format, which is then
358   read by PALM. This file includes the following variables:} \\
359   \par\bigskip
360   \tiny
361   \uncover<3->{
362   \begin{tabular}{|p{3cm}|p{4cm}|p{3cm}|} \hline
363      \textbf{Variable}                 & \textbf{Meaning} & \textbf{Value set by {\tt mrun}-option} \\
364      \hline
365      {\tt host}                        & host identifier that mrun is using for the host on which the job is running & {\tt -h}    \\
366      {\tt maximum\_cpu\_time\_allowed} & cpu time allowed for the job                                                & {\tt -t}    \\
367      {\tt run\_identifier}             & identification string for the run    & {\tt -d}    \\
368      {\tt tasks\_per\_node}            & number of MPI tasks to be started on each node     & {\tt -T}     \\
369      {\tt write\_binary}               & switch for writing binary data to be used for restart runs     & {\tt -r} (+setting in configuration file {\tt .mrun.config)}  \\
370      \hline
371   \end{tabular}}
372   \normalsize
373\end{frame}
374
375% Folie 12
376\begin{frame}
377   \frametitle{PALM / netCDF Documentation}
378   \begin{itemize}
379      \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: \\
380            \par\bigskip
381            \textbf{http://palm.muk.uni-hannover.de/wiki/doc/toc}}
382      \par\bigskip
383      \item<2->{General information about the netCDF data format can be found under \\
384            \par\bigskip
385            \textbf{http://www.unidata.ucar.edu/software/netcdf/}}
386   \end{itemize}
387\end{frame}
388
389\end{document}
Note: See TracBrowser for help on using the repository browser.