source: palm/trunk/TUTORIAL/SOURCE/program_structure.tex @ 1117

Last change on this file since 1117 was 945, checked in by maronga, 12 years ago

added/updated several tutorial files

  • Property svn:keywords set to Id
File size: 43.5 KB
RevLine 
[945]1% $Id: program_structure.tex 945 2012-07-17 15:43:01Z suehring $
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\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
13\usepackage{xmpmulti}
14\usepackage{tikz}
15\usepackage{pdfcomment}
16\usetikzlibrary{shapes,arrows,positioning}
17\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
18\usepackage{listings}
19\lstset{language=[90]Fortran,
20  basicstyle=\ttfamily \tiny,
21  keywordstyle=\color{black},
22  commentstyle=\color{black},
23  morecomment=[l]{!\ }% Comment only with space after !
24}
25
26
27\institute{Institut fÌr Meteorologie und Klimatologie, Leibniz UniversitÀt Hannover}
28\date{last update: \today}
29\event{PALM Seminar}
30\setbeamertemplate{navigation symbols}{}
31
32\setbeamertemplate{footline}
33  {%
34    \begin{beamercolorbox}[rightskip=-0.1cm]&
35     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
36    \end{beamercolorbox}
37    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
38      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}%
39      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}%
40    \end{beamercolorbox}%
41%    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}%
42%    \end{beamercolorbox}
43  }
44%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.png}}
45
46\title[PALM Program Structure]{PALM Program Structure}
47\author{Siegfried Raasch}
48
49
50% Notes:
51% jede subsection bekommt einen punkt im menu (vertikal ausgerichtet.
52% jeder frame in einer subsection bekommt einen punkt (horizontal ausgerichtet)
53\begin{document}
54
55\begin{frame}
56\titlepage
57\end{frame}
58
59\section{PALM Program Structure}
60\subsection{PALM Program Structure}
61
62%Folie 01
63\begin{frame}
64   \begin{center}
65      PALM - Program Structure
66   \end{center}
67\end{frame}
68
69%Folie 02
70\begin{frame}
71   \frametitle{Contents}
72   \begin{flushleft}
73      This part gives a brief overview about the structure of the PALM code:
74   \end{flushleft}
75   \begin{itemize}
76      \item<2->{Flow chart}
77      \item<3->{Most important variables and how they are declared}
78      \item<4->{Machine dependencies}
79   \end{itemize}
80\end{frame}
81
82%Folie 03
83\begin{frame}[fragile]
84   \frametitle{PALM Code: General Features}
85   \begin{itemize}
86      \item<2->{PALM is written in FORTRAN90. Current version number is 3.8.}
87      \item<3->{With some very minor exceptions, the code is using the FORTRAN standard, so it should compile without error on any FORTRAN90/95 compiler.}
88      \item<4->{Data handling between subroutines is mostly done using FORTRAN90-modules instead of using parameter lists.
89      \begin{minipage}{0.45\textwidth}
90         \centering
91         \begin{lstlisting}
92SUBROUTINE parin
93   USE control_parameters
94   USE grid_variables
95   .
96   .
97         \end{lstlisting}
98      \end{minipage}
99      \begin{minipage}{0.45\textwidth}
100         \centering
101         \begin{lstlisting}
102SUBROUTINE parin( a, b, c, ... )
103   INTEGER ::  a, b
104   REAL    ::  c, ...
105   .
106   .
107         \end{lstlisting}
108      \end{minipage}
109      \mbox{All modules can be found in file .../trunk/SOURCE/modules.f90}}
110   \end{itemize}
111\end{frame}
112
113%Folie 04
114\begin{frame}
115   \frametitle{PALM Code: General Features}
116   \begin{itemize}
117      \item<2->{Machine dependent code segments, e.g. calls for flushing of buffers (CALL FLUSH / CALL FLUSH\_), or calls of special software (e.g. netCDF or dvrp), which are available on some machines only, are activated using preprocessor directives.}
118      \item<3->{The serial and parallel PALM version is also activated by preprocessor directives.}
119      \item<4->{The code is splitted into several files, most of them containing just one subroutine, e.g. file ``parin.f90'' contains ``SUBROUTINE parin''.}
120      \item<5->{The code includes an interface which can be used by users to add their own code extensions. Advantage: These code extensions can be reused (normally) for future PALM releases without requiring any changes.}
121   \end{itemize}
122\end{frame}
123
124%Folie 05
125\begin{frame}
126   \frametitle{PALM Flow Chart (I)}
127
128   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
129   \tikzstyle{white2} = [rectangle, text width=0]
130   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=15pt, font=\tiny]
131   \tikzstyle{line} = [draw, -]
132
133   \begin{tikzpicture}[auto, node distance=0]
134      \uncover<1->{\node [yellow] (PALM) {PALM};}
135      \uncover<1->{\node [white2, right=0.2cm of PALM] (PALMspace) {};}
136
137      \uncover<2->{\node [yellow, below=0.2cm of PALMspace] (localtre) {local\_tremain\_ini};}
138      \path<2-> [line] (PALM.south) |- (localtre.west);
139
140      \uncover<3->{\node [yellow, below=0.05cm of localtre] (initdvrp) {init\_dvrp\_logging};}
141      \path<3-> [line] (PALM.south) |- (initdvrp.west);
142
143      \uncover<4->{\node [yellow, below=0.05cm of initdvrp] (parin) {parin};}
144      \path<4-> [line] (PALM.south) |- (parin.west);
145      \uncover<4->{\node [white, right=0.2cm of parin] (parinspace) {};}
146
147         \uncover<5->{\node [yellow, below=0cm of parinspace] (readvar) {read\_var\_list};}
148         \path<5-> [line,dashed] (parin.south) |- (readvar.west);
149
150         \uncover<6->{\node [yellow, below=0.05cm of readvar] (packageparin) {package\_parin};}
151         \path<6-> [line,dashed] (parin.south) |- (packageparin.west);
152
153         \uncover<7->{\node [yellow, below=0.05cm of packageparin] (userparin) {user\_parin};}
154         \path<7-> [line] (parin.south) |- (userparin.west);
155
156      \uncover<8->{\node [yellow, below=1.4cm of parin] (initpeg) {init\_pegrid};}
157      \path<8-> [line] (PALM.south) |- (initpeg.west);
158      \uncover<8->{\node [white, right=0.2cm of initpeg] (initpegspace) {};}
159
160         \uncover<9->{\node [yellow, below=0cm of initpegspace] (poisfftinit) {poisfft\_init};}
161         \path<9-> [line] (initpeg.south) |- (poisfftinit.west);
162
163      \uncover<10->{\node [yellow, below=0.3cm of initpeg] (initgrid) {init\_grid};}
164      \path<10-> [line] (PALM.south) |- (initgrid.west);
165
166      \uncover<11->{\node [yellow, below=0.05cm of initgrid] (checkpara) {check\_parameters};}
167      \path<11-> [line] (PALM.south) |- (checkpara.west);
168
169      \uncover<12->{\node [yellow, below=0.05cm of checkpara] (header) {header};}
170      \path<12-> [line] (PALM.south) |- (header.west);
171      \uncover<12->{\node [white, right=0.2cm of header] (headerspace) {};}
172
173         \uncover<13->{\node [yellow, below=0cm of headerspace] (userheader) {user\_header};}
174         \path<13-> [line,dashed] (header.south) |- (userheader.west);
175
176      \uncover<1->{\node [white, below=5.8cm of PALM] (continu2) {};}
177      \path<1-> [line,dashed] (PALM.south) |- (continu2.north);
178
179      \uncover<1->{\node [white, below=5.2cm of PALM] (continu1) {};}
180      \path<1-> [line] (PALM.south) |- (continu1.north);
181   \end{tikzpicture}
182\end{frame}
183
184%Folie 06
185\begin{frame}
186   \frametitle{PALM Flow Chart (II)}
187
188   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
189   \tikzstyle{whitelarge} = [rectangle, text width=0.43\textwidth, font=\tiny]
190   \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
191   \tikzstyle{white2} = [rectangle, text width=0]
192   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
193   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
194   \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
195   \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.43\textwidth, minimum size=13pt, font=\tiny]
196   \tikzstyle{line} = [draw, -]
197
198   \begin{tikzpicture}[auto, node distance=0]
199      \uncover<1->{\node [white2] (contino1) {};}
200      \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};}
201
202      \uncover<2->{\node [yellow, right=0.2cm of PALM] (init3d) {init\_3d\_model};}
203      \path<2-> [line] (PALM.south) |- (init3d.west);
204      \uncover<2->{\node [white, right=0.05cm of init3d] (init3dspace) {};}
205      \uncover<2->{\node [whitelarge, right=0.05cm of init3d] (init3dspacelarge) {};}
206
207         \uncover<3->{\node [yellowLarge, below=-0.05cm of init3dspacelarge] (init1d) {init\_1d\_model (calls various subroutines)};}
208         \path<3-> [line,dashed] (init3d.south) |- (init1d.west);
209
210         \uncover<4->{\node [yellow, below=0.5cm of init3dspace] (initslope) {init\_slope};}
211         \path<4-> [line,dashed] (init3d.south) |- (initslope.west);
212
213         \uncover<5->{\node [yellow, below=0.05cm of initslope] (disturbh) {disturb\_heatflux};}
214         \path<5-> [line,dashed] (init3d.south) |- (disturbh.west);
215
216         \uncover<6->{\node [yellow, below=0.05cm of disturbh] (initrank) {init\_rankine};}
217         \path<6-> [line,dashed] (init3d.south) |- (initrank.west);
218
219            \uncover<7->{\node [yellow, right=0.05cm of initrank] (initpt) {init\_pt\_anomaly};}
220            \path<7-> [line] (initrank.east) -- (initpt.west);
221
222         \uncover<8->{\node [yellow, below=0.05cm of initrank] (disturbf) {disturb\_field};}
223         \path<8-> [line,dashed] (init3d.south) |- (disturbf.west);
224
225            \uncover<9->{\node [yellow, right=0.05cm of disturbf] (pres) {pres};}
226            \path<9-> [line] (disturbf.east) -- (pres.west);
227            \uncover<9->{\node [white, below=-0.05cm of pres] (presspace) {};}
228
229               \uncover<10->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};}
230               \path<10-> [line] (pres.east) -| (poisfft.north);
231
232               \uncover<11->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};}
233               \path<11-> [line] (pres.east) -| (sor.north);
234
235               \uncover<12->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};}
236               \path<12-> [line] (pres.east) -| (poismg.north);
237
238         \uncover<13->{\node [yellow, below=0.4cm of disturbf] (read3d) {read\_3d\_binary};}
239         \path<13-> [line,dashed] (init3d.south) |- (read3d.west);
240
241            \uncover<14->{\node [yellow, right=0.05cm of read3d] (initdvrp) {init\_dvrp};}
242            \path<14-> [line] (read3d.east) -- (initdvrp.west);
243
244               \uncover<15->{\node [yellowlarge, right=0.05cm of initdvrp] (initcloud) {init\_cloud\_physics};}
245               \path<15-> [line] (initdvrp.east) -- (initcloud.west);
246
247         \uncover<16->{\node [yellow, below=0.05cm of read3d] (initpart) {init\_particles};}
248         \path<16-> [line] (init3d.south) |- (initpart.west);
249         \uncover<16->{\node [white, right=0.05cm of initpart] (initpartspace) {};}
250
251            \uncover<17->{\node [yellow, below=-0.05cm of initpartspace] (userinitpart) {user\_init\_particles};}
252            \path<17-> [line] (initpart.south) |- (userinitpart.west);
253
254            \uncover<18->{\node [yellow, below=0.05cm of userinitpart] (sortpart) {sort\_particles};}
255            \path<18-> [line] (initpart.south) |- (sortpart.west);
256
257            \uncover<19->{\node [yellow, below=0.05cm of sortpart] (dataoutput) {data\_output\_dvrp};}
258            \path<19-> [line,dashed] (initpart.south) |- (dataoutput.west);
259
260               \uncover<20->{\node [yellow, right=0.05cm of dataoutput] (userdvrp) {user\_dvrp\_coltab};}
261               \path<20-> [line,dashed] (dataoutput.east) -- (userdvrp.west);
262
263         \uncover<21->{\node [yellow, below=1.45cm of initpart] (initadvec) {init\_advec};}
264         \path<21-> [line] (init3d.south) |- (initadvec.west);
265
266            \uncover<22->{\node [yellow, right=0.05cm of initadvec] (userinit) {user\_init};}
267            \path<22-> [line] (initadvec.east) -- (userinit.west);
268
269      \uncover<23->{\node [yellow, below=5.8cm of init3d] (dataout2d) {data\_output\_2d};}
270      \path<23-> [line,dashed] (PALM.south) |- (dataout2d.west);
271
272         \uncover<24->{\node [yellow, right=0.05cm of dataout2d] (dataout3d) {data\_output\_3d};}
273         \path<24-> [line] (dataout2d.east) -- (dataout3d.west);
274
275      \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
276      \path<1-> [line,dashed] (contino1.south) |- (continu2.north);
277
278      \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};}
279      \path<1-> [line] (PALM.south) |- (continu1.north);
280   \end{tikzpicture}
281\end{frame}
282
283
284%Folie 07
285\begin{frame}
286   \frametitle{PALM Flow Chart (III)}
287
288   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
289   \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny]
290   \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
291   \tikzstyle{white2} = [rectangle, text width=0]
292   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
293   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
294   \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
295   \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
296   \tikzstyle{line} = [draw, -]
297   \tikzstyle{linered} = [draw, color=red, -]
298   \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny]
299   \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny]
300   \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
301   \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
302   \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
303   
304   %"align=center" hinzufÃŒgen, um in den boxen zu zentrieren.
305   
306   \begin{tikzpicture}[auto, node distance=0]
307      \uncover<1->{\node [white2] (contino1) {};}
308      \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};}
309
310      \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};}
311      \uncover<1->{\node [whitebox, right=0.3cm of PALM] (timeintegrline) {};}
312      \path<1-> [line] (PALM.south) |- (timeintegr.west);
313      \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};}
314      \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};}
315      \uncover<1->{\node [Bigwhite, right=0.05cm of timeintegr] (timeintegrspacebox) {};}
316
317         \uncover<1->{\node [yellow, below=-0.05cm of timeintegrspace] (timestep) {timestep};}
318         \path<1-> [line] (timeintegr.south) |- (timestep.west);
319
320         \uncover<1->{\node [yellow, below=0.05cm of timestep] (runcontrol) {run\_control};}
321         \path<1-> [line] (timeintegr.south) |- (runcontrol.west);
322
323            \uncover<1->{\node [yellow, right=0.05cm of runcontrol] (flowstatistics) {flow\_statistics};}
324            \path<1-> [line] (runcontrol.east) -- (flowstatistics.west);
325
326         \uncover<1->{\node [yellowLarge, below=0.95cm of timeintegrspacelarge] (useractions) {user\_actions (before\_timestep)};}
327         \path<1-> [line] (timeintegr.south) |- (useractions.west);
328
329         \uncover<1->{\node [yellowLarge, below=0.05cm of useractions] (timestepscheme) {timestep\_scheme\_steering};}
330         \path<1-> [line] (timeintegr.south) |- (timestepscheme.west);
331
332         \uncover<1->{\node [Bigbox, below=1.75cm of timeintegrspacebox] (bigbox) {};}
333%         \path<1-> [line] (timeintegr.south) |- (bigbox.west);
334         \uncover<1->{\node [white, below=2cm of timeintegrline] (boxlinespace) {};}
335         \path<1-> [line] (timeintegrline.south) |- (boxlinespace.north);
336
337            \uncover<1->{\node [yellowLarge, below=0.4cm of timestepscheme] (prognosticequno) {prognostic\_equations\_noopt};}
338            \uncover<1->{\node [yellowLarge, right=0.05cm of prognosticequno] (prognosticequca) {prognostic\_equations\_cache};}
339            \uncover<1->{\node [yellowLarge, below=0.05cm of prognosticequca] (prognosticequve) {prognostic\_equations\_vector};}
340            \uncover<1->{\node [boxinfo, below=-0.025cm of prognosticequno] (Boxinfo) {For details, see \\ PALM Flow Chart (V).};}
341            \path<1-> [linered] (boxlinespace.north) -| (prognosticequca.north);
342            \path<1-> [line] (boxlinespace.north) -| (prognosticequno.north);
343            \uncover<1->{\node [redsmall, above=0.3cm of prognosticequca] (redadv) {standard\\advection};}
344
345         \uncover<1->{\node [yellow, below=2.7cm of runcontrol] (advecpart) {advec\_particles};}
346         \path<1-> [line,dashed] (advecpart.west) -| (timeintegr.south);
347
348            \uncover<1->{\node [yellowLarge, right=0.05cm of advecpart] (userpartatt) {user\_particle\_attributes + more};}
349            \path<1-> [line] (advecpart.east) -- (userpartatt.west);
350
351         \uncover<1->{\node [yellowLarge, below=2.15cm of timestepscheme] (interactiondrop) {interaction\_droplets\_ptq};}
352         \path<1-> [line,dashed] (interactiondrop.west) -| (timeintegr.south);
353
354         \uncover<1->{\node [yellow, below=0.535cm of advecpart] (asselinfilter) {asselin\_filter};}
355         \path<1-> [line,dashed] (asselinfilter.west) -| (timeintegr.south);
356
357         \uncover<1->{\node [yellow, below=0.05cm of asselinfilter] (swaptimelevel) {swap\_timelevel};}
358         \path<1-> [line] (swaptimelevel.west) -| (timeintegr.south);
359
360            \uncover<1->{\node [yellow, right=0.05cm of swaptimelevel] (boundaryconds) {boundary\_conds};}
361            \path<1-> [line] (swaptimelevel.east) -- (boundaryconds.west);
362
363         \uncover<1->{\node [yellow, below=0.05cm of swaptimelevel] (disturbfield) {disturb\_field};}
364         \path<1-> [line,dashed] (disturbfield.west) -| (timeintegr.south);
365
366      \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
367      \path<1-> [line,dashed] (contino1.south) |- (continu2.north);
368
369      \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};}
370      \path<1-> [line] (PALM.south) |- (continu1.north);
371   \end{tikzpicture}
372\end{frame}
373
374
375%Folie 08
376\begin{frame}
377   \frametitle{PALM Flow Chart (IV)}
378
379   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
380   \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny]
381   \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
382   \tikzstyle{white2} = [rectangle, text width=0]
383   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
384   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
385   \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
386   \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=13pt, font=\tiny]
387   \tikzstyle{line} = [draw, -]
388   \tikzstyle{linered} = [draw, color=red, -]
389   \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny]
390   \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny]
391   \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
392   \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
393   \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
394   
395   %"align=center" hinzufÃŒgen, um in den boxen zu zentrieren.
396   
397   \begin{tikzpicture}[auto, node distance=0]
398      \uncover<1->{\node [white2] (contino1) {};}
399      \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};}
400
401      \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};}
402      \path<1-> [line] (PALM.south) |- (timeintegr.west);
403      \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};}
404      \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};}
405
406         \uncover<1->{\node [yellow, below=-0.05cm of timeintegrspace] (pres) {pres};}
407         \path<1-> [line] (timeintegr.south) |- (pres.west);
408         \uncover<1->{\node [white, below=-0.05cm of pres] (presspace) {};}
409
410            \uncover<1->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};}
411            \path<1-> [line] (pres.east) -| (poisfft.north);
412
413            \uncover<1->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};}
414            \path<1-> [line] (pres.east) -| (sor.north);
415
416            \uncover<1->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};}
417            \path<1-> [line] (pres.east) -| (poismg.north);
418
419         \uncover<1->{\node [yellow, below=0.355cm of pres] (boundaryconds) {boundary\_conds};}
420         \path<1-> [line,dashed] (timeintegr.south) |- (boundaryconds.west);
421
422         \uncover<1->{\node [yellow, below=0.05cm of boundaryconds] (computevpt) {compute\_vpt};}
423         \path<1-> [line,dashed] (timeintegr.south) |- (computevpt.west);
424
425            \uncover<1->{\node [yellowLarge, right=0.05cm of computevpt] (calcliquidwatercontent) {calc\_liquid\_water\_content};}
426            \path<1-> [line] (computevpt.east) -- (calcliquidwatercontent.west);
427
428         \uncover<1->{\node [yellow, below=0.05cm of computevpt] (prandtlfluxes) {prandtl\_fluxes};}
429         \path<1-> [line,dashed] (timeintegr.south) |- (prandtlfluxes.west);
430
431         \uncover<1->{\node [yellow, below=0.05cm of prandtlfluxes] (diffusivities) {diffusivities};}
432         \path<1-> [line] (timeintegr.south) |- (diffusivities.west);
433
434         \uncover<1->{\node [yellowLarge, below=2.855cm of timeintegrspacelarge] (useractionsafter) {user\_actions (after\_integration)};}
435         \path<1-> [line] (timeintegr.south) |- (useractionsafter.west);
436
437         \uncover<1->{\node [yellow, below=0.575cm of diffusivities] (checkforrestart) {check\_for\_restart};}
438         \path<1-> [line] (timeintegr.south) |- (checkforrestart.west);
439
440            \uncover<1->{\node [yellow, right=0.05cm of checkforrestart] (localtremain) {local\_tremain};}
441            \path<1-> [line] (checkforrestart.east) -- (localtremain.west);
442
443         \uncover<1->{\node [yellow, below=1.1cm of diffusivities] (flowstatistics) {flow\_statistics};}
444         \path<1-> [line,dashed] (timeintegr.south) |- (flowstatistics.west);
445
446            \uncover<1->{\node [yellow, right=0.05cm of flowstatistics] (sumup3ddata) {sum\_up\_3d\_data};}
447            \path<1-> [line] (flowstatistics.east) -- (sumup3ddata.west);
448
449               \uncover<1->{\node [yellow, right=0.05cm of sumup3ddata] (calcspectra) {calc\_spectra};}
450               \path<1-> [line] (sumup3ddata.east) -- (calcspectra.west);
451
452         \uncover<1->{\node [yellow, below=0.05cm of flowstatistics] (runcontrol) {run\_control};}
453         \path<1-> [line,dashed] (timeintegr.south) |- (runcontrol.west);
454
455            \uncover<1->{\node [yellow, right=0.05cm of runcontrol] (dataoutput) {data\_output\_***};}
456            \path<1-> [line] (runcontrol.east) -- (dataoutput.west);
457
458         \uncover<1->{\node [yellow, below=0.05cm of runcontrol] (disturbheatflux) {disturb\_heatflux};}
459         \path<1-> [line,dashed] (timeintegr.south) |- (disturbheatflux.west);
460
461         \uncover<1->{\node [yellowLarge, below=2.125cm of useractionsafter] (useractionsaftert) {user\_actions (after\_timestep)};}
462         \path<1-> [line] (timeintegr.south) |- (useractionsaftert.west);
463
464      \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
465      \path<1-> [line,dashed] (contino1.south) |- (continu2.north);
466
467      \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};}
468      \path<1-> [line] (PALM.south) |- (continu1.north);
469   \end{tikzpicture}
470\end{frame}
471
472
473%Folie 09
474\begin{frame}
475   \frametitle{PALM Flow Chart (V)}
476
477   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
478   \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny]
479   \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
480   \tikzstyle{white2} = [rectangle, text width=0]
481   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, minimum size=12pt, font=\tiny]
482   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
483   \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.255\textwidth, minimum size=12pt, font=\tiny]
484   \tikzstyle{yellowLarge} = [rectangle, draw, align=center, fill=yellow!20, text width=0.32\textwidth, minimum size=12pt, font=\scriptsize]
485   \tikzstyle{line} = [draw, -]
486   \tikzstyle{linered} = [draw, color=red, -]
487   \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny]
488   \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=1\textwidth, minimum size=183pt, font=\tiny]
489   \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.18\textwidth, minimum size=12pt, font=\tiny]
490   \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
491   \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
492   \tikzstyle{bigbox} = [rectangle, draw, fill=white!100, text width=0.21\textwidth, minimum size=12pt, font=\tiny]
493   \tikzstyle{bigbox2} = [rectangle, draw, align=center, fill=white!100, text width=0.29\textwidth, minimum size=12pt, font=\tiny]
494   
495   \tikzstyle{framebox} = [rectangle, draw, text width=0.2\textwidth, minimum size=104pt, font=\tiny]
496   \tikzstyle{Endbox} = [rectangle, draw, fill=gray!20, text width=0.21\textwidth, minimum size=12pt, font=\tiny]
497
498   
499   %"align=center" hinzufÃŒgen, um in den boxen zu zentrieren.
500   
501   \begin{tikzpicture}[auto, node distance=0, >=stealth]
502
503      \uncover<1->{\node [Bigbox] (bigbox) {};}
504      \uncover<1->{\node [redsmall, above=-0.23cm of bigbox] (redadv) {standard advection};}
505
506      \uncover<1->{\node [yellow, below=0.1cm of redadv] (calcmeanptprofile) {calc\_mean\_pt\_profile};}
507
508      \uncover<1->{\node [yellowLarge, left=0.5cm of calcmeanptprofile] (prognosticequationsnoopt) {prognostic\_equations\_noopt};}
509      \uncover<1->{\node [yellowLarge, right=0.5cm of calcmeanptprofile] (prognosticequationscache) {prognostic\_equations\_cache};}
510      \uncover<1->{\node [yellowLarge, below=2.35cm of prognosticequationscache] (prognosticequationsvector) {prognostic\_equations\_vector};}
511
512      \uncover<1->{\node [yellow, below=-0.05cm of calcmeanptprofile] (calcradiation) {calc\_radiation};}
513      \uncover<1->{\node [yellow, below=-0.05cm of calcradiation] (impactoflatentheat) {impact\_of\_latent\_heat};}
514      \uncover<1->{\node [yellow, below=-0.05cm of impactoflatentheat] (calcprecipitation) {calc\_precipitation};}
515      \uncover<1->{\node [yellow, below=-0.05cm of calcprecipitation] (productioneinit) {production\_e\_init};}
516     
517      \uncover<1->{\node [whitesmall, left=-1.4cm of productioneinit] (productioneinitspace1) {};}
518      \uncover<1->{\node [whitesmall, below=0cm of productioneinitspace1] (productioneinitspace2) {};}
519
520      \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationscache] (listingscache) {
521         \texttt{\linespread {0.7}\selectfont\noindent
522            DO i=nxl,nxr\\
523            \quad DO j=nys,nyn\\
524            \quad \quad CALL \textcolor{blue}{u-subr}\\
525            \quad \quad CALL \textcolor{blue}{v-subr}\\
526            \quad \quad CALL \textcolor{blue}{w-subr}\\
527            \quad \quad CALL \textcolor{blue}{pt-subr}\\
528            \quad \quad CALL \textcolor{blue}{q or s-subr}\\
529            \quad \quad CALL \textcolor{blue}{e-subr}\\
530            \quad ENDDO\\
531            ENDDO\\
532         }
533      };}
534     
535      \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationsvector] (listingsvector) {
536         \texttt{\linespread {0.7}\selectfont\noindent
537            CALL \textcolor{blue}{u-subr}\\
538            CALL \textcolor{blue}{v-subr}\\
539            .\\
540            .\\
541            .\\
542            !within subroutines:\\
543            DO i=nxl,nxr\\
544            \quad DO j=nys,nyn\\
545            \quad \quad DO k=nzb+1,nzt\\
546            \quad \quad \quad \quad ...\\
547            \quad \quad ENDDO\\
548            \quad ENDDO\\
549            ENDDO\\
550         }
551      };}
552
553      \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationsnoopt] (listingsnoopt1) {
554         \texttt{\linespread {0.7}\selectfont\noindent
555            DO i=nxl,nxr\\
556            \quad DO j=nys,nyn\\
557            \quad \quad CALL \textcolor{blue}{u-subr}\\
558            \quad ENDDO\\
559            ENDDO\\
560         }
561      };}
562
563      \uncover<1->{\node [bigbox, below=0.05cm of listingsnoopt1] (listingsnoopt2) {
564         \texttt{\linespread {0.7}\selectfont\noindent
565            DO i=nxl,nxr\\
566            \quad DO j=nys,nyn\\
567            \quad \quad CALL \textcolor{blue}{v-subr}\\
568            \quad ENDDO\\
569            ENDDO\\
570         }
571      };}
572
573      \uncover<1->{\node [bigbox, below=1.95cm of listingsnoopt2] (listingsnoopt3) {
574         \texttt{\linespread {0.7}\selectfont\noindent
575            DO i=nxl,nxr\\
576            \quad DO j=nys,nyn\\
577            \quad \quad CALL \textcolor{blue}{e-subr}\\
578            \quad ENDDO\\
579            ENDDO\\
580         }
581      };}
582
583      \path<1-> [line,dotted] (listingsnoopt2.south) |- (listingsnoopt3.north);
584
585      \uncover<1->{\node [whitesmall, right=-1.35cm of listingsnoopt2] (listingsnoopt251) {};}
586      \uncover<1->{\node [whitesmall, below=0.8cm of listingsnoopt251] (listingsnoopt252) {\texttt{\textcolor{blue}{w\\pt\\q or s}}};}
587
588      \uncover<1->{\node [bigbox2, below=-0.25cm of productioneinitspace2] (foreachvariable) {
589         \textcolor{blue}{
590            \textbf{\underline{For each variable:}}\\
591            u-, v-, w-component,\\
592            pt, q or s, sa, e (SGS-TKE)
593         }
594      };}
595
596      \uncover<1->{\node [whitesmall, right=-2.08cm of foreachvariable] (foreachvariablespace1) {};}
597      \uncover<1->{\node [whitesmall, below=-0.18cm of foreachvariablespace1] (foreachvariablespace2) {};}
598
599      \uncover<1->{\node [yellowlarge, below=0.05cm of foreachvariablespace2] (advecuvws) {advec\_\{uvws\}};}
600      \path<1-> [line] (advecuvws.west) -| (foreachvariable.west);
601
602      \uncover<1->{\node [yellowlarge, below=-0.05cm of advecuvws] (diffusionuvwse) {diffusion\_\{uvwse\}};}
603      \path<1-> [line] (diffusionuvwse.west) -| (foreachvariable.west);
604
605      \uncover<1->{\node [yellowlarge, below=-0.05cm of diffusionuvwse] (coriolis) {coriolis};}
606      \path<1-> [line,dashed] (coriolis.west) -| (foreachvariable.west);
607
608      \uncover<1->{\node [yellowlarge, below=-0.05cm of coriolis] (buoyancy) {buoyancy};}
609      \path<1-> [line,dashed] (buoyancy.west) -| (foreachvariable.west);
610
611      \uncover<1->{\node [yellowlarge, below=-0.05cm of buoyancy] (useractionstend) {\mbox{user\_actions (i,j,***-tendency)}};}
612      \path<1-> [line] (useractionstend.west) -| (foreachvariable.west);
613
614      \uncover<1->{\node [yellowlarge, below=-0.05cm of useractionstend] (productione) {production\_e};}
615      \path<1-> [line,dashed] (productione.west) -| (foreachvariable.west);
616
617      \uncover<1->{\node [framebox, below=-1.025cm of foreachvariable] (foreachvariableframe) {};}
618      \uncover<1->{\draw [<-,line width=5pt, color=blue] (1,0.2) -- (1.5,1);}
619      \uncover<1->{\draw [<-,line width=5pt, color=blue] (-1.54,0.2) -- (-2.04,1);}
620
621
622
623      \uncover<2->{\node [Endbox, below=6.05cm of redadv] (endbox) {
624         \texttt{\linespread {0.7}\selectfont\noindent
625            !within subroutines:\\
626            DO k=nzb+1,nzt\\
627            \quad \quad \textcolor{blue}{...}\\
628            ENDDO\\
629         }
630      };}
631
632      \uncover<2->{\draw [<-,thick] (endbox.east) -- (listingscache.west);}
633      \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt1.east);}
634      \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt2.east);}
635      \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt3.east);}
636
637   \end{tikzpicture}
638\end{frame}
639
640
641%Folie 10
642\begin{frame}
643   \frametitle{PALM Flow Chart (VI)}
644
645   \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
646   \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny]
647   \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
648   \tikzstyle{white2} = [rectangle, text width=0]
649   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
650   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny]
651   \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
652   \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=13pt, font=\tiny]
653   \tikzstyle{line} = [draw, -]
654   \tikzstyle{linered} = [draw, color=red, -]
655   \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny]
656   \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny]
657   \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny]
658   \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
659   \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny]
660   
661   %"align=center" hinzufÃŒgen, um in den boxen zu zentrieren.
662   
663   \begin{tikzpicture}[auto, node distance=0]
664      \uncover<1->{\node [white2] (contino1) {};}
665      \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};}
666
667      \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};}
668      \path<1-> [line] (PALM.south) |- (timeintegr.west);
669      \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};}
670      \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};}
671      \uncover<1->{\node [white, below=0.8cm of timeintegr] (boxlinespace) {};}
672      \uncover<1->{\node [white, below=1.3cm of timeintegr] (boxlinespacedash) {};}
673      \path<1-> [line] (timeintegr.south) |- (boxlinespace.north);
674      \path<1-> [line,dashed] (timeintegr.south) |- (boxlinespacedash.north);
675
676
677      \uncover<1->{\node [yellow, below=2cm of timeintegr] (write3dbinary) {write\_3d\_binary};}
678      \path<1-> [line,dashed] (PALM.south) |- (write3dbinary.west);
679
680         \uncover<1->{\node [yellow, right=0.05cm of write3dbinary] (writevarlist) {write\_var\_list};}
681         \path<1-> [line] (write3dbinary.east) -- (writevarlist.west);
682
683      \uncover<1->{\node [yellow, below=0.05cm of write3dbinary] (writeparticles) {write\_particles};}
684      \path<1-> [line] (PALM.south) |- (writeparticles.west);
685
686      \uncover<1->{\node [yellow, below=0.05cm of writeparticles] (header) {header};}
687      \path<1-> [line] (PALM.south) |- (header.west);
688
689         \uncover<1->{\node [yellow, right=0.05cm of header] (userheader) {user\_header};}
690         \path<1-> [line] (header.east) -- (userheader.west);
691
692      \uncover<1->{\node [yellow, below=0.05cm of header] (userlastactions) {user\_last\_actions};}
693      \path<1-> [line] (PALM.south) |- (userlastactions.west);
694
695      \uncover<1->{\node [yellow, below=0.05cm of userlastactions] (cpustatistics) {cpu\_statistics};}
696      \path<1-> [line] (PALM.south) |- (cpustatistics.west);
697
698      \uncover<1->{\node [white2, below=5.6cm of PALM] (continu2) {};}
699      \path<1-> [line,dashed] (contino1.south) |- (continu2.north);
700
701      \uncover<1->{\node [white2, below=5.0cm of PALM] (continu1) {};}
702      \path<1-> [line] (PALM.south) |- (continu1.north);
703   \end{tikzpicture}
704\end{frame}
705
706%Folie 11
707\begin{frame}[fragile]
708   \frametitle{Important Variables and Their Declaration}
709   \begin{itemize}
710      \item<2->{3D-arrays of prognostic variables are named $\Psi_m$, $\Psi$, and $\Psi_p$ for time level $t-\Delta t$, $t$, and $t+\Delta T$, respectively, with $\Psi = u$, $v$, $w$, $pt$, $q$, $e$, $sa$}
711      \item<3->{They are by default declared as $\Psi$($z$,$y$,$x$) or $\Psi$($k$,$j$,$i$), e.g.\\
712      \begin{minipage}{0.2\textwidth}
713         with\\\\
714      \end{minipage}
715      \begin{minipage}{0.7\textwidth}
716         \centering
717         \begin{lstlisting}
718u(nzb:nzt+1,nysg:nyng,nxlg:nxrg)
719
720
721nysg = nys - ngl,  nyng = nyn + ngl
722nxlg = nxl - ngl,  nxrg = nxr + ngl
723nzb, nzt (bottom, top)
724nys, nyn (south, north)
725nxl, nxr (left, right)
726         \end{lstlisting}
727      \end{minipage}\\
728      as the index limits of the (sub-)domain. ngl is the number of ghost layers which depends on the advection scheme ( ngl = 3 for the default Wicker-Skamarock scheme)
729      }
730   \end{itemize}
731\end{frame}
732
733%Folie 12
734\begin{frame}[fragile]
735   \frametitle{Important Variables and Their Declaration}
736   \begin{itemize}
737      \item<1->{If only one processor is used, then\\
738      \begin{minipage}{0.2\textwidth}
739         \quad \\\\
740      \end{minipage}
741      \begin{minipage}{0.7\textwidth}
742         \centering
743         \begin{lstlisting}
744nxl = 0; nxr = nx
745nys = 0; nyn = ny
746         \end{lstlisting}
747      \end{minipage}\\
748      }
749      \item<2->{For speed optimization, most of the 3D-variables are declared as pointers, e.g.\\
750      \begin{minipage}{0.2\textwidth}
751         \quad \\\\
752      \end{minipage}
753      \begin{minipage}{0.7\textwidth}
754         \centering
755         \begin{lstlisting}
756REAL, DIMENSION(:,:,:), POINTER ::  u, u_m, u_p, ...
757         \end{lstlisting}
758      \end{minipage}\\
759      This does not affect the usage of these variables in the code in (almost) any way.
760      }
761   \end{itemize}
762\end{frame}
763
764%Folie 13
765\begin{frame}[fragile]
766   \frametitle{Some Other Frequently Used Variables}
767
768\begin{table}[htbp]
769  \centering
770%  \caption{Add caption}
771    \begin{tabular}{|l|l|p{0.22\linewidth}|l|}
772    \hline
773    variable & index bounds & meaning & comment\\
774    \hline
775    \hline
776    \texttt{\tiny zu }   & \texttt{\tiny nzb:nzt+1 }& \tiny heights of the scalar (u,v) grid levels & \texttt{\tiny zu(0)=-zu(1)}\\
777    \hline
778    \texttt{\tiny zw }   & \texttt{\tiny nzb:nzt+1 }& \tiny heights of the w grid level & \texttt{\tiny zw(0)=0 }\\
779    \hline
780    \texttt{\tiny dzu }  & \texttt{\tiny 1:nzt+1 }& \tiny vertical grid spacings between scalar grid levels & \texttt{\tiny dzu(k)=zu(k)-zu(k-1)}\\
781    \hline
782    \texttt{\tiny ddzu } & \texttt{\tiny 1:nzt+1 }& \tiny inverse of grid spacings & \texttt{\tiny ddzu(k)=1.0/dzu(k)}\\
783    \hline
784    \texttt{\tiny dx  }  &       & {\tiny grid spacing along x} &  \\
785    \hline
786    \texttt{\tiny ddx }  &       & {\tiny inverse of dx} & \texttt{\tiny ddx=1.0/dx }\\
787    \hline
788    \texttt{\tiny current\_timestep\_number} &       & {\tiny timestep counter} &  \\
789    \hline
790    \texttt{\tiny simulated\_time }&       & {\tiny simulated time in seconds} &  \\
791    \hline
792    \end{tabular}%
793%  \label{tab:addlabel}%
794\end{table}%
795\end{frame}
796
797
798%Folie 14
799\begin{frame}[fragile]
800   \frametitle{Preprocessor Directives (I)}
801   \begin{itemize}
802      \item<1->{Preprocessor directives are special lines in the code which allows to compile alternative parts of the code depending on so-called \textbf{define-string} switches.\\ Code example:\\
803      \begin{minipage}{0.2\textwidth}
804         \quad \\\\
805      \end{minipage}
806      \begin{minipage}{0.7\textwidth}
807         \centering
808         \begin{lstlisting}
809#if defined( __abc )
810CALL FLUSH( 9 )
811#else
812CALL FLUSH_( 9 )
813#endif
814         \end{lstlisting}
815      \end{minipage}\\
816      If now the compiler is called e.g.\\
817      \begin{minipage}{0.2\textwidth}
818         \quad \\\\
819      \end{minipage}
820      \begin{minipage}{0.7\textwidth}
821         \centering
822         \begin{lstlisting}
823ifort -cpp -D __abc ... (other options)
824         \end{lstlisting}
825      \end{minipage}\\
826      then the line containing ``\texttt{\tiny CALL FLUSH( 9 )}'' is compiled. \\If the compiler call is\\
827      \begin{minipage}{0.2\textwidth}
828         \quad \\\\
829      \end{minipage}
830      \begin{minipage}{0.7\textwidth}
831         \centering
832         \begin{lstlisting}
833ifort -cpp ... (other options)
834         \end{lstlisting}
835      \end{minipage}\\
836      the line containing ``\texttt{\tiny CALL FLUSH\_( 9 )}'' is compiled.
837      }
838   \end{itemize}
839\end{frame}
840
841
842%Folie 14
843\begin{frame}[fragile]
844   \frametitle{Preprocessor Directives (I)}
845   \begin{itemize}
846      \item<1->{The preprocessor directives require to include the compiler option ``\texttt{\scriptsize-cpp}'' in any way. Otherwise, the compilation will give error messages. \textbf{The option has to be given in the configuration file} \texttt{\scriptsize .mrun.config.} \textbf{Different compilers may require different options!}}\\
847
848      \item<2->{Define-string switches can be combined using logical AND / OR operators \&\& / $\lvert \lvert$.\\
849      \begin{minipage}{0.2\textwidth}
850         \quad \\\\
851      \end{minipage}
852      \begin{minipage}{0.7\textwidth}
853         \centering
854         \begin{lstlisting}
855#if defined ( __abc  &&  __def )
856         \end{lstlisting}
857      \end{minipage}
858      }
859   \end{itemize}
860\end{frame}
861
862
863%Folie 15
864\begin{frame}[fragile]
865   \frametitle{Preprocessor Directives (II)}
866   In the PALM code, define-string switches are used for following reasons:
867   \begin{itemize}
868      \item<2->{To switch between system dependent subroutines for:\\
869      \begin{itemize}
870         \item<2->{\texttt{\scriptsize \_\_ibm}} \quad IBM-Regatta systems\\
871         \item<2->{\texttt{\scriptsize \_\_lc}}\;\: \quad Linux clusters (using Intel compiler ifort)\\
872         \item<2->{\texttt{\scriptsize \_\_nec}} \quad NEC-SX systems\\
873      \end{itemize}
874      Switches are set automatically depending on mrun-option ``\texttt{\scriptsize-h}'', eg. ``\texttt{\scriptsize-h lcmine}'' sets ``\texttt{\scriptsize-D \_\_lc}''}
875      \item<3->{To switch between the serial and the parallel code:\\
876      \begin{itemize}
877         \item<3->{\texttt{\scriptsize \_\_parallel}}
878      \end{itemize}
879      This switch is set by mrun-option ``\texttt{\scriptsize-K parallel}''.}
880   \end{itemize}
881\end{frame}
882
883
884%Folie 15
885\begin{frame}[fragile]
886   \frametitle{Preprocessor Directives (II)}
887   In the PALM code, define-string switches are used for following reasons:
888   \begin{itemize}
889      \item<1->{To enable usage of special software packages which are not included in the compilation process by default\\
890      \begin{itemize}
891         \item<1->{\texttt{\scriptsize \_\_dvrp\_graphics}} \quad 3D visualization system\\
892         \item<1->{\texttt{\scriptsize \_\_spectra}} \quad \quad \quad \quad calculation and output of power spectra\\
893      \end{itemize}
894      Switches are activated with mrun-option ``\texttt{\scriptsize-p}'', \mbox{eg. ``\texttt{\scriptsize-p} ``\texttt{\scriptsize spectra dvrp\_graphics}''''}}
895   \end{itemize}
896    {\small \quad\\ \quad\\ \quad}\\ \quad  \\ \quad %nicht fragen, was das soll!! Mir ist leider nichts bsseres eingefallen um den Satz unter der Überschrift deckungsgleich auf beiden Folien zu haben.
897\end{frame}
898
899
900%Folie 14
901\begin{frame}[fragile]
902   \frametitle{Preprocessor Directives (III)}
903   \begin{itemize}
904      \item<1->{Preprocessor directives are also used for string replacement in the code.\\ Example:\\A compiler call with preprocessor option\\
905      \begin{minipage}{0.2\textwidth}
906         \quad \\\\
907      \end{minipage}
908      \begin{minipage}{0.7\textwidth}
909         \centering
910         \begin{lstlisting}
911ifort -cpp -Dabcd=efgh
912         \end{lstlisting}
913      \end{minipage}
914      will replace all strings ``\texttt{\scriptsize abcd}'' in the code with ``\texttt{\scriptsize efgh}'' \textbf{before} the code is compiled.\\
915      This is used in PALM to change the MPI\_REAL datatypes (which are 4 Byte long by default), to 8 Bytes. The respective cpp-directives are given in the configuration file \texttt{\scriptsize .mrun.config.}:\\
916      \begin{minipage}{0.2\textwidth}
917         \quad \\\\
918      \end{minipage}
919      \begin{minipage}{0.7\textwidth}
920         \centering
921         \begin{lstlisting}
922%cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION:
923             -DMPI_2REAL=MPI_2DOUBLE_PRECISION: ....
924         \end{lstlisting}
925      \end{minipage}
926      }
927   \end{itemize}
928\end{frame}
929
930\end{document}
Note: See TracBrowser for help on using the repository browser.