Index: palm/trunk/TUTORIAL/SOURCE/debugging.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/debugging.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/debugging.tex	(revision 973)
@@ -1,5 +1,5 @@
 % $Id$
 \input{header_tmp.tex}
-%\input{../header_lectures.tex}
+%\input{../header_LECTURE.tex}
 
 \usepackage[utf8]{inputenc}
@@ -117,5 +117,5 @@
       \item<4->{The default {\tt .mrun.config.imuk\_hlrn} file contains an additional block with debug options. It can bei used with mrun-call 
             \par\medskip
-            {\tt mrun ... -h lcsgih -K parallel trace ...}}
+            {\tt mrun ... -h lcsgih -K \dq parallel trace\dq ...}}
    \end{itemize}
 \end{frame}
@@ -177,7 +177,7 @@
             \textbf{advec\_s\_bc.f90}\\
             ...};
-      \node[green3](depository_parallel) [below=0.5cm of trunk] [xshift = 2cm] {MAKE\_Depository\_parallel/};}
-      \uncover<3->{
-      \node[green4](depository_parallel_trace) [below=0.5cm of depository_parallel] [xshift = 0.25cm] {MAKE\_Depository\_parallel\_trace/};}
+      \node[green3](depository_parallel) [below=0.5cm of trunk] [xshift = 2cm] {MAKE\_DEPOSITORY\_parallel/};}
+      \uncover<3->{
+      \node[green4](depository_parallel_trace) [below=0.5cm of depository_parallel] [xshift = 0.25cm] {MAKE\_DEPOSITORY\_parallel\_trace/};}
       
       \uncover<2->{
@@ -192,6 +192,6 @@
       \path[arrow, thick] (7.3,-1.01) -- (depository_parallel.east);}
       \uncover<3->{
-      \path[line, thick] (7.5,-0.3) -- (7.5,-2.02);
-      \path[arrow, thick] (7.5,-2.02) -- (depository_parallel_trace.east);}
+      \path[line, thick] (7.7,-0.3) -- (7.7,-2.02);
+      \path[arrow, thick] (7.7,-2.02) -- (depository_parallel_trace.east);}
    \end{tikzpicture}
    \end{center}
@@ -202,5 +202,5 @@
    \begin{tabbing}
       \qquad \={\tt mrun ... -K parallel ...} will use the optimized version \\
-             \> {\tt mrun ... -K "'parallel trace"' ...} will use the debug version
+             \> {\tt mrun ... -K \dq parallel trace\dq ...} will use the debug version
    \end{tabbing}  }
    \uncover<5->{\begin{center} \textbf{Enabling debug options slows down the execution speed significantly!} \end{center}}
Index: palm/trunk/TUTORIAL/SOURCE/exercise_interface.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/exercise_interface.tex	(revision 973)
+++ palm/trunk/TUTORIAL/SOURCE/exercise_interface.tex	(revision 973)
@@ -0,0 +1,231 @@
+% $Id$
+\input{header_tmp.tex}
+%\input{../header_lectures.tex}
+
+\usepackage[utf8]{inputenc}
+\usepackage{ngerman}
+\usepackage{pgf}
+\usetheme{Dresden}
+\usepackage{subfigure}
+\usepackage{units}
+\usepackage{tabto}
+\usepackage{multimedia}
+\usepackage{hyperref}
+\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
+\usepackage{xmpmulti}
+\usepackage{tikz}
+\usetikzlibrary{shapes,arrows,positioning}
+\usetikzlibrary{decorations.markings}             %neues paket
+\usetikzlibrary{decorations.pathreplacing}        %neues paket
+\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{multicol}
+\usepackage{pdfcomment}
+\usepackage{graphicx}
+\usepackage{listings}
+\lstset{language=[90]Fortran,
+  basicstyle=\ttfamily \tiny,
+  keywordstyle=\color{black},
+  commentstyle=\color{black},
+  morecomment=[l]{!\ }% Comment only with space after !
+}
+
+
+\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\date{last update: \today}
+\event{PALM Seminar}
+\setbeamertemplate{navigation symbols}{}
+
+\setbeamertemplate{footline}
+  {
+    \begin{beamercolorbox}[rightskip=-0.1cm]&
+     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
+      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}
+      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
+    \end{beamercolorbox}
+  }
+%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}}
+
+\title[Exercise 3: User Interface]{Exercise 3: User Interface}
+\author{Siegfried Raasch}
+
+\setbeamersize{text margin left=.2cm,text margin right=.2cm}
+
+\begin{document}
+\footnotesize
+% Folie 1
+\begin{frame}
+\titlepage
+\end{frame}
+
+\section{Exercise}
+\subsection{Exercise}
+
+% Folie 2
+\begin{frame}
+   \frametitle{Exercise 3: User Interface}
+   \begin{itemize}
+      \item Carry out a run for a convective boundary layer where the surface heat flux is applied for a limited rectangular area only.
+
+            \tikzstyle{green} = [rectangle, draw, fill=green!70, minimum size=51pt, font=\tiny]
+            \tikzstyle{red} = [rectangle, draw, fill=red!90, text width=44.77pt, minimum size=20pt, font=\tiny]
+            \tikzstyle{textd} = [rectangle, font=\normalsize]
+            \tikzstyle{line} = [draw, -]
+            \begin{center}
+            \begin{tikzpicture}[auto, node distance=0]
+               \uncover<2->{\node [green] (green) {};}
+               \uncover<3->{\node [red, rotate=90] (red) {};}
+               \uncover<4->{\node [textd] (textd) {d};}
+               \uncover<4->{\draw [latex-,line width=0.8pt] (red.south) -- (textd.east);}
+               \uncover<4->{\draw [latex-,line width=0.8pt] (red.north) -- (textd.west);}
+            \end{tikzpicture}
+            \end{center}
+
+      \item<5-> It should be possible to control the area width d by a user-defined parameter in the parameter file. All other parameters should be chosen as in the example run ({\texttt{\scriptsize example\_cbl}}).
+      \item<6-> Create horizontal and vertical cross sections of variables in order to analyze the flow field.
+      \item<7-> Create mean vertical profiles of temperature and resolved/subgrid-scale heatflux for the total domain but also for the limited rectangular area and the total domain without the limited area. Also create time series for these three domains.\\ 
+      This can be done by using the \textbf{statistic region concept} already implemented in PALM.
+
+   \end{itemize}
+
+\end{frame}
+
+% Folie 3
+\begin{frame}
+   \frametitle{The statistic region concept}
+    \begin{itemize}
+       \item<1-> By default, mean horizontal profiles are calculated and written on file for the total domain.
+       \item<2-> The user can define up to nine so-called statistic regions, which can be arbitrary subsets of the total domain and PALM will calculate and output mean profiles for these regions also.
+    \end{itemize}
+    \vspace{1em}
+    \onslide<3->\textbf{Procedure:}
+    \begin{enumerate}
+       \item<3-> Set the number of statistic regions you additionally want to define by assigning a value to the {\texttt{\scriptsize {\&}inipar}}-parameter {\texttt{\scriptsize statistic\_regions}}.
+       \item<4-> Within the user-interface ({\texttt{\scriptsize user\_init}}), set the masking array {\texttt{\scriptsize rmask}}. It is an {\texttt{\scriptsize INTEGER}} array with array-bounds
+       \begin{center}
+       {\texttt{\scriptsize rmask(nysg:nyng,nxlg:nxrg,0:9)}}
+       \end{center}
+       The last index represents the respective statistic region (index {\texttt{\scriptsize 0}} stands for total domain). Assign a 1 to each array element (grid point) which shall belong to the respective statistic region.\\
+       {\texttt{\scriptsize rmask}} is pre-set as:
+       \begin{center}
+       {\texttt{\scriptsize rmask(:,:,0:9)   = 1}}
+       \end{center}
+    \end{enumerate}
+\end{frame}
+
+
+% Folie 4
+\begin{frame}
+   \frametitle{Additional hints}
+    \begin{itemize}
+       \item<1-> Keep in mind that every PE calculates for a different subset of the total domain. Array bounds of the total domain are {\texttt{\scriptsize (0:ny,0:nx)}}, those of the subdomains {\texttt{\scriptsize (nys:nyn,nxl:nxr)}}, where {\texttt{\scriptsize nys, nyn, nxl, nxr}} vary for each subdomain.
+       \item<2-> {\texttt{\scriptsize rmask}} can also be used to modify the array which is used for the surface heatflux ({\texttt{\scriptsize shf}}):
+       \begin{center}
+       {\texttt{\scriptsize shf $=$ shf * rmask(:,:,1)}}
+       \end{center}
+       sets the surface heatflux to zero at all those array elements (grid points), where {\texttt{\scriptsize rmask(...,1)}} is zero.
+       \item<3-> In case of using the default netCDF format, the profile data for the additional statistic regions are added to the default local file {\texttt{\scriptsize DATA\_1D\_PR\_NETCDF}}.
+       \item<4-> The developing mean flow is quasi two-dimensional (in the xz-plane). You can easily get plots of the mean flow by averaging results along the y-axis. The standard output provides such averages. See description of parameter {\texttt{\scriptsize \textcolor{blue}{section\_xz}}} on how to get averages along y.
+    \end{itemize}
+\end{frame}
+
+% Folie 5
+\begin{frame}
+   \frametitle{If You Finished the Exercise Very Fast:}
+    \begin{itemize}
+       \item<1-> Repeat the simulation, but now for a geostrophic wind of 0.5 m/s
+       \item<2-> The resulting flow will be (should be) quite similar to the flow over an arctic lead.
+    \end{itemize}
+\end{frame}
+
+% Folie 6
+\section{Results \quad \, }
+\subsection{Results}
+
+% Folie 7
+\begin{frame}
+   \frametitle{XY cross-sections}
+   \begin{center}
+      \includegraphics[width=0.415\textwidth]{exercise_interface_figures/xy_shf.eps}
+      \includegraphics[width=0.50\textwidth]{exercise_interface_figures/xy_w.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 8
+\begin{frame}
+   \frametitle{vertical profiles (I)}
+   \begin{center}
+      \includegraphics[width=0.32\textwidth]{exercise_interface_figures/pr_pt0.eps}
+      \includegraphics[width=0.32\textwidth]{exercise_interface_figures/pr_pt1.eps}
+      \includegraphics[width=0.32\textwidth]{exercise_interface_figures/pr_pt2.eps}
+   \end{center}
+\end{frame}
+
+% Folie 9
+\begin{frame}
+   \frametitle{XZ cross-sections after 1h}
+   \begin{center}
+      \includegraphics[width=0.50\textwidth]{exercise_interface_figures/xz_w_avg.eps}
+      \includegraphics[width=0.50\textwidth]{exercise_interface_figures/xz_w_y1000.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 10
+\begin{frame}
+   \frametitle{vertical profiles (II)}
+   \begin{center}
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_resolved.eps}
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_resolved1.eps}
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_resolved2.eps}\\
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_sgs.eps}
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_sgs1.eps}
+      \includegraphics[width=0.30\textwidth]{exercise_interface_figures/pr_wpt_sgs2.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 11
+\begin{frame}
+   \frametitle{time series (I)}
+   \begin{center}
+      \hspace{-1.15em} \includegraphics[width=0.66\textwidth]{exercise_interface_figures/ts_pt0.eps}\\
+      \includegraphics[width=0.66\textwidth]{exercise_interface_figures/ts_pt1.eps}\\
+      \hspace{-0.75em} \includegraphics[width=0.66\textwidth]{exercise_interface_figures/ts_pt2.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 12
+\begin{frame}
+   \frametitle{time series (II)}
+   \begin{center}
+      \hspace{-0.15em} \includegraphics[width=0.65\textwidth]{exercise_interface_figures/ts_wpt0.eps}\\
+      \includegraphics[width=0.65\textwidth]{exercise_interface_figures/ts_wpt1.eps}\\
+      \includegraphics[width=0.65\textwidth]{exercise_interface_figures/ts_wpt2.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 13
+\begin{frame}
+   \frametitle{time series (III)}
+   \begin{center}
+      \hspace{0.25em} \includegraphics[width=0.65\textwidth]{exercise_interface_figures/ts_wpt0_sgs.eps}\\
+      \includegraphics[width=0.65\textwidth]{exercise_interface_figures/ts_wpt1_sgs.eps}\\
+      \hspace{-0.75em} \includegraphics[width=0.675\textwidth]{exercise_interface_figures/ts_wpt2_sgs.eps}\\
+   \end{center}
+\end{frame}
+
+% Folie 14
+\begin{frame}
+   \frametitle{XY cross-sections (b)}
+   \begin{center}
+      \includegraphics[width=0.50\textwidth]{exercise_interface_figures/xz_w_avg_wind.eps}
+      \includegraphics[width=0.50\textwidth]{exercise_interface_figures/xz_w_y250_wind.eps}\\
+   \end{center}
+\end{frame}
+
+
+\end{document}
Index: palm/trunk/TUTORIAL/SOURCE/exercise_topography.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/exercise_topography.tex	(revision 973)
+++ palm/trunk/TUTORIAL/SOURCE/exercise_topography.tex	(revision 973)
@@ -0,0 +1,306 @@
+%$Id$
+\input{header_tmp.tex}
+%\input{../header_lectures.tex}
+
+\usepackage[utf8]{inputenc}
+\usepackage{ngerman}
+\usepackage{pgf}
+\usetheme{Dresden}
+\usepackage{subfigure}
+\usepackage{units}
+\usepackage{multimedia}
+\usepackage{hyperref}
+\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
+\usepackage{xmpmulti}
+\usepackage{tikz}
+\usetikzlibrary{shapes,arrows,positioning,decorations.pathreplacing}
+\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
+
+%---------- neue Pakete
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{multicol}
+\usepackage{pdfcomment}
+\usepackage{xcolor}
+
+\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\date{last update: \today}
+\event{PALM Seminar}
+\setbeamertemplate{navigation symbols}{}
+\setbeamersize{text margin left=.5cm,text margin right=.2cm}
+\setbeamertemplate{footline}
+  {%
+    \begin{beamercolorbox}[rightskip=-0.1cm]&
+     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
+      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}%
+      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}%
+    \end{beamercolorbox}%
+%    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}%
+%    \end{beamercolorbox}
+  }%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.eps}}
+
+\title[Exercise - Topography]{Exercise - Topography}
+\author{Siegfried Raasch}
+
+% Notes:
+% jede subsection bekommt einen punkt im menu (vertikal ausgerichtet.
+% jeder frame in einer subsection bekommt einen punkt (horizontal ausgerichtet)
+\begin{document}
+% Folie 1
+\begin{frame}
+\titlepage
+\end{frame}
+
+\section{Exercise}
+\subsection{Exercise}
+
+% Folie 2
+\begin{frame}
+   \frametitle{Exercise}
+   Please carry out \textbf{two runs} with following conditions.
+   \begin{itemize}
+      \item{Single surface-mounted cube}
+      \begin{itemize}
+         \item[1.)]{First run ''generic'' using {\tt topography = 'single\_building'}}
+         \item[2.)]{Second run ''raster'' using {\tt topography = 'read\_from\_file'}
+                   with ASCII file ...\_topo}
+      \end{itemize}
+      \item{Neutral boundary layer in a channel}
+      \item{Constant bulk velocity}
+      \item{No Coriolis force}
+      \item{Simulation features:}
+      \begin{itemize}
+         \item{domain size: (80 m)$^3$ (x/y/z)}
+         \item{grid size: 2 m equidistant}
+         \item{cube: size (40 m)$^3$, location centered in the domain center}
+         \item{simulated time: 7200 s}
+         \item{initial velocity: u = 1, v = 0 m/s}
+      \end{itemize}
+   \end{itemize}
+   \textbf{Please use the same building (size, location) for both runs!}
+\end{frame}
+
+% Folie 3
+\begin{frame}
+   \frametitle{Questions to be Answered}
+   \small
+   \begin{itemize}
+      \item{Can you identify flow convergence / divergence patterns near the cube?}
+      \begin{itemize}
+         \item{What kind of output do you need to answer this?}
+      \end{itemize}
+      \item{How does the horizontally and temporally averaged momentum flux profile look
+            like?}
+      \begin{itemize}
+         \item{How long should the averaging time interval be?}
+      \end{itemize}
+      \item{Is it really a large-eddy simulation?}
+      \begin{itemize}
+         \item{Are the subgrid-scale fluxes much smaller than the resolved-scale fluxes?}
+         \item{How do the total kinetic energy and the maximum velocity components change
+               with time?}
+      \end{itemize}
+   \end{itemize}
+   \textbf{Final question:}
+   \begin{itemize}
+      \item{Do the results of both runs agree?}
+   \end{itemize}
+\end{frame}
+
+% Folie 4
+\begin{frame}
+   \frametitle{Hints (I)}
+   \scriptsize
+   \begin{itemize}
+      \item{\textbf{Domain size}}
+      \begin{itemize}
+         \scriptsize
+         \item{Is controlled by grid size (\textbf{dx}, \textbf{dy}, \textbf{dz}) and number of grid points 
+              (\textbf{nx}, \textbf{ny}, \textbf{nz}). Since the first grid point along one of the directions has
+              index 0, the total number of grid points used are \textbf{nx}+1, \textbf{ny}+1, \textbf{nz}+1.
+              The total domain size in case of cyclic horizontal boundary conditions is
+              (\textbf{nx}+1)\cdot\textbf{dx}, (\textbf{ny}+1)\cdot\textbf{dy}.}
+      \end{itemize}
+      \item{\textbf{Initial profiles}}
+      \begin{itemize}
+         \scriptsize
+         \item{Constant with height. See parameter \textbf{initializing\_actions} for available
+               initialization methods. See \textbf{ug\_surface}, \textbf{vg\_surface} for initial values of
+               velocity.}
+      \end{itemize}
+      \item{\textbf{Boundary conditions}}
+      \begin{itemize}
+         \scriptsize
+         \item{For channel boundary condition, see \textbf{bc\_uv\_t}.}
+      \end{itemize}
+      \item{\textbf{Forcing}}
+      \begin{itemize}
+         \scriptsize
+         \item{For constant bulk velocity, see \textbf{conserve\_volume\_flow}.}
+         \item{For Coriolis force, see \textbf{omega}.}
+      \end{itemize}
+      \item{\textbf{Topography}}
+      \begin{itemize}
+         \scriptsize
+         \item{For generic topography, see \textbf{building\_height}, \textbf{building\_length\_x} and
+               \textbf{building\_length\_y}.}
+         \item{For raster topography, please use a text editor to manually create an
+               ASCII ''raster\_topo'' file that contains the same building.}
+      \end{itemize}      
+   \end{itemize}
+\end{frame}
+
+% Folie 5
+\begin{frame}
+   \frametitle{Hints (II)}
+   \footnotesize
+   \begin{itemize}
+      \item{\textbf{Simulation time}}
+      \begin{itemize}  
+         \footnotesize       
+         \item{See parameter \textbf{end\_time}.}
+      \end{itemize}
+      \item{\textbf{Variables}}
+      \begin{itemize}
+         \footnotesize
+         \item{Output variables are chosen with parameters \textbf{data\_output} (3d-data or 
+               2d-cross-sections) and \textbf{data\_output\_pr} (profiles).}
+         \item{Time series are activated using \textbf{dt\_dots}.}         
+      \end{itemize}
+      \item{\textbf{Output intervals}}
+      \begin{itemize}
+         \footnotesize
+         \item{Output intervals are set with parameter \textbf{dt\_data\_output}. This parameter
+               affects all output (cross-sections, profiles, etc.). Individual temporal
+               intervals for the different output quantities can be assigned using
+               parameters \textbf{dt\_do3d}, \textbf{dt\_do2d\_xy}, \textbf{dt\_do2d\_xz}, \textbf{dt\_do2d\_yz}, \textbf{dt\_dopr},
+               etc. }
+      \end{itemize}
+      \item{\textbf{Time averaging}}
+      \begin{itemize}
+         \footnotesize
+         \item{Time averaging is controlled with parameters \textbf{averaging\_interval},
+               \textbf{averaging\_interval\_pr}, \textbf{dt\_averaging\_input}, \textbf{dt\_averaging\_input\_pr}.}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 6
+\begin{frame}
+   \frametitle{Further Hints}
+   \scriptsize
+   Please see under \\
+   \textbf{http://palm.muk.uni-hannover.de/wiki/doc/app/netcdf}  \\ 
+   \par\medskip  
+   where the complete PALM netCDF-data-output and the respective steering parameters are described. 
+   \par\medskip
+   For topography, see \\
+   \textbf{http://www.muk.uni-hannover.de/$\sim$raasch/PALM\_group/doc/app/
+   chapter\_4.1.html\#topography}\\
+   \par\medskip
+   and especially for raster topography, see also
+   \textbf{http://www.muk.uni-hannover.de/$\sim$raasch/PALM\_group/doc/app/ 
+   chapter\_3.4.html\#TOPOGRAPHY\_DATA} \\
+   \par\medskip
+   as well as the presentation ''Using topography (I)''.
+\end{frame}
+
+% Folie 7
+\begin{frame}
+   \frametitle{Proceeding}
+   Please proceed as follows:
+   \begin{itemize}
+      \item[1.]{Please run with the ''generic'' topography case first.}
+      \item[2.]{Check your results to answer all questions â except the final question.}
+      \item[3.]{After this run has finished, use ncview, ncdump etc. to check the precise
+               location of the building (look at 2D array zusi that is contained in 2D xy
+               cross-sections and 3D volume data).}
+      \item[4.]{Use this information to manually create the ''raster\_topo'' file.}
+      \item[5.]{Run the ''raster'' topography case.}
+      \item[6.]{Compare both simulation results to answer the final question.}
+   \end{itemize} 
+\end{frame}
+
+% Folie 8
+\begin{frame}
+   \frametitle{How to Start?}
+   \footnotesize
+   \begin{itemize}
+      \item{Create two \textbf{INPUT} directories for both new runs: \\
+            {\tt cd $\sim$/palm/current\_version} \\            
+            {\tt mkdir -p JOBS/generic/INPUT} \\
+            {\tt mkdir -p JOBS/raster/INPUT}} 
+      \item{Create the parameter files and {\tt raster\_topo} file and set the required
+            parameters in \\
+            {\tt JOBS/generic/INPUT/generic\_p3d} \\
+            {\tt JOBS/raster/INPUT/raster\_p3d}}
+      \item{Start the runs one by one with mrun-commands \\
+            {\tt mrun -d generic -K parallel ...} \\
+            {\tt mrun -d raster -K parallel ...}}
+      \item{and analyze the output files in \\
+            {\tt JOBS/generic/OUTPUT} \\
+            {\tt JOBS/raster/OUTPUT}}
+   \end{itemize}
+\end{frame}
+
+\section{Results}
+\subsection{Results}
+
+% Folie 9
+\begin{frame}
+   \frametitle{Flow convergence / divergence (I)}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/cross_sections/u_xy.eps} \hspace{0.8cm}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/cross_sections/v_xy.eps} 
+\end{frame}
+
+% Folie 10
+\begin{frame}
+   \frametitle{Flow convergence / divergence (II)}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/cross_sections/w_xy.eps} \hspace{0.8cm}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/cross_sections/w_xz.eps} 
+\end{frame}
+
+% Folie 11
+\begin{frame}
+   \frametitle{Streamlines}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/streamlines/streamlines_xy.eps} \hspace{0.8cm}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/streamlines/streamlines_xz.eps} \hspace{0.8cm}
+\end{frame}
+
+
+% Folie 12
+\begin{frame}
+   \frametitle{Vertical profiles of $\overline{w'u'}$, $\overline{w'v'}$}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/profiles/wu_time_pr.eps} \hspace{0.8cm}
+   \includegraphics[width=0.45\textwidth]{exercise_topography_figures/profiles/wv_time_pr.eps}
+\end{frame}
+
+% Folie 13
+\begin{frame}
+   \frametitle{LES? - Fluxes}
+   \begin{center}
+      \includegraphics[width=0.6\textwidth]{exercise_topography_figures/profiles/wu_comp_pr.eps}
+   \end{center}   
+\end{frame}
+
+% Folie 14
+\begin{frame}
+   \frametitle{LES? - Time Series (I)}
+   \begin{center}
+      \includegraphics[width=0.95\textwidth]{exercise_topography_figures/timeseries/E_ts.eps} \\
+      \includegraphics[width=0.95\textwidth]{exercise_topography_figures/timeseries/umax_ts.eps} 
+   \end{center}
+\end{frame}
+
+% Folie 15
+\begin{frame}
+   \frametitle{LES? - Time Series (II)}
+   \begin{center}
+      \includegraphics[width=\textwidth]{exercise_topography_figures/timeseries/vmax_ts.eps} \\
+      \includegraphics[width=\textwidth]{exercise_topography_figures/timeseries/wmax_ts.eps}
+   \end{center}
+\end{frame}
+
+\end{document}
Index: palm/trunk/TUTORIAL/SOURCE/mrun_data_analysis.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/mrun_data_analysis.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/mrun_data_analysis.tex	(revision 973)
@@ -69,4 +69,5 @@
       \item<3-> Mean vertical profiles
       \begin{itemize}
+         \footnotesize
          \item[-]<3-> horizontally averaged, instantaneous or time-averaged
       \end{itemize}
@@ -74,8 +75,10 @@
       \item<5-> Two-dimensional cross sections ($xy$, $xz$, $yz$)
       \begin{itemize}
+         \footnotesize
          \item[-]<5-> instantaneous or time-averaged, + averaged along 3rd dimension
       \end{itemize}
       \item<6-> Complete three-dimensional data arrays
       \begin{itemize}
+         \footnotesize
          \item[-]<6-> instantaneous or time-averaged
       \end{itemize}
@@ -85,5 +88,5 @@
    \onslide<8-> First item is pure ASCII-data to give a short overview of the run. All other output is in netCDF format and can be graphically displayed.\\
    \vspace{2mm}
-   Additionally, power spectra can be output using the spectra-package (use \texttt{mrun}-option \texttt{â-p spectraâ}).
+   Additionally, power spectra can be output using the spectra-package (use \texttt{mrun}-option \grqq \texttt{-p spectra}\grqq).
    
 \end{frame}
@@ -142,5 +145,7 @@
       \texttt{ferret -gui}};
    
-
+      \draw[-] (1.south west) -- (4.south east);   
+      \draw[-] (13.south west) -- (43.south east); 
+      \draw[-] (1.north east) -- (15.south east); 
    \end{tikzpicture}
 \end{frame}
@@ -153,33 +158,33 @@
    \begin{enumerate}
    
-      \item<2-> Carefully think about, which variables you want to analyze
+      \item<2-> \textbf{Carefully think about, which variables you want to analyze}
       \begin{itemize}
          \scriptsize
 	      \item[]<2-> e.g. temperature, wind, etc., resolved- or subgrid-scale?, output interval?, should they be time averaged?
       \end{itemize}
-      
-      \item<3-> Find and set the appropriate output parameters in the parameter file
+      \vspace{1mm}
+      \item<3-> \textbf{Find and set the appropriate output parameters in the parameter file}
       \begin{itemize}
          \scriptsize
-	      \item[]<3-> \texttt{data\_output\_pr = 'pt', 'u', 'w ''pt'' ',  dt\_dopr = 900.0,}
+	      \item[]<3-> \texttt{data\_output\_pr = 'pt', 'u', 'w \dq pt\dq\, ',  dt\_dopr = 900.0,}
 	      \item[]<3-> \texttt{averaging\_interval\_pr = 600.0, dt\_averaging\_input\_pr = 10.0}
       \end{itemize}    
-      
-      \item<4-> Check, if the necessary file connection statements exist in the .mrun.config file
+      \vspace{1mm}
+      \item<4-> \textbf{Check, if the necessary file connection statements exist in the .mrun.config file}\\
       \begin{itemize}
          \scriptsize
 	      \item[]<4-> \texttt{DATA\_1D\_PR\_NETCDF   out:loc:tr  pr\#      \~{}/palm/current\_version/JOBS/\$fname/OUTPUT  \_pr  nc}
       \end{itemize}  
-      
-      \item<5-> Don't forget to activate the file connection statements by setting the correct activation string(s) in \texttt{mrun}-option \texttt{-r}
+      \vspace{1mm}
+      \item<5-> \textbf{Don't forget to activate the file connection statements by setting the correct activation string(s) in \texttt{mrun}-option \texttt{-r}}\\
       \begin{itemize}
          \scriptsize
-	      \item[]<5-> \texttt{mrun ... -r ''... pr\# ...'' ...}
+	      \item[]<5-> \texttt{mrun ... -r \dq ... pr\# ...\dq\, ...}
       \end{itemize}   
-      
-      \item<6-> After job completion, change to the OUTPUT-directory and call the appropriate graphics software
+      \vspace{1mm}
+      \item<6-> \textbf{After job completion, change to the OUTPUT-directory and call the appropriate graphics software}\\
       \begin{itemize}
          \scriptsize
-	      \item[]<6-> \texttt{ncview <filename>} or \texttt{palmplot pr <options>}
+	      \item[]<6-> \texttt{ncview <filename>} \quad \textbf{or} \quad \texttt{palmplot pr <options>}
       \end{itemize}  
    \end{enumerate}   
Index: palm/trunk/TUTORIAL/SOURCE/mrun_steering_parameters.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/mrun_steering_parameters.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/mrun_steering_parameters.tex	(revision 973)
@@ -67,5 +67,5 @@
       \scriptsize
       
-      \item<2-> Domain size
+      \item<2-> \textbf{Domain size}
       \begin{itemize}
          \scriptsize
@@ -73,12 +73,12 @@
       \end{itemize}
       
-      \item<4-> Grid spacing
-      \begin{itemize}
-         \scriptsize
-         \item[-]<4-> Must be so fine that most of the turbulent transport is resolved (explicit transport $>>$ subgrid-scale transport)\\ $\rightarrow$ check profiles of resolved-scale and subgrid-scale fluxes
+      \item<4-> \textbf{Grid spacing}
+      \begin{itemize}
+         \scriptsize
+         \item[-]<4-> Must be so fine that most of the turbulent transport is resolved\\ (explicit transport $>>$ subgrid-scale transport)\\ $\rightarrow$ check profiles of resolved-scale and subgrid-scale fluxes
          \item[-]<5-> Results should not depend on grid spacing $\rightarrow$ carry out sensitivity study
       \end{itemize}
       
-      \item<6-> Simulation time
+      \item<6-> \textbf{Simulation time}
       \begin{itemize}
          \scriptsize
@@ -88,5 +88,5 @@
       \end{itemize}
       
-      \item<9-> Data analysis
+      \item<9-> \textbf{Data analysis}
       \begin{itemize}
          \scriptsize
@@ -106,5 +106,5 @@
       \footnotesize
       
-      \item<2-> Grid parameters (computational grid / processor grid)
+      \item<2-> \textbf{Grid parameters (computational grid / processor grid)}
       \begin{itemize}
          \footnotesize
@@ -112,5 +112,5 @@
       \end{itemize}
       
-      \item<3-> Numerical parameters
+      \item<3-> \textbf{Numerical parameters}
       \begin{itemize}
          \footnotesize
@@ -118,5 +118,5 @@
       \end{itemize}
       
-      \item<4-> Boundary condition parameters
+      \item<4-> \textbf{Boundary condition parameters}
       \begin{itemize}
          \footnotesize
@@ -124,5 +124,5 @@
       \end{itemize}
       
-      \item<5-> Initialization parameters
+      \item<5-> \textbf{Initialization parameters}
       \begin{itemize}
          \footnotesize
@@ -130,5 +130,5 @@
       \end{itemize}   
       
-      \item<6-> Output parameters
+      \item<6-> \textbf{Output parameters}
       \begin{itemize}
          \footnotesize
@@ -136,5 +136,5 @@
       \end{itemize}         
       
-      \item<7-> Physical parameters
+      \item<7-> \textbf{Physical parameters}
       \begin{itemize}
          \footnotesize
@@ -154,5 +154,5 @@
       \footnotesize
       
-      \item<2-> General initialization methods
+      \item<2-> \textbf{General initialization methods}
       \begin{itemize}
          \footnotesize
@@ -160,5 +160,5 @@
       \end{itemize}
       
-      \item<3-> Initial run:
+      \item<3-> \textbf{Initial run:}
       \begin{itemize}
          \footnotesize
@@ -170,8 +170,8 @@
          3d-data from a pre-run (possibly with smaller domain size than the initial run) are used
          \item[-]<6-> \texttt{initializing\_actions = âby\_userâ}\\
-         user has to provide all initial settings
-      \end{itemize}
-      
-      \item<7-> Restart run:
+         user has to provide \textbf{all} initial settings
+      \end{itemize}
+      
+      \item<7-> \textbf{Restart run:}
       \begin{itemize}
          \footnotesize
@@ -190,5 +190,5 @@
    \begin{itemize}
       \footnotesize
-      \item<1-> The following parameters have to be set for an initial atmosphere at rest with neutral temperature stratification and a capping inversion:
+      \item<1-> \textbf{The following parameters have to be set for an initial atmosphere at rest with neutral temperature stratification and a capping inversion:}
 
       \quad \texttt{initializing\_actions = âset\_constant\_profilesâ,}\\
Index: palm/trunk/TUTORIAL/SOURCE/parallelization.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/parallelization.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/parallelization.tex	(revision 973)
@@ -108,5 +108,5 @@
 
          \node (center) at (0,1) {};
-         \onslide<2-> \node (Network) at (-3.5,1) [ellipse,fill=green!20] {Network};
+         \onslide<2-> \node (Network) at (-3.5,1) [draw, ellipse,fill=green!20] {Network};
          \node (dis_mem) at (-3.5,-1) [text width=0.28\textwidth] {\footnotesize \textbf{distributed} memory\\(Cray-T3E)};
          \onslide<3-> \node (add_mem) at (3.5,1) [rectangle, draw] {adressable memory};
@@ -116,5 +116,5 @@
          \onslide<6-> \node (clustered_systems) at (0,-3) [draw, text width=0.15\textwidth] {clustered systems};
          \node (cs_info) at (0,-4.2) [text width=0.4\textwidth] {\footnotesize (IBM-Regatta, Linux-Cluster,
-NEC-SX, SGI-ICE, Cray-XT4)};
+NEC-SX, SGI-ICE, Cray-XE6)};
 
 % Adressable memory node (big)
@@ -138,31 +138,34 @@
 % Adressable memory node (small)    
          \onslide<4->
-         \draw[->, thick] (1.5,0.2) -- (0.4,0.2) ;    
-         \node at (0,0.2) [scale=0.2] {%
-         \begin{tikzpicture}
+           
+         \node (small_node) at (-2,0.6) [scale=0.2] {%
+            \begin{tikzpicture}
+
+               \node (add_mem_small) at (3.5,0.9) [ultra thick, rectangle, draw, minimum width=3cm] {};
+
+               \node (p1_small) at (2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p2_small) at (2.6,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p3_small) at (3.2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p4_small) at (3.8,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p5_small) at (4.4,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p6_small) at (5,-0.05) [ultra thick, draw,circle, scale=0.9] {};
             
-            \node (add_mem_small) at (3.5,0.9) [ultra thick, rectangle, draw, minimum width=3cm] {};
-            \node (p1_small) at (2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p2_small) at (2.6,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p3_small) at (3.2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p4_small) at (3.8,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p5_small) at (4.4,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p6_small) at (5,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-         
-            \draw[-, ultra thick] (add_mem_small.south) -- (3.5,0.4);
-            \draw[-, ultra thick] (2,0.4) -- (5,0.4);
-            \draw[-, ultra thick] (2,0.4) -- (p1_small);
-            \draw[-, ultra thick] (2.6,0.4) -- (p2_small);
-            \draw[-, ultra thick] (3.2,0.4) -- (p3_small);         
-            \draw[-, ultra thick] (3.8,0.4) -- (p4_small);
-            \draw[-, ultra thick] (4.4,0.4) -- (p5_small);         
-            \draw[-, ultra thick] (5,0.4) -- (p6_small);
+               \draw[-, ultra thick] (add_mem_small.south) -- (3.5,0.4);
+               \draw[-, ultra thick] (2,0.4) -- (5,0.4);
+               \draw[-, ultra thick] (2,0.4) -- (p1_small);
+               \draw[-, ultra thick] (2.6,0.4) -- (p2_small);
+               \draw[-, ultra thick] (3.2,0.4) -- (p3_small);         
+               \draw[-, ultra thick] (3.8,0.4) -- (p4_small);
+               \draw[-, ultra thick] (4.4,0.4) -- (p5_small);         
+               \draw[-, ultra thick] (5,0.4) -- (p6_small);
+               
+               
+            \end{tikzpicture}
+            } ;
             
-            
-         \end{tikzpicture}
-         } ;
-         
+         \draw[->, thick] (1.5,0.2) -- (small_node) ;  
+         \draw[-] (-2.7,0.75) -- (-2.3,0.725);
          \onslide<5->
-         \node (add_info) at (0,-0.1) [scale=0.9] {\scriptsize node};
+         \node[below=-0.1cm of small_node] (add_info) [scale=0.9] {\scriptsize node};
 
 % Black Arrows
@@ -177,5 +180,5 @@
 % OpenMP Arrows         
          \onslide<8-> \draw[->, ultra thick, color=yellow] (3.5,-2.6) -- (3.5,-1.5) ;
-         \draw[->, ultra thick, color=yellow] (2.5,-2.8) -- (-2.5,0.7) ;
+         \draw[->, ultra thick, color=yellow] (2.5,-2.8) -- (-2.0,0.1) ;
          
 % Network decorations
@@ -209,5 +212,6 @@
          \draw[-] (-2.45,1.0) -- (pr6);
          \draw[-] (mem6) -- (pr6);    
-                           
+               
+         \onslide<1->            
       \end{tikzpicture}
    \end{center}
@@ -245,5 +249,7 @@
    \begin{itemize}
       \item<10-> Alternatively, a 1D-decomposition along $x$ or $y$ may be used in case of slow networks, but this generally doesn't scale for processor numbers $>$ 256.
+      \vspace{2mm}
       \item<11-> Message passing is realized using MPI.
+      \vspace{2mm}
       \item<12-> OpenMP parallelization as well as mixed usage of OpenMP and
 MPI is also possible. (OpenMP tests and optimization is under way)
@@ -279,5 +285,5 @@
          \onslide<5-> \includegraphics[width=0.8\textwidth]{parallelization_figures/fft.png} \end{center}
          \vspace{-4mm}
-         \textbf{Example: transpositions for solving the poisson equation}
+         \textbf{Example: transpositions for solving the Poisson\\ \hspace{4em}equation}
       \end{column}
    \end{columns}   
@@ -353,24 +359,33 @@
 \begin{frame}
    \frametitle{Virtual Processor Grid Used in PALM}   
-   \footnotesize
-   The processor grid and special data types are defined in file \texttt{init\_pegrid.f90}
+   \scriptsize
+   \vspace{2mm}
+   The processor grid and special data types are defined in file \texttt{init\_pegrid.f90}\\
+   \ \\
    \begin{itemize}
       \item<2-> PALM uses a two-dimensional virtual processor grid (in case of a 1D-decomposition, it has only one element along $y$). It is defined by a so called communicator (here: \texttt{comm2d}):\\
-      \scriptsize
+      \tiny
+      \vspace{1.5mm}
       \quad \texttt{ndim = 2}\\
-	   \quad \texttt{pdims(1) = npex    ! \# of processors along x}\\
-	   \quad \texttt{pdims(2) = npey    ! \# of processors along y}\\
+	   \quad \texttt{pdims(1) = npex  \quad  ! \# of processors along x}\\
+	   \quad \texttt{pdims(2) = npey  \quad  ! \# of processors along y}\\
 	   \quad \texttt{cyclic(1) = .TRUE.}\\
 	   \quad \texttt{cyclic(2) = .TRUE.}\\
-
-	   \quad \texttt{CALL MPI\underline{\ }CART\underline{\ }CREATE( MPI\underline{\ }COMM\underline{\ }WORLD, ndim, pdims, cyclic,  \&}\\
-	   \quad \texttt{\hspace{10.5em} reorder, \textcolor{blue}{comm2d}, ierr )}  
+      \ \\
+	   \quad \texttt{CALL MPI\underline{\ }CART\underline{\ }CREATE( MPI\underline{\ }COMM\underline{\ }WORLD, ndim, pdims, cyclic, reorder, \&}\\
+	   \quad \texttt{\hspace{10.5em} \textcolor{blue}{comm2d}, ierr )} 
+	   \scriptsize
+      \vspace{4mm} 
       \item<3-> The processor number (id) with respect to this processor grid, \texttt{myid}, is given by:\\
-      \scriptsize
-      \quad \texttt{CALL MPI\underline{\ }COMM\underline{\ }RANK( comm2d, \textcolor{blue}{myid}, ierr )}      
+      \tiny
+      \vspace{1.5mm}
+      \quad \texttt{CALL MPI\underline{\ }COMM\underline{\ }RANK( comm2d, \textcolor{blue}{myid}, ierr )}   
+      \scriptsize   
+      \vspace{4mm}
       \item<4-> The ids of the neighbouring PEs are determined by:\\
-      \scriptsize
+      \tiny
+      \vspace{1.5mm}
       \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 0, 1, \textcolor{blue}{pleft},  \textcolor{blue}{pright}, ierr )}\\
-      \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 1, 1, \textcolor{blue}{psouth}, \textcolor{blue}{pnorth}, ierr )}
+      \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 1, 1, \textcolor{blue}{psouth}, \textcolor{blue}{pnorth}, ierr )}\\
    \end{itemize}
 \end{frame}
@@ -383,19 +398,22 @@
             \item<1-> Ghost points are stored in additional array elements added at the horizontal boundaries of the subdomains, e.g.\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{u(:,:,nxl\textcolor{blue}{-ngl}), u(:,:,nxr\textcolor{blue}{+ngl})    ! left and right boundary}\\
             \quad \texttt{u(:,nys\textcolor{blue}{-ngl},:), u(:,nyn\textcolor{blue}{+ngl},:)    ! south and north boundary}\\
-            \hspace{3mm}
+            \vspace{4mm}
             \item<2-> \scriptsize The exchange of ghost points is done in file \texttt{exchange\underline{\ }horiz.f90}\\
             \textbf{\underline{Simplified} example:} synchroneous exchange of ghost points along $x$ ($yz$-planes, send left, receive right plane):\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{CALL MPI\underline{\ }SENDRECV( ar(nzb,nys-\textcolor{blue}{ngl},nxl),   ngp\underline{\ }yz, MPI\underline{\ }REAL, pleft,  0,}\\
             \quad \texttt{\hspace{9.5em}ar(nzb,nys-\textcolor{blue}{ngl},nxr+1), ngp\underline{\ }yz, MPI\underline{\ }REAL, pright, 0,}\\
             \quad \texttt{\hspace{9.5em}comm2d, status, ierr )}\\
-            \hspace{3mm}
+            \vspace{4mm}
             \item<3-> \scriptsize In the real code special MPI data types (vectors) are defined for exchange of $yz$/$xz$-planes for performance reasons and because array elements to be exchanged are not consecutively stored in memory for $xz$-planes:\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{ngp\underline{\ }yz(0) = (nzt - nzb + 2) * (nyn - nys + 1 + 2 * \textcolor{blue}{ngl} )}\\
             \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }VECTOR( \textcolor{blue}{ngl}, ngp\underline{\ }yz(0), ngp\underline{\ }yz(0), MPI\underline{\ }REAL, type\underline{\ }yz(0), ierr )}\\ 
-            \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }COMMIT( type\underline{\ }xz(0), ierr )   ! see file init\underline{\ }pegrid.f90}\\
+            \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }COMMIT( type\underline{\ }yz(0), ierr )   ! see file init\underline{\ }pegrid.f90}\\
             \ \\
             \quad \texttt{CALL MPI\underline{\ }SENDRECV( ar(nzb,nys-ngl,nxl), type\underline{\ }yz(grid\underline{\ }level), MPI\underline{\ }REAL, pleft, 0, ...}\\
@@ -431,4 +449,5 @@
    \frametitle{Parallel I/O} 
    \scriptsize
+   \vspace{-2mm}
    \begin{columns}[T]
       \begin{column}{1.1\textwidth}
@@ -449,5 +468,5 @@
          \onslide<4-> \textbf{General comment:}
          \begin{itemize}
-            \item Parallel I/O on a large number of files ($>$1000) currently may cause severe file system problems (e.g. on Lustre file systems). A workaround for this problem will\\ be available soon. 
+            \item Parallel I/O on a large number of files ($>$1000) currently may cause severe file system problems (e.g. on Lustre file systems).\\ \textbf{Workaround:} reduce the maximum number of parallel I/O streams\\ \hspace{5.75em}(see \texttt{mrun}-options)
          \end{itemize}
       \end{column}
Index: palm/trunk/TUTORIAL/SOURCE/particle_model_cloud_physics.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/particle_model_cloud_physics.tex	(revision 973)
+++ palm/trunk/TUTORIAL/SOURCE/particle_model_cloud_physics.tex	(revision 973)
@@ -0,0 +1,1555 @@
+%$Id$
+\input{header_tmp.tex}
+%\input{../header_lectures.tex}
+
+\usepackage[utf8]{inputenc}
+\usepackage{ngerman}
+\usepackage{pgf}
+\usetheme{Dresden}
+\usepackage{subfigure}
+\usepackage{units}
+\usepackage{multimedia}
+\usepackage{hyperref}
+\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
+\usepackage{xmpmulti}
+\usepackage{tikz}
+\usetikzlibrary{shapes,arrows,positioning}
+\usetikzlibrary{calc}                             %neues paket
+\usetikzlibrary{decorations.markings}             %neues paket
+\usetikzlibrary{decorations.pathreplacing}        %neues paket
+\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{multicol}
+\usepackage{pdfcomment}
+\usepackage{graphicx}
+\usepackage{listings}
+\lstset{showspaces=false,language=fortran,basicstyle=
+        \ttfamily,showstringspaces=false,captionpos=b}
+
+\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\date{last update: \today}
+\event{PALM Seminar}
+\setbeamertemplate{navigation symbols}{}
+
+\setbeamertemplate{footline}
+  {
+    \begin{beamercolorbox}[rightskip=-0.1cm]&
+     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
+      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}
+      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
+    \end{beamercolorbox}
+  }
+%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}}
+
+\title[PALM's Lagrangian Particle Model]{PALM's Lagrangian Particle Model}
+\author{Siegfried Raasch}
+
+\begin{document}
+
+% Folie 1
+\begin{frame}
+\titlepage
+\end{frame}
+
+\section{The embedded Lagrangian particle model}
+\subsection{The embedded Lagrangian particle model}
+
+% Folie 2
+\begin{frame}
+   \frametitle{Overview}
+
+   \begin{itemize}     
+	   \item<1-> The Lagrangian particle model embedded in PALM can be used for
+different purposes:
+	   \begin{itemize}
+	   \footnotesize
+	      \item Cloud droplet simulation
+	      \item Dispersion modeling / Footprint analysis 
+	      \item Visualization
+      \end{itemize}   
+      \vspace{3mm}
+      \item<2-> Therefore the particles can have different properties, e.g.: 
+      \begin{itemize}
+         \footnotesize
+	      \item Particles can be transported (advected) \textbf{passively} with the \textbf{resolved-scale} flow
+	      \item Particle transport by the subgrid-scale (SGS) turbulence can be included by switching on a stochastic SGS model for the particle transport (parameter: \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles})
+	      \item Particles can be given a mass and thus an \textbf{inertia} and a \textbf{radius} which affects their \textbf{flow resistance} (parameter: \texttt{density\underline{ }ratio}, \texttt{radius})
+	      \item Tails can be added to the particles (showing the particle trajectories) for visualization purpose using the special visualization package \textbf{dvrp}
+      \end{itemize}   
+   \end{itemize}   
+\end{frame}
+
+% Folie 3
+\begin{frame}
+   \frametitle{Basics}
+   \small
+   \begin{itemize}     
+	   \item<1-> The particle model is switched on by adding a \texttt{\&particles\underline{ }par} NAMELIST to the parameter file (PARIN). This NAMELIST has to be added \textbf{after} the \texttt{\&d3par}-NAMELIST.
+	   \item All parameters for steering the particle model are described in: Documentation $\rightarrow$ Model steering $\rightarrow$ Parameters $\rightarrow$ Particles (http://palm.muk.uni-hannover.de/)
+	   \item \textbf{The particle model requires to use a constant vertical grid spacing (due to the implemented scheme for the interpolation of information from the LES grid to particle positions, that is required for the calculation of particle velocities)!}
+   \end{itemize}
+\end{frame}
+
+% Folie 4
+\begin{frame}
+   \frametitle{Basic Particle Parameters (I)}
+   \small
+   Parameters that define the locations of particle source(s):
+   \begin{itemize}
+      \item Step I: Define the volume of the particle source
+   \end{itemize}
+
+   \begin{tikzpicture}
+      \definecolor{darkgreen1}{rgb}{0.2,0.7,0.2}
+      \definecolor{darkgreen2}{rgb}{0.4,0.7,0.4}
+      \definecolor{darkgreen3}{rgb}{0.1,0.6,0.2}
+     
+      % Draw the box
+      \onslide<2->
+      \draw[-] (0,0) -- (5,0);
+      \draw[-] (0,0) -- (0,4);
+      \draw[-] (5,4) -- (5,0);
+      \draw[-] (0,4) -- (5,4);
+      \draw[-] (2,1.5) -- (7,1.5);
+      \draw[-] (2,1.5) -- (2,5.5);
+      \draw[-] (7,5.5) -- (7,1.5);
+      \draw[-] (2,5.5) -- (7,5.5);
+      \draw[-] (0,0) -- (2,1.5);
+      \draw[-] (5,0) -- (7,1.5);
+      \draw[-] (5,4) -- (7,5.5);
+      \draw[-] (0,4) -- (2,5.5);
+      \node at (4,5) {\small Total model domain};
+     
+      % Draw coordinate system
+      \node at (8.5,2.5) [scale=1.0] {%
+      \begin{tikzpicture}
+         \draw[->] (0,0) -- (1,0);
+         \draw[->] (0,0) -- (0,1);
+         \draw[->] (0,0) -- (0.5,0.5);
+         \node at (-0.2,0.9) {z};
+         \node at (0.9,-0.2) {x};
+         \node at (0.65,0.3) {y};
+      \end{tikzpicture}
+      };
+      
+      % Draw green box
+      \onslide<3->
+      \draw[fill=darkgreen1,draw=darkgreen1,opacity=.95]
+         (0,1) -- 
+         (3,1) --
+         (3,2.5) --
+         (0,2.5) -- cycle ;
+      \draw[fill=darkgreen2,draw=darkgreen2,opacity=.95]
+         (3,1) -- 
+         (4,1.75) --
+         (4,3.25) --
+         (3,2.5) -- cycle ;
+      \draw[fill=darkgreen3,draw=darkgreen3,opacity=.95]
+         (0,2.5) -- 
+         (3,2.5) --
+         (4,3.25) --
+         (1,3.25) -- cycle ;
+      \node at (1.5,2) {\small \glqq Source Volume\grqq };         
+      
+      % Dashed green lines   
+      \draw[dashed, ultra thick, color=darkgreen3] (0,1) -- (0,0);
+      \draw[dashed, ultra thick, color=darkgreen3] (3,1) -- (3,0);
+      \draw[dashed, ultra thick, color=darkgreen3] (3,1) -- (5,1); 
+      \draw[dashed, ultra thick, color=darkgreen3] (4,1.75) -- (6,1.75);
+      \draw[dashed, ultra thick, color=darkgreen3] (5,1) -- (5,0); 
+      \draw[dashed, ultra thick, color=darkgreen3] (6,1.75) -- (6,0.75);
+      
+      % Add Labels
+      \node at (1,-0.25) {\scriptsize \texttt{ps1} (default 0.0)}; 
+      \node at (4.25,-0.25) {\scriptsize \texttt{psr} (default \texttt{nx*dx})}; 
+      \node at (7,0) {\scriptsize \texttt{pss} (default 0.0)}; 
+      \node at (8,0.75) {\scriptsize \texttt{psn} (default \texttt{ny*dy})}; 
+      \node [text width=4em] at (-0.7,0.5) {\scriptsize \texttt{psb} (default zu(\texttt{nz}/2))}; 
+      \node [text width=4em] at (-0.7,2) {\scriptsize \texttt{pst} (default zu(\texttt{nz}/2))};  
+      
+   \onslide<1->
+   \end{tikzpicture}
+\end{frame}
+
+% Folie 5
+\begin{frame}
+   \frametitle{Basic Particle Parameters (II)}
+   \small
+   Parameters that define the locations of particle source(s):
+   \begin{itemize}
+      \item Step IIa: Define the points of single particle release   
+   \end{itemize}
+   
+   \begin{tikzpicture}
+      \definecolor{darkgreen}{rgb}{0.0,0.35,0.0}
+      \definecolor{darkgreen3}{rgb}{0.2,0.6,0.2}
+      \definecolor{darkred}{rgb}{0.5,0.0,0.0}
+      
+      % Draw green box (except for one line that is drawn later)
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (5,0);
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (0,4);
+      \draw[-, ultra thick, color=darkgreen3] (0,4) -- (5,4);
+      \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (2,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (7,5.5) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (2,5.5) -- (7,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (2,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (5,0) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (5,4) -- (7,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (0,4) -- (2,5.5);
+      \node at (4,5) {\small \glqq Source Volume\grqq};
+      
+      % Draw circles and dashed lines
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0,0) {};
+      \node at (0,0) {1};
+      \onslide<2->
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (2,0) {};
+      \draw[dashed, ultra thick, color=blue] (rd1) -- (rd2);
+      \node at (2,0) {2};
+      \node at (1,-0.25) {\scriptsize \texttt{pdx}};
+      \onslide<3->
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (4,0) {};
+      \draw[dashed, ultra thick, color=blue] (rd2) -- (rd3);
+      \node at (4,0) {3};
+      \onslide<4>
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx1) at (6,0) {};
+      \draw[dashed, ultra thick, color=blue] (rd3) -- (rdx1);
+      \node[scale=1.6] at (6,0) {X};
+      \onslide<6->
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.5,1.125) {};
+      \draw[dashed, ultra thick, color=darkgreen] (rd1) -- (rd4);      
+      \node at (1.5,1.125) {4};  
+      \node at (1.1,0.43) {\scriptsize \texttt{pdy}};
+      \onslide<7->
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.5,1.125) {};
+      \draw[dashed, ultra thick, color=blue] (rd4) -- (rd5);
+      \node at (3.5,1.125) {5}; 
+      \onslide<7->      
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (5.5,1.125) {};
+      \draw[dashed, ultra thick, color=blue] (rd5) -- (rd6);
+      \node at (5.5,1.125) {6};
+      \onslide<8>
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx2) at (3,2.25) {};   
+      \draw[dashed, ultra thick, color=darkgreen] (rd4) -- (rdx2);
+      \node[scale=1.6] at (3,2.25) {X};
+      \onslide<10->      
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (0,2.2) {};
+      \draw[dashed, ultra thick, color=darkred] (rd1) -- (rd7);
+      \node at (0,2.2) {7};
+      \node at (0.3,1.3) {\scriptsize \texttt{pdz}};
+      \onslide<11->
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (2,2.2) {};
+      \draw[dashed, ultra thick, color=blue] (rd7) -- (rd8);
+      \node at (2,2.2) {8};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4,2.2) {};
+      \draw[dashed, ultra thick, color=blue] (rd8) -- (rd9);
+      \node at (4,2.2) {9};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (1.5,3.325) {};
+      \draw[dashed, ultra thick, color=darkgreen] (rd7) -- (rd10);      
+      \node[scale=0.8] at (1.5,3.325) {10};  
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (3.5,3.325) {};
+      \draw[dashed, ultra thick, color=blue] (rd10) -- (rd11);
+      \node[scale=0.8] at (3.5,3.325) {11}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (5.5,3.325) {};
+      \draw[dashed, ultra thick, color=blue] (rd11) -- (rd12);
+      \node[scale=0.8] at (5.5,3.325) {12};            
+      \onslide<12>      
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx3) at (0,4.4) {};
+      \draw[dashed, ultra thick, color=darkred] (rd7) -- (rdx3);
+      \node[scale=1.6] at (0,4.4) {X};
+      
+      % Draw rest of the green box
+      \onslide<1-13>
+      \draw[-, ultra thick, color=darkgreen3] (5,4) -- (5,0); 
+      
+      % Draw coordinate system
+      \node at (7.2,0.1) [scale=1.0] {%
+      \begin{tikzpicture}
+         \draw[->] (0,0) -- (1,0);
+         \draw[->] (0,0) -- (0,1);
+         \draw[->] (0,0) -- (0.5,0.5);
+         \node at (-0.2,0.9) {z};
+         \node at (0.9,-0.2) {x};
+         \node at (0.65,0.3) {y};
+      \end{tikzpicture}
+      };
+      
+      % Add text
+      \node at (9.0,3) [scale=0.8] {%
+      \begin{tikzpicture}
+         \node[text width=11em] {\scriptsize \texttt{maximum\underline{ }number\underline{ }of\underline{ }particles} number of particles (per PE) for that memory must be allocated at the beginning of a run; this number must be $\ge$ the initial number of particles \textbf{per subdomain(!)}.\\ \ \\ \textbf{Attention:} If netCDF output of particle data is switched on, \texttt{maximum\underline{ }number\underline{ }of\underline{ }particles} must be $\ge$ the maximum number of particles per subdomain observed throughout the complete run!\\ \ \\ Choosing a too large value may cause memory problems!\\};
+      \end{tikzpicture}
+      };      
+      
+   \end{tikzpicture}
+   
+\end{frame}
+
+% Folie 6
+\begin{frame}
+   \frametitle{Basic Particle Parameters (III)}
+   \small
+   Parameters that define the locations of particle source(s):
+   \begin{itemize}
+      \item Step IIb: Random start positions of particles 
+   \end{itemize}
+   
+   \begin{tikzpicture}
+      \definecolor{darkgreen3}{rgb}{0.2,0.6,0.2}
+
+      % Draw green box
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (5,0);
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (0,4);
+      \draw[-, ultra thick, color=darkgreen3] (5,4) -- (5,0); 
+      \draw[-, ultra thick, color=darkgreen3] (0,4) -- (5,4);
+      \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (2,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (7,5.5) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (2,5.5) -- (7,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (0,0) -- (2,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (5,0) -- (7,1.5);
+      \draw[-, ultra thick, color=darkgreen3] (5,4) -- (7,5.5);
+      \draw[-, ultra thick, color=darkgreen3] (0,4) -- (2,5.5);
+
+      
+      % Draw circles and dashed lines
+      \onslide<1-2>
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (4,0) {};
+      \node at (4,0) {3};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4,2.2) {};
+      \node at (4,2.2) {9};
+
+      \onslide<1>
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0,0) {};
+      \node at (0,0) {1};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (2,0) {};
+      \node at (2,0) {2};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.5,1.125) {};
+      \node at (1.5,1.125) {4};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.5,1.125) {};
+      \node at (3.5,1.125) {5}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (5.5,1.125) {};
+      \node at (5.5,1.125) {6};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (0,2.2) {};
+      \node at (0,2.2) {7};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (2,2.2) {};
+      \node at (2,2.2) {8};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (1.5,3.325) {};
+      \node[scale=0.8] at (1.5,3.325) {10};  
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (3.5,3.325) {};
+      \node[scale=0.8] at (3.5,3.325) {11}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (5.5,3.325) {};
+      \node[scale=0.8] at (5.5,3.325) {12};
+                  
+      \onslide<2>
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1n) at (1.0,0.3) {};
+      \node at (1.0,0.3) {1};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2n) at (1.8,0.3) {};
+      \node at (1.8,0.3) {2};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4n) at (1.7,1.0) {};
+      \node at (1.7,1.0) {4};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5n) at (3.0,1.2) {};
+      \node at (3.0,1.2) {5}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6n) at (4.5,1.125) {};
+      \node at (4.5,1.125) {6}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7n) at (0.9,2.8) {};
+      \node at (0.9,2.8) {7};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8n) at (3,1.8) {};
+      \node at (3,1.8) {8};
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10n) at (2.1,3) {};
+      \node[scale=0.8] at (2.1,3) {10};     
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11n) at (4,4.5) {};
+      \node[scale=0.8] at (4,4.5) {11}; 
+      \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12n) at (4.5,3.2) {};
+      \node[scale=0.8] at (4.5,3.2) {12};      
+      
+      % Draw coordinate system
+      \onslide<1->
+      \node at (9,2) [scale=1.0] {%
+      \begin{tikzpicture}
+         \draw[->] (0,0) -- (1,0);
+         \draw[->] (0,0) -- (0,1);
+         \draw[->] (0,0) -- (0.5,0.5);
+         \node at (-0.2,0.9) {z};
+         \node at (0.9,-0.2) {x};
+         \node at (0.65,0.3) {y};
+      \end{tikzpicture}
+      };
+      
+      % Add text
+      \node at (9.2,4) {\scriptsize \texttt{random\underline{ }start\underline{ }position = .T.}};
+      
+   \end{tikzpicture}
+   
+\end{frame}
+
+% Folie 7
+\begin{frame}
+   \frametitle{Basic Particle Parameters (IV)}
+   \small
+   Parameters that define the period of particle release: \\
+   \vspace{10mm}
+   \begin{columns}[T]
+      \begin{column}{1.15\textwidth}
+         \begin{tikzpicture}
+            \definecolor{darkred}{rgb}{0.6,0.1,0.1}
+            \definecolor{grey}{rgb}{0.25,0.25,0.25}
+            \draw[->, ultra thick] (0,0) -- (10.5,0);
+            \draw[->, ultra thick] (0,0.5) -- (0,-0.5);
+            \node at (10.7,0) {t};
+            \node at (0,-0.8) {0};    
+            \node[text width=6em] at (0.2,-1.9) {\scriptsize Start of LES, determination of particle release points};
+      
+            \onslide<2->
+            \draw[->, ultra thick, color=red] (2.5,0.5) -- (2.5,-0.5);
+            \node at (2.8,-0.8) {\scriptsize \texttt{particle\underline{ }advection\underline{ }start}};       
+            \node[text width=6em] at (2.8,-2.1) {\scriptsize Calculation of particle trajectories begins (default value: 0.0)};
+      
+            \onslide<3->
+            \draw[->, ultra thick, color=red] (5.3,0.5) -- (5.3,-0.5);
+            \node[text width=4em] at (4.9,-1.7) {\scriptsize Release of a new set of particles};  
+            \node at (3.75,0.3) {\scriptsize \texttt{dt\underline{ }prel}};
+            \draw[<->, thick, color=blue] (2.5,0.6) -- (5.25,0.6); 
+      
+            \onslide<4->
+            \draw[->, ultra thick, color=darkred] (6.5,0.5) -- (6.5,-0.5);   
+            \node[text width=4em] at (6.7,-1.9) {\scriptsize Deletion of the first set of particles};
+            \draw[<->, thick, color=darkred] (2.5,0.9) -- (6.5,0.9); 
+            \node at (4.5,1.2) {\scriptsize \texttt{particle\underline{ }maximum\underline{ }age}};
+     
+            \onslide<5->
+            \draw[->, ultra thick, color=darkred] (7.95,0.5) -- (7.95,-0.5);  
+            \node[text width=4em] at (8.25,-2.1) {\scriptsize No release of new particles after this time};
+            \node at (8.0,-0.8) {\scriptsize \texttt{end\underline{ }time\underline{ }prel}};
+            \draw[<->, thick, color=blue] (5.35,0.6) -- (8.1,0.6); 
+
+            \onslide<6->
+            \draw[->, ultra thick, color=grey] (9.3,0.5) -- (9.3,-0.5);     
+            \node[text width=4em] at (9.8,-1.9) {\scriptsize Deletion of the second set of particles};
+            \draw[<->, thick, color=darkred] (5.35,1.6) -- (9.3,1.6); 
+            
+            \onslide<1->
+         \end{tikzpicture}
+       \end{column}
+   \end{columns}
+
+  
+\end{frame}
+
+% Folie 8
+\begin{frame}[t]
+   \frametitle{Basic Particle Parameters (V)}
+   \small
+   Parameter that defines the mode of particle movement: \\
+   The concept of LES ...\\
+   \vspace{-5mm}
+   \begin{center}
+      \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}
+   \end{center}
+   \vspace{-5mm}
+   \onslide<2->
+   ... transferred to the embedded particle model leads to particle velocity\\
+   \vspace{1mm}
+   \begin{columns}[T]
+      \begin{column}{0.35\textwidth}
+         $\vec{V}_{i_{\text{particle}}} = \vec{V}_{i_{\text{resolved}}} + \vec{V}_{i_{\text{subgrid}}}$
+      \end{column}
+      \begin{column}{0.55\textwidth}
+         \scriptsize
+         \onslide<3->
+         Particle movement as a result of 
+         \begin{itemize}
+            \item advection, resolved turbulence $\vec{V}_{i_{\text{resolved}}}$
+            \vspace{-2mm}
+            \item and subgrid turbulence $\vec{V}_{i_{\text{subgrid}}}$
+         \end{itemize}
+      \end{column}
+   \end{columns}
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(6 cm,-6.3cm)}]  at (current page.north west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \uncover<4->{\draw[->, ultra thick] (-2.05,0) -- (-5,-0.8);
+            \node[text width=14em] at (-3.2,-1.5) {\scriptsize $=0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .F.} (default value)\\};}
+            \uncover<5->{\draw[->, ultra thick] (-1.95,0) -- (0,-0.8);
+            \node[text width=20em] at (3.2,-1.5) {\scriptsize $\ne0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .T.}\\ determination of the subgrid part of the particle velocity as a solution of a stochastic differential equation\\};
+            \node[text width=14em] at (2.5,-2.5) {\scriptsize requires initialization parameter \texttt{use\underline{ }upstream\underline{ }for\underline{ }tke = .T.}\\ };}
+         \end{tikzpicture}
+         };
+    \end{tikzpicture}
+
+\end{frame}
+
+% Folie 9
+\begin{frame}[t]
+   \frametitle{Basic Particle Parameters (VI)}
+   \small
+   \vspace{-2mm}
+   Parameter \texttt{dt\underline{ }sort\underline{ }particles} that improves the performance of a simulation with (many) particles:
+
+   \onslide<2->
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(1 cm,2.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (2.5,4.2) {$t=t_0$:};
+            \draw[-] (0,0) -- (5,0);
+            \draw[-] (0,1) -- (5,1);
+            \draw[-] (0,2) -- (5,2);
+            \draw[-] (0,3) -- (5,3);
+            \draw[-] (0,0) -- (0,4);
+            \draw[-] (1,0) -- (1,4);            
+            \draw[-] (2,0) -- (2,4);             
+            \draw[-] (3,0) -- (3,4); 
+            \draw[-] (4,0) -- (4,4);            
+            \draw[-] (5,4) -- (5,0);
+            \draw[-] (0,4) -- (5,4);
+            
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0.25,0.5) {};
+            \node[scale=0.8] at (rd1) {1};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (0.75,0.5) {};
+            \node[scale=0.8] at (rd2) {2};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (1.25,0.5) {};
+            \node[scale=0.8] at (rd3) {3};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.75,0.5) {};
+            \node[scale=0.8] at (rd4) {4};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (2.25,0.5) {};
+            \node[scale=0.8] at (rd5) {5};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (2.75,0.5) {};
+            \node[scale=0.8] at (rd6) {6};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (3.25,0.5) {};
+            \node[scale=0.8] at (rd7) {7};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.75,0.5) {};
+            \node[scale=0.8] at (rd8) {8};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4.25,0.5) {};
+            \node[scale=0.8] at (rd9) {9};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (4.75,0.5) {};
+            \node[scale=0.8] at (rd10) {10};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (0.25,2.5) {};
+            \node[scale=0.8] at (rd11) {11};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.75,2.5) {};
+            \node[scale=0.8] at (rd12) {12};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (1.25,2.5) {};
+            \node[scale=0.8] at (rd13) {13};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {};
+            \node[scale=0.8] at (rd14) {14};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.25,2.5) {};
+            \node[scale=0.8] at (rd15) {15};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.75,2.5) {};
+            \node[scale=0.8] at (rd16) {16};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (3.25,2.5) {};
+            \node[scale=0.8] at (rd17) {17};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.75,2.5) {};
+            \node[scale=0.8] at (rd18) {18};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.25,2.5) {};
+            \node[scale=0.8] at (rd19) {19};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (4.75,2.5) {};
+            \node[scale=0.8] at (rd20) {20};  
+                   
+            \node[text width=14em] at (2.5,-0.9) {\scriptsize Particles are sorted in a way that their order follows the order in which the grid point values are stored (beneficial as the code contains many loops over all particles)\\};
+
+         \end{tikzpicture}
+         };
+      \uncover<3->{
+      \node [shift={(7 cm,2.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+
+            \node at (2.5,4.2) {$t>t_0$:};
+            \draw[-] (0,0) -- (5,0);
+            \draw[-] (0,1) -- (5,1);
+            \draw[-] (0,2) -- (5,2);
+            \draw[-] (0,3) -- (5,3);
+            \draw[-] (0,0) -- (0,4);
+            \draw[-] (1,0) -- (1,4);            
+            \draw[-] (2,0) -- (2,4);             
+            \draw[-] (3,0) -- (3,4); 
+            \draw[-] (4,0) -- (4,4);            
+            \draw[-] (5,4) -- (5,0);
+            \draw[-] (0,4) -- (5,4);
+            
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (1.75,1.3) {};
+            \node[scale=0.8] at (rd1) {1};
+         
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (1.2,2.3) {};
+            \node[scale=0.8] at (rd2) {2};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (2.3,2.3) {};
+            \node[scale=0.8] at (rd3) {3};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (3.25,1.21) {};
+            \node[scale=0.8] at (rd4) {4};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.2,2.7) {};
+            \node[scale=0.8] at (rd5) {5};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (3.25,1.7) {};
+            \node[scale=0.8] at (rd6) {6};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (1.25,1.6) {};
+            \node[scale=0.8] at (rd7) {7};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.7,0.5) {};
+            \node[scale=0.8] at (rd8) {8};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (3.77,1.8) {};
+            \node[scale=0.8] at (rd9) {9};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (2.6,1.3) {};
+            \node[scale=0.8] at (rd10) {10};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (2.7,0.7) {};
+            \node[scale=0.8] at (rd11) {11};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.21,1.3) {};
+            \node[scale=0.8] at (rd12) {12};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (0.3,2.5) {};
+            \node[scale=0.8] at (rd13) {13};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {};
+            \node[scale=0.8] at (rd14) {14};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.3,1.7) {};
+            \node[scale=0.8] at (rd15) {15};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.4,2.8) {};
+            \node[scale=0.8] at (rd16) {16};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (4.23,0.7) {};
+            \node[scale=0.8] at (rd17) {17};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.77,2.6) {};
+            \node[scale=0.8] at (rd18) {18};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.23,3.3) {};
+            \node[scale=0.8] at (rd19) {19};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (3.75,1.23) {};
+            \node[scale=0.8] at (rd20) {20};  
+            
+            \node[text width=14em] at (2.5,-1.05) {\scriptsize By default, particles are not sorted after every time step, particles with subsequent numbers will need information from quite different LES grid points\\ \textcolor{red}{Bad cache utilization}\\};
+            \node at (-0.2,-1.9) {$\rightarrow$};
+         \end{tikzpicture}
+         };}
+   \end{tikzpicture} 
+\end{frame}
+
+% Folie 10
+\begin{frame}[t]
+   \frametitle{Basic Particle Parameters (VI)}
+   \small
+   \vspace{-2mm}
+   Parameter \texttt{dt\underline{ }sort\underline{ }particles} that improves the performance of a simulation with (many) particles:
+
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(1 cm,2.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node[text width=14em] at (2.5,3.8) {Higher performance with\\ resorting of particles:\\};
+            \uncover<2->{\node[text width=14em] at (2.5,1.6) {\scriptsize Temporal interval between the\\ sorting of particles determined\\ by the parameter\\ \ \\ \texttt{dt\underline{ }sort\underline{ }particles}\\ \ \\ (default value 0.0, i.e. particles are resorted at every time step)};}  
+            \uncover<3->{\node[text width=28em] at (5,-0.9) {Keep in mind that resorting of particles is time consuming itself, so that using the default value of \texttt{dt\underline{ }sort\underline{ }particles} probably wonât yield the best performance that is possible.\\};}
+         \end{tikzpicture}
+         };
+      \node [shift={(7 cm,2.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+
+            \node at (2.5,4.2) {$t>t_0$:};
+            \draw[-] (0,0) -- (5,0);
+            \draw[-] (0,1) -- (5,1);
+            \draw[-] (0,2) -- (5,2);
+            \draw[-] (0,3) -- (5,3);
+            \draw[-] (0,0) -- (0,4);
+            \draw[-] (1,0) -- (1,4);            
+            \draw[-] (2,0) -- (2,4);             
+            \draw[-] (3,0) -- (3,4); 
+            \draw[-] (4,0) -- (4,4);            
+            \draw[-] (5,4) -- (5,0);
+            \draw[-] (0,4) -- (5,4);
+            
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (1.75,1.3) {};
+            \node[scale=0.8] at (rd1) {1};
+         
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (1.2,2.3) {};
+            \node[scale=0.8] at (rd2) {2};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (2.3,2.3) {};
+            \node[scale=0.8] at (rd3) {3};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (3.25,1.21) {};
+            \node[scale=0.8] at (rd4) {4};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.2,2.7) {};
+            \node[scale=0.8] at (rd5) {5};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (3.25,1.7) {};
+            \node[scale=0.8] at (rd6) {6};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (1.25,1.6) {};
+            \node[scale=0.8] at (rd7) {7};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.7,0.5) {};
+            \node[scale=0.8] at (rd8) {8};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (3.77,1.8) {};
+            \node[scale=0.8] at (rd9) {9};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (2.6,1.3) {};
+            \node[scale=0.8] at (rd10) {10};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (2.7,0.7) {};
+            \node[scale=0.8] at (rd11) {11};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.21,1.3) {};
+            \node[scale=0.8] at (rd12) {12};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (0.3,2.5) {};
+            \node[scale=0.8] at (rd13) {13};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {};
+            \node[scale=0.8] at (rd14) {14};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.3,1.7) {};
+            \node[scale=0.8] at (rd15) {15};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.4,2.8) {};
+            \node[scale=0.8] at (rd16) {16};   
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (4.23,0.7) {};
+            \node[scale=0.8] at (rd17) {17};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.77,2.6) {};
+            \node[scale=0.8] at (rd18) {18};      
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.23,3.3) {};
+            \node[scale=0.8] at (rd19) {19};
+            \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (3.75,1.23) {};
+            \node[scale=0.8] at (rd20) {20};  
+         \end{tikzpicture}
+         };
+   \end{tikzpicture} 
+\end{frame}
+
+% Folie 11
+\begin{frame}[t]
+   \frametitle{Basic Particle Parameters (VI)}
+   \small
+   Example for the beneficial effect of resorting on the consumption of CPU time \texttt{(dt\underline{ }sort\underline{ }particles = 0.0)}:\\
+   \scriptsize \ \\
+   Release of 3.200.000 particles into a convective boundary layer.\\
+   Extract from CPU time measurement file.\\
+   \ \\
+
+   \begin{tabular}{|p{1.8cm}|p{1.5cm}|p{1.3cm}|p{1.5cm}|p{1.3cm}|p{1.3cm}|}
+      \hline
+	   Part of PALM & Consumed CPU time in s \textbf{without resorting} & Percentage of totally consumed CPU time \textbf{(without)} & Consumed CPU time in s \textbf{with resorting}  & Percentage of totally consumed CPU time \textbf{(with)} & Saved CPU time \textbf{with resorting} in \%\\
+      \hline
+	   total & 50027.225 & 100.0 & 47805.635  & 100.0 & \textcolor{red}{4.4}\\
+      \hline
+	   lpm & 22049.711 & 44.08 & 19926.364  & 41.68  & \textcolor{red}{9.6}\\
+      \hline
+	   lpm\underline{ }advec & 13640.729 & 27.27 & 11424.540  & 23.90  & \textcolor{red}{16.2}\\
+      \hline
+   \end{tabular}
+
+\end{frame}
+
+% Folie 12
+\begin{frame}[t]
+   \frametitle{Basic Particle Parameters (VII)}
+   \small
+   \vspace{-2mm}
+   Parameters that define the boundary conditions for particles\\
+   \scriptsize \ \\
+   \uncover<10>{In PALM particles are \textbf{always} reflected at \textbf{vertical walls and roofs of buildings.}}\\
+   \ \\
+
+   \begin{tikzpicture}
+      \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}
+      % Bottom
+      \uncover<2>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (0,0) -- 
+         (2,1.5) --
+         (7,1.5) --
+         (5,0) -- cycle ;}
+      % Top
+      \uncover<4>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (0,4) -- 
+         (2,5.5) --
+         (7,5.5) --
+         (5,4) -- cycle ;}
+      % Front
+      \uncover<6>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (0,0) -- 
+         (0,4) --
+         (5,4) --
+         (5,0) -- cycle ;}
+      % Back
+      \uncover<6>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (2,1.5) -- 
+         (7,1.5) --
+         (7,5.5) --
+         (2,5.5) -- cycle ;}
+      % Left
+      \uncover<8>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (0,0) -- 
+         (0,4) --
+         (2,5.5) --
+         (2,1.5) -- cycle ;}
+      % Right
+      \uncover<8>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85]
+         (5,0) -- 
+         (5,4) --
+         (7,5.5) --
+         (7,1.5) -- cycle ;}
+         
+      % Draw Box  
+      \draw[-] (0,0) -- (5,0);
+      \draw[-] (0,0) -- (0,4);
+      \draw[-] (5,4) -- (5,0);
+      \draw[-] (0,4) -- (5,4);
+      
+      \draw[-] (2,1.5) -- (7,1.5);
+      \draw[-] (2,1.5) -- (2,5.5);
+      \draw[-] (7,5.5) -- (7,1.5);
+      \draw[-] (2,5.5) -- (7,5.5);
+      
+      \draw[-] (0,0) -- (2,1.5);
+      \draw[-] (5,0) -- (7,1.5);
+      \draw[-] (5,4) -- (7,5.5);
+      \draw[-] (0,4) -- (2,5.5);
+      
+      \node at (4,5) {\small Total model domain};
+      
+      % Labels
+      \uncover<2->{\node at (2.7,0.15) {\scriptsize \texttt{bc\underline{ }par\underline{ }b = 'reflect', 'absorb'}};}  
+      \uncover<4->{\node at (3.0,4.25) {\scriptsize \texttt{bc\underline{ }par\underline{ }t = 'absorb', 'reflect'}};}        
+      \uncover<6->{\node at (3.25,2.15) {\scriptsize \texttt{bc\underline{ }par\underline{ }ns = 'cyclic', 'reflect', 'absorb'}};}      
+      \uncover<8->{\node[text width=15.5em] at (7.7,3.7) {\scriptsize \texttt{bc\underline{ }par\underline{ }lr = 'cyclic', 'reflect',}\\ \texttt{\hspace{5em} 'absorb'}};}            
+
+                
+      % Draw coordinate system
+      \node at (9,2) [scale=1.0] {%
+      \begin{tikzpicture}
+         \draw[->] (0,0) -- (1,0);
+         \draw[->] (0,0) -- (0,1);
+         \draw[->] (0,0) -- (0.5,0.5);
+         \node at (-0.2,0.9) {z};
+         \node at (0.9,-0.2) {x};
+         \node at (0.65,0.3) {y};
+      \end{tikzpicture}
+      };
+      
+   \end{tikzpicture}
+   
+\end{frame}
+
+% Folie 13
+\begin{frame}
+   \frametitle{Basic Particle Parameters (VIII)}
+   \small
+   Parameters that steer the output of particle data
+   \begin{itemize}
+      \item There are two output files containing particle data:
+      \begin{itemize}
+         \item \texttt{DATA\underline{ }1D\underline{ }PTS\underline{ }NETCDF}:
+         \hspace{0.5em} contains particle time series, output\\ 
+         \hspace{11.0em}interval is controlled by parameter\\ 
+         \hspace{11.0em}\texttt{dt\underline{ }dopts}, one file for the total\\ 
+         \hspace{11.0em}domain, e.g. time series of the total\\
+         \hspace{11.0em}number of particles, mean particle\\
+         \hspace{11.0em}velocity, mean subgrid scale part of\\
+         \hspace{11.0em}the particle velocity, mean particle\\
+         \hspace{11.0em}location etc.
+         \vspace{1mm}
+         \item \texttt{DATA\underline{ }PRT\underline{ }NETCDF}:
+         \hspace{2.5em}contains \textbf{all} particle data (see slide\\
+         \hspace{11.0em}The Data Type Used for Particles),\\
+         \hspace{11.0em}output is controlled by\\
+         \hspace{11.0em}\texttt{dt\underline{ }write\underline{ }particle\underline{ }data},\\
+         \hspace{11.0em}one file per subdomain/PE
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 14
+\begin{frame}
+   \frametitle{An Example of a Particle NAMELIST}
+   \includegraphics[scale=0.3]{particle_model_figures/namelist.png}
+   \begin{itemize}
+      \item<2-> \small Several (up to 10) so called particle groups with different density ratio, radius, and starting positions can be defined by setting parameter number\underline{ }of\underline{ }particle\underline{ }groups to the required number of groups, and by assigning values for each particle groups to the respective parameters (e.g. density\underline{ }ratio = 0.001, 0.0, etc.)
+   \end{itemize}
+\end{frame}
+
+\section{Theory}
+\subsection{Theory}
+
+% Folie 15
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (I)}
+   \footnotesize
+   \textbf{Advection of Passive particles}\\
+   \vspace{1mm}
+   The position of a particle is found by integrating $ \dfrac{d \vec{X}_{\text{particle}}}{dt} = \vec{V}_{\text{particle}}$\\
+   \vspace{2mm}
+   \onslide<2->Transferring the LES concept ...
+   \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}\\
+   \vspace{-2mm}
+   \scriptsize \hspace{2em}total energy\hspace{2.25em}=\hspace{3em}resolved part\hspace{2.5em}+\hspace{3em}modelled part\\
+   \vspace{1mm}
+   \small ... to the embedded particle model leads to: $\vec{V}_{\text{particle}} = \vec{V}_{\text{res}} (+ \vec{V}_{\text{sub}})$\\
+   \vspace{2mm}
+   \onslide<3->$\vec{V}_{\text{res}}:$\\ 
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(1.7 cm,0.6cm)}]  at (current page.south west)
+         {%   
+         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
+            \draw[-] (0,0) -- (5,0);
+            \draw[-] (0,0) -- (0,4);
+            \draw[-] (5,4) -- (5,0);
+            \draw[-] (0,4) -- (5,4);
+            \draw[-] (2,1.5) -- (7,1.5);
+            \draw[-] (2,1.5) -- (2,5.5);
+            \draw[-] (7,5.5) -- (7,1.5);
+            \draw[-] (2,5.5) -- (7,5.5);
+            \draw[-] (0,0) -- (2,1.5);
+            \draw[-] (5,0) -- (7,1.5);
+            \draw[-] (5,4) -- (7,5.5);
+            \draw[-] (0,4) -- (2,5.5);
+      
+            \node[circle, fill=blue, scale=0.5] at (0,0) {};
+            \node[circle, fill=blue, scale=0.5] at (5,0) {};
+            \node[circle, fill=blue, scale=0.5] at (0,4) {};
+            \node[circle, fill=blue, scale=0.5] at (5,4) {};
+            \node[circle, fill=blue, scale=0.5] at (2,1.5) {};
+            \node[circle, fill=blue, scale=0.5] at (7,1.5) {};
+            \node[circle, fill=blue, scale=0.5] at (7,5.5) {};
+            \node[circle, fill=blue, scale=0.5] at (2,5.5) {};
+      
+            \node[circle, fill=red, scale=0.5] at (2.5,1.1) {};
+
+            \draw[->, ultra thick, color=red] (7.4,0.7) -- (2.9,1.1);
+            \node at (9.0,0.1) {\scriptsize \textcolor{red}{particle location}}; 
+      
+            \draw[->, ultra thick] (8,2.5) -- (12,2.5);
+         \end{tikzpicture}
+         };
+      \node [shift={(5.8 cm,0.6cm)}]  at (current page.south west)
+         {%   
+         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
+            \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}
+            \draw[-] (0,0) -- (5,0);
+            \draw[-] (0,4) -- (5,4);
+            \draw[-] (2,1.5) -- (7,1.5);
+            \draw[-] (2,5.5) -- (7,5.5);
+            \draw[-] (0,0) -- (2,1.5);
+            \draw[-] (5,0) -- (7,1.5);
+            \draw[-] (5,4) -- (7,5.5);
+            \draw[-] (0,4) -- (2,5.5);
+      
+            \node[circle, fill=blue, scale=0.5] at (0,0) {};
+            \node[circle, fill=blue, scale=0.5] at (5,0) {};
+            \node[circle, fill=blue, scale=0.5] at (0,4) {};
+            \node[circle, fill=blue, scale=0.5] at (5,4) {};
+            \node[circle, fill=blue, scale=0.5] at (2,1.5) {};
+            \node[circle, fill=blue, scale=0.5] at (7,1.5) {};
+            \node[circle, fill=blue, scale=0.5] at (7,5.5) {};
+            \node[circle, fill=blue, scale=0.5] at (2,5.5) {};
+            
+            \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,0.6) {};        
+            \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,4.6) {};          
+            \draw[->, ultra thick] (8,2.5) -- (12,2.5);
+         \end{tikzpicture}
+         };
+      \node [shift={(9 cm,0.6cm)}]  at (current page.south west)
+         {%   
+         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
+            \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}
+            
+            \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,0.6) {};        
+            \node[circle, fill=red, scale=0.5] at (2.5,1.1) {};
+            \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,4.6) {};          
+         \end{tikzpicture}
+         };
+      \end{tikzpicture}
+\end{frame}
+
+% Folie 16
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (II)}
+   \footnotesize
+   \textbf{Advection of Non-passive Particles}\\
+   \ \\
+   Advection of particles by the non-linear drag law following Clift et al., 1978\\
+   \vspace{4mm}
+   $\dfrac{dV_i}{dt} = \dfrac{1}{\tau_p} (u_i - V_i) - \delta_{i3}( 1 - \rho_0 / \rho_l ) g$\\
+      \vspace{2mm}
+   with $\tau_p^{-1} = \dfrac{9 v \rho_0}{2 r^2 \rho_l} \left( 1 + 0.15 \text{Re}^{0.687} \right)$ and $\text{Re} = \dfrac{2r \left| \vec{u}_i - \vec{V}_i \right|}{v} $\\
+   \vspace{5mm}
+   \onslide<1->
+   \begin{tabular}{llll}
+	   $g$   & = gravitational acceleration & $\rho_l$ & = density of water\\
+	   Re    & = Reynolds number            & $\rho_0$ & = density of air\\
+	   $u_i$ & = velocity of the fluid      & $\tau_p$ & = response time with respect to inertia\\
+	   $V_i$ & = particle velocity          & \\
+   \end{tabular}
+
+\end{frame}
+
+% Folie 17
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (III)}
+   \footnotesize
+   \textbf{Using Particles as Cloud Droplets}\\
+   \small
+   \begin{itemize}
+      \item This feature is switched on by setting the initial parameter cloud\underline{ }droplets = \textit{.TRUE.}.
+      \item In this case, the change in particle radius by condensation/evaporation and collision is calculated for every timestep.
+      \item In case of condensation or evaporation, the potential temperature and the specific humidity has to be adjusted in the respective grid volumes. This is done within the subroutine interaction\underline{ }droplets\underline{ }ptq.
+   \end{itemize}
+\end{frame}
+
+% Folie 18
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (IV)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (I)}\\
+   \begin{itemize}
+      \item Simulation of enormous particle numbers like in real clouds\\ is impossible
+      \begin{itemize}
+         \footnotesize
+         \item Ensembles of water droplets are simulated
+         \vspace{1mm}
+         \item Every simulated droplet stands for a very high number\\ of real droplets
+         \vspace{1mm}
+         \item Concept of weighting factor: $A_i=\dfrac{\text{Real volume of droplets}}{\text{Simulated volume of droplets}}$
+         \vspace{2mm}
+         \item Initial weighting factor can be assigned with the parameter \texttt{initial\underline{ }weighting\underline{ }factor}
+      \end{itemize}
+      \vspace{1mm}
+      \item Calculation of liquid water content: $ \text{LWC} = \omega_l = \dfrac{\rho_L}{\Delta V} \sum\limits^{N_p}_{i=1} A_i \cdot \dfrac{4}{3} \pi r_i^3$
+      \vspace{1mm}
+      \item Droplets can change radius by condensation/evaporation and collision
+   \end{itemize}
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(11.7 cm,6.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/real_simulated.png}};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+
+\end{frame}
+
+% Folie 19
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (V)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (II)}\\
+   \scriptsize
+   \begin{itemize}
+      \item \textbf{Condensation/evaporation} is calculated following an approach of Mason, 1971\\
+      \vspace{1mm}
+      $ r_i \dfrac{dr_i}{dt} = \dfrac{(S - ar^{-1} + br^{-3})}{F_k + F_d}$\\
+      \vspace{1mm}
+      with $S = \dfrac{e}{e_s}-1$, \quad $F_k = \left( \dfrac{L}{R_v T} -1 \right) \dfrac{L \rho_l}{KT}$ \quad and \quad $F_d = \dfrac{\rho_l R_v T}{D e_s(t)}$\\
+      \vspace{2mm}
+      \qquad $a = 2 \sigma/(\rho_l R_v T) \qquad \rightarrow$  Curvature effect\\
+      \qquad $b = 6 m_v M / (4 \pi \rho_l m_s) \rightarrow$ Solution effect
+      \vspace{3mm}
+      \item<2-> For $r > \unit{1}{\mu m}$  solution and curvature effects are neglected: \\
+      $ r_i \dfrac{dr_i}{dt} = \dfrac{S}{F_k + F_d} \rightarrow r_i(t) = \sqrt{ r_{i,0}^2 + 2 \cdot \Delta t \cdot \left( \dfrac{S}{F_k + F_d} \right)}$
+   \end{itemize}
+   \vspace{1mm}
+   \begin{tabular}{llll}
+	   $D$   & = Coefficient of diffusion   & $L$ & = Latent heat\\
+	   $e$    & = Vapor pressure            & $r$ & = Droplet radius\\
+	   $e_s$ & = Saturation vapor pressure  & $R_v$ & = Gas constant for water vapor\\ 
+	   $F_k$ & = Effect of heat conduction  & $S$ & = Supersaturation\\
+	   $F_d$ & = Effect of vapor diffusion  & $T$ & = Temperature\\
+	   $K$ & = Coefficient of thermal conductivity  & $\rho_L$ & = Density of water\\
+   \end{tabular}
+
+\end{frame}
+
+% Folie 20
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (VI)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (III)}\\
+   \ \\
+   \scriptsize
+   Concept of droplet collision with collision efficiency = 1
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(5.0cm,3.7cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/collision1.png}};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}     
+\end{frame}
+
+% Folie 21
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (VII)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (IV)}\\
+   \ \\
+   \scriptsize
+   Concept of droplet collision with collision efficiency $\neq$ 1  
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(5.0cm,4.0cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node (pic2) at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/collision2.png}};
+            \node[below=0.0cm of pic2] {Liquid water content is kept constant: $\sum\limits^{N_p}_{i=1} A_i^{\ast} \cdot r_i^{\ast 3} = \sum\limits^{N_p}_{i=1} A_i \cdot r_i^3$};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture} 
+\end{frame}
+
+% Folie 22
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (VIII)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (V)}\\
+   \scriptsize   
+   \begin{itemize}
+      \item Calculation of droplet growth due to \textbf{collisions} follows approach from Rogers and Yau, 1989:
+      \begin{itemize}
+         \scriptsize
+         \item The increase in volume of a drop with radius $R$ falling at terminal speed through a population of smaller droplets is:
+      \end{itemize}
+      \vspace{2mm}
+      $\dfrac{dV}{dt} = \int\limits_0^R \pi (R + r)^2 \cdot \dfrac{4}{3} \pi r^3 \cdot E(R,r) n(r) \cdot \left[ U(R) - u(r) \right] dr$\\
+      \vspace{2mm}
+      $\rightarrow \dfrac{dR}{dt} = \dfrac{1}{3 R^2} \int\limits_0^R r^3 \cdot K(R,r) n(r) dr$\\
+      \vspace{2mm}
+      \qquad with $K(R,r) = \pi(R+r)^2 \cdot E(R,r) \cdot [u(R) - u(r)] dr$\\
+      \vspace{2mm}
+      \hspace{10mm}$\rightarrow R^* = R + \dfrac{\Delta t}{3R^2} \sum\limits_{n=1}^{N_R} r^3_n n(r) K(R,r)$\\
+      \vspace{2mm}
+      \hspace{14mm}$A_r^* = A_r [ 1 - \alpha K(R,r) ]$
+   \end{itemize}
+   \vspace{2mm}
+   \begin{tabular}{|ll|}
+      \hline
+	   $E$   & = collection efficiency \\
+	   $M$   & = $LWC$ in g/m$^3$ \\
+      \hline
+   \end{tabular}
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(11 cm,3.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/droplet_falling.png}};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+
+\end{frame}
+
+% Folie 23
+\begin{frame}[t]
+   \frametitle{Theory of the Lagrangian Particle Model (IX)}
+   \footnotesize
+   \textbf{Simulation of Cloud Droplets (VI)}\\
+   \begin{itemize}
+      \item \textbf{Collision kernel without turbulence effects} \\
+      \vspace{1mm}
+      $K(R,r) = \pi(R + r)^2 \cdot E^g(R,r) \cdot [ u(R) - u(r)]$\\
+      \vspace{3mm}
+      \item \textbf{Collision kernel with turbulence effects\\ from Ayala and Wang}\\
+      \vspace{1mm}
+      $K(R,r) = 2 \pi (R + r)^2 \cdot \eta_E E^g \langle| w_r |\rangle g_{Rr} $\\
+      \vspace{3mm}
+   \end{itemize}
+    \begin{tabular}{ll}
+	   $\eta_E$ & = turbulent enhancement factor for collision efficiency \\
+	   $E^g$ & = collection efficiency \\
+      $\langle| w_r |\rangle$ & = radial relativ velocity \\
+      $g_{Rr}$ & = radial distribution function \\
+   \end{tabular}
+
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(11 cm,6.5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node (pic1) at (0.0,0.0) {\includegraphics[scale=0.30]{particle_model_figures/falkowich.png}};
+            \node[below=0.0cm of pic1] {Falkowich, 2010};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(11.25 cm,3.0cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node (pic2) at (0.0,0.0) {\includegraphics[scale=0.30]{particle_model_figures/malinowski.png}};
+            \node[below=0.0cm of pic2] {Malinowski, 2010};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+\end{frame}
+
+\section{Implementation}
+\subsection{Implementation}
+
+% Folie 24
+\begin{frame}
+   \frametitle{Flow Chart of Particle Code (I)}
+   \footnotesize
+   \begin{tikzpicture}[scale=0.8, transform shape]
+      % Define colours
+      \tikzstyle{gelb1} = [draw, fill=yellow!60, text width=7em, text centered, minimum height=1.6em]
+      \tikzstyle{orange} = [draw, fill=orange!60, text width=7em, text centered]
+      
+      % Define coordinates and draw nodes      
+      \node[gelb1, text width=5em] (PALM) at (0,0.1) {PALM};
+
+      \coordinate (A) at (0,-0.7);
+
+      \node[gelb1, right=0.6cm of A] (init3d) {init\underline{ }3d\underline{ }model};
+      
+      \coordinate[below=0.4cm of init3d] (B) ;
+      \coordinate[below=1.0cm of init3d] (C) ;        
+      \coordinate[below=1.6cm of init3d] (D) ;       
+      \coordinate[below=2.2cm of init3d] (E) ;       
+      \coordinate[below=2.8cm of init3d] (F) ;        
+      \coordinate[below=4.2cm of init3d] (G) ;      
+      \coordinate[below=4.8cm of init3d] (H) ;      
+      \coordinate[below=7cm of init3d] (I) ;   
+      \coordinate (J) at (0,-8.6);
+            
+      \node[gelb1, right=0.5cm of B, text width=17em] (init1d) {init\underline{ }1d\underline{ }model (\textit{calls various subroutines})};
+      \node[gelb1, right=0.5cm of C] (initslope) {init\underline{ }slope};
+      \node[gelb1, right=0.5cm of D] (disturb) {disturb\underline{ }heatflux};
+      \node[gelb1, right=0.5cm of E] (initrankine) {init\underline{ }rankine};
+      \node[gelb1, right=0.0cm of initrankine] {init\underline{ }pt\underline{ }anomaly};
+      \node[gelb1, right=0.5cm of F] (disturbfield) {disturb\underline{ }field};
+      \node[gelb1, right=0.0cm of disturbfield] (pres) {pres};
+      \node[gelb1, right=0.5cm of G] (read3d) {read\underline{ }3d\underline{ }binary};
+      \node[gelb1, right=0.0cm of read3d] (initdvrp) {init\underline{ }dvrp};
+      \node[gelb1, right=0.0cm of initdvrp] (initocean) {init\underline{ }ocean};
+      \node[gelb1, right=0.0cm of initocean] {init\underline{ }cloud\underline{ }physics};            
+      \node[orange, right=0.5cm of H] (initparticles) {lpm\underline{ }init};     
+      \node[gelb1, right=0.5cm of I] (initadvec) {init\underline{ }advec};      
+      \node[gelb1, right=0.0cm of initadvec] (userinit) {user\underline{ }init}; 
+      \node[gelb1, right=0.6cm of J] (dataoutput2d) {data\underline{ }output\underline{ }2d};      
+      \node[gelb1, right=0.0cm of dataoutput2d] {data\underline{ }output\underline{ }3d};         
+
+      \coordinate[below=0.15cm of pres] (K);
+      \coordinate[right=0.2cm of K] (L);
+      \coordinate[right=2cm of L] (M);
+      \coordinate[right=2cm of M] (N);
+            
+      \node[gelb1, below=0.1cm of L, text width=4em] (poisfft) {poisfft}; 
+      \node[gelb1, below=0.1cm of M, text width=4em] (sor) {sor}; 
+      \node[gelb1, below=0.1cm of N, text width=4em] (poismg) {poismg}; 
+      
+      \coordinate[below=0.1cm of initparticles] (O);
+      \coordinate[below=0.6cm of O] (P);
+      \coordinate[below=0.6cm of P] (Q);
+      
+      \node[orange, right=1.5cm of O] (userinitparticles) {user\underline{ }lpm\underline{ }init}; 
+      \node[orange, right=1.5cm of P] (sortparticles) {lpm\underline{ }sort\underline{ }arrays}; 
+      \node[orange, right=1.5cm of Q] (dataoutputdvrp) {data\underline{ }output\underline{ }dvrp}; 
+      
+      \coordinate[right=1.5cm of dataoutputdvrp] (R);
+
+      \node[orange, below=0.3cm of R] (userdvrp) {user\underline{ }dvrp\underline{ }coltab};
+   
+      % Draw lines  
+      \draw[dotted, thick] (PALM) -- (0,-0.5);
+      \draw[-, thick] (0,-0.5) -- (0,-8.7);
+      \draw[dotted, thick] (0,-8.7) -- (0,-9.0);      
+      \draw[-, thick] (init3d.west) -- (A) ;
+      \draw[-, thick] (init3d.south) -- (I) ;
+      \draw[dashed, thick] (B) -- (init1d.west);
+      \draw[dashed, thick] (C) -- (initslope.west);
+      \draw[dashed, thick] (D) -- (disturb.west);
+      \draw[dashed, thick] (E) -- (initrankine.west);
+      \draw[dashed, thick] (F) -- (disturbfield.west);
+      \draw[dashed, thick] (G) -- (read3d.west);      
+      \draw[-, thick] (H) -- (initparticles.west);      
+      \draw[-, thick] (I) -- (initadvec.west);         
+      \draw[dashed, thick] (J) -- (dataoutput2d);      
+      \draw[-, thick] (pres.south) -- (K);
+      \draw[-, thick] (K) -- (N);
+      \draw[-, thick] (L) -- (poisfft.north);
+      \draw[-, thick] (M) -- (sor.north);      
+      \draw[-, thick] (N) -- (poismg.north);        
+      \draw[-, thick] (initparticles.south) -- (P);
+      \draw[dashed, thick] (P) -- (Q);
+      \draw[-, thick] (O) -- (userinitparticles.west);
+      \draw[-, thick] (P) -- (sortparticles.west);
+      \draw[dashed, thick] (Q) -- (dataoutputdvrp.west);            
+      \draw[-, thick] (dataoutputdvrp.east) -- (R);
+      \draw[-, thick] (R) -- (userdvrp.north);
+      
+   \end{tikzpicture}
+   
+   
+\end{frame}
+
+% Folie 25
+\begin{frame}
+   \frametitle{Flow Chart of Particle Code (II)}
+   \footnotesize
+   \begin{tikzpicture}[scale=0.8, transform shape]
+      % Define colours
+      \tikzstyle{gelb1} = [draw, fill=yellow!60, text width=7em, text centered, minimum height=1.6em]
+      \tikzstyle{orange} = [draw, fill=orange!60, text width=7em, text centered]
+      
+      % Define coordinates and draw nodes
+      \coordinate (A) at (0,-0.7);
+
+      \node[gelb1, right=0.6cm of A] (timeintegration) {time\underline{ }integration};
+      
+      \coordinate[below=0.3 of timeintegration] (B);
+      \coordinate[below=0.9 of timeintegration] (C);
+      
+      \node[gelb1, right=0.6cm of B] (timestep) {timestep};
+      \node[gelb1, right=0.6cm of C] (runcontrol) {run\underline{ }control};
+      
+      \coordinate[below=0.2cm of runcontrol] (D);
+      
+      \node[gelb1, right=1.5cm of D] (flowstat) {flow\underline{ }statistics};
+      
+      \coordinate[below=1.8cm of timeintegration] (E);
+      
+      \node[gelb1, right=0.6cm of E] (surface) {surface\underline{ }coupler};
+      
+      \coordinate[below=2.4cm of timeintegration] (F);
+        
+      \node[gelb1, right=0.6cm of F, text width=13em] (useractions) {user\underline{ }actions (\textit{before\underline{ }timestep})};    
+ 
+       \coordinate[below=3.0cm of timeintegration] (G);
+       
+      \node[gelb1, right=0.6cm of G, text width=11em] (timestepscheme) {timestep\underline{ }scheme\underline{ }steering};       
+      
+      \coordinate[below=3.5cm of timeintegration] (H);
+      \coordinate[right=2cm of H] (I);
+      \coordinate[right=3.5cm of I] (J); 
+      
+      \node[draw, text width=22em,minimum height=4.5em,fill=black!15] (progframe) at (5.75,-5.3) {};
+      \node[draw, text width= 9.5em, right=0.5cm of progframe] {For details, see PALM Flow Chart (V).};
+      \node[gelb1, below=0.3cm of I, text width=9em] (prog) {prognostic\underline{ }equations};      
+      \node[gelb1, below=0.3cm of J, text width=10.5em] (progfast) {prognostic\underline{ }equations\underline{ }fast};  
+      \node[gelb1, below=0.1cm of progfast, text width=10.5em] (progvec) {prognostic\underline{ }equations\underline{ }vec};       
+      \node[draw, fill=red, text width=4em] at (8.2,-4) {\textcolor{white}{standard advection}};
+      
+      \coordinate[below=5.5cm of timeintegration] (K);
+      
+      \node[orange, right=0.6cm of K] (advecparticles) {lpm};             
+      
+      \coordinate[below=0.2cm of advecparticles] (L);
+     
+      \node[orange, right=1.5cm of L, text width=13em] (userparticlesatt) {user\underline{ }lpm\underline{ }set\underline{ }attributes + more}; 
+      
+      \coordinate[below=6.6cm of timeintegration] (M);
+      
+      \node[orange, right=0.6cm of M, text width=10em] (interaction) {interaction\underline{ }droplets\underline{ }ptq};     
+
+      \coordinate[below=7.2cm of timeintegration] (N);
+      
+      \node[gelb1, right=0.6cm of N] (asselin) {asselin\underline{ }filter};     
+      
+      \coordinate[below=7.8cm of timeintegration] (O);
+      
+      \node[gelb1, right=0.6cm of O] (boundary) {boundary\underline{ }conds};       
+      \node[gelb1, right=0.0cm of boundary] {swap\underline{ }timelevel};  
+            
+      \coordinate[below=8.4cm of timeintegration] (P);      
+      
+      \node[gelb1, right=0.6cm of P] (inflow) {inflow\underline{ }turbulence}; 
+      \node[gelb1, right=0.0cm of inflow] {disturb\underline{ }field}; 
+                                                      
+      % Draw lines  
+      \draw[dotted, thick] (0,-0.3) -- (0,-0.7);
+      \draw[-, thick] (0,-0.7) -- (0,-7.7);
+      \draw[dotted, thick] (0,-7.7) -- (0,-9.0);      
+      \draw[-, thick] (A) -- (timeintegration);
+      \draw[-, thick] (B) -- (timestep);
+      \draw[-, thick] (C) -- (runcontrol);
+      \draw[-, thick] (runcontrol.south) -- (D);
+      \draw[-, thick] (D) -- (flowstat);
+      \draw[dashed, thick] (E) -- (surface);
+      \draw[-, thick] (F) -- (useractions);      
+      \draw[-, thick] (G) -- (timestepscheme); 
+      \draw[-, thick] (H) -- (I); 
+      \draw[-, thick] (I) -- (prog.north); 
+      \draw[-, thick, color=red] (I) -- (J);       
+      \draw[->, thick, color=red] (J) -- (progfast.north); 
+      \draw[dashed, thick] (K) -- (advecparticles);            
+      \draw[-, thick] (advecparticles.south) -- (L);            
+      \draw[-, thick] (L) -- (userparticlesatt.west);       
+      \draw[dashed, thick] (M) -- (interaction.west);  
+      \draw[dashed, thick] (N) -- (asselin.west);        
+      \draw[-, thick] (O) -- (boundary.west);  
+      \draw[dashed, thick] (P) -- (inflow.west);             
+      \draw[-, thick] (timeintegration.south) -- (O);  
+      \draw[dashed, thick] (O) -- (P);  
+      
+   \end{tikzpicture}   
+   
+\end{frame}
+
+% Folie 26
+\begin{frame}
+   \frametitle{Detailed Flow Chart of \texttt{lpm} (I)}
+   \scriptsize
+   \begin{tikzpicture}[scale=0.87, transform shape] 
+      \node (0) at (0,0) {};
+      {\node[draw, right=0.0cm of 0, text width=29em] {write particle data on file (subroutine \texttt{lpm\underline{ }data\underline{ }output\underline{ }particles})\\ \qquad binary (\texttt{PARTICLE\underline{ }DATA/})\\ \quad + NetCDF (\texttt{DATA\underline{ }PRT\underline{ }NETCDF/})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-0.9cm] {calculate exponential terms for particles groups with inertia};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-1.65cm, text width=30em] {particle growth by condensation/evaporation and collision\\ (subroutines \texttt{lpm\underline{ }droplet\underline{ }condensation} and \texttt{lpm\underline{ }droplet\underline{ }collision})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-2.4cm] {If SGS-velocities are used: calculate gradients of TKE (subroutine \texttt{lpm\underline{ }init\underline{ }sgs\underline{ }tke})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-3.15cm, text width=29em] {timestep loop\\ (repeated, unless each particle has reached the LES timestep \texttt{dt\underline{ }3d})};}
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-4.2cm, text width=36em] {for each particle:\\ - interpolate velocities and SGS quantities (SGS-velocities, Lagrangian timescale, etc.\\ - calculate the particle advection (subroutine \texttt{lpm\underline{ }advec})};}
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-5.1cm] {calculate particle reflection from walls (subroutine \texttt{lpm\underline{ }boundary\underline{ }conds})};}
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-5.7cm] {user defined actions (subroutine \texttt{user\underline{ }lpm\underline{ }advec})};}     
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-6.3cm] {if necessary, release a new set of particles (subroutine \texttt{lpm\underline{ }release\underline{ }set})};}
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-6.9cm] {particle exchange between the subdomains (subroutine \texttt{lpm\underline{ }exchange\underline{ }horiz})};}    
+   \end{tikzpicture}
+\end{frame}
+
+% Folie 27
+\begin{frame}
+   \frametitle{Detailed Flow Chart of \texttt{lpm} (II)}
+   \scriptsize
+   \begin{tikzpicture}[auto, node distance=0] 
+      \node (0) at (0,0) {};
+      \node[draw, right=0.5cm of 0] {boundary conditions at bottom and top (subroutine \texttt{lpm\underline{ }boundary\underline{ }conds})};
+      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-0.7cm, text width=25em] {delete, pack, and sort particles\\ (subroutines \texttt{lpm\underline{ }pack\underline{ }arrays} and \texttt{lpm\underline{ }sort\underline{ }arrays} )};}  
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-1.6cm, text width=29em] {In case of cloud droplets: calculate the liquid water content\\ (subroutine \texttt{lpm\underline{ }calc\underline{ }liquid\underline{ }water\underline{ }content})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-2.3cm] {user defined setting of particle attributes (subroutine \texttt{user\underline{ }lpm\underline{ }set\underline{ }attributes})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-2.85cm] {if necessary, add actual positions to the particle tails (subroutine \texttt{lpm\underline{ }extend\underline{ }tails})};}
+      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-3.6cm, text width=29em] {write particle statistics on file \texttt{PARTICLE\underline{ }INFOS} (ASCII format)\\ (subroutine \texttt{lpm\underline{ }write\underline{ }exchange\underline{ }statistics})};  }    
+   \end{tikzpicture}
+\end{frame}
+
+% Folie 28
+\begin{frame}
+   \frametitle{The Data Type Used for Particles}
+   \small
+   \begin{itemize}
+      \item Particle data are stored in a FORTRAN derived data type:
+   \end{itemize}
+   \includegraphics[scale=0.3]{particle_model_figures/data_type.png}
+\end{frame}
+
+% Folie 29
+\begin{frame}
+   \frametitle{How to Read netCDF Particle Data from an External Program}
+   \footnotesize
+   \begin{itemize}
+      \item An example program for reading netCDF particle data (from file DATA\underline{ }PRT\underline{ }NETCDF/) can be found in the PALM repository under \texttt{...../trunk/UTIL/analyze\underline{ }particle\underline{ }netcdf\underline{ }data.f90}
+       \item<1-> \textbf{Attention:}\\ The particle feature \grqq density\underline{ }ratio\grqq\, is stored in variable particle\underline{ }groups which (so far) is \textbf{not} contained in the netCDF file.\\ Also, informations about particle tails (history of particle positions) are \textbf{not} on the netCDF file!\\
+       \vspace{1mm}
+       Both informations can only be found on file PARTICLE\underline{ }DATA/.\\
+       \vspace{1mm}
+       For the format of this file (one per PE, i.e. filenames \underline{ }0000, \underline{ }0001, etc.) see beginning of subroutine advec\underline{ }particles.
+   \end{itemize}
+   \onslide<1->\hspace{4mm}\includegraphics[scale=0.27]{particle_model_figures/particle_data.png}
+\end{frame}
+
+\section{Application Example}
+\subsection{Application Example}
+
+% Folie 30
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (I)}
+   \footnotesize
+   \textbf{Why investigating clouds?}
+   \begin{itemize}
+      \item Clouds are very important e.g. for climate, precipitation 
+         \begin{itemize}
+            \footnotesize
+            \item Problem: many microphysic processes are still not sufficiently known but determine the macroscopic properties of clouds
+            \item Open Issues: growth of cloud droplets in range $\unit{10-50}{\mu m}$, influence of in-cloud turbulence effects on droplet growth, ...
+      \end{itemize}
+   \end{itemize}
+   \vspace{2mm}
+   \textbf{What is our goal?}
+   \begin{itemize}
+      \item Analyze in-cloud turbulence effects on droplet growth and precipitation formation using an LCM
+   \end{itemize}
+   \vspace{2mm}
+   \textbf{What are the advantages?}
+   \begin{itemize}
+      \item dynamics and microphysics of the cloud are directly related to physical processes of the individual droplets
+      \item provides detailed information e.g. spatial and temporal evolution of the droplet spectrum, spatial distribution of the droplet concentration, droplet tracks, ...
+   \end{itemize}  
+\end{frame}
+
+% Folie 31
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (II)}
+   \footnotesize
+   \textbf{Simulation setup for idealized case}
+   \begin{itemize}
+      \item Domain size: $\unit{4}{km}$ x $\unit{4}{km}$ x $\unit{4}{km}$, resolution: $\unit{20}{m}$
+      \item Cloud is initialized with the help of a warm air bubble near the bottom
+      \item Bubble size: $\unit{4000}{m}$ x $\unit{100}{m}$ x $\unit{100}{m}$, $\Delta T = \unit{0.4}{K}$
+      \item Particles are released every $\unit{4.5}{m}$ in whole model domain
+      \item Initial particles size: $\unit{1}{\mu m}$
+      \item Initial weighting factor: $9 \cdot 10^9$ 
+   \end{itemize}
+   \vspace{15mm}
+   Total number of particles: $\sim$ 425 Million\\
+   Particle concentration:  $\unit{100}{cm^{-3}}$
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(9.5 cm,2.85cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {\includegraphics[scale=0.30]{particle_model_figures/profil_pt_q.png}};
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+   
+\end{frame}
+
+% Folie 32
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (III)}
+   \footnotesize
+   \textbf{Extract from the corresponding parameter file:}
+   \includegraphics[scale=0.3]{particle_model_figures/particles_par.png}
+\end{frame}
+
+% Folie 33
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (IV)}
+   \footnotesize
+   \centering 
+   \includegraphics[scale=0.4]{particle_model_figures/snapshot.png}\\
+   Snapshot of cloud droplet evolution using\\ visualization tool DVRP\\
+\end{frame}
+
+% Folie 34
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (V)}
+   \footnotesize
+   
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(6.3 cm, 3.6 cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {   \includegraphics[scale=0.15]{particle_model_figures/turbulence_effects.png}};
+            \node at (0.0,2.55) {after 1600 s};
+            \node at (-3.3,3) {Kernel without turbulence effects};
+            \node at (3,3) {Kernel with turbulence effects};
+
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}  
+   
+\end{frame}
+
+% Folie 35
+\begin{frame}[t]
+   \frametitle{Application Example: Simulation of a Convective Cloud with LCM (VI)}
+   \footnotesize
+      \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(6.3 cm, 4.2 cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node at (0.0,0.0) {\includegraphics[scale=0.4]{particle_model_figures/turbulence_effects_2.png}};
+            \node at (-3.0,2.6) {Kernel without turbulence effects};
+            \node at (3,2.6) {Kernel with turbulence effects};
+
+         \end{tikzpicture}
+         };
+   \end{tikzpicture}
+   \ \\  
+   \vspace{48mm}
+   $\rightarrow$ Turbulence effects enhance droplet growth and lead to more realistic mass distribution function\\
+\end{frame}
+
+% Folie 36
+\begin{frame}
+   \frametitle{General Warning}
+   \begin{itemize}
+      \item Errors in the user interface routines for particles may cause problems which are very difficult to debug. Please be extremely careful with modifying the user interface and try to find out exactly how the default particle code works, before you make your modifications.
+   \end{itemize}
+\end{frame}
+
+\end{document}
Index: palm/trunk/TUTORIAL/SOURCE/program_control.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/program_control.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/program_control.tex	(revision 973)
@@ -290,5 +290,5 @@
       errors have occurred!}}
    \par\bigskip
-   \includegraphics[width=\textwidth]{program_control_figures/run_control_file.png}
+   \includegraphics[width=1.08\textwidth]{program_control_figures/run_control_file.png}
    \normalsize
 \end{frame}
Index: palm/trunk/TUTORIAL/SOURCE/restarts_with_mrun.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/restarts_with_mrun.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/restarts_with_mrun.tex	(revision 973)
@@ -93,27 +93,40 @@
 
 
-% Folie 4 (Zu voll)?
+% Folie 4 
 \begin{frame}
    \frametitle{Carrying Out Restart Runs With \texttt{mrun}}
    \scriptsize
-
-   Concerning \texttt{mrun}, the first thing required to enable restart runs is to use the additional activating string \grqq \texttt{restart}\grqq\, in the \texttt{mrun}-call for the \underline{initial run}:\\
-   \quad \texttt{mrun -d test ... -r ''d3\# restart''}\\
-   This will have the following effects:
-   \vspace{2mm}
-   \begin{itemize}
-      \item<2-> At the end of the run, all necessary variables will bei written as binary data to the local file \texttt{BINOUT}. This is caused by an entry in the configuration file\\
-      \quad \texttt{\%write\underline{ }binary true restart}\\
-      which sets the environment variable \texttt{write\underline{ }binary}, which is in turn read by PALM from the local file \texttt{ENVPAR} created by \texttt{mrun}.
-      \item<3-> This binary file will be permanently stored in case that an appropriate file connection statement exists\\
-      \begin{columns}
-         \column{1.05\textwidth}
-         \texttt{BINOUT  out:loc:flpe restart \~{}/palm/current\underline{ }version/JOBS/\$fname/RESTART  \underline{ }d3d}
-      \end{columns}
-      \item<4-> If, during the run, PALM detects that the simulation cannot be finished due to limited job time, it tells \texttt{mrun} (by creating a local file named \texttt{CONTINUE\underline{ }RUN}) that a restart job has to be started. \texttt{mrun} will then automatically start such a job by submitting the command\\
-      \quad \texttt{mrun -d test ... -r ''d3f restart''}\\
-      on the \textbf{local host}. Options of this command are nearly the same as of the initial run, but every sharp symbol (\grqq\#\grqq) in the activating strings is replaced by an \grqq f\grqq.
-   \end{itemize}
-   \onslide<5->\textcolor{red}{\textbf{This effects the activation of file connections for the restart job!}}
+   \begin{columns}[T]
+      \begin{column}{1.0\textwidth}
+         Concerning \texttt{mrun}, the first thing required to enable restart runs is to use the additional activating string \grqq \texttt{restart}\grqq\, in the \texttt{mrun}-call for the \underline{initial run}:\\
+         \vspace{1mm}
+         \quad \texttt{mrun -d test ... -r \dq d3\# restart\dq}\\
+         \ \\
+         This will have the following effects:
+         \vspace{1mm}
+         \tiny
+         \begin{itemize}
+            \item<2-> At the end of the run, all necessary variables will bei written as binary data to the local file \texttt{BINOUT}. This is caused by an entry in the configuration file\\
+            \vspace{1mm}
+            \quad \texttt{\%write\underline{ }binary true restart}\\
+            \vspace{1mm}
+            which sets the environment variable \texttt{write\underline{ }binary}, which is in turn read by PALM from the local file \texttt{ENVPAR} created by \texttt{mrun}.
+            \vspace{3mm}
+            \item<3-> This binary file will be permanently stored in case that an appropriate file connection statement exists\\
+            \vspace{1mm}
+            \quad \texttt{BINOUT  out:loc:flpe restart \~{}/palm/current\underline{ }version/JOBS/\$fname/RESTART  \underline{ }d3d}
+            \vspace{3mm}
+            \item<4-> If, during the run, PALM detects that the simulation cannot be finished due to limited job time, it tells \texttt{mrun} (by creating a local file named \texttt{CONTINUE\underline{ }RUN}) that a restart job has to be started. \texttt{mrun} will then automatically start such a job by submitting the command\\
+            \vspace{1mm}
+            \quad \texttt{mrun -d test ... -r \dq d3f restart\dq}\\
+            \vspace{1mm}
+            on the \textbf{local host}. Options of this command are nearly the same as of the initial run, but every sharp symbol (\grqq\#\grqq) in the activating strings is replaced by an \grqq f\grqq.
+         \end{itemize}
+         \scriptsize
+         \vspace{2mm}
+         \onslide<5->\textcolor{red}{\textbf{This effects the activation of file connections for the restart job!}}
+      \end{column}
+   \end{columns}
+
 \end{frame}
 
@@ -131,12 +144,14 @@
    \begin{itemize}
       \item<2-> For the restart job, the model receives a different parameter file than for the initial job (e.g. \texttt{example\underline{ }cbl\underline{ }p3d\textcolor{blue}{f}} instead of \texttt{example\underline{ }cbl\underline{ }p3d}).\\
-   \vspace{2mm}
+   \vspace{4mm}
    The parameter file for the restart job is nearly the same as for the initial run, but it must contain the parameter setting\\
+   \vspace{1mm}
    \quad \texttt{initializing\underline{ }actions = 'read\underline{ }restart\underline{ }data'}\\
+   \vspace{1mm}
    in the \texttt{\&inipar}-NAMELIST-group. All other \texttt{\&inipar}-parameter-settings are ignored!\\
-   \vspace{2mm}
+   \vspace{4mm}
    \texttt{\&d3par}-parameter values can freely be changed compared with the parameter file for the initial run.\\
    \vspace{4mm}
-   \item<3-> Input binary data file (\texttt{BININ}) is necessary (and available) only for restart jobs
+   \item<3-> Input binary data file (\texttt{BININ}) is necessary (and available) only for\\ restart jobs
    \end{itemize}
 \end{frame}
@@ -167,5 +182,5 @@
 
 
-% Folie 7 (Zu voll?)
+% Folie 7
 \begin{frame}
    \frametitle{Handling of Large Binary Data Files}
@@ -173,11 +188,14 @@
    \begin{columns}
       \column{1.1\textwidth}
+      \vspace{-1mm}
       \begin{itemize}
          \item<1-> Typically, the binary restart files are very large, so that they cannot be stored in the user's home-directory because of limited file quotas. Also, hard disks where \texttt{/home} is stored are typically very slow, so that the copy process needs very long time.
+         \vspace{1mm}
          \item<2-> Using the file attribute \texttt{fl} (abbreviation for german \grqq Fortsetzungslauf\grqq) in the output file connection statement causes \texttt{mrun} to copy the local file to a special directory, which can be defined in the configuration file by the environment variable \texttt{tmp\underline{ }data\underline{ }catalog}. The permanent file described in the connection statement is also created, but it is \textbf{empty}.
+         \vspace{1mm}
          \item<3-> At the end of the job, the second last cycle of the respective file with attribute \texttt{fl} is automatically deleted by \texttt{mrun} from the \texttt{tmp\underline{ }data\underline{ }catalog} in order to spare disc space. This can be prevented by setting the \texttt{mrun}-option \grqq\texttt{-k}\grqq (keep data from previous run).
       \end{itemize}
    \end{columns}
-   \ \\
+   \vspace{2mm}
       \onslide<4-> \textbf{Example:}\\
       \tiny \quad \texttt{\%base\underline{ }data\hspace{4.5em}\~{}/palm/current\underline{ }version/JOBS}\\
@@ -189,6 +207,6 @@
       \tiny \quad \texttt{/gfs2/work/niksiraa/palm\underline{ }restart\underline{ }data/example\underline{ }cbl\underline{ }d3d}\\
       \tiny \quad \texttt{\~{}/palm/current\underline{ }version/JOBS/example/RESTART/example\underline{ }cbl\underline{ }d3d \# empty file (directory)}\\
-   \vspace{1mm}
-   \onslide<6-> \scriptsize \textcolor{red}{Concerning input files, \texttt{mrun} always determines the current cycle number to be \underline{used from the contents of the directory defined by the file connection statement!}}
+   \vspace{2mm}
+   \onslide<6-> \scriptsize \textcolor{red}{Concerning input files, \texttt{mrun} always determines the current cycle number to be \underline{used from the contents of the directory defined by the file connection}\\ \underline{statement!}}
 
 \end{frame}
@@ -222,13 +240,18 @@
       \begin{itemize}
          \item<1-> By default, PALM checks after every timestep, if enough time remains from the job cpu limit to carry out the next timestep:\\
-         \quad \grqq\texttt{total job time}\grqq\, - \grqq\texttt{time already consumed}\grqq\, $\leftarrow$ \texttt{termination\underline{ }time\underline{ }needed}\\
-(as given by \texttt{mrun}-option \texttt{-t} ...) \hspace{5mm}  (as given by parameter in \texttt{\&d3par}-NAMELIST)
+         \vspace{1mm}
+         (\quad \grqq\texttt{total job time}\grqq\, - \grqq\texttt{time already consumed}\grqq\,) \texttt{<=} \texttt{termination\underline{ }time\underline{ }needed}\\
+         (as given by \texttt{mrun}-option \texttt{-t} ...) \hspace{5mm}  (as given by parameter in \texttt{\&d3par}-NAMELIST)\\
+         \vspace{3mm}
          \item<2-> \texttt{termination\underline{ }time\underline{ }needed} has to include the cpu time needed before running PALM (e.g. for compilation, copying of input data, etc.; default value: 300 s)!\\
          \ \\
          \onslide<3-> \textbf{Warning:}\\
-         \quad \quad \grqq\texttt{total job time}\grqq\, $\leftarrow$ \texttt{termination\underline{ }time\underline{ }needed},\\
+         \vspace{1mm}
+         \quad \quad \grqq\texttt{total job time}\grqq\, \texttt{<=} \texttt{termination\underline{ }time\underline{ }needed},\\
          \quad forces a restart after the first timestep!
-         \item<4-> \texttt{\&d3par}-parameters \texttt{restart\underline{ }time} and \texttt{dt\underline{ }restart} can be used to set restart time(s) manually.
-         \item<5-> In case of manually setting the restart time, the default checking (see above) is still active and a restart will be automatically forced if the job reaches its cpu limit, even if the manually set restart time has not been reached!
+         \vspace{3mm}
+         \item<4-> \texttt{\&d3par}-parameters \texttt{restart\underline{ }time} and \texttt{dt\underline{ }restart} can be used to set restart time(s) manually.\\
+         \vspace{3mm}
+         \item<5-> In case of manually setting the restart time, the default checking (see above) is still active and a restart will be automatically forced if the job reaches its cpu limit, even if the manually set restart time has not been reached!\\
       \end{itemize} 
    \end{columns}
@@ -243,9 +266,10 @@
          \item<1-> After a job has finished (\texttt{end\underline{ }time} has been reached), the user can submit a restart job manually (provided that restart data have been saved) by entering:\\
          \vspace{2mm}
-         \quad \texttt{mrun ... -r ''d3f ...'' ...}\\
+         \quad \texttt{mrun ... -r \dq d3f ...\dq\, ...}\\
          or\\
-	      \quad \texttt{mrun ... -r ''d3f restart ...'' ...}\\
+	      \quad \texttt{mrun ... -r \dq d3f restart ...\dq\, ...}\\
 	      \ \\
          \item<2-> Remember to increase the value of \texttt{end\underline{ }time} in the parameter file before submitting the job.
+         \vspace{2mm}
          \item<3-> If a manually started restart job shall continue a run of a former job chain which is somewhere in the middle of this chain, all binary files with respective higher cycle numbers have to be deleted or removed from their respective directories.
    \end{itemize} 
Index: palm/trunk/TUTORIAL/SOURCE/runs_with_mrun.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/runs_with_mrun.tex	(revision 972)
+++ palm/trunk/TUTORIAL/SOURCE/runs_with_mrun.tex	(revision 973)
@@ -126,6 +126,5 @@
    \onslide<6->\textcolor{red}{\textbf{Problems:} The user has to copy or rename output files, if 
    he/she wants to run the program more than once and if he concurrently wants to keep 
-   the files from the former run(s).\\
-   If he/she is using different input parameter files for steering, these files also have 
+   the files from the former run(s). If he/she is using different input parameter files for steering, these files also have 
    to be copied into the working directory before the program is executed.}\\
    \vspace{1mm}
Index: palm/trunk/TUTORIAL/SOURCE/topography.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/topography.tex	(revision 973)
+++ palm/trunk/TUTORIAL/SOURCE/topography.tex	(revision 973)
@@ -0,0 +1,725 @@
+%$Id$
+\input{header_tmp.tex}
+%\input{../header_lectures.tex}
+
+\usepackage[utf8]{inputenc}
+\usepackage{ngerman}
+\usepackage{pgf}
+\usetheme{Dresden}
+\usepackage{subfigure}
+\usepackage{units}
+\usepackage{multimedia}
+\usepackage{hyperref}
+\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
+\usepackage{xmpmulti}
+\usepackage{tikz}
+\usetikzlibrary{shapes,arrows,positioning,decorations.pathreplacing}
+\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
+
+%---------- neue Pakete
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{multicol}
+\usepackage{pdfcomment}
+\usepackage{xcolor}
+
+\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\date{last update: \today}
+\event{PALM Seminar}
+\setbeamertemplate{navigation symbols}{}
+\setbeamersize{text margin left=.5cm,text margin right=.2cm}
+\setbeamertemplate{footline}
+  {%
+    \begin{beamercolorbox}[rightskip=-0.1cm]&
+     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
+      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}%
+      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}%
+    \end{beamercolorbox}%
+%    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}%
+%    \end{beamercolorbox}
+  }%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.eps}}
+
+\title[PALM - Using Topography]{PALM - Using Topography}
+\author{Siegfried Raasch}
+
+% Notes:
+% jede subsection bekommt einen punkt im menu (vertikal ausgerichtet.
+% jeder frame in einer subsection bekommt einen punkt (horizontal ausgerichtet)
+\begin{document}
+% Folie 1
+\begin{frame}
+\titlepage
+\end{frame}
+
+% Folie 2
+\begin{frame}
+   \frametitle{Contents â Using Topography (I)}
+   \begin{itemize}
+      \item{Purpose of topography in PALM} 
+      \item{Definition}
+      \item{Realization}
+      \begin{itemize}
+         \item{Physical concept}
+         \item{Technical / numerical implementation}
+      \end{itemize}
+      \item{Strengths and limitations}
+      \item{Control parameters}
+      \begin{itemize}
+         \item{Required / optional topography parameters}
+         \item{Topography-related general control parameters}
+         \begin{itemize}
+            \item{Suitable driving methods, initial and boundary conditions}
+            \item{Pressure solver}
+         \end{itemize}
+      \end{itemize}
+      \item{Data output}
+   \end{itemize}
+\end{frame}
+
+% Folie 3
+\begin{frame}
+   \frametitle{Purpose of Topography}
+   \begin{itemize}
+      \item{Optional feature to simulate flow around/above obstacles}
+      \par\bigskip
+      \item{Application fields}
+      \begin{itemize}
+         \item{Urban meteorology, wind engineering}
+         \item{Mesoscale meteorology}
+         \item{Oceanography}
+         \item{...}
+      \end{itemize} 
+   \end{itemize}
+\end{frame}
+
+% Folie 4
+\begin{frame}
+   \frametitle{Definition}   
+   \begin{itemize}
+      \item{The topography definition in PALM covers solid, impermeable, fixed flow obstacles with a volume of at least one grid box.}
+      \par\bigskip
+      \item{The following qualifies as topography: \textcolor{green!50!black!100}{\checkmark}}      
+      \begin{itemize}
+         \footnotesize
+         \item{Human-made obstacles (buildings)}
+         \item{Natural obstacles (hills, mountains)}
+      \end{itemize}
+      \par\bigskip
+      \item{The following does NOT qualify as topography: \textcolor{red}{$\times$}}
+      \begin{itemize}
+         \footnotesize
+         \item{\begin{tabbing}Permeable obstacles (vegetation) $\}$  \= Parameterization options in PALM: \\
+                                                                     \> canopy model, local roughness length  \end{tabbing} } 
+         \item{Small obstacles (signposts)}
+         \item{Moving obstacles (vehicles)}                                                    
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 5
+\begin{frame}
+   \frametitle{Realization - Physical Concept}
+   \scriptsize
+   \begin{columns}[c]
+   \column{0.8\textwidth}
+      \begin{itemize}
+         \item{Flow cannot enter topography and is forced around/above it.}
+      \end{itemize}
+   \column{0.2\textwidth}
+   \end{columns}
+   \begin{columns}[c]
+   \column{0.6\textwidth}
+      \begin{itemize}
+         \item{Grid boxes are}
+         \begin{itemize}
+            \item{\begin{minipage}{0.1\textwidth} 
+                     \includegraphics[width=0.7\textwidth]{topography_figures/physical_concept_small1.png}
+                  \end{minipage}
+                  \begin{minipage}{0.5\textwidth} \scriptsize
+                     \par\medskip
+                     100\% free fluid, \\
+                  \end{minipage}}
+            \item{\begin{minipage}{0.1\textwidth}
+                     \includegraphics[width=0.7\textwidth]{topography_figures/physical_concept_small2.png}
+                  \end{minipage}
+                  \begin{minipage}{0.5\textwidth} \scriptsize
+                     100\% fluid adjacent to an obstacle, or
+                  \end{minipage}}     
+            \item{\begin{minipage}{0.1\textwidth} 
+                     \includegraphics[width=0.7\textwidth]{topography_figures/physical_concept_small3.png}
+                  \end{minipage}
+                  \begin{minipage}{0.5\textwidth} \scriptsize
+                     \par\medskip
+                     100\% obstacle. \\
+                  \end{minipage}}             
+         \end{itemize}
+         \item{No-slip boundary condition}
+         \begin{itemize}
+            \item{\scriptsize Wall-normal velocity component is zero at obstacle surface \textbf{\textcolor{blue}{---------}}}
+         \end{itemize}
+         \par\bigskip
+         \item{\begin{minipage}{0.75\textwidth}  \scriptsize
+                  Local surface layer for the first grid box \\adjacent to each obstacle surface
+               \end{minipage}
+               \begin{minipage}{0.1\textwidth}
+                  \includegraphics[width=0.7\textwidth]{topography_figures/physical_concept_small2.png}
+               \end{minipage}}
+         \par\smallskip
+         \begin{itemize}
+            \item{\scriptsize Neutral Monin-Obukhov similarity}
+         \end{itemize}
+      \end{itemize}
+   \column{0.4\textwidth}
+      \includegraphics[width=\textwidth]{topography_figures/physical_concept.png}
+   \end{columns}
+\end{frame}
+
+% Folie 6
+\begin{frame}
+   \frametitle{Realization - \\ Numerical /Technical Implementation (I)}
+   \small
+   \begin{columns}[c]
+   \column{0.5\textwidth}
+      \begin{itemize}
+         \item{Obstacles must be surface-mounted}
+         \item{Overhanging structures \textcolor{blue}{$\times$}, holes \textcolor{red}{$\times$} etc. are not permitted.}
+         \begin{itemize}
+            \footnotesize
+            \item{This simplification allows extra performance optimization by reducing the 3D obstacle dimension to a "'2.5D"' dimension.}
+            \item{"'2.5D"' means that each horizontal grid cell is assigned only one height level.}
+            \item{This conforms to the "'2.5D"' format of Digital Elevation Models (DEM).}
+         \end{itemize}
+      \end{itemize}     
+   \column{0.4\textwidth}
+      \par\medskip
+      \includegraphics[width=1.1\textwidth]{topography_figures/technical_implementation.png}
+   \end{columns}
+\end{frame}
+
+% Folie 7
+\begin{frame}
+   \frametitle{Realization - \\ Numerical /Technical Implementation (II)}
+   \begin{columns}[c]
+   \column{0.4\textwidth}
+      \footnotesize     
+      The location of the wall-normal velocity component defines the location of the impermeable obstacle surface. \\
+      \par\smallskip
+      Obstacle surfaces that do not match the grid are approximated by grid boxes like a step-function. 
+      \par\bigskip
+      $\bullet$ scalars \\
+      \textcolor{red}{$\bullet$ u (staggered)} \\
+      \textcolor{green!40!black!100}{\textbf{+} v (staggered)}
+%      \includegraphics[width=0.4\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_small1.png} \\
+%      \includegraphics[width=0.6\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_small2.png} \\
+%      \includegraphics[width=0.6\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_small3.png}
+   \column{0.6\textwidth}
+      \includegraphics<1>[width=\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_1.png}
+      \includegraphics<2>[width=\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_2.png}
+      \includegraphics<3>[width=\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_3.png}
+      \includegraphics<4>[width=\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_4.png}
+      \includegraphics<5>[width=\textwidth]{topography_figures/technical_implementation_grid/technical_implementation_grid_5.png}
+   \end{columns}
+\end{frame}
+
+% Folie 8
+\begin{frame}
+   \frametitle{Realization - \\ Numerical / Technical Implementation (III)}
+   \footnotesize
+   \textbf{Rastering GIS data: \dq from GIS data to ASCII raster data\dq}
+   \begin{itemize}
+      \item{In order to process topography from external data sources, the data must be made available 
+            to PALM as a rastered ASCII file, e.g. example\_topo.} 
+      \item{The layout of example\_topo must conform to the computational domain size and to the grid size dx and dy.}
+      \item{The rastered height data of example\_topo are given in m above ground and do not need to match
+            the vertical grid, since they are interpolated.}
+      \par\bigskip
+      \item{Software known to be able to perfom the rastering process of GIS data in vector and/or raster format to PALM raster format:}
+      \begin{itemize}
+         \item{ArcGIS (commercial)}
+         \item{GRASS GIS (freeware)}
+         \item{...? (please report to us)}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 9
+\begin{frame}
+   \frametitle{Realization â \\ Numerical / Technical Implementation (IV)}  
+   \small
+   \textbf{Potential issues}
+   \begin{itemize}
+      \item{Load imbalance} 
+      \begin{itemize}
+         \item{Leads to inefficient parallelization: \dq fast\dq CPU(s) must wait for \dq slow\dq CPU(s)}
+         \item{Occurs if the CPUs do not share the same workload}
+         \begin{itemize}
+            \item{E.g. if topography is significantly heterogeneous in a large volume fraction of the computational domain}
+         \end{itemize}
+      \end{itemize}     
+      \item{\dq 2 $\Delta$x\dq instabilities}
+      \begin{itemize}
+         \item{Upstream of obstacle walls}
+         \item{Due to second-order finite difference advection scheme}
+         \item{Model remains stable throughout the simulation}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 10
+\begin{frame}
+   \frametitle{Summary: Strengths (+) and Limitations (â)}
+   \small
+   \begin{itemize}
+      \item[+]{Horizontal and vertical surfaces can be exactly resolved (thanks to the finite difference Cartesian model architecture)}
+      \item[+]{Optimization also for scalar computer architectures}
+      \item[+]{Conforms with \dq 2.5D\dq format of Digital Elevation Models (DEM)} 
+      \par\bigskip
+      \item[-]{Obstacles must be surface-mounted}
+      \item[-]{Grid boxes can only be 100\% fluid or 100\% obstacle \\ \par\smallskip
+              \begin{footnotesize} Obstacle surfaces that do not match the grid are approximated by grid boxes like a step-function, which 
+ 	      modifies the real obstacle size \end{footnotesize}}
+      \item[-]{Overhanging structures, holes etc. are not permitted due to the \dq 2.5D\dq format}
+   \end{itemize}
+\end{frame}
+
+% Folie 11
+\begin{frame}
+   \frametitle{Take a Short Break... Urban Flow Visualization}
+   \begin{columns}[c]
+   \column{0.42\textwidth}
+      \includegraphics<1>[width=\textwidth]{topography_figures/hannover_1.png}
+      \href{.html}{\includegraphics<2>[width=\textwidth]{topography_figures/hannover_2.png}}
+   \column{0.58\textwidth}
+      Set-up: neutral boundary layer
+      \begin{itemize}
+         \item{Particle = passive tracer}
+         \item{Colour $\sim$ particle height}
+         \item{Tail length ~ particle velocity}         
+      \end{itemize}      
+      \par\bigskip
+      \begin{itemize}
+         \item{Flow past office tower:}
+         \begin{itemize}
+            \item{initially laminar: not yet an LES}
+            \item{intermittent: different episodes}
+         \end{itemize}
+         \item{Broad street canyon flow:}
+         \begin{itemize}
+            \item{channeling}
+            \item{low-level upstream flow}
+         \end{itemize}
+      \end{itemize}
+   \end{columns}
+\end{frame}
+
+% Folie 12
+\begin{frame}
+   \frametitle{Required Topography Control Parameters}
+    \footnotesize
+   {\tt topography =} 
+   \begin{itemize}
+      \item{{\tt 'flat'} \hspace{3cm} no topography (default)}
+      \item{{\tt 'single\_building'} \hspace{1.2cm} \textcolor{red}{generic} single building} 
+      \item{{\tt 'single\_street\_canyon'} \hspace{0.4cm} \textcolor{red}{generic} single quasi-2D street canyon}
+      \item{{\tt 'read\_from\_file'} \hspace{1.4cm} \textcolor{blue}{rastered} ASCII file, e.g. {\tt example\_topo}}
+      \item{any other string \hspace{1.8cm} processed by user subroutine user\_init\_grid}
+   \end{itemize}
+   {\tt topography\_grid\_convention =}
+   \begin{itemize}
+      \item{{\tt '\textcolor{red}{cell\_edge}'} \hspace{2.2cm} default for \textcolor{red}{generic} topography: \textcolor{red}{$\leftrightarrow$}}
+      \item{{\tt '\textcolor{blue}{cell\_center}'} \hspace{1.9cm} default for \textcolor{blue}{rastered} topography: \textcolor{blue}{$\bigcirc$ $\leftrightarrow$}} 
+   \end{itemize}
+   \includegraphics<1>[width=0.5\textwidth]{topography_figures/control_parameters_1.png}
+   \includegraphics<2>[width=0.5\textwidth]{topography_figures/control_parameters_2.png}
+   \includegraphics<3>[width=0.5\textwidth]{topography_figures/control_parameters_3.png}
+   \includegraphics<4>[width=0.5\textwidth]{topography_figures/control_parameters_4.png}
+\end{frame}
+
+% Folie 13
+\begin{frame}
+   \frametitle{Optional Topography Control Parameters (I)}
+   \small
+   \textbf{Generic topography}    
+   \scriptsize
+   \begin{itemize}
+      \item{topography = {\tt 'single\_building'}} 
+      \begin{itemize}
+         \scriptsize
+         \item{building\_height = 50.0 \hspace{0.67cm} height of the building}
+         \item{building\_length\_x = 50.0 \hspace{0.43cm} length of the building in x-direction}
+         \item{building\_length\_y = 50.0 \hspace{0.43cm} length of the building in y-direction}
+         \item{building\_wall\_left \hspace{1.4cm} (default is building centered in x-direction)}
+         \item{building\_wall\_south \hspace{1.13cm} (default is building centered in y-direction)}
+      \end{itemize}
+      \item{topography = {\tt 'single\_street\_canyon'}}
+      \begin{itemize}
+         \scriptsize
+         \item{canyon\_height = 50.0 \hspace{0.45cm} height of the canyon \\
+               and}
+         \item{canyon\_width\_x = 50.0 \hspace{0.3cm} implies canyon axis orientation in y-direction}
+         \item{canyon\_wall\_left \hspace{1.17cm} (default is canyon centered in x-direction) \\
+               or}
+         \item{canyon\_width\_y = 50.0 \hspace{0.3cm} implies canyon axis orientation in x-direction}
+         \item{canyon\_wall\_south \hspace{0.9cm} (default is canyon centered in y-direction)}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 14
+\begin{frame}
+   \frametitle{Optional Topography Control Parameters (II)}
+   \scriptsize   
+   \textbf{Rastered topography}\\
+   \begin{minipage}{0.7\textwidth}
+      \begin{itemize}
+         \scriptsize
+         \item{{\tt topography} = 'read\_from\_file'} 
+         \begin{itemize}
+            \footnotesize
+            \item{requires an external ASCII file, e.g. {\tt example\_topo:}}
+         \end{itemize}
+      \end{itemize}
+   \end{minipage}
+   \begin{minipage}{0.2\textwidth}
+      \includegraphics[width=0.5\textwidth]{topography_figures/optional_control_parameters_1.png}
+   \end{minipage}
+   \begin{center}
+      \includegraphics[width=0.85\textwidth]{topography_figures/optional_control_parameters_2.png}
+   \end{center}
+   \begin{itemize}
+      \item[]{}
+      \begin{itemize} 
+         \scriptsize         
+         \item{layout must conform to domain size and grid size dx and dy.}
+         \item{height data}
+         \begin{itemize}
+            \scriptsize
+            \item{in m above ground (INTEGER or REAL)}
+            \item{do not need to match the vertical grid}
+         \end{itemize}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 15
+\begin{frame}
+   \frametitle{Optional Topography Control Parameters (III)}
+   \small
+   \textbf{Rastered topography}
+   \begin{itemize}
+      \item{{\tt topography} = 'read\_from\_file'}
+      \par\smallskip
+      \begin{itemize}
+         \item{\textbf{mrun}-call: \\
+               {\tt mrun ... -r 'd3\# ...'}}
+         \par\medskip
+         \item{{\tt .mrun.config:}}
+      \end{itemize}
+   \end{itemize}  
+   \begin{center} \includegraphics[width=0.7\textwidth]{topography_figures/optional_control_parameters_3.png} \end{center}
+\end{frame}
+
+% Folie 16   
+\begin{frame}
+   \frametitle{General Control Parameters (I): Suitable Driving Methods}
+   \scriptsize
+   \begin{itemize}
+      \item{\textbf{\dq Meteorological\dq set-up M: geostrophic wind / Coriolis force}}
+      \begin{itemize}
+         \scriptsize
+         \item{Set {\tt omega $ \neq$ 0.0}}
+         \item{Construct a non-zero profile of geostrophic wind $u_g$ and/or $v_g$ using {\tt ug\_surface}, {\tt ug\_vertical\_gradient}
+               and {\tt ug\_vertical\_gradient\_level} and/or the respective parameter set for $v_g$}
+      \end{itemize}
+      \par\bigskip
+      \item{\textbf{\dq Engineering\dq set-up E: direct external pressure gradient / no Coriolis force}}
+      \begin{itemize}
+         \scriptsize
+         \item{Set {\tt omega = 0.0}}
+         \item{Set-up E1: direct external pressure gradient that does not change with time 
+		 (the bulk velocity fluctuates with time)}
+         \begin{itemize}
+            \scriptsize
+            \item{Parameters: {\tt dp\_external}, {\tt dp\_smooth}, {\tt dp\_level\_b}, {\tt dpdxy}}
+         \end{itemize}
+         \item{Set-up E2: maintain a constant bulk velocity 
+		 (the direct external pressure gradient fluctuates with time)}
+         \begin{itemize}
+             \scriptsize
+             \item{Parameters: {\tt conserve\_volume\_flow}, {\tt conserve\_volume\_flow\_mode}, {\tt u\_bulk}, {\tt v\_bulk}}
+         \end{itemize}
+      \end{itemize}
+      \par\bigskip
+      \item{\textbf{\dq Thermal\dq set-up T: directly prescribe sensible heatflux}}
+      \begin{itemize}
+         \item[]{}
+         \begin{itemize}
+            \scriptsize
+            \item{surface\_heatflux at ground level only} 
+            \item{wall\_heatflux(0:4) at top/left/right/South/North obstacle face}
+         \end{itemize}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 17
+\begin{frame}
+   \frametitle{General Control Parameters (II): Initialization}
+   \scriptsize
+   \begin{itemize}
+      \item{\textbf{\dq Meteorological\dq set-up M }\\
+            Initialize a non-zero profile of geostrophic wind $u_g$ and/or $v_g$ using}
+      \begin{itemize}
+         \scriptsize
+         \item{{\tt initializing\_actions =} \textbf{'set\_constant\_profiles' (e.g. for convective BL)}}
+         \begin{itemize}
+            \scriptsize
+            \item{Parameters: {\tt ug\_surface $ \neq $ 0.0} and/or {\tt vg\_surface $\neq $ 0.0}}
+         \end{itemize}
+         \item{{\tt initializing\_actions =} \textbf{'set\_1d-model\_profiles' (e.g. for neutral BL)}}
+         \begin{itemize}
+            \scriptsize
+            \item{1D model prerun parameters with suffix {\tt \_1d} (e.g. {\tt end\_time\_1d}, {\tt damp\_level\_1d)}}
+         \end{itemize}
+      \end{itemize}  
+      \par\bigskip
+      \item{\textbf{\dq Engineering\dq set-up E} \\
+            Good initialization may require a priori knowlegde, e.g. from previous test runs. 
+            Here, {\tt ug\_}... and {\tt vg\_}... don't refer to geostrophic wind but to the initial wind profile.} 
+      \begin{itemize}
+         \scriptsize
+         \item{{\tt initializing\_actions} = \textbf{'set\_constant\_profiles'}}
+         \begin{itemize}
+            \scriptsize
+            \item{Parameter set: {\tt ug\_surface}, {\tt ug\_vertical\_gradient}[{\tt \_level}] and/or the respective set for $v_g$}
+         \end{itemize}
+         \item{{\tt initializing\_actions} = \textbf{'set\_1d-model\_profiles'}}
+         \item{{\tt initializing\_actions} = \textbf{'by\_user' â processed by user\_init\_3d\_model}}
+      \end{itemize}
+      \par\bigskip
+      \item{\textbf{\dq Thermal\dq set-up T} \\
+            Any of the above may apply}
+   \end{itemize}
+\end{frame}
+
+% Folie 18
+\begin{frame}
+   \frametitle{General Control Parameters (III): Boundary Conditions}
+   \footnotesize
+   \begin{itemize}
+      \item{Lateral boundary conditions}
+      \begin{itemize}
+         \item{Cyclic / non-cyclic: cf. lecture on \dq non-cyclic boundary conditions\dq}
+      \end{itemize} 
+      \item{Bottom boundary conditions}
+      \begin{itemize}
+         \item{Cf. lecture on \dq numerics and boundary conditions\dq}
+      \end{itemize}
+      \item{Top boundary conditions}
+      \begin{itemize}
+         \footnotesize
+         \item{\textbf{Channel}: {\tt bc\_uv\_t =} \textbf{'dirichlet\_0' (no-slip)}}
+         \item{\textbf{Open channel}: {\tt bc\_uv\_t =} \textbf{'neumann' (slip)}}
+         \item{\textbf{\dq Constant flux\dq layer} (not yet published): {\tt bc\_uv\_t =} \textbf{'neumann' (slip)} \\
+                with set-up E1 where {\tt dp\_level\_b >> 0} and {\tt dp\_smooth = .T.}}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 19
+\begin{frame}
+   \frametitle{General Control Parameters (IV): Pressure Solver} 
+   {\tt psolver =}
+   \par\medskip
+   \begin{itemize}
+      \item{'poisfft' (FFT scheme)} 
+      \begin{itemize}
+         \item{Good performance for urban PALM version}
+         \item{Cannot be used with non-cyclic boundary conditions}
+      \end{itemize}
+      \par\bigskip
+      \item{'multigrid' (Multigrid scheme)}
+      \begin{itemize}
+         \item{Performance for very large number of grid points may be better than FFT}
+         \item{This is the only possible choice for non-cyclic boundary conditions}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 20
+\begin{frame}
+   \frametitle{Data Analysis / Output â Some Considerations (I)}
+   \scriptsize
+   \begin{itemize}
+      \item{How to get turbulence statistics?}
+      \begin{itemize}
+         \scriptsize
+         \item{Phase averaging if a direction of homogeneity exists}
+         \item{Temporal averaging}
+         \item{Ensemble averaging}
+      \end{itemize} 
+      \item{Definition of turbulent fluctuations}\\
+      \textbf{Spatial fluctuations:} deviation from representative instantaneous spatial average
+      \begin{itemize}
+         \scriptsize
+         \item{PALM: many statistics calculated on-the-fly as time series, 1D vertical profiles}
+         \item{Not suitable for topography unless a direction of homogeneity exists}
+      \end{itemize}
+      \textbf{Temporal fluctuations}: deviation from representative local temporal average
+      \begin{itemize}
+         \scriptsize
+         \item{Suitable for all applications including topography}
+         \item{Requires much hard disk space and post-processing CPU time}
+         \item{PALM: not natively supported, but following procedure works:}
+         \begin{itemize}
+            \scriptsize
+            \item{Collect time-series during the simulation (2D/3D data output or user-defined time series)}
+            \item{Check for (quasi-)steady turbulent state and sufficient averaging time}
+            \item{Calculate statistics by post-processing making use of the Reynolds decomposition: \\ \par\medskip
+                  $\overline{w'\theta'} = \overline{w\theta} - \overline{w} \overline{\theta} $}
+         \end{itemize}
+      \end{itemize}    
+   \end{itemize}
+\end{frame}
+
+% Folie 21
+\begin{frame}
+   \frametitle{Your Responsibility and Contribution}
+   \footnotesize
+   \par\medskip
+   In most cases, a new parameter is added to PALM for one specific purpose.
+   \par\bigskip
+   Beyond this one purpose, each new parameter normally gives many other new feature/parameter combinations in PALM.
+   We are unable to check all these combinations by ourselves and rely on your help!
+   \par\bigskip
+   For example, the combination of topography and non-cyclic lateral boundary conditions has not yet been tested 
+   because both features have originally been introduced separately for different research projects.
+   \par\bigskip 
+   Therefore, we ask you for your responsibility and contribution:
+   \begin{itemize}
+      \item{Please always check your PALM setup carefully. PALM is not a black box.} 
+      \item{For example, design a simple case and test your expectation.}
+      \item{Please report potential bugs â thank you!}
+      \begin{itemize}
+         \item{PALM developer team}
+         \item{PALM user community (via trac-system)}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+% Folie 22
+\begin{frame}
+   \Large
+   \begin{center} \textcolor{blue!90!black!100}{Topography - Scenario examples} \end{center}
+\end{frame}
+
+% Folie 23
+\begin{frame}
+   \frametitle{Set-up Scenario: Single Street Canyon (I)}
+   \par\smallskip
+   \textbf{Single quasi-2D street canyon in neutral open channel flow with constant bulk velocity}
+   \par\smallskip
+   \begin{itemize}
+      \item{{\tt trunk/EXAMPLES/canyon/}}
+      \begin{itemize}
+         \item{Parameter file \hspace{2cm} {\tt example\_canyon\_p3d}}
+         \item{Run-control file \hspace{1.78cm} {\tt example\_canyon\_rc}}
+         \item{Some documentation \hspace{0.95cm} {\tt example\_canyon.odt}}
+      \end{itemize}
+   \end{itemize}
+   \begin{center}
+      \includegraphics[width=0.85\textwidth]{topography_figures/scenario_ssc_1.png}
+   \end{center}
+\end{frame}
+
+% Folie 24
+\begin{frame}
+   \frametitle{Set-up Scenario: Single Street Canyon (II)}
+   \textbf{The phase average makes use of homogeneity in y-direction:} \\
+   {\tt section\_xz = -1}, {\tt data\_output = \textbf{'u\_xz\_av'}}, {\tt 'v\_xz\_av'}, {\tt 'w\_xz\_av'}
+   \begin{center}
+      \includegraphics[width=0.85\textwidth]{topography_figures/scenario_ssc_2.png}
+   \end{center}
+\end{frame}
+
+% Folie 25
+\begin{frame}
+ \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(6.5 cm, 5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \uncover<1>{\node at (0,-0.5) {\includegraphics[width=0.7\textwidth]{topography_figures/scenario_ssc_example_1.png}};}
+            \uncover<2>{\node at (0,-0.5) {\includegraphics[width=0.7\textwidth]{topography_figures/scenario_ssc_example_2.png}};}
+            \uncover<3->{\node at (0,-0.5) {\includegraphics[width=0.7\textwidth]{topography_figures/scenario_ssc_example_3.png}};}
+            \uncover<4->{\node at (-3.5,-0.2) {\includegraphics[width=0.48\textwidth]{topography_figures/scenario_ssc_example_4.png}};}
+            \uncover<5->{\node at (3.5,-0.2) {\includegraphics[width=0.38\textwidth]{topography_figures/scenario_ssc_example_5.png}};}
+         \end{tikzpicture}
+         };
+  \end{tikzpicture}
+\end{frame}
+
+% Folie 26
+\begin{frame}
+   \frametitle{Set-up Scenario: Constant Flux Layer}
+   \small
+   \textbf{Single surface-mounted cube in neutral open channel flow with a constant flux layer}
+   \begin{itemize}
+      \item{{\tt trunk/EXAMPLES/constant\_flux\_layer/}}
+      \begin{itemize}
+         \footnotesize
+         \item{Parameter file \hspace{2cm} {\tt example\_constant\_flux\_layer\_p3d}}
+         \item{Run-control file \hspace{1.79cm} {\tt example\_constant\_flux\_layer\_rc}}
+         \item{Some documentation \hspace{1.02cm} {\tt example\_constant\_flux\_layer.odt}}
+      \end{itemize}
+   \end{itemize}
+   \begin{center}
+      \includegraphics[width=0.85\textwidth]{topography_figures/scenario_cfl.png}
+   \end{center}
+\end{frame}
+
+% Folie 27
+\begin{frame}
+ \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(6.5 cm, 5cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \uncover<1->{\node at (0,-0.5) {\includegraphics[width=0.7\textwidth]{topography_figures/scenario_cfl_example_1.png}};}
+            \uncover<2->{\node at (-3.5,-0.2) {\includegraphics[width=0.45\textwidth]{topography_figures/scenario_cfl_example_2.png}};}
+            \uncover<3->{\node at (3.5,-0.2) {\includegraphics[width=0.38\textwidth]{topography_figures/scenario_cfl_example_3.png}};}
+         \end{tikzpicture}
+         };
+  \end{tikzpicture}
+\end{frame}
+
+% Folie 28
+\begin{frame}
+   \frametitle{Rules of Good Practise}
+   \small
+   \begin{itemize}
+      \item{If you run PALM with topography, make sure that it is really LES...}
+      \begin{itemize}
+         \item{''Large eddies'' are ''small'' between obstacles}
+         \begin{itemize}
+            \item{use fine grid length to resolve turbulence there}
+         \end{itemize}
+         \item{Ratio of resolved to SGS fluxes}
+      \end{itemize} 
+      \item{Check for (quasi-)steady turbulent state and sufficient averaging time.}
+      \begin{itemize}
+         \item{Fluctuations of time series of E, E*, maximum velocity components etc.}
+      \end{itemize}
+      \item{Make sure that your PALM result is independent of numerical parameters such as domain size and grid size.}
+      \begin{itemize}
+         \item{Sensitivity studies}
+      \end{itemize}
+      \item{If you intend to do a comparison with some kind of reference data, it is essential to configure the set-up of PALM 
+           in the same way as the reference experiment.}
+      \begin{itemize}
+         \item{For example, if you compare PALM with wind tunnel results, you have to follow the wind tunnel set-up for setting up PALM.}
+      \end{itemize}
+   \end{itemize}
+\end{frame}
+
+\end{document}
Index: palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex	(revision 973)
+++ palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex	(revision 973)
@@ -0,0 +1,641 @@
+% $Id$
+\input{header_tmp.tex}
+%\input{../header_lectures.tex}
+
+\usepackage[utf8]{inputenc}
+\usepackage{ngerman}
+\usepackage{pgf}
+\usetheme{Dresden}
+\usepackage{subfigure}
+\usepackage{units}
+\usepackage{multimedia}
+\usepackage{hyperref}
+\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
+\usepackage{xmpmulti}
+\usepackage{tikz}
+\usetikzlibrary{shapes,arrows,positioning}
+\usetikzlibrary{decorations.markings}             %neues paket
+\usetikzlibrary{decorations.pathreplacing}        %neues paket
+\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{multicol}
+\usepackage{pdfcomment}
+\usepackage{graphicx}
+\usepackage{listings}
+\lstset{showspaces=false,language=fortran,basicstyle=
+        \ttfamily,showstringspaces=false,captionpos=b}
+
+\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\date{last update: \today}
+\event{PALM Seminar}
+\setbeamertemplate{navigation symbols}{}
+
+\setbeamertemplate{footline}
+  {
+    \begin{beamercolorbox}[rightskip=-0.1cm]&
+     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
+      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}
+      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}
+    \end{beamercolorbox}
+    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
+    \end{beamercolorbox}
+  }
+%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}}
+
+\title[The PALM User-Interface]{The PALM User-Interface}
+\author{Siegfried Raasch}
+
+\begin{document}
+
+% Folie 1
+\begin{frame}
+\titlepage
+\end{frame}
+
+\section{The PALM User-Interface}
+\subsection{The PALM User-Interface}
+
+% Folie 2
+\begin{frame}
+   \frametitle{Purpose of the User-Interface}
+   \scriptsize
+   \begin{itemize}
+      \item<2-> The standard (default) PALM code cannot account for every specific demand of a user. In order to include these specific demands, the user would have to modify the standard code.
+   \end{itemize}
+   \vspace{2mm}
+   \onslide<3->
+   \textbf{Problem:}
+   \begin{itemize}
+      \item<3-> If a new PALM version is released (current release is 3.8) and the user wants to use it, he would have to add his modifications to the new release again.
+   \end{itemize}   
+   \vspace{3mm}
+   \onslide<4->
+   \textbf{Solution:}
+   \begin{itemize}
+      \item<4-> PALM offers a \grqq user-interface\grqq, i.e. a set of subroutines, where the user can add his modifications and which can be re-used for future releases of the standard PALM code.
+      \item<5-> By using the user-interface, the standard code does not have to be modified by the user in most of all cases.
+      \item<6-> The user-interface subroutines are almost \grqq empty\grqq\, by default. They are called from the standard PALM code but (with some very minor exceptions) do not contain any executable code.
+   \end{itemize}   
+\end{frame}
+
+% Folie 3
+\begin{frame}
+   \frametitle{General Structure of the User-Interface}
+   \scriptsize
+   \begin{itemize}
+      \item<1-> All routines can be found under \texttt{.../trunk/SOURCE}.
+      \item<2-> There is one file for each routine. Filenames are \texttt{user\underline{ }*.f90}.\\
+Example: \texttt{user\underline{ }last\underline{ }actions.f90}
+   \end{itemize}
+   \onslide<3->
+   \centering
+   \includegraphics[scale=0.3]{user_defined_code_figures/user_last_actions.png}\\   
+\end{frame}
+
+% Folie 4
+\begin{frame}
+   \frametitle{Embedding of User-Interface Routines}
+   \scriptsize
+   \begin{itemize}
+      \item<1-> The user-interface routines are called from specific, well-defined locations in the standard PALM code.\\
+   \ \\
+   Example from \texttt{palm.f90}:
+   \end{itemize}
+   \onslide<2->
+   \centering
+   \includegraphics[scale=0.33]{user_defined_code_figures/embedding.png}\\
+\end{frame}
+
+
+% Folie 5
+\begin{frame}
+   \frametitle{Embedding of User-Interface Routines\\
+   Flow Chart Overview (I): Initial Steps}
+   \scriptsize
+   \begin{tikzpicture}[scale=0.8, transform shape]
+      % Define colours
+      \tikzstyle{green} = [draw, fill=green!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{yellow} = [draw, fill=yellow!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{orange} = [draw, fill=orange!60, text width=7.1em, text centered]
+      
+      % Define coordinates and draw nodes      
+      \node[green, text width=5em] (PALM) at (0,0.1) {PALM};
+
+      \coordinate (A) at (0,-0.7);
+
+      \node[green, right=0.6cm of A] (parin) {parin};
+      
+      \coordinate[below=0.3cm of parin] (B);
+      \coordinate[below=0.9cm of parin] (C);
+      \coordinate[below=1.5cm of parin] (D);
+      
+      \node[green, right=0.6cm of B] (read) {read\_var\_list};
+      \node[green, right=0.6cm of C] (package) {package\_parin};
+      \node[yellow, right=0.6cm of D] (userparin) {user\_parin};
+      
+      \coordinate[below=3cm of PALM] (E);      
+      \coordinate[below=3.6cm of PALM] (F);    
+      \coordinate[below=4.2cm of PALM] (G);      
+      \coordinate[below=4.8cm of PALM] (H); 
+      \coordinate[below=5.6cm of PALM] (I); 
+      \coordinate[below=7.4cm of PALM] (J);             
+                
+      \node[green, right=0.6cm of E] (initpegrid) {init\_pegrid};      
+      \node[green, right=0.6cm of F] (initgrid) {init\_grid}; 
+      \node[yellow, right=0.9cm of initgrid] (userinitgrid) {user\_init\_grid}; 
+      
+      \node[green, right=0.6cm of G] (checkparameters) {check\_parameters};       
+      \node[yellow, right=0.9cm of checkparameters, text width=9.5em] (usercheckdataoutput) {user\_check\_data\_output}; 
+      \node[green, right=0.6cm of H] (header) {header}; 
+      \node[green, right=0.6cm of I] (init3dmodel) {init\_3d\_model};       
+      \node[yellow, right=0.9cm of header] (userheader) {user\_header}; 
+            
+      \node[orange, right=0.6cm of J] (timeint) {time\_integration};       
+      
+      \coordinate[below=0.3cm of init3dmodel] (K);   
+      \coordinate[below=0.9cm of init3dmodel] (L);        
+      
+      \node[green, right=0.6cm of K] (initparticles) {init\_particles};       
+      \node[yellow, right=0.9cm of initparticles] (userinitparticles) {user\_init\_particles};   
+      \node[yellow, right=0.6cm of L] (userinit) {user\_init};       
+     
+      % Draw lines
+      \draw[-, thick] (PALM) -- (0,-7.8); 
+      \draw[dotted, thick] (0,-8.2) -- (0,-7.8);
+      \draw[-, thick] (A) -- (parin);
+      \draw[-, thick] (parin) -- (D);  
+      \draw[dashed, thick] (B) -- (read);
+      \draw[dashed, thick] (C) -- (package);
+      \draw[-, thick] (D) -- (userparin); 
+      \draw[-, thick] (E) -- (initpegrid);
+      \draw[-, thick] (F) -- (initgrid);
+      \draw[-, thick] (G) -- (checkparameters);
+      \draw[-, thick] (H) -- (header);
+      \draw[-, thick] (I) -- (init3dmodel);
+      \draw[-, thick] (J) -- (timeint);
+      \draw[dotted, thick] (init3dmodel) -- (K);
+      \draw[-, thick] (K) -- (L);
+      \draw[dashed, thick] (K) -- (initparticles);
+      \draw[-, thick] (L) -- (userinit);
+      \draw[-, thick] (initgrid) -- (userinitgrid);      
+      \draw[-, thick] (checkparameters) -- (usercheckdataoutput);      
+      \draw[-, thick] (header) -- (userheader);      
+      \draw[-, thick] (initparticles) -- (userinitparticles);      
+      
+   \end{tikzpicture}
+\end{frame}
+
+% Folie 6
+\begin{frame}
+   \frametitle{Embedding of User-Interface Routines\\
+   Flow Chart Overview (II): Time Integration Loop}
+   \scriptsize
+   \begin{tikzpicture}[scale=0.7, transform shape]
+      % Define colours
+      \tikzstyle{green} = [draw, fill=green!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{yellow} = [draw, fill=yellow!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{orange} = [draw, fill=orange!60, text width=7.1em, text centered]
+      \tikzstyle{orange1} = [draw, fill=orange!80, text width=11em, text centered]      
+      \definecolor{grey}{rgb}{0.25,0.25,0.25}
+
+      % Define coordinates and draw nodes      
+      \node[draw, text width=25em,minimum height=4.0em,fill=black!15] (progframe) at (5.75,-1.5) {};
+
+      \coordinate (A) at (0,0);
+
+      \node[orange, right=0.6cm of A] (timeint) {time\_integration};       
+      
+      \coordinate[below=0.3cm of timeint] (B);
+      \coordinate[below=0.8cm of timeint] (C);   
+      \coordinate[right=2cm of C] (D);   
+      \coordinate[right=3.8cm of D] (E);
+                 
+      \node[yellow, right=0.6cm of B, text width=14em] (useractions1) {\textcolor{blue}{user\_actions\_(\textit{'before\_timestep'})}};    
+         
+      \node[orange1, below=0.2cm of D] (progeq) {prognostic\_equations};    
+      \node[orange1, below=0.2cm of E] (progeqfast) {prognostic\_equations\_fast};
+      \node[draw, fill=red, text width=4em] at (8.6,-0.8) {\textcolor{white}{standard advection}};
+                
+      \node[yellow, right=0.3cm of progframe, text width=14em] (useractions2) {\textcolor{blue}{user\_actions\_(\textit{'*\_tendency'})}}; 
+      
+      
+      \coordinate[below=2.3cm of timeint] (F);
+      \coordinate[below=2.9cm of timeint] (G);
+      \coordinate[below=3.5cm of timeint] (H);
+      \coordinate[below=4.1cm of timeint] (I);
+
+                              
+      \node[green, right=0.6cm of F] (advecparticles) {advec\_particles}; 
+      \node[yellow, right=0.9cm of advecparticles, text width=10em] (userparticlesattributes) {user\_particles\_attributes}; 
+      \node[green, right=0.6cm of G] (exchangehoriz) {exchange\_horiz};  
+      \node[green, right=0.0cm of exchangehoriz] (asselin) {asselin\_filter};     
+      \node[green, right=0.6cm of H] (swaptimelevel) {swap\_timelevel}; 
+      \node[green, right=0.6cm of I] (pres) {pres};
+      
+      \coordinate[below=0.3cm of pres] (J);    
+      \coordinate[below=5.1cm of timeint] (K);     
+      \coordinate[below=5.7cm of timeint] (L);
+      \coordinate[below=6.3cm of timeint] (M);
+      \coordinate[below=6.9cm of timeint] (N);      
+      \coordinate[below=8.2cm of timeint] (O); 
+      \coordinate[below=8.8cm of timeint] (P);     
+                  
+      \node[green, right=0.6cm of K] (prandtlfluxes) {prandtl\_fluxes};    
+      \node[yellow, right=0.6cm of L, text width=14em] (useractions3) {\textcolor{blue}{user\_actions\_(\textit{'after\_integration'})}};             
+      \node[green, right=0.6cm of M] (diffusivities) {diffusivities};              
+      \node[green, right=0.0cm of diffusivities] {check\_for\_restart};      
+      \node[green, right=0.6cm of N] (flowstat) {flow\_statistics};
+      \node[green, right=0.0cm of flowstat] (runcontrol) {run\_control};  
+      \node[yellow, below=0.2cm of flowstat] (userstat) {user\_statistics};  
+      \node[yellow, right=0.6cm of O, text width=14em] (useractions4) {\textcolor{blue}{user\_actions\_(\textit{'after\_timestep'})}}; 
+      \node[green, right=0.6cm of P] (timestep) {timestep};             
+
+      \node[green, right=0.2cm of runcontrol] (dataoutput) {data\_output\_***};
+      \node[yellow, right=0.2cm of dataoutput] (userdvrpcoltab) {user\_dvrp\_coltab};
+      \coordinate[below=0.2cm of dataoutput] (Q);   
+      \coordinate[right=0.4cm of Q] (R);   
+      \coordinate[right=3.0cm of R] (S); 
+          
+      \node[yellow, below=0.2cm of R, text width=9em] (output2d) {user\_data\_output\_2d};
+      \node[yellow, below=0.2cm of S, text width=9em] (output3d) {user\_data\_output\_3d};
+      
+
+
+      \draw[dotted, thick] (0,0.05) -- (0,0.3);
+      \draw[-, thick] (0,0.05) -- (0,-8.8);
+      \draw[dotted, thick] (0,-9.2) -- (0,-8.8);
+      \draw[-, thick] (A) -- (timeint);
+      \draw[-, thick] (timeint) -- (P);
+      \draw[-, thick] (B) -- (useractions1);
+      \draw[-, thick] (C) -- (D);
+      \draw[-, thick] (progeq) -- (D);      
+      \draw[-, thick, color=red] (D) -- (E); 
+      \draw[->, thick, color=red] (E) -- (progeqfast);        
+      \draw[-, thick] (progframe) -- (useractions2); 
+      \draw[-, thick] (F) -- (advecparticles);    
+      \draw[-, thick] (userparticlesattributes) -- (advecparticles);   
+      \draw[-, thick] (G) -- (exchangehoriz);
+      \draw[-, thick] (H) -- (swaptimelevel);
+      \draw[-, thick] (I) -- (pres);     
+      \draw[dotted, thick] (pres) -- (J);
+      \draw[-, thick] (K) -- (prandtlfluxes);   
+      \draw[-, thick] (L) -- (useractions3);     
+      \draw[-, thick] (M) -- (diffusivities);  
+      \draw[-, thick] (N) -- (flowstat);  
+      \draw[-, thick] (userstat) -- (flowstat);  
+      \draw[-, thick] (O) -- (useractions4); 
+      \draw[-, thick] (P) -- (timestep);   
+      \draw[-, thick] (dataoutput) -- (Q); 
+      \draw[-, thick] (S) -- (Q); 
+      \draw[-, thick] (R) -- (output2d); 
+      \draw[-, thick] (S) -- (output3d); 
+   \end{tikzpicture}
+\end{frame}
+
+
+% Folie 7
+\begin{frame}
+   \frametitle{Embedding of User-Interface Routines\\
+   Flow Chart Overview (III): Final Steps}
+   \scriptsize
+   \begin{tikzpicture}[scale=0.8, transform shape]
+      % Define colours
+      \tikzstyle{green} = [draw, fill=green!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{yellow} = [draw, fill=yellow!30, text width=7.1em, text centered, minimum height=1.6em]
+      \tikzstyle{orange} = [draw, fill=orange!60, text width=7.1em, text centered]
+      
+      % Define coordinates and draw nodes      
+      \node[green, text width=5em] (PALM) at (0,0.1) {PALM};
+
+      \coordinate (A) at (0,-0.7);
+
+
+      \node[orange, right=0.6cm of A] (timeint) {time\_integration};       
+      \coordinate[below=0.5cm of timeint] (B);
+      \coordinate[below=1.0cm of timeint] (C);   
+     
+      \coordinate[below=2.5cm of PALM] (D);  
+     
+      \node[green, right=0.6cm of D] (write3dbinary) {write\_3d\_binary};
+      \node[green, right=0.9cm of write3dbinary] (writevarlist) {write\_var\_list};   
+        
+      \coordinate[below=3.5cm of PALM] (E); 
+      \coordinate[below=4.1cm of PALM] (F); 
+      \coordinate[below=4.7cm of PALM] (G); 
+      \node[green, right=0.6cm of E] (header) {header};      
+      \node[yellow, right=0.6cm of F] (userlastactions) {user\_last\_actions};    
+      \node[green, right=0.6cm of G] (cpustat) {cpu\_statistics};                
+      % Draw lines
+      \draw[-, thick] (PALM) -- (G); 
+      \draw[-, thick] (A) -- (timeint);
+      \draw[-, thick] (B) -- (timeint);
+      \draw[dotted, thick] (B) -- (C);
+      \draw[dashed, thick] (D) -- (write3dbinary);
+      \draw[-, thick] (write3dbinary) -- (writevarlist);
+      \draw[-, thick] (E) -- (header);
+      \draw[-, thick] (F) -- (userlastactions);
+      \draw[-, thick] (G) -- (cpustat);
+
+   \end{tikzpicture}
+\end{frame}
+
+% Folie 8
+\begin{frame}
+   \frametitle{Complete List of User-Interface Routines (I)}
+   \tiny
+   \begin{tabular}{|p{2.5cm}|p{2.4cm}|p{2.1cm}|p{3cm}|}
+      \hline
+	   \textbf{Name} & \textbf{Arguments} & \textbf{Called from} & \textbf{Task}\\
+	   \hline
+	   \texttt{user\_3d\_data\_averaging} & \texttt{mode}, \texttt{variable} & \texttt{sum\_up\_3d\_data} & temporal averaging for user-defined quantities\\
+	   \hline
+	   \texttt{user\_actions} \texttt{user\_actions} & \texttt{location} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \texttt{i}, \texttt{j}, \texttt{location} & \texttt{time\_integration} +
+\texttt{prognostic\_equations} & e.g. additional forces to be included in the prognostic equations\\
+	   \hline
+	   \texttt{user\_dummy (user\_additional \_routines.f90)} & - - - & - - - & for additional subroutines defined by the user\\
+	   \hline
+	   \texttt{user\_advec\_particles} & - - - & \texttt{advec\_particles} & modification of particles after advection\\
+	   \hline
+	   \texttt{user\_check\_data\_output} & \texttt{variable}, \texttt{unit} & \texttt{check\_parameters} & check the user-defined output quantities\\
+	   \hline
+	   \texttt{user\_check\_data\_output\_pr} & \texttt{variable}, \texttt{var\_count}, \texttt{unit} & \texttt{check\_parameters} & check the user-defined profile output quantities\\
+	   \hline
+	   \texttt{user\_check\_parameters} & - - - & \texttt{check\_parameters} & check user-defined variables\\
+	   \hline	   
+	   \texttt{user\_data\_output\_2d} & \texttt{av}, \texttt{variable}, \texttt{found}, \texttt{grid}, \texttt{local\_pf} & \texttt{data\_output\_2d} & output/calculation of additional user-defined quantities\\	
+	   \hline	   
+	   \texttt{user\_data\_output\_3d} & \texttt{av}, \texttt{variable}, \texttt{found}, \texttt{local\_pf}, \texttt{nz\_do} & \texttt{data\_output\_3d} & output/calculation of additional user-defined quantities\\
+	   \hline	   
+	   \texttt{user\_data\_output\_dvrp} & \texttt{output\_variable}, \texttt{local\_pf} & \texttt{data\_output\_dvrp} & output of additional user-defined quantities\\
+	   \hline
+	   \texttt{user\_data\_output\_mask} & \texttt{av}, \texttt{variable}, \texttt{found}, \texttt{local\_pf} & \texttt{data\_output\_mask} & output of additional masked user-defined quantities\\
+	   \hline
+	   \texttt{user\_define\_netcdf\_grid} & \texttt{variable}, \texttt{found}, \texttt{grid\_x}, \texttt{grid\_y}, \texttt{grid\_z} & \texttt{netcdf} & defining the grid for additional output quantities\\
+	   \hline
+	   \texttt{user\_dvrp\_coltab} & \texttt{mode}, \texttt{variable} & \texttt{data\_output\_dvrp} & defining color tables for particles\\   
+	   \hline	   
+   \end{tabular}
+
+\end{frame}
+
+% Folie 9
+\begin{frame}
+   \frametitle{Complete List of User-Interface Routines (II)}
+   \tiny
+   \ \\
+   \begin{tabular}{|p{2.5cm}|p{2.4cm}|p{2.1cm}|p{3cm}|}
+      \hline
+	   \textbf{Name} & \textbf{Arguments} & \textbf{Called from} & \textbf{Task}\\
+	   \hline
+	   \texttt{user\_header} & \texttt{io} & \texttt{header} & output user variables to header\\
+	   \hline
+	   \texttt{user\_init} & - - - & \texttt{init\_3d\_model} & e.g. reading from restart file\\
+	   \hline
+	   \texttt{user\_init\_3d\_model} & - - - & \texttt{init\_3d\_model} & special initializations\\
+	   \hline
+	   \texttt{user\_init\_grid} & \texttt{gls}, \texttt{nzb\_local} & \texttt{init\_grid} & defining a special topography\\
+	   \hline	   
+	   \texttt{user\_init\_particles} & - - - & \texttt{init\_particles} & defining initial particle sources\\
+	   \hline	   	   
+	   \texttt{user\_init\_plant\_canopy} & - - - & \texttt{init\_3d\_model} & setting of leaf area density and canopy drag coefficient\\
+	   \hline
+	   \texttt{user\_last\_actions} & - - - & \texttt{palm} & e.g. output for restart runs\\
+	   \hline	   
+	   \texttt{MODULE user (user\_module.f90)} & - - - & - - - & contains user defined variables\\
+	   \hline		   
+	   \texttt{user\_parin} &  & \texttt{parin} & reading user variables\\	   
+	   \hline	   
+	   \texttt{user\_particle\_attributes} & - - - & \texttt{advec\_particles} & defining particles attributes\\	   
+	   \hline
+	   \texttt{user\_read\_restart\_data} & \texttt{i}, \texttt{nxlfa}, \texttt{nxl\_on\_file}, \texttt{nxrfa}, \texttt{nxr\_on\_file}, \texttt{nynfa}, \texttt{nyn\_on\_file}, \texttt{nysfa}, \texttt{nys\_on\_file}, \texttt{offset\_xa}, \texttt{offset\_ya}, \texttt{overlap\_count}, \texttt{tmp\_2d}, \texttt{tmp\_3d} & \texttt{read\_3d\_binary} & reading user-defined 2d/3d-arrays from the restart file\\	   
+	   \hline		   
+	   \texttt{user\_spectra} & \texttt{mode}, \texttt{m}, \texttt{pr} & \texttt{data\_output\_spectra} & output/calculation of additional user-defined quantities\\	   
+	   \hline	   
+	   \texttt{user\_statistics} & \texttt{mode}, \texttt{sr}, \texttt{tn} & \texttt{flow\_statistics} & calculating additional horizontal averages + time series quantities\\		
+	   \hline	      
+   \end{tabular}
+   \ \\
+   \ \\
+   See PALM online documentation under \\
+   \textbf{http://palm.muk.uni-hannover.de/wiki/doc/app/userint}\\
+   for detailed explanations.
+
+\end{frame}
+
+% Folie 10
+\begin{frame}
+   \frametitle{Data Access / Exchange}
+   \footnotesize
+   \begin{itemize}
+      \item<2-> \textbf{Between the standard PALM code and the user-interface:}\\
+      \begin{itemize}
+         \scriptsize
+         \item<3-> by including the respective PALM modules in the user-interface subroutines.\\
+         \begin{center}
+            \includegraphics[scale=0.3]{user_defined_code_figures/data_access_exchange.png}
+         \end{center} 
+      \end{itemize}
+      \item<4-> \textbf{Within the user-interface:}
+      \begin{itemize}
+         \scriptsize
+         \item by the module \texttt{\textcolor{red}{user}} (file \texttt{user\underline{ }module.f90}),  which is used in every subroutine included in the interface.\\ \textbf{This module is (and should be) never used in the standard PALM code, in order to avoid data flow from the user interface to the\\ PALM default code!}
+      \end{itemize}
+   \end{itemize}
+
+\end{frame}
+
+% Folie 11
+\begin{frame}
+   \frametitle{Usage of \texttt{user\underline{ }actions} (I)}
+   \scriptsize
+   \begin{itemize}
+      \item<1-> \texttt{user\underline{ }actions} is designed to add additional terms to the prognostic equations or to carry out special actions at the beginning or the end of each timestep.
+      \vspace{2mm}
+      \item<2-> Therefore, several calls of \texttt{user\underline{ }actions} can be found in the default PALM routines \texttt{time\underline{ }integration} and \texttt{prognostic\underline{ }equations}. The place from which it is called is communicated to the routine by a string-argument, e.g.\\
+   \ \\
+   \quad \texttt{CALL user\underline{ }actions ( 'u-tendency' )}\\
+   \ \\
+	\onslide<3-> It means that this call is from a place within \texttt{prognostic\underline{ }equations}, where the tendencies for the u-component are calculated and integrated:
+   \end{itemize}
+   \vspace{-2mm}
+   \begin{center}
+      \includegraphics[scale=0.33]{user_defined_code_figures/user_actions_1.png}
+   \end{center}
+\end{frame}
+
+% Folie 12
+\begin{frame}
+   \frametitle{Usage of \texttt{user\underline{ }actions} (II)}
+   \scriptsize
+   \begin{itemize}
+      \item Additional tendencies have to be included by the user at the respective code line in \texttt{user\underline{ }actions}:
+   \end{itemize}
+   \begin{center}
+      \includegraphics[scale=0.35]{user_defined_code_figures/user_actions_2.png}
+   \end{center}
+\end{frame}
+
+% Folie 13
+\begin{frame}[t]
+   \frametitle{Usage of \texttt{user\underline{ }actions} (III)}
+   \scriptsize
+   \begin{columns}[T]
+      \begin{column}{1.15\textwidth}
+         \begin{itemize}
+            \item<1-> The different versions of \texttt{prognostic\underline{ }equations} (\texttt{prognostic\underline{ }equations\underline{ }cache}, \texttt{prognostic\underline{ }equations\underline{ }vector}) contain different calls of \texttt{user\underline{ }actions}:
+            \item<2-> From \texttt{prognostic\underline{ }equations\underline{ }vector}: \hspace{0.6em}\texttt{CALL user\underline{ }actions ( 'u-tendency' )}
+            \item<3-> From \texttt{prognostic\underline{ }equations},\\
+            \texttt{prognostic\underline{ }equations\underline{ }cache}:\hspace{4em}\texttt{CALL user\underline{ }actions ( i, j, 'u-tendency' )}
+            \vspace{3mm}
+            \item<4-> In case that \texttt{prognostic\underline{ }equations}\\
+            \texttt{prognostic\underline{ }equations\underline{ }cache} are\\
+            used, the user has to add his code in\\
+            the interface routine\\
+            \texttt{user\underline{ }actions\underline{ }ij}:
+            \vspace{3mm}
+            \item<5-> Here, only the \texttt{k}-loop (vertical direction)\\
+            has to be used, because loops over\\
+            i and j are carried out in\\
+            \texttt{prognostic\underline{ }equations\underline{ }cache}.
+         \end{itemize}
+      \end{column}
+   \end{columns}
+  
+   \uncover<4->{%
+   \begin{tikzpicture}[remember picture, overlay]
+      \node [shift={(8.3 cm,3.0cm)}]  at (current page.south west)
+         {%
+         \begin{tikzpicture}[remember picture, overlay]
+            \node[text width=14em] at (0,0) {\includegraphics[scale=0.3]{user_defined_code_figures/user_actions_3.png}};
+         \end{tikzpicture}
+         };
+    \end{tikzpicture}}
+   
+\end{frame}
+
+% Folie 14
+\begin{frame}
+   \frametitle{Steering the User-Interface}
+   \scriptsize
+   \begin{columns}[T]
+      \begin{column}{1.1\textwidth}
+         For steering the user-interface code, the user may want to add some additional variables and set their respective values within the parameter-file (e.g. \texttt{example\underline{ }cbl\underline{ }p3d}). This requires the following actions (example for a variable named \texttt{foo}):
+      \end{column}
+   \end{columns}
+   \vspace{1mm}
+      \begin{enumerate}
+         \item<1-> Add the variable name to module \texttt{user} in order to define it and to make it available in all user-interface subroutines. Set a default value for this variable.
+         \begin{center}
+            \includegraphics[scale=0.3]{user_defined_code_figures/steering_1.png}
+         \end{center}
+         \vspace{1mm}
+         \item<2-> Add the variable to the NAMELIST \texttt{/userpar/}. This NAMELIST already contains four predefined variables.
+         \begin{center}
+            \includegraphics[scale=0.3]{user_defined_code_figures/steering_2.png}
+         \end{center}
+         \vspace{1mm}
+         \item<3-> Add the NAMELIST \texttt{\&userpar} to the parameter file (e.g. \texttt{example\underline{ }cbl\underline{ }p3d}) and assign a value to this variable.         
+         \begin{center}
+            \includegraphics[scale=0.3]{user_defined_code_figures/steering_1.png}
+         \end{center}
+         \vspace{1mm}
+         \item<4-> Output the variable's value using \texttt{user\underline{ }header}.
+      \end{enumerate}
+      
+
+\end{frame}
+
+% Folie 15
+\begin{frame}
+   \frametitle{User-Defined Output}
+   \scriptsize
+   \begin{itemize}
+      \item<2-> A very typical request of users is the calculation and output of quantities which are not part of PALM's standard output (e.g. a 3D-array of the resolved-scale vertical heat (temperature) flux).
+      \vspace{2mm}
+      \item<3-> The default user interface includes a number of subroutines which allow the calculation of user-defined quantities and output of these quantities as profiles, timeseries, 2d cross section or 3d volume data. These are e.g.\\
+      \texttt{user\underline{ }check\underline{ }data\underline{ }output}, \texttt{user\underline{ }check\underline{ }data\underline{ }output\underline{ }pr},\\
+      \texttt{user\underline{ }define\underline{ }netcdf\underline{ }grid}, \texttt{user\underline{ }statistics},\\
+      \texttt{user\underline{ }3d\underline{ }data\underline{ }averaging}, \texttt{user\underline{ }data\underline{ }output\underline{ }2d},\\
+      \texttt{user\underline{ }data\underline{ }output\underline{ }3d}.
+      \vspace{2mm}
+      \item<4-> The respective subroutines contain, as an example, code lines (written as comment lines) for calculating and output the square of the u-component velocity.
+      \vspace{2mm}
+      \item<5-> These quantities are output to PALMâs standard netCDF files, i.e.\\ \texttt{DATA\underline{ }1D\underline{ }PR\underline{ }NETCDF}, \texttt{DATA\underline{ }1D\underline{ }TS\underline{ }NETCDF}, \texttt{DATA\underline{ }2D\underline{ }XY\underline{ }NETCDF} or \texttt{DATA\underline{ }3D\underline{ }NETCDF}.
+      \vspace{2mm}
+      \item<6-> The online documentation gives very detailed instructions about how to modify the interface in order to output user-defined quantities under\\
+      \vspace{1mm}
+      \textbf{http://palm.muk.uni-hannover.de/wiki/doc/app/userint/output}
+   \end{itemize}
+\end{frame}
+
+% Folie 16
+\begin{frame}
+   \frametitle{User-Defined Data for Restart Runs (I)}
+   \scriptsize
+   \begin{itemize}
+      \item It might be neccessary to save the values of user-defined variables at the end of a model run in order to use them for a restart run.\\
+      \ \\
+      This can be done using the routine \texttt{user\underline{ }last\underline{ }actions}.\\
+      \grqq \texttt{14}\grqq\, is the file-id for the restart file (local filename \texttt{BINOUT}):
+   \end{itemize}
+   \begin{center}
+      \includegraphics[scale=0.3]{user_defined_code_figures/restart_1.png}
+   \end{center}
+\end{frame}
+
+% Folie 17
+\begin{frame}
+   \frametitle{User-Defined Data for Restart Runs (II)}
+   \scriptsize
+   \begin{itemize}
+      \item Additionally, these variables have to be read from the restart file (file-id \grqq \texttt{13}\grqq\,, local filename \texttt{BININ}) by adding code to the routine \texttt{user\underline{ }read\underline{ }restart\underline{ }data}:
+   \end{itemize}
+   \begin{center}
+      \includegraphics[scale=0.3]{user_defined_code_figures/restart_2.png}
+   \end{center}
+\end{frame}
+
+% Folie 18
+\begin{frame}
+   \frametitle{Using the User-Interface with \texttt{mrun}}
+   \scriptsize
+   \begin{columns}[T]
+      \begin{column}{1.1\textwidth}
+         \vspace{-1mm}
+         \textbf{Users can add their own (modified) user-interface to a PALM-run by carrying out the following steps:}
+         \begin{enumerate}
+            \item<2-> Copy the default (empty) user-interface files that you need (e.g. user\underline{ }module.f90, user\underline{ }parin.f90, user\underline{ }actions.f90) to a directory of your choice, e.g.:\\
+            \tiny
+	         \quad \texttt{cd \~{ }/palm/current\underline{ }version}\\
+	         \quad \texttt{mkdir -p USER\underline{ }CODE/example\underline{ }cbl}\\
+	         \quad \texttt{cp trunk/SOURCE/user\underline{ }module.f90  USER\underline{ }CODE/example\underline{ }cbl/user\underline{ }module.f90}\\
+	         \quad \texttt{cp trunk/SOURCE/user\underline{ }parin.f90\hspace{1em}USER\underline{ }CODE/example\underline{ }cbl/user\underline{ }parin.f90}\\
+            \quad \texttt{...}
+            \scriptsize
+            \vspace{-1mm}
+            \item<3-> Set an additional path in the configuration file \texttt{.mrun.config} to allow \texttt{mrun} to find and include this file:\\
+            \tiny
+	         \quad \texttt{\%add\underline{ }source\underline{ }path \hspace{1em} \$base\underline{ }directory/USER\underline{ }CODE/\$fname}
+	         \scriptsize
+	         \item<4-> Modify the interface routines according to your needs.
+	         \item<5-> Start a PALM run by executing\\
+	         \tiny
+	         \quad	\texttt{mrun -d example\underline{ }cbl ...}\\
+	         \scriptsize
+	         The files user\underline{ }*.f90 will be automatically compiled within the job / interactive run and will replace the respective PALM default user-interface files.
+	      \end{enumerate}
+	      \vspace{-2mm}
+         \begin{itemize}
+	         \item<6-> \textbf{The modified user-interface file cannot be pre-compiled by using} \texttt{mbuild}!
+	         \item<7-> The above method allows to use different user-interfaces for different runs. Just store the respective interface-files in subdirectories \texttt{USER\underline{ }CODE/abcd}, \texttt{USER\underline{ }CODE/cdef}, etc. and start \texttt{mrun} with option \grqq \texttt{-d abcd}\grqq, \grqq \texttt{-d cdef}\grqq, etc.
+         \end{itemize}
+
+      \end{column}
+   \end{columns} 
+   
+\end{frame}
+
+\end{document}
