Changeset 1532


Ignore:
Timestamp:
Jan 26, 2015 1:59:17 PM (10 years ago)
Author:
hoffmann
Message:

updated tutorial (ncl, particle model), new exercise (bulk cloud physics)

Location:
palm/trunk/TUTORIAL/SOURCE
Files:
12 added
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/TUTORIAL/SOURCE/ncl.tex

    r1515 r1532  
    11%$Id$
    22\input{header_tmp.tex}
    3 %\input{../header_lectures.tex}
     3%\input{header_lectures.tex}
    44
    55\usepackage[utf8]{inputenc}
    66\usepackage{ngerman}
    77\usepackage{pgf}
    8 \usetheme{Dresden}
    98\usepackage{subfigure}
    109\usepackage{units}
     
    2827        \ttfamily,showstringspaces=false,captionpos=b}
    2928
    30 \institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÀt Hannover}
     29\institute{Institute of Meteorology and Climatology, Leibniz Universit{\"a}t Hannover}
     30\selectlanguage{english}
    3131\date{last update: \today}
    3232\event{PALM Seminar}
     
    4848
    4949\title[Introduction to NCL]{Introduction to NCL}
    50 \author{Siegfried Raasch}
     50\author{PALM group}
    5151
    5252\begin{document}
     
    6767           \item<1-> There are several ways how you can visualize netCDF data
    6868           \item<1-> If you are lacking experience in the visualization of netCDF data or if you have not yet found your favourite way how to visualize netCDF data, here is one recommendation:
    69       \item<2-> NCL – The \textbf{N}CAR \textbf{C}ommand \textbf{L}anguage
    70       \item<2-> Developed by the Computational \& Information Systems Laboratory at the NCAR (continuously updated)
     69           
     70           \begin{center}NCL -- The \textbf{N}CAR \textbf{C}ommand \textbf{L}anguage\end{center}
     71      \item<2-> Developed at the NCAR (and continuously updated)
    7172      \item<2-> Detailed information is available under http://www.ncl.ucar.edu
    7273      \item<3-> With the information revealed in this talk you will be able to visualize the output of this week's simulations
     
    8283                data processing and visualization, freely available
    8384      \item<2-> Portable: it is running on many different operating systems
    84                 including AIX, Linux, MacOSX, Cygwin/Windows
    85       \item<3-> It's a powerful tool for file input and output, visualization
    86                 and data analysis (but please \textbf{avoid the excessive usage
    87                 of loops}, as NCL is an interpreted language) $\rightarrow$
    88                 integrated processing environment
    89    \end{itemize} 
    90    \centering
    91    \onslide<3-> \includegraphics[scale=0.28]{ncl_figures/ncl.png}
     85                including Linux, Mac OS X, Windows, ...
     86      \item<3-> It's a powerful tool for file input and output, visualization and data analysis $\rightarrow$ integrated processing environment
     87      \vspace{-0.2cm}
     88                  \begin{center}
     89                   \onslide<3-> \includegraphics[scale=0.315]{ncl_figures/ncl.png}
     90                   \end{center}
     91      \end{itemize} 
     92
    9293   
    9394\end{frame}
     
    9899   \small
    99100   \begin{itemize}     
    100            \item<1-> Supports calling C and FORTRAN extended routines
     101           \item<1-> Supports calling of C and FORTRAN routines
    101102           \item<1-> Over 600 functions and procedures for visualization and
    102103                     data analysis are provided with NCL
    103            \item<2-> Interactive mode: \texttt{\$ ncl}\\
    104       \texttt{ncl 0>}
    105       \item<3-> each line is interpreted as it is entered
    106       \item<4-> Batch mode: \texttt{\$ ncl ncl\underline{ }script.ncl}\\
    107       interpreter of complete scripts, variables within the NCL script can\\
    108       be steered by providing additional parameters with the ncl call\\
    109       \texttt{\$ ncl ncl\underline{ }script.ncl parameter1=value}
    110       \texttt{'parameter2=\dq string\dq ' ...}
     104           \item<2-> \textbf{Interactive mode}: \texttt{\$ ncl}\\         
     105      \hspace{2.95cm}\texttt{ncl 0> ...}
     106      \item<2-> Each line is interpreted as it is entered
     107      \item<3-> \textbf{Batch mode}: \texttt{\$ ncl ncl\underline{ }script.ncl}
     108      \item<3-> Interpreter of complete scripts, variables within the NCL script can be steered by providing additional parameters with the NCL call:\\
     109      \texttt{\$ ncl ncl\underline{ }script.ncl parameter1=value ...}
     110       \item<4-> Since NCL is an interpreted language, \textbf{the excessive usage of loops seriously decrease the performance of NCL!}
    111111   \end{itemize} 
    112112
     
    121121           \begin{itemize}   
    122122              \footnotesize
    123               \item<1-> data types
     123              \item<1-> data types (float, double, integer, logical, ...)
    124124              \item<1-> variables
    125125              \item<1-> operators
    126126              \item<1-> expressions
    127127              \item<1-> loops
    128               \item<1-> functions/procedures/graphics
     128              \item<1-> functions and procedures (e.g., \texttt{dim\_stat4(data\_array)})
    129129      \end{itemize} 
    130130           \item<2-> Features
    131131           \begin{itemize}   
    132132              \footnotesize
    133               \item<2-> query / manipulate meta data
    134               \item<2-> import data in a variety of formats
     133              \item<2-> manipulate meta data
     134              \item<2-> import data in a variety of formats (netCDF, ASCII, ...)
    135135              \item<2-> array syntax / operations
    136136              \item<2-> can use user FORTRAN/C codes and commercial libraries
     
    146146   \small
    147147   \begin{itemize}     
    148       \item<1-> Detailed information is available under\\
     148      \item<1-> Detailed information is available under:\\
    149149                \underline{http://www.ncl.ucar.edu/Download/index.shtml}
    150       \item<1-> Request an Earth System Grid account
     150      \item<1-> For downloading, request an Earth System Grid account:\\
    151151                \underline{http://www.earthsystemgrid.org/}
    152152      \item<2-> Download the appropriate binaries e.g. \texttt{A.tar.gz}
     
    154154      \item<2-> \texttt{\% gunzip \$HOME/A.tar.gz}
    155155      \item<2-> \texttt{\% mkdir -p /usr/local}\\
    156       \quad \texttt{\% cd /usr/local}\\
    157       \quad \texttt{\% tar -xvf \$HOME/A.tar}
     156      \texttt{\% cd /usr/local}\\
     157      \texttt{\% tar -xvf \$HOME/A.tar}
    158158   \end{itemize} 
    159159
     
    166166   \begin{itemize}     
    167167      \item<1-> Set the \texttt{NCARG\underline{ }ROOT} environment variable and
    168                 your search path to where NCL/NCARG resides\\
     168                your search path to where NCL/NCARG resides:\\
    169169                csh: \texttt{setenv NCARG\underline{ }ROOT /usr/local/}\\
    170170                \hspace{1.6em} \texttt{setenv PATH /usr/local/bin:\$PATH}\\
     
    173173      \vspace{3mm}
    174174      \item<2-> Set the DISPLAY environment variable to indicate where to
    175                 display graphics as for any X11 Windows application that you
    176                 run\\
    177                 e.g. ksh: \texttt{export DISPLAY=localhost:13.0}, or use
    178                 \texttt{ssh -X} to tunnel X-communication.\\
     175                display graphics (as for any X11 Windows application that you
     176                run):\\
     177                ksh: \texttt{export DISPLAY=localhost:13.0}, \\
     178                or use \texttt{ssh -X} to tunnel X-communication
    179179      \vspace{3mm}
    180       \item<3-> Test your NCL installation\\
    181                 \quad \texttt{\% ng4ex gsun01}\\
    182                 NCL script gsun01n.ncl is copied to your working directory and
    183                 run through NCL. An X11 window should pop up.
     180      \item<3-> Test your NCL installation:\\
     181                \quad \texttt{\% ng4ex gsun01n}\\
     182                The NCL script gsun01n.ncl is copied to your working directory and
     183                executed by NCL. An X11 window should pop up.
    184184   \end{itemize} 
    185185
     
    191191   \footnotesize
    192192   \begin{itemize}     
    193       \item<1-> Together with the PALM installation you have also received four NCL scripts, a configuration file and a manual; they can be found in the directory\\
     193      \item<1-> Together with the PALM installation you have also received four NCL scripts, a configuration file and a manual; they can be found in the directory:\\
    194194                \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS/NCL/}
    195195      \item<2-> All standard netCDF data output of PALM can be visualized by one
     
    198198                   \scriptsize
    199199                   \item[-]<2-> \texttt{cross\underline{ }sections.ncl}
    200                                 (2D/3D data, e.g. contour or vector plots)
    201                    \item[-]<2-> \texttt{profiles.ncl} (profile data)
     200                                (contour or vector plots from 2D/3D data)
     201                   \item[-]<2-> \texttt{profiles.ncl} (profiles from profiles/3D data)
    202202                   \item[-]<2-> \texttt{timeseries.ncl} (time series data)
    203203                   \item[-]<2-> \texttt{spectra.ncl} (spectra data)
    204204                \end{itemize} 
    205205      \item<3-> To run these NCL scripts you can use the shell script
    206                 \texttt{palmplot} which can be found in the directory\\
     206                \texttt{palmplot} which can be found in the directory:\\
    207207                \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS}
    208208      \item<4-> The output of the plots can be changed with several parameters;
     
    218218   \frametitle{NCL Scripts Delivered with PALM (II)}
    219219
    220    Using \texttt{.ncl.config}
    221    \small
    222    \begin{itemize}     
    223       \item[-]<1-> Please create a personal configuration file by copying
     220   Using \texttt{.ncl.config}:
     221   \small
     222   \begin{itemize}     
     223      \item<1-> Please create a personal configuration file by copying
    224224                   the default configuration file
    225225                   \texttt{.ncl.config.default} to the PALM working
    226226                   directory \texttt{\$HOME/palm/current\underline{ }version}
    227227                   and naming it \texttt{.ncl.config}
    228       \item[-]<2-> \texttt{.ncl.config} is used by NCL directly, thus the
     228      \item<2-> \texttt{.ncl.config} is used by NCL directly, thus the
    229229                   parameters have to be written according to the rules of the
    230230                   scripting language NCL
    231       \item[-]<3-> The configuration file contains all steering parameters with
     231      \item<3-> The configuration file contains all steering parameters with
    232232                   a short description and can be adjusted to personal needs
    233233   \end{itemize} 
     
    242242   \footnotesize
    243243   \begin{itemize}     
    244       \item[-]<1-> The shell script is used as follows:\\
     244      \item<1-> The shell script is used as follows:\\
    245245                   \texttt{palmplot <plot\underline{ }identifier>}
    246       \item[-]<1-> \texttt{<plot\underline{ }identifier>} has to be \texttt{xy},
     246      \item<1-> \texttt{<plot\underline{ }identifier>} has to be \texttt{xy},
    247247                   \texttt{xz}, \texttt{yz}, \texttt{pr}, \texttt{sp} or
    248248                   \texttt{ts} depending on the data to be plotted
     
    250250   \vspace{3mm}
    251251   \onslide<2->
     252   \begin{center}
    252253      \begin{tabular}{ccc}
    253254         \textbf{plot\underline{ }identifier} & \textbf{data used} & \textbf{ncl script}\\
    254          xy & instantaneous or time-averaged xy or 3D data & cross\underline{ }sections.ncl\\
    255          xz & instantaneous or time-averaged xz or 3D data & cross\underline{ }sections.ncl\\
    256          yz & instantaneous or time-averaged yz or 3D data & cross\underline{ }sections.ncl\\
     255         xy & xy or 3D data & cross\underline{ }sections.ncl\\
     256         xz & xz or 3D data & cross\underline{ }sections.ncl\\
     257         yz & yz or 3D data & cross\underline{ }sections.ncl\\
    257258         pr & profile or 3D data & profiles.ncl\\
    258259         sp & spectra data & spectra.ncl\\
    259260         ts & time series data & timeseries.ncl\\
    260261   \end{tabular}
     262   \end{center}
    261263
    262264\end{frame}
     
    269271   \footnotesize
    270272   \begin{itemize}     
    271       \item[-]<1-> To change the output of the plot you can also use:\\
     273      \item<1-> To change the output of the plot you can also use the prompt:\\
    272274                   \scriptsize
    273275                   \texttt{palmplot \textbf{plot\underline{ }identifier}
    274                    parameter=value parameter=string ...}
     276                   parameter=value parameter='string' ...}
    275277      \footnotesize \\
    276278      \vspace{2mm}
    277       \item[-]<2-> A list of all available parameters can be found in the
     279      \item<2-> A list of all available parameters can be found in the
    278280                   configuration file \texttt{.ncl.config} or in the
    279281                   documentation:\\
    280282                   \uncover<3->{\texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist}}\\
    281283      \vspace{2mm}
    282       \item[-]<4-> Parameters specified in the prompt override parameters given
     284      \item<4-> Parameters specified in the prompt override parameters given
    283285                   in the configuration file\\
    284286      \vspace{2mm}
    285       \item[-]<5-> String parameters which can contain lists (\texttt{var},
     287      \item<5-> String parameters which can contain lists (\texttt{var},
    286288                   \texttt{c\underline{ }var}, \texttt{vec1}, \texttt{vec2},
    287289                   \texttt{plotvec}) have to be set in single quotes and the
     
    289291                   \texttt{var='pt u w'}\\
    290292      \vspace{2mm}
    291       \item[-]<6-> A short introduction for using the shell script is given by
     293      \item<6-> A short introduction for using the shell script is given by
    292294                   typing\\
    293295                   \texttt{palmplot ?}
     
    304306      \item<1-> Starting the example run with the command\\
    305307                \vspace{2mm}
    306                 \texttt{mrun -d example\underline{ }cbl ... -r
     308                \hspace{0.5cm}\texttt{mrun -d example\underline{ }cbl ... -r
    307309                        'd3\# pr\# ts\# xy\# xz\#'}\\
    308310                \vspace{2mm}
    309                 results in the following output files in\\
     311                results in the following output files
     312               
     313                \hspace{0.5cm}\texttt{example\underline{ }cbl\underline{ }pr.nc}, \texttt{example\underline{ }cbl\underline{ }xy.nc},\\
     314                 \hspace{0.5cm}\texttt{example\underline{ }cbl\underline{ }xz.nc}, \texttt{example\underline{ }cbl\underline{ }ts.nc}
     315               
     316                located in
     317               
     318                \hspace{0.5cm}\texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}
     319
     320               
     321      \item<2-> Example: Visualization of time series data\\
    310322                \vspace{2mm}
    311                 \texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}:\\
    312                 \texttt{example\underline{ }cbl\underline{ }pr.nc}, \texttt{example\underline{ }cbl\underline{ }xy.nc}, \texttt{example\underline{ }cbl\underline{ }xz.nc},\\
    313                 \texttt{example\underline{ }cbl\underline{ }ts.nc}
    314       \item<2-> Example: Visualization of the time series data\\
    315                 \vspace{2mm}
    316                 Goal: Output as eps-file \texttt{timeseries.eps} (by default the
     323       \item<3-> Goal: Output the eps-file \texttt{timeseries.eps} (by default the
    317324                plot would be output to an X11 window)
    318325   \end{itemize}     
     
    327334   \begin{itemize}     
    328335      \item<1-> In order to reach the goal you can either ...
    329       \item<1-> ... Change to the directory\\
     336      \item<1-> ... change to the directory\\
    330337                \texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}\\
    331                 and use the shell script with the command\\
    332                 \vspace{2mm}
    333                 \texttt{palmplot ts file\underline{ }1=example\underline{ }cbl\underline{ }ts.nc format\underline{ }out=eps file\underline{ }out=timeseries}\\
    334                 \vspace{2mm}
    335                 Thus, the script \texttt{timeseries.ncl} is called and some of the parameters in the configuration file \texttt{.ncl.config} are directly set by specifying the related parameters in the command line,\\
    336                 \vspace{2mm}
    337                 \onslide<2-> e.g. \texttt{file\underline{ }1 = <netCDF file>}
    338                 \textbf{(Note: the input file has always to be specified!)}, \texttt{file\underline{ }out = <output file>}
     338                and use the shell script with the command:\\
     339                \hspace{0.5cm}\texttt{palmplot ts file\underline{ }1=example\underline{ }cbl\underline{ }ts.nc format\underline{ }out=eps}\\
     340                \hspace{0.5cm}\texttt{file\underline{ }out=timeseries}\\
     341                Thus, the script \texttt{timeseries.ncl} is called and some of the parameters in the configuration file \texttt{.ncl.config} are directly set by specifying the related parameters in the command line, e.\,g.,\\
     342                \onslide<2-> \hspace{0.5cm}\texttt{file\underline{ }1 = <netCDF file> file\underline{ }out = <output file>}
    339343   \end{itemize}     
    340344
     
    346350               Run (example\underline{ }cbl) (III)}
    347351   \footnotesize
    348    ... or you can modify the configuration file \texttt{.ncl.config}, e.g.\\
     352   \begin{itemize}
     353   \item<1-> ... or you can modify the configuration file \texttt{.ncl.config}, e.\,g.,\\
    349354   \vspace{2mm}
    350355   \texttt{if(.not. isvar(\dq file\underline{ }1\dq))then}\\
     
    355360   \vspace{2mm}
    356361\texttt{if(.not. isvar(\dq file\underline{ }1\dq))then}\\
    357    \quad \quad \texttt{file\underline{ }1 = \dq \$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/example\underline{ }cbl\underline{ }ts.nc\dq}\\
     362   \quad \quad \texttt{file\underline{ }1 = \dq \$HOME/palm/current\underline{ }version/JOBS/...}\\
     363   \hspace{+2.3cm}\texttt{...example\underline{ }cbl/OUTPUT/example\underline{ }cbl\underline{ }ts.nc\dq}\\
    358364   \texttt{end if}
    359 
     365\end{itemize}
    360366\end{frame}
    361367
     
    371377   \end{itemize}
    372378   \centering
    373    \onslide<2->\includegraphics[scale=0.25]{ncl_figures/vis1.png}
     379   \onslide<2->\includegraphics[scale=0.23]{ncl_figures/vis1.png}
    374380   
    375381\end{frame}
     
    381387   \footnotesize
    382388   \begin{itemize}
    383       \item<1-> If you only want to get the plot of the time series of one variable, e.g. the maximum of the velocity component u, you can add the command line parameter \texttt{var='umax'} or modify the configuration file respectively, e.g.\\
     389      \item<1-> If you only want to get the plot of the time series of just one variable, e.\,g., the maximum of the velocity component $u$, you can add the command line parameter \texttt{var='umax'} or modify the configuration file respectively, e.\,g.,\\
    384390      \vspace{2mm}
    385391      \texttt{if(.not. isvar(\dq var\dq ))then}\\
     
    387393      \texttt{end if}
    388394   \end{itemize}
     395   \vspace{+0.2cm}
    389396   \centering
    390397   \onslide<2->\includegraphics[scale=0.3]{ncl_figures/vis2.png}
     
    397404   \frametitle{Application Example: Visualization of the Output of the Example
    398405               Run (example\underline{ }cbl) (VI)}
    399    \footnotesize
    400    Plot profiles with the command\\
    401    \quad \texttt{palmplot pr file\underline{ }1=example\underline{ }cbl\underline{ }pr.nc}\\
    402    \vspace{3mm}
    403    Profiles of same dimension are plotted\\
    404    together, e.g. total, resolved and\\
    405    subgridscale temperature flux (default)\\
    406    \vspace{3mm}
    407    (This composition is written to the\\
    408    NetCDF header by the \texttt{d3par}\\
    409    parameter \texttt{cross\underline{ }profiles})\\
    410    \vspace{3mm}
    411    If you add the parameter var=all to\\
    412    the command, all profiles will be plotted\\
    413    separately
     406   %\footnotesize
     407   \begin{itemize}
     408   \item Plot profiles with the command\\
     409   \quad \texttt{palmplot pr}\\
     410   \quad \texttt{file\underline{ }1=example\underline{ }cbl\underline{ }pr.nc}
     411   \item Profiles of same dimension are\\
     412            plotted together, e.\,g., total, \\
     413            resolved and sub-grid scale \\
     414            temperature flux (default)
     415    \item If you add the parameter \\
     416            \texttt{var='all'} to the command,\\
     417            all profiles are plotted separately
     418   \end{itemize}
    414419   \begin{tikzpicture}[remember picture, overlay]
    415420      \node at (current page.north west){%
     
    426431\begin{frame}
    427432   \frametitle{More Comments}
    428    \small
     433   \footnotesize
    429434   \begin{itemize}     
    430435      \item<1-> The other NCL scripts delivered with PALM can be used in
     
    432437                differ from script to script
    433438      \item<2-> There are plenty of parameters for each script. Please have a
    434                 look to the NCL documentation
    435                 (\texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist})
     439                look to the NCL documentation\\
     440               
     441                \quad \texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist}\\
     442               
    436443                for detailed information
    437       \item<3-> If one of the program aborts and there is no comment,
    438                 check the configuration file - the scripts should not abort with
    439                 the default values. Be sure to use the right data type
    440                 (e.g.: integer = 2; float = 2.0; double = 2.0d;
    441                 string = \dq name\dq ) 
     444      \item<3-> If one of the programs aborts and there is no comment,
     445                check the configuration file! The scripts should not abort with
     446                default values. Be sure to use the right data type
     447                (e.\,g., \texttt{integer = 2}, \texttt{float = 2.0}, \texttt{double = 2.0d},
     448                \texttt{string = \dq name\dq})!
    442449   \end{itemize}   
    443450\end{frame}
  • palm/trunk/TUTORIAL/SOURCE/particle_model_cloud_physics.tex

    r1515 r1532  
    11%$Id$
    22\input{header_tmp.tex}
    3 %\input{../header_lectures.tex}
     3%\input{header_lectures.tex}
    44
    55\usepackage[utf8]{inputenc}
     
    2424\usepackage{graphicx}
    2525\usepackage{listings}
     26\usepackage{textcomp}  %neues paket
    2627\lstset{showspaces=false,language=fortran,basicstyle=
    2728        \ttfamily,showstringspaces=false,captionpos=b}
    2829
    29 \institute{Institute of Meteorology and Climatology, Leibniz UniversitÀt Hannover}
     30\institute{Institute of Meteorology and Climatology, Leibniz Universit{\"a}t Hannover}
    3031\selectlanguage{english}
    3132\date{last update: \today}
     
    4647  }
    4748%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}}
    48 
    4949\title[PALM's Lagrangian Particle Model]{PALM's Lagrangian Particle Model}
    5050\author{PALM group}
     
    6969           \begin{itemize}
    7070           \footnotesize
    71               \item Cloud droplet simulation
     71              \item Cloud droplet simulations
    7272              \item Dispersion modeling / Footprint analysis
    7373              \item Visualization
     
    7777      \begin{itemize}
    7878         \footnotesize
    79               \item Particles can be transported (advected) \textbf{passively} with the \textbf{resolved-scale} flow
    80               \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})
     79              \item Particles can be transported \textbf{passively} with the \textbf{resolved-scale} flow
     80              \item Particle transport by \textbf{subgrid-scale (SGS) turbulence} can be included by switching on a stochastic model (parameter: \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles})
    8181              \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})
    8282      \end{itemize}   
     
    445445   \frametitle{Basic Particle Parameters (V)}
    446446   \small
    447    Parameter that defines the mode of particle movement: \\
     447   Parameter that defines the mode of particle movement:
     448   \vspace{+2mm}
     449   
    448450   The concept of LES ...\\
    449    \vspace{-5mm}
    450451   \begin{center}
    451452      \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}
     
    453454   \vspace{-5mm}
    454455   \onslide<2->
    455    ... transferred to the embedded particle model leads to particle velocity\\
    456    \vspace{1mm}
    457    \begin{columns}[T]
    458       \begin{column}{0.35\textwidth}
    459          $\vec{V}_{i_{\text{particle}}} = \vec{V}_{i_{\text{resolved}}} + \vec{V}_{i_{\text{subgrid}}}$
    460       \end{column}
    461       \begin{column}{0.55\textwidth}
    462          \scriptsize
     456   ... transferred to the embedded particle model leads to particle velocity:\\
     457   \begin{center}
     458         $\vec{V}_{{\text{particle}}} = \vec{V}_{{\text{resolved}}} + \vec{V}_{{\text{subgrid}}}$\\
     459    \end{center}
    463460         \onslide<3->
    464          Particle movement as a result of
     461         \scriptsize
     462         Accordingly, the particle movement is a result of:
    465463         \begin{itemize}
    466             \item advection, resolved turbulence $\vec{V}_{i_{\text{resolved}}}$
     464            \scriptsize
     465            \item<3-> resolved flow $\vec{V}_{{\text{resolved}}}$
    467466            \vspace{-2mm}
    468             \item and subgrid turbulence $\vec{V}_{i_{\text{subgrid}}}$
     467            \item<3-> and subgrid scale turbulence $\vec{V}_{{\text{subgrid}}}$
     468            \begin{itemize}
     469            \scriptsize
     470            \item<4-> $\vec{V}_{{\text{subgrid}}}=0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .F.} (default value)
     471\item<4-> $\vec{V}_{{\text{subgrid}}}\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 (see Weil et al., 2004, JAS)
     472
     473            \end{itemize}
    469474         \end{itemize}
    470       \end{column}
    471    \end{columns}
    472    
    473    \begin{tikzpicture}[remember picture, overlay]
    474       \node [shift={(6 cm,-6.3cm)}]  at (current page.north west)
    475          {%
    476          \begin{tikzpicture}[remember picture, overlay]
    477             \uncover<4->{\draw[->, ultra thick] (-2.05,0) -- (-5,-0.8);
    478             \node[text width=14em] at (-3.2,-1.5) {\scriptsize $=0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .F.} (default value)\\};}
    479             \uncover<5->{\draw[->, ultra thick] (-1.95,0) -- (0,-0.8);
    480             \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\\};
    481             \node[text width=14em] at (2.5,-2.5) {\scriptsize requires initialization parameter \texttt{use\underline{ }upstream\underline{ }for\underline{ }tke = .T.}\\ };}
    482          \end{tikzpicture}
    483          };
    484     \end{tikzpicture}
    485 
    486 \end{frame}
    487 
    488 % Folie 12
     475
     476
     477
     478\end{frame}
     479
     480% Folie 9
    489481\begin{frame}[t]
    490482   \frametitle{Basic Particle Parameters (VI)}
     
    576568\end{frame}
    577569
    578 % Folie 13
     570% Folie 10
    579571\begin{frame}
    580572   \frametitle{Basic Particle Parameters (VIII)}
     
    594586         \hspace{11.0em}location etc.
    595587         \vspace{1mm}
    596          \item \texttt{DATA\underline{ }PRT\underline{ }NETCDF}:
    597          \hspace{2.5em}contains \textbf{all} particle data (see slide\\
     588         \item \texttt{PARTICLE\underline{ }DATA}:
     589         \hspace{3.5em}contains \textbf{all} particle data (see slide\\
    598590         \hspace{11.0em}The Data Type Used for Particles),\\
    599591         \hspace{11.0em}output is controlled by\\
     
    604596\end{frame}
    605597
    606 % Folie 14
     598% Folie 11
    607599\begin{frame}[fragile]
    608600   \frametitle{An Example of a Particle NAMELIST}
    609    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=0.7\textwidth, font=\Tiny,scale=1.2]
     601   \vspace{+0.1cm}
     602   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=1.0\textwidth, font=\footnotesize,scale=1.0]
    610603   \begin{tikzpicture}
    611604   \node [yellow] {\begin{lstlisting} 
    612 &inipar          cloud_droplets = .TRUE., ................ /
    613 
    614 &particles_par   dt_dopts = 25.0,
     605 &particles_par  dt_dopts = 25.0,
    615606                 bc_par_b = 'absorb',
    616                  density_ratio = 0.001, radius = 1.0E-6,
    617                  initial_weighting_factor = 1.0E10,
     607                 density_ratio = 0.001,
     608                 radius = 1.0E-6,
    618609                 psb = 35.0, pst = 255.0,
    619610                 psl = 935.0, psr = 1065.0,
    620                  pss = -5.0,
     611                 pss = -5.0, psn = 30.0,
    621612                 pdx = 20.0, pdy = 20.0, pdz = 20.0,
    622613                 random_start_position = .TRUE., /
     
    624615   };
    625616   \end{tikzpicture}
    626    \begin{itemize}
    627       \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. \texttt{density\_ratio = 0.001, 0.0}, etc.)
     617   \vspace{-5mm}
     618   \begin{itemize}
     619      \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 \texttt{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., \texttt{density\_ratio = 0.001, 0.0}, etc.)
    628620   \end{itemize}
    629621\end{frame}
     
    632624\subsection{Theory}
    633625
    634 % Folie 15
     626% Folie 12
    635627\begin{frame}[t]
    636628   \frametitle{Theory of the Lagrangian Particle Model (I)}
    637629   \footnotesize
    638    \textbf{Advection of Passive particles}\\
     630   \textbf{Advection of Passive Particles}\\
    639631   \vspace{1mm}
    640    The position of a particle is found by integrating $ \dfrac{d \vec{X}_{\text{particle}}}{dt} = \vec{V}_{\text{particle}}$\\
    641    \vspace{2mm}
    642    \onslide<2->Transferring the LES concept ...
    643    \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}\\
    644    \vspace{-2mm}
    645    \scriptsize \hspace{2em}total energy\hspace{2.25em}=\hspace{3em}resolved part\hspace{2.5em}+\hspace{3em}modelled part\\
    646    \vspace{1mm}
    647    \small ... to the embedded particle model leads to: $\vec{V}_{\text{particle}} = \vec{V}_{\text{res}} (+ \vec{V}_{\text{sub}})$\\
    648    \vspace{2mm}
    649    \onslide<3->$\vec{V}_{\text{res}}:$\\
     632   \begin{itemize}
     633   \item The position of the particle is found by integrating $ \dfrac{d \vec{X}_{\text{particle}}}{dt} = \vec{V}_{\text{particle}}$
     634   \item The particle's velocity consist of a resolved and a subgrid part:\\
     635   \begin{center}
     636    $\vec{V}_{\text{particle}} = \vec{V}_{\text{res}} (+ \vec{V}_{\text{sub}})$\\
     637    \end{center}
     638%   \vspace{2mm}
     639%   \onslide<2->Transferring the LES concept ...
     640%   \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}\\
     641%   \vspace{-2mm}
     642%   \scriptsize \hspace{2em}total energy\hspace{2.25em}=\hspace{3em}resolved part\hspace{2.5em}+\hspace{3em}modelled part\\
     643%   \vspace{1mm}
     644%   \small ... to the embedded particle model leads to: $\vec{V}_{\text{particle}} = \vec{V}_{\text{res}} (+ \vec{V}_{\text{sub}})$\\
     645%   \vspace{2mm}
     646   \item<2-> The resolved part $\vec{V}_{\text{res}}$ is derived by a tri-linear interpolation:
    650647   \begin{tikzpicture}[remember picture, overlay]
    651       \node [shift={(1.7 cm,0.6cm)}]  at (current page.south west)
     648      \node [shift={(1.7 cm,2.8cm)}]  at (current page.south west)
    652649         {%   
    653650         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
     
    682679         \end{tikzpicture}
    683680         };
    684       \node [shift={(5.8 cm,0.6cm)}]  at (current page.south west)
     681      \node [shift={(5.8 cm,2.8cm)}]  at (current page.south west)
    685682         {%   
    686683         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
     
    709706         \end{tikzpicture}
    710707         };
    711       \node [shift={(9 cm,0.6cm)}]  at (current page.south west)
     708      \node [shift={(9 cm,2.8cm)}]  at (current page.south west)
    712709         {%   
    713710         \begin{tikzpicture}[scale=0.3,remember picture, overlay]
     
    720717         };
    721718      \end{tikzpicture}
    722 \end{frame}
    723 
    724 % Folie 16
     719     
     720      \vspace{+2.5cm}
     721      \item<3-> The $\vec{V}_{\text{sub}}$ is only computed if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .T.} (this also requires \texttt{use\underline{ }upstream\underline{ }for\underline{ }tke = .T.} in the \texttt{inipar} namelist). Then, a solution for $\vec{V}_{\text{sub}}$ is derived from a stochastic differential equation (see Weil et al., 2004, JAS).
     722            \end{itemize}
     723\end{frame}
     724
     725% Folie 13
    725726\begin{frame}[t]
    726727   \frametitle{Theory of the Lagrangian Particle Model (II)}
     
    728729   \textbf{Advection of Non-passive Particles}\\
    729730   \ \\
    730    Advection of particles by the non-linear drag law following Clift et al., 1978\\
     731   Newton's second law for a droplet (considering Stoke's drag, gravity and buoyancy):\\
    731732   \vspace{4mm}
    732733   $\dfrac{dV_i}{dt} = \dfrac{1}{\tau_p} (u_i - V_i) - \delta_{i3}( 1 - \rho_0 / \rho_l ) g$\\
    733734      \vspace{2mm}
    734    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|}{\nu} $\\
    735    \vspace{5mm}
     735  with the inertial response time $\tau_p^{-1} = \dfrac{9 \nu \rho_0}{2 r^2 \rho_l} \left( 1 + 0.15 \text{Re}^{0.687} \right)$ including a correction term (in parenthesis) for high Reynolds numbers (see Clift et al., 1978)\\%based on $\text{Re} = \dfrac{2r \left| \vec{u}_i - \vec{V}_i \right|}{\nu} $ (see Clift et al., 1978)\\
     736   \vspace{10mm}
    736737   \onslide<1->
    737738   \begin{tabular}{llll}
     
    744745\end{frame}
    745746
    746 % Folie 17
     747% Folie 14
    747748\begin{frame}[t]
    748749   \frametitle{Theory of the Lagrangian Particle Model (III)}
     
    751752   \small
    752753   \begin{itemize}
    753       \item This feature is switched on by setting the initial parameter \texttt{cloud\_droplets = .TRUE.}.
    754       \item In this case, the change in particle radius by condensation/evaporation and collision is calculated for every timestep.
    755       \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 \texttt{interaction\_droplets\_ptq}.
    756    \end{itemize}
    757 \end{frame}
    758 
    759 % Folie 18
     754      \item This feature is switched on by setting the initial parameter \texttt{cloud\_droplets = .TRUE.}
     755      \item In this case, the change in particle radius by condensation/evaporation and collision/coalescence is calculated for every timestep.
     756      \item In case of condensation or evaporation, the potential temperature and the specific humidity (computed by the LES) have to be adjusted. This is done within the subroutine \texttt{interaction\_droplets\_ptq}, which is therefore the major coupling between the LES and the LPM.
     757   \end{itemize}
     758\end{frame}
     759
     760% Folie 15
    760761\begin{frame}[t]
    761762   \frametitle{Theory of the Lagrangian Particle Model (IV)}
     
    770771         \item Every simulated droplet stands for a very high number\\ of real droplets
    771772         \vspace{1mm}
    772          \item Concept of weighting factor: $A_i=$ real number of droplets represented by one simulated droplet
    773          \vspace{2mm}
     773         \item Concept of weighting factor (Shima et al., 2009, QJRMS):\\
     774         \begin{center}
     775          $A_i = \textit{real number of droplets represented by one simulated droplet}$
     776              \includegraphics[scale=1.0]{particle_model_figures/super.jpg}
     777          \end{center}
     778         \vspace{-2mm}
    774779         \item Initial weighting factor can be assigned with the parameter \texttt{initial\underline{ }weighting\underline{ }factor}
    775780      \end{itemize}
    776       \vspace{1mm}
    777       \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$
    778       \vspace{1mm}
    779       \item Droplets can change radius by condensation/evaporation and collision
    780781   \end{itemize}
    781782   
    782    \begin{tikzpicture}[remember picture, overlay]
    783       \node [shift={(11.7 cm,6.5cm)}]  at (current page.south west)
    784          {%
    785          \begin{tikzpicture}[remember picture, overlay]
    786             \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/real_simulated.png}};
    787          \end{tikzpicture}
    788          };
    789    \end{tikzpicture} 
    790 
    791 \end{frame}
    792 
    793 % Folie 19
     783
     784\end{frame}
     785
     786% Folie 16
    794787\begin{frame}[t]
    795788   \frametitle{Theory of the Lagrangian Particle Model (V)}
     
    798791   \scriptsize
    799792   \begin{itemize}
    800       \item \textbf{Condensation/evaporation}\\
     793      \item The growth of the radius of single droplet by condensation/evaporation:\\
    801794      \vspace{1mm}
    802       $ r_i \dfrac{dr_i}{dt} = \dfrac{(S - ar^{-1} + br^{-3})}{F_k + F_d}$\\
     795      $ r_i \dfrac{dr_i}{dt} = \dfrac{(S - a\,r^{-1} + b\,r^{-3})}{F_\text{k} + F_\text{d}}$\\
    803796      \vspace{1mm}
    804       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)}$\\
    805       \vspace{2mm}
    806       \qquad $a = 2 \sigma/(\rho_l R_v T) \qquad \rightarrow$  Curvature effect\\
    807       \qquad $b = 3 i_\text{s} m_v M / (4 \pi \rho_l m_s) \rightarrow$ Solution effect
     797      primarily depending on the supersaturation $S = e / e_\text{s}-1$, including the effects of the particle's curvature (parameter $a$) and amount of solute aerosol (parameter $b$)
    808798      \vspace{1.5mm}
    809       \item<2-> For $r > \unit{1}{\mu m}$  solution and curvature effects are neglected: \\
    810       $ 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)}$
    811    \end{itemize}
    812    \vspace{0mm}
     799      \item<2-> For $r > 1\,\text{\textmu m}$ solution and curvature effects are neglected $\Rightarrow$ an analytic solution is possible: \\
     800      $ 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_\text{k} + F_\text{d}} \right)}$
     801   \end{itemize}
     802   \vspace{1.0cm}
     803   \hspace{0.5cm}
    813804   \begin{tabular}{llll}
    814            $D$   & = Coefficient of diffusion   & $L$   & = Latent heat\\
    815            $e$    & = Vapor pressure            & $r$   & = Droplet radius\\
    816            $e_s$ & = Saturation vapor pressure  & $R_v$ & = Gas constant for water vapor\\
    817            $F_k$ & = Effect of heat conduction  & $S$   & = Supersaturation\\
    818            $F_d$ & = Effect of vapor diffusion  & $T$   & = Temperature\\
    819            $K$ & = Coefficient of thermal conductivity  & $\rho_L$ & = Density of water\\
    820                  &                                & $i_\text{s}$  & = van't Hoff factor\\
     805           $r$   & = Droplet radius & $S$   & = Supersaturation\\
     806           $a$ & = Curvature effect    & $b$  & = Solution effect\\
     807           $e$ & = Vapor pressure  &  $e_\text{s}$ & = Saturation vapor pressure\\ 
     808           $F_\text{k}$ & = Effect of heat conduction & $F_\text{d}$ & = Effect of vapor diffusion
    821809   \end{tabular}
    822810
    823811\end{frame}
    824812
    825 % Folie 20
     813% Folie 17
    826814\begin{frame}[t]
    827815   \frametitle{Theory of the Lagrangian Particle Model (VI)}
    828816   \footnotesize
    829    \textbf{Simulation of Cloud Droplets (III)}\\
    830    \ \\
    831    \scriptsize
    832    Concept of droplet collision with collision efficiency = 1
     817   \textbf{Simulation of Cloud Droplets (III)} -- Idealized concept of droplet collisions\\
    833818   \begin{tikzpicture}[remember picture, overlay]
    834       \node [shift={(5.0cm,3.7cm)}]  at (current page.south west)
     819      \node [shift={(6.0cm,4.0cm)}]  at (current page.south west)
    835820         {%
    836821         \begin{tikzpicture}[remember picture, overlay]
    837             \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/collision1.png}};
     822            \node at (0.0,0.0) {\includegraphics[scale=0.25]{particle_model_figures/collision1.png}};
    838823         \end{tikzpicture}
    839824         };
     
    841826\end{frame}
    842827
    843 % Folie 21
     828% Folie 18
    844829\begin{frame}[t]
    845830   \frametitle{Theory of the Lagrangian Particle Model (VII)}
    846831   \footnotesize
    847832   \textbf{Simulation of Cloud Droplets (IV)}\\
    848    \ \\
    849    \scriptsize
    850    Concept of droplet collision with collision efficiency $\neq$ 1 
    851    \begin{tikzpicture}[remember picture, overlay]
    852       \node [shift={(5.0cm,4.0cm)}]  at (current page.south west)
    853          {%
    854          \begin{tikzpicture}[remember picture, overlay]
    855             \node (pic2) at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/collision2.png}};
    856             \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$};
    857          \end{tikzpicture}
    858          };
    859    \end{tikzpicture}
    860 \end{frame}
    861 
    862 % Folie 22
    863 \begin{frame}[t]
    864    \frametitle{Theory of the Lagrangian Particle Model (VIII)}
    865    \footnotesize
    866    \textbf{Simulation of Cloud Droplets (V)}\\
    867833   \scriptsize   
    868834   \begin{itemize}
    869       \item Calculation of droplet growth due to \textbf{collisions} follows a statistical approach (e.\,g., Rogers and Yau, 1989)
     835      \item Calculation of droplet growth due to collisions considers three types of collisions:
     836      \vspace{-0.4cm}
     837      \begin{enumerate}
     838      \scriptsize
     839          \item collisions with smaller droplets $\Rightarrow$ increase the radius
     840          \item collisions with larger droplets $\Rightarrow$ decrease the weighting factor
     841          \item internal collisions $\Rightarrow$ decrease the weighting factor and increase the radius
     842      \end{enumerate}
    870843      \item Two prognostic quantities: Weighting factor $A_n$ and mass of super-droplet expressed as volume averaged droplet radius $r_n=(m_n / (4/3 \pi \rho_\text{l} A_n))^{1/3}$:
    871844         \scriptsize
     
    876849\end{alignat*}
    877850\end{itemize}
    878 %   \begin{tikzpicture}[remember picture, overlay]
    879 %      \node [shift={(11 cm,3.5cm)}]  at (current page.south west)
    880 %         {%
    881 %         \begin{tikzpicture}[remember picture, overlay]
    882 %            \node at (0.0,0.0) {\includegraphics[scale=0.20]{particle_model_figures/droplet_falling.png}};
    883 %         \end{tikzpicture}
    884 %         };
    885 %   \end{tikzpicture} 
    886 \end{frame}
    887 
    888 % Folie 23
     851\end{frame}
     852
     853% Folie 19
    889854\begin{frame}[t]
    890    \frametitle{Theory of the Lagrangian Particle Model (IX)}
     855   \frametitle{Theory of the Lagrangian Particle Model (VIII)}
    891856   \footnotesize
    892    \textbf{Simulation of Cloud Droplets (VI)}\\
    893    \begin{itemize}
    894       \item \textbf{Collision kernel without turbulence effects} \\
     857   \textbf{Simulation of Cloud Droplets (V)}\\
     858   \begin{itemize}
     859      \item \textbf{Collision kernel without turbulence effects}:\\
    895860      \vspace{1mm}
    896       $K(R,r) = \pi(R + r)^2 \cdot E^g(R,r) \cdot [ u(R) - u(r)]$\\
     861      $K(r_\text{n}, r_\text{m}) = \pi(r_\text{n} + r_\text{m})^2 \cdot E(r_\text{n}, r_\text{m}) \cdot [ u(r_\text{n}) - u(r_\text{m})]$\\
    897862      \vspace{3mm}
    898       \item \textbf{Collision kernel with turbulence effects\\ from Ayala and Wang}\\
     863      \item \textbf{Collision kernel with turbulence effects} \\
     864      (Ayala et al., 2008, NJP; \\
     865      Wang and Grabowski, 2009, ASL):\\
    899866      \vspace{1mm}
    900       $K(R,r) = 2 \pi (R + r)^2 \cdot \eta_E E^g \langle| w_r |\rangle g_{Rr} $\\
    901       \vspace{3mm}
     867      $K(r_\text{n}, r_\text{m}) = 2 \pi (r_\text{n} + r_\text{m})^2 \cdot \textcolor{red}{\eta_E} E(r_\text{n}, r_\text{m}) \cdot \textcolor{red}{\langle| w_r |\rangle} \textcolor{red}{g_\text{RDF}} $\\
     868      \vspace{+1mm}
     869      all \textcolor{red}{red} variables parameterize effects of turbulence
     870            \vspace{3mm}
    902871   \end{itemize}
    903872    \begin{tabular}{ll}
    904            $\eta_E$ & = turbulent enhancement factor for collision efficiency \\
    905            $E^g$ & = collection efficiency \\
     873           $\eta_E$ & = turbulent enhancement of collision efficiency \\
     874           $E$ & = collision efficiency (Hall, 1980, JAS)\\
    906875      $\langle| w_r |\rangle$ & = radial relative velocity \\
    907       $g_{Rr}$ & = radial distribution function \\
     876      $g_\text{RDF}$ & = radial distribution function
    908877   \end{tabular}
    909878
    910879   \begin{tikzpicture}[remember picture, overlay]
    911       \node [shift={(11 cm,6.5cm)}]  at (current page.south west)
     880      \node [shift={(11.2 cm,6.5cm)}]  at (current page.south west)
    912881         {%
    913882         \begin{tikzpicture}[remember picture, overlay]
    914             \node (pic1) at (0.0,0.0) {\includegraphics[scale=0.30]{particle_model_figures/falkowich.png}};
    915             \node[below=0.0cm of pic1] {Falkowich, 2010};
     883            \node (pic1) at (0.0,0.0) {\includegraphics[scale=0.48]{particle_model_figures/shaw.pdf}};
     884            \node[below=0.0cm of pic1] {(Shaw, 2003)};
    916885         \end{tikzpicture}
    917886         };
     
    923892         \begin{tikzpicture}[remember picture, overlay]
    924893            \node (pic2) at (0.0,0.0) {\includegraphics[scale=0.30]{particle_model_figures/malinowski.png}};
    925             \node[below=0.0cm of pic2] {Malinowski, 2010};
     894            \node[below=0.0cm of pic2] {(Malinowski, 2010)};
    926895         \end{tikzpicture}
    927896         };
     
    932901\subsection{Implementation}
    933902
     903% Folie 20
     904\begin{frame}[fragile]
     905   \frametitle{The Data Type Used for Particles}
     906   \small
     907   \begin{itemize}
     908      \item Particles are stored in a FORTRAN derived data type
     909      \item A derived data type consists of several elements, which can be accessed by the \texttt{\%} operator
     910   \end{itemize}
     911   \vspace{-0.1cm}
     912   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=1.0\textwidth, font=\scriptsize,scale=1.0]
     913   \begin{tikzpicture}
     914   \node [yellow] {\begin{lstlisting} 
     915    TYPE particle_type
     916        SEQUENCE
     917        REAL(wp)     ::  radius, age, age_m, dt_sum,      &
     918                         dvrp_psize, e_m,                 &
     919                         origin_x, origin_y, origin_z,    &
     920                         rvar1, rvar2, rvar3,             &
     921                         speed_x, speed_y, speed_z,       &
     922                         weight_factor, x, y, z
     923        INTEGER(iwp) ::  class, group, tailpoints, tail_id
     924        LOGICAL      ::  particle_mask
     925        INTEGER(iwp) ::  block_nr
     926    END TYPE particle_type
     927\end{lstlisting}
     928   };
     929   \end{tikzpicture}
     930   \vspace{-0.6cm}
     931   \begin{itemize}
     932      \item Example: \texttt{TYPE(particle\_type) :: particle}\\
     933      \hspace{1.5cm}\texttt{particle\%radius = 1.0E-6}
     934   \end{itemize}
     935\end{frame}
     936
     937
     938% Folie 21
     939\begin{frame}[fragile]
     940   \frametitle{Storing Lagrangian particles (I)}
     941   \begin{itemize}
     942   \item Handling hundreds of millions of particles, efficient storing is essential for a good performance
     943   \item The easiest method for storing Lagrangian particles is an one-dimensional array
     944   \item Most applications demand particles located at a certain location (e.\,g., collision process is computed for all particles located in a certain grid box)
     945      \item Finding this particles demands \texttt{N}$^2$ operations:
     946      \scriptsize
     947\begin{lstlisting}
     948DO  n = 1, N
     949   DO  k = 1, N
     950      IF ( k /= n )  THEN
     951         IF ( ABS( particles(k)%x - particles(n)%x )   &
     952              < threshold )  THEN
     953            ...
     954         ENDIF
     955      ENDIF
     956   ENDDO
     957ENDDO
     958\end{lstlisting}
     959   \end{itemize}
     960\end{frame}
     961
     962% Folie 22
     963\begin{frame}[fragile]
     964   \frametitle{Storing Lagrangian particles (I)}
     965   \begin{itemize}
     966      \item Sorting the particles by their respective grid-box reduces the operations to \texttt{N}:
     967         \scriptsize
     968\begin{lstlisting}
     969DO  n = n_start(k,j,i), n_end(k,j,i)
     970   ...
     971ENDDO
     972\end{lstlisting}
     973\normalsize
     974\item This was done in the previous version of PALM, reducing CPU time of LPM by 9.6\,\%
     975\item However, sorting increases CPU time and demands a second, one-dimensional array for efficient sorting
     976\item<2-> To overcome these issues, a new approach has been developed for the current version of PALM: \\
     977\begin{center}
     978\textbf{a four-dimensional array}
     979\end{center}
     980   \end{itemize}
     981\end{frame}
     982
     983
     984% Folie 23
     985\begin{frame}[t]
     986   \frametitle{Storing Lagrangian particles (III)}
     987   \small
     988   \begin{tikzpicture}[scale=0.6]
     989      \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}
     990     
     991      % Coordinates
     992      \coordinate (OL) at (-4,4);     
     993      \coordinate (OC) at (0,4);
     994      \coordinate (OR) at (4,4);
     995      \coordinate (ML) at (-4,0);
     996      \coordinate (MC) at (0,0);
     997      \coordinate (MR) at (4,0);
     998      \coordinate (UL) at (-4,-4);     
     999      \coordinate (UC) at (0,-4);
     1000      \coordinate (UR) at (4,-4);
     1001     
     1002      \coordinate (OL2) at (-2,2);
     1003      \coordinate (OR2) at (2,2);
     1004      \coordinate (UR2) at (2,-2);
     1005      \coordinate (UL2) at (-2,-2);
     1006     
     1007      \coordinate (P1) at (-1,1);
     1008      \coordinate (P2) at (1.8,-1.3);
     1009      \coordinate (P3) at (0.4,-0.9);
     1010      \coordinate (P4) at (1,0.7);
     1011      \coordinate (P5) at (-1.3,-1.4);
     1012      \coordinate (P6) at (-1.8,1.6);
     1013      \coordinate (part_box) at (6,2);
     1014   
     1015      % Draw Boxes
     1016      \draw[-] (OL) -- (OR) -- (UR) -- (UL) -- cycle;
     1017      \draw[-] (OC) -- (UC);
     1018      \draw[-] (ML) -- (MR);     
     1019      \draw[-,dashed] (OL2) -- (OR2) -- (UR2) -- (UL2) -- cycle;
     1020     
     1021      \draw[-, thick] (MC) -- (part_box);
     1022     
     1023      % Draw dots
     1024      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OL) {};     
     1025      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OC) {};
     1026      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OR) {};
     1027      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (ML) {};
     1028      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (MC) {};
     1029      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (MR) {};
     1030      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UL) {};
     1031      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UC) {};
     1032      \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UR) {};
     1033
     1034      \uncover<1>{\node[circle, draw, fill, color=red, ultra thick, scale=0.5] at (P1) {};}
     1035      \uncover<1-2>{\node[circle, draw, fill, color=yellow, ultra thick, scale=0.5] at (P2) {};}
     1036      \uncover<1-3>{\node[circle, draw, fill, color=green, ultra thick, scale=0.5] at (P3) {};}
     1037      \uncover<1-4>{\node[circle, draw, fill, color=blue, ultra thick, scale=0.5] at (P4) {};}
     1038      \uncover<1-5>{\node[circle, draw, fill, color=violet, ultra thick, scale=0.5] at (P5) {};}
     1039      \uncover<1-6>{\node[circle, draw, fill, color=magenta, ultra thick, scale=0.5] at (P6) {};}
     1040     
     1041      \node[yshift=6.0, xshift=-15.0] at (OL) {\tiny \texttt{i-1,j+1}};
     1042      \node[yshift=6.0, xshift=-15.0] at (OC) {\tiny \texttt{i,j+1}};
     1043      \node[yshift=6.0, xshift=-15.0] at (OR) {\tiny \texttt{i+1,j+1}};
     1044      \node[yshift=6.0, xshift=-15.0] at (ML) {\tiny \texttt{i-1,j}};
     1045      \node[yshift=6.0, xshift=-15.0] at (MC) {\tiny \texttt{i,j}};
     1046      \node[yshift=6.0, xshift=-15.0] at (MR) {\tiny \texttt{i+1,j}};
     1047      \node[yshift=6.0, xshift=-15.0] at (UL) {\tiny \texttt{i-1,j-1}};
     1048      \node[yshift=6.0, xshift=-15.0] at (UC) {\tiny \texttt{i,j-1}};
     1049      \node[yshift=6.0, xshift=-15.0] at (UR) {\tiny \texttt{i+1,j-1}};
     1050     
     1051     
     1052      % draw particle box
     1053      \node at (part_box) [scale=1.0] {%
     1054      \begin{tikzpicture}
     1055         \draw[-, thick, fill=white] (-0.2,0.2) -- (0.2,0.2) -- (0.2,-1.7) -- (-0.2,-1.7) -- cycle;
     1056         \uncover<2->{\node[circle, draw, fill, color=red, ultra thick, scale=0.5] at (0,0) {};}
     1057         \uncover<3->{\node[circle, draw, fill, color=yellow, ultra thick, scale=0.5] at (0,-0.3) {};}
     1058         \uncover<4->{\node[circle, draw, fill, color=green, ultra thick, scale=0.5] at (0,-0.6) {};}
     1059         \uncover<5->{\node[circle, draw, fill, color=blue, ultra thick, scale=0.5] at (0,-0.9) {};}
     1060         \uncover<6->{\node[circle, draw, fill, color=violet, ultra thick, scale=0.5] at (0,-1.2) {};}
     1061         \uncover<7->{\node[circle, draw, fill, color=magenta, ultra thick, scale=0.5] at (0,-1.5) {};}
     1062         
     1063      \end{tikzpicture}
     1064      };
     1065     
     1066      \uncover<1->{\node[text width=10em] at (10,0) {\scriptsize - All particles located in a certain grid-box are stored in a \textit{small} one-dimensional particle array permanently assigned to their grid-box\\
     1067      \ \\
     1068      - LPM CPU time decreases by 22\,\%\\
     1069      \ \\
     1070      - Available memory doubles, since no large additional arrays are needed for assigning the particles to their grid-box\\};}
     1071   \end{tikzpicture}
     1072
     1073\end{frame}
     1074
    9341075% Folie 24
     1076\begin{frame}[fragile]
     1077   \frametitle{Storing Lagrangian particles (IV)}
     1078   \scriptsize
     1079   \begin{itemize}
     1080   \item A new \textbf{3D-array} of another FORTRAN derived data type: \texttt{grid\_particle\_def}
     1081   \item This type contains, as an element, a \textbf{1D-array} of the FORTRAN derived data type \texttt{particle\_type}, in which the particles, located at that grid box, are stored
     1082   \end{itemize}
     1083   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=1.05\textwidth, font=\scriptsize,scale=0.95]
     1084   \begin{tikzpicture}
     1085   \node[yellow]{\begin{lstlisting} 
     1086 TYPE  grid_particle_def
     1087     TYPE(particle_type), DIMENSION(:) ::  particles
     1088 END TYPE grid_particle_def
     1089
     1090 TYPE(grid_particle_def), DIMENSION(:,:,:) ::  grid_particles
     1091\end{lstlisting}
     1092   };
     1093   \end{tikzpicture}
     1094   \vspace{-4mm}
     1095   \begin{itemize}
     1096   \item Particles can be accessed by the indices of their respective grid-box:
     1097   \scriptsize
     1098   \vspace{-2mm}
     1099    \begin{lstlisting}
     1100DO  i = nxl, nxr
     1101  DO  j = nys, nyn
     1102    DO  k = nzb+1, nzt
     1103      n_par = prt_count(k,j,i)
     1104      IF ( n_par <= 0 )  CYCLE
     1105      particles(1:n_par) = &
     1106        grid_particles(kp,jp,ip)%particles(1:n_par)
     1107      DO  n = 1, n_par
     1108        particles(n)%radius = 1.0E-6
     1109      ENDDO
     1110      :
     1111\end{lstlisting}
     1112%    ENDDO
     1113%  ENDDO
     1114%ENDDO
     1115%\end{lstlisting}
     1116      \end{itemize}
     1117   
     1118\end{frame}
     1119
     1120
     1121% Folie 25
     1122\begin{frame}[fragile]
     1123   \frametitle{How to Read Particle Data from an External Program}
     1124   \scriptsize
     1125   \begin{itemize}
     1126      \item An example program for reading \texttt{PARTICLE\_DATA} can be found in the PALM repository under \texttt{...../trunk/UTIL/analyze\underline{ }particle\underline{ }data.f90}
     1127     \item For the format \texttt{PARTICLE\_DATA} see beginning of subroutine \texttt{lpm\_data\_output\_particles} (one file per PE, i.e. filenames \underline{ }0000, \underline{ }0001, etc.)
     1128   \end{itemize}
     1129   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=1.05\textwidth, font=\scriptsize,scale=1.0]
     1130   \begin{tikzpicture}
     1131   \node [yellow] {\begin{lstlisting} 
     1132WRITE ( 85 )  simulated_time
     1133WRITE ( 85 )  prt_count
     1134         
     1135DO  ip = nxl, nxr
     1136  DO  jp = nys, nyn
     1137    DO  kp = nzb+1, nzt
     1138      n_par = prt_count(kp,jp,ip)
     1139      particles(1:n_par) = &
     1140        grid_particles(kp,jp,ip)%particles(1:n_par)
     1141      IF ( n_par <= 0 )  CYCLE
     1142      WRITE ( 85 )  particles
     1143    ENDDO
     1144  ENDDO
     1145ENDDO
     1146\end{lstlisting}
     1147   };
     1148   \end{tikzpicture}
     1149\end{frame}
     1150
     1151% Folie 26
    9351152\begin{frame}
    9361153   \frametitle{Flow Chart of Particle Code (I)}
     
    10161233\end{frame}
    10171234
    1018 % Folie 25
     1235% Folie 27
    10191236\begin{frame}
    10201237   \frametitle{Flow Chart of Particle Code (II)}
     
    10531270     
    10541271      \coordinate[below=3.5cm of timeintegration] (H);
    1055       \coordinate[right=2cm of H] (I);
    1056       \coordinate[right=3.5cm of I] (J);
    1057      
    1058       \node[draw, text width=22em,minimum height=4.5em,fill=black!15] (progframe) at (5.75,-5.3) {};
    1059       \node[draw, text width= 9.5em, right=0.5cm of progframe] {For details, see PALM Flow Chart (V).};
    1060       \node[gelb1, below=0.3cm of I, text width=9em] (prog) {prognostic\underline{ }equations};     
    1061       \node[gelb1, below=0.3cm of J, text width=10.5em] (progfast) {prognostic\underline{ }equations\underline{ }fast}; 
    1062       \node[gelb1, below=0.1cm of progfast, text width=10.5em] (progvec) {prognostic\underline{ }equations\underline{ }vec};       
    1063       \node[draw, fill=red, text width=4em] at (8.2,-4) {\textcolor{white}{standard advection}};
     1272      \coordinate[right=2.5cm of H] (I);
     1273      \coordinate[right=4.25cm of I] (J);
     1274     
     1275      \node[draw, text width=26em,minimum height=4.5em,fill=black!15] (progframe) at (6.5,-5.3) {};
     1276      \node[draw, text width= 9.5em, right=0.3cm of progframe] {For details, see PALM Flow Chart (V).};
     1277      \node[gelb1, below=0.3cm of I, text width=11.5em] (prog) {prognostic\underline{ }equations\underline{ }vector};     
     1278      \node[gelb1, below=0.3cm of J, text width=11.5em] (progfast) {prognostic\underline{ }equations\underline{ }cache}; 
     1279      \node[gelb1, below=0.1cm of progfast, text width=11.5em] (progvec) {prognostic\underline{ }equations\underline{ }acc};       
    10641280     
    10651281      \coordinate[below=5.5cm of timeintegration] (K);
     
    10761292
    10771293      \coordinate[below=7.2cm of timeintegration] (N);
    1078      
    1079       \node[gelb1, right=0.6cm of N] (asselin) {asselin\underline{ }filter};     
    1080      
    1081       \coordinate[below=7.8cm of timeintegration] (O);
     1294           
     1295      \coordinate[below=7.2cm of timeintegration] (O);
    10821296     
    10831297      \node[gelb1, right=0.6cm of O] (boundary) {boundary\underline{ }conds};       
    10841298      \node[gelb1, right=0.0cm of boundary] {swap\underline{ }timelevel}; 
    10851299           
    1086       \coordinate[below=8.4cm of timeintegration] (P);     
     1300      \coordinate[below=7.8cm of timeintegration] (P);     
    10871301     
    10881302      \node[gelb1, right=0.6cm of P] (inflow) {inflow\underline{ }turbulence};
     
    11081322      \draw[-, thick] (advecparticles.south) -- (L);           
    11091323      \draw[-, thick] (L) -- (userparticlesatt.west);       
    1110       \draw[dashed, thick] (M) -- (interaction.west); 
    1111       \draw[dashed, thick] (N) -- (asselin.west);       
     1324      \draw[dashed, thick] (M) -- (interaction.west);       
    11121325      \draw[-, thick] (O) -- (boundary.west); 
    11131326      \draw[dashed, thick] (P) -- (inflow.west);             
     
    11191332\end{frame}
    11201333
    1121 % Folie 26
     1334% Folie 28
    11221335\begin{frame}
    11231336   \frametitle{Detailed Flow Chart of \texttt{lpm} (I)}
     
    11251338   \begin{tikzpicture}[scale=0.87, transform shape]
    11261339      \node (0) at (0,0) {};
    1127       {\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/}) };}
    1128       \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-0.75cm] {calculate exponential terms for particles groups with inertia};}
     1340      {\node[draw, right=0.0cm of 0, , yshift=-0.2cm, text width=29em] {write particle data on file (subroutine \texttt{lpm\underline{ }data\underline{ }output\underline{ }particles})};}
     1341      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-0.78cm] {calculate exponential terms for particles groups with inertia};}
    11291342      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-1.35cm] {if necessary, release a new set of particles (subroutine \texttt{lpm\underline{ }release\underline{ }set})};}
    11301343      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-2.1cm, text width=30em] {particle growth by condensation/evaporation and collision\\ (subroutines \texttt{lpm\underline{ }droplet\underline{ }condensation} and \texttt{lpm\underline{ }droplet\underline{ }collision})};}
    11311344      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-2.85cm] {If SGS-velocities are used: calculate gradients of TKE (subroutine \texttt{lpm\underline{ }init\underline{ }sgs\underline{ }tke})};}
    11321345      \uncover<1->{\node[draw, right=0.0cm of 0, yshift=-3.6cm, text width=29em] {timestep loop\\ (repeated, unless each particle has reached the LES timestep \texttt{dt\underline{ }3d})};}
    1133       \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-4.65cm, 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})};}
     1346      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-4.65cm, text width=36em] {for each particle:\\ - interpolate resolved velocities and compute SGS velocities\\ - calculate the particle advection (subroutine \texttt{lpm\underline{ }advec})};}
    11341347      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-5.55cm] {calculate particle reflection from walls (subroutine \texttt{lpm\underline{ }boundary\underline{ }conds})};}
    11351348      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-6.15cm] {user defined actions (subroutine \texttt{user\underline{ }lpm\underline{ }advec})};}     
     
    11401353\end{frame}
    11411354
    1142 % Folie 27
     1355% Folie 29
    11431356\begin{frame}
    11441357   \frametitle{Detailed Flow Chart of \texttt{lpm} (II)}
     
    11461359   \begin{tikzpicture}[auto, node distance=0]
    11471360      \node (0) at (0,0) {};
    1148       \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-0.7cm, text width=25em] {delete and pack particles\\ (subroutines \texttt{lpm\_pack\_all\_arrays})};} 
     1361      \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-0.7cm, text width=25em] {delete and sort particles\\ (subroutines \texttt{lpm\_pack\_all\_arrays})};} 
    11491362      \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})};}
    11501363      \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})};}
     
    11531366\end{frame}
    11541367
    1155 % Folie 28
    1156 \begin{frame}[fragile]
    1157    \frametitle{The Data Type Used for Particles}
    1158    \small
    1159    \begin{itemize}
    1160       \item Particle data are stored in a FORTRAN derived data type:
    1161    \end{itemize}
    1162    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=0.9\textwidth, font=\Tiny,scale=1.0]
    1163    \begin{tikzpicture}
    1164    \node [yellow] {\begin{lstlisting} 
    1165 MODULE particle_attributes
    1166     :
    1167     TYPE particle_type
    1168         SEQUENCE
    1169         REAL(wp)     ::  radius, age, age_m, dt_sum, dvrp_psize, e_m,          &
    1170                          origin_x, origin_y, origin_z, rvar1, rvar2, rvar3,    &
    1171                          speed_x, speed_y, speed_z, weight_factor, x, y, z
    1172         INTEGER(iwp) ::  class, group, tailpoints, tail_id
    1173         LOGICAL      ::  particle_mask
    1174         INTEGER(iwp) ::  block_nr
    1175     END TYPE particle_type
    1176 
    1177     TYPE(particle_type), DIMENSION(:), POINTER             ::  particles
    1178     TYPE(particle_type)                                    ::  zero_particle
    1179 
    1180     TYPE particle_groups_type
    1181         SEQUENCE
    1182         REAL(wp) ::  density_ratio, radius, exp_arg, exp_term
    1183     END TYPE particle_groups_type
    1184 
    1185     TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::    &
    1186        particle_groups
    1187 \end{lstlisting}
    1188    };
    1189    \end{tikzpicture}
    1190 \end{frame}
    1191 
    1192 \begin{frame}[fragile]
    1193    \frametitle{Storing Lagrangian particles (I)}
    1194    \begin{itemize}
    1195    \item the easiest method for storing Lagrangian particles is an one-dimensional array
    1196    \item most applications demand particles located at a certain location (e.\,g., collision process)
    1197    \item finding this particles demands \texttt{N}$^2$ operations:
    1198       \scriptsize
    1199 \begin{lstlisting}
    1200 DO  n = 1, N
    1201    DO  k = 1, N
    1202       IF ( k /= n )  THEN
    1203          IF ( ABS( particles(k)%x - particles(n)%x )   &
    1204               < threshold )  THEN
    1205             ...
    1206          ENDIF
    1207       ENDIF
    1208    ENDDO
    1209 ENDDO
    1210 \end{lstlisting}
    1211    \end{itemize}
    1212 \end{frame}
    1213 
    1214 \begin{frame}[fragile]
    1215    \frametitle{Storing Lagrangian particles (I)}
    1216    \begin{itemize}
    1217       \item sorting the particles by their respective grid-box reduces the operations to \texttt{N}:
    1218          \scriptsize
    1219 \begin{lstlisting}
    1220 DO  n = n_start(k,j,i), n_end(k,j,i)
    1221    ...
    1222 ENDDO
    1223 \end{lstlisting}
    1224 \normalsize
    1225 \item reducing CPU time of LPM by 9.6\,\%
    1226 \item sorting increases CPU time and demands a second one-dimensional array for efficient sorting
    1227 \item this was done in the previous version of PALM
    1228 \item \textbf{new approach} in the current PALM version:
    1229 
    1230 a four-dimensional array
    1231    \end{itemize}
    1232 \end{frame}
    1233 
    1234 
    1235 % Folie 9
    1236 \begin{frame}[t]
    1237    \frametitle{Storing Lagrangian particles (III)}
    1238    \small
    1239    \begin{tikzpicture}[scale=0.6]
    1240       \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}
    1241      
    1242       % Coordinates
    1243       \coordinate (OL) at (-4,4);     
    1244       \coordinate (OC) at (0,4);
    1245       \coordinate (OR) at (4,4);
    1246       \coordinate (ML) at (-4,0);
    1247       \coordinate (MC) at (0,0);
    1248       \coordinate (MR) at (4,0);
    1249       \coordinate (UL) at (-4,-4);     
    1250       \coordinate (UC) at (0,-4);
    1251       \coordinate (UR) at (4,-4);
    1252      
    1253       \coordinate (OL2) at (-2,2);
    1254       \coordinate (OR2) at (2,2);
    1255       \coordinate (UR2) at (2,-2);
    1256       \coordinate (UL2) at (-2,-2);
    1257      
    1258       \coordinate (P1) at (-1,1);
    1259       \coordinate (P2) at (1.8,-1.3);
    1260       \coordinate (P3) at (0.4,-0.9);
    1261       \coordinate (P4) at (1,0.7);
    1262       \coordinate (P5) at (-1.3,-1.4);
    1263       \coordinate (P6) at (-1.8,1.6);
    1264       \coordinate (part_box) at (6,2);
    1265    
    1266       % Draw Boxes
    1267       \draw[-] (OL) -- (OR) -- (UR) -- (UL) -- cycle;
    1268       \draw[-] (OC) -- (UC);
    1269       \draw[-] (ML) -- (MR);     
    1270       \draw[-,dashed] (OL2) -- (OR2) -- (UR2) -- (UL2) -- cycle;
    1271      
    1272       \draw[-, thick] (MC) -- (part_box);
    1273      
    1274       % Draw dots
    1275       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OL) {};     
    1276       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OC) {};
    1277       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (OR) {};
    1278       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (ML) {};
    1279       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (MC) {};
    1280       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (MR) {};
    1281       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UL) {};
    1282       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UC) {};
    1283       \node[circle, draw, fill, color=black, ultra thick, scale=0.3] at (UR) {};
    1284 
    1285       \uncover<1>{\node[circle, draw, fill, color=red, ultra thick, scale=0.5] at (P1) {};}
    1286       \uncover<1-2>{\node[circle, draw, fill, color=yellow, ultra thick, scale=0.5] at (P2) {};}
    1287       \uncover<1-3>{\node[circle, draw, fill, color=green, ultra thick, scale=0.5] at (P3) {};}
    1288       \uncover<1-4>{\node[circle, draw, fill, color=blue, ultra thick, scale=0.5] at (P4) {};}
    1289       \uncover<1-5>{\node[circle, draw, fill, color=violet, ultra thick, scale=0.5] at (P5) {};}
    1290       \uncover<1-6>{\node[circle, draw, fill, color=magenta, ultra thick, scale=0.5] at (P6) {};}
    1291      
    1292       \node[yshift=6.0, xshift=-15.0] at (OL) {\tiny \texttt{i-1,j+1}};
    1293       \node[yshift=6.0, xshift=-15.0] at (OC) {\tiny \texttt{i,j+1}};
    1294       \node[yshift=6.0, xshift=-15.0] at (OR) {\tiny \texttt{i+1,j+1}};
    1295       \node[yshift=6.0, xshift=-15.0] at (ML) {\tiny \texttt{i-1,j}};
    1296       \node[yshift=6.0, xshift=-15.0] at (MC) {\tiny \texttt{i,j}};
    1297       \node[yshift=6.0, xshift=-15.0] at (MR) {\tiny \texttt{i+1,j}};
    1298       \node[yshift=6.0, xshift=-15.0] at (UL) {\tiny \texttt{i-1,j-1}};
    1299       \node[yshift=6.0, xshift=-15.0] at (UC) {\tiny \texttt{i,j-1}};
    1300       \node[yshift=6.0, xshift=-15.0] at (UR) {\tiny \texttt{i+1,j-1}};
    1301      
    1302      
    1303       % draw particle box
    1304       \node at (part_box) [scale=1.0] {%
    1305       \begin{tikzpicture}
    1306          \draw[-, thick, fill=white] (-0.2,0.2) -- (0.2,0.2) -- (0.2,-1.7) -- (-0.2,-1.7) -- cycle;
    1307          \uncover<2->{\node[circle, draw, fill, color=red, ultra thick, scale=0.5] at (0,0) {};}
    1308          \uncover<3->{\node[circle, draw, fill, color=yellow, ultra thick, scale=0.5] at (0,-0.3) {};}
    1309          \uncover<4->{\node[circle, draw, fill, color=green, ultra thick, scale=0.5] at (0,-0.6) {};}
    1310          \uncover<5->{\node[circle, draw, fill, color=blue, ultra thick, scale=0.5] at (0,-0.9) {};}
    1311          \uncover<6->{\node[circle, draw, fill, color=violet, ultra thick, scale=0.5] at (0,-1.2) {};}
    1312          \uncover<7->{\node[circle, draw, fill, color=magenta, ultra thick, scale=0.5] at (0,-1.5) {};}
    1313          
    1314       \end{tikzpicture}
    1315       };
    1316      
    1317       \uncover<1->{\node[text width=10em] at (10,0) {\scriptsize - all particles located in a certain grid box are stored in a \textit{small} one-dimensional particle array permanently assigned to this grid-box\\
    1318       \ \\
    1319       - LPM CPU time decreases by 22\,\% \\
    1320       \ \\
    1321       - available memory doubles since no additional arrays are needed
    1322       };}
    1323    \end{tikzpicture}
    1324    
    1325 
    1326 
    1327    
    1328 \end{frame}
    1329 
    1330 \begin{frame}[fragile]
    1331    \frametitle{Storing Lagrangian particles (IV)}
    1332    \small
    1333    \begin{itemize}
    1334    \item particles stored in another FORTRAN derived data type:
    1335 
    1336    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=0.9\textwidth, font=\Tiny,scale=1.0]
    1337    \begin{tikzpicture}
    1338    \node [yellow] {\begin{lstlisting} 
    1339 MODULE particle_attributes
    1340 
    1341     :
    1342 
    1343     TYPE  grid_particle_def
    1344         :
    1345         TYPE(particle_type), POINTER, DIMENSION(:) ::  particles
    1346     END TYPE grid_particle_def
    1347 
    1348     TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
    1349 
    1350 \end{lstlisting}
    1351    };
    1352    \end{tikzpicture}
    1353    \item particles are called at every grid-box:
    1354    \Tiny
    1355     \begin{lstlisting}
    1356 DO  i = nxl, nxr
    1357    DO  j = nys, nyn
    1358       DO  k = nzb+1, nzt
    1359          n_par = prt_count(k,j,i)
    1360          particles => grid_particles(k,j,i)%particles(1:n_par)
    1361          IF ( n_par <= 0 )  CYCLE
    1362          DO  n = 1, n_par
    1363             ...
    1364          ENDDO
    1365       ENDDO
    1366    ENDDO
    1367 ENDDO
    1368 \end{lstlisting}
    1369       \end{itemize}
    1370    
    1371 \end{frame}
    1372 
    1373 
    1374 % Folie 29
    1375 \begin{frame}[fragile]
    1376    \frametitle{How to Read netCDF Particle Data from an External Program}
    1377    \scriptsize
    1378    \begin{itemize}
    1379       \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}
    1380        \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.\\
    1381        \vspace{1mm}
    1382        Both informations can only be found on file PARTICLE\underline{ }DATA/.\\
    1383        \vspace{1mm}
    1384        For the format of this file (one per PE, i.e. filenames \underline{ }0000, \underline{ }0001, etc.) see beginning of subroutine \texttt{lpm\_data\_output\_particles}.
    1385    \end{itemize}
    1386    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=0.9\textwidth, font=\Tiny,scale=1.0]
    1387    \begin{tikzpicture}
    1388    \node [yellow] {\begin{lstlisting} 
    1389     WRITE ( 85 )  simulated_time
    1390     WRITE ( 85 )  prt_count
    1391          
    1392     DO  ip = nxl, nxr
    1393        DO  jp = nys, nyn
    1394           DO  kp = nzb+1, nzt
    1395              number_of_particles = prt_count(kp,jp,ip)
    1396              particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
    1397              IF ( number_of_particles <= 0 )  CYCLE
    1398              WRITE ( 85 )  particles
    1399           ENDDO
    1400        ENDDO
    1401     ENDDO
    1402 \end{lstlisting}
    1403    };
    1404    \end{tikzpicture}
    1405 \end{frame}
    1406 
    14071368\section{Application Example}
    14081369\subsection{Application Example}
     
    14101371% Folie 30
    14111372\begin{frame}[t]
    1412    \frametitle{Application Example: Simulation of a Convective Cloud with LCM (I)}
     1373   \frametitle{Application Examples of the LCM (I)}
    14131374   \footnotesize
    1414    \textbf{Why investigating clouds?}
    1415    \begin{itemize}
    1416       \item Clouds are very important, e.g., for climate, precipitation
    1417          \begin{itemize}
    1418             \footnotesize
    1419             \item Problem: many microphysic processes are still not sufficiently known but determine the macroscopic properties of clouds
    1420             \item Open Issues: production of rain in sufficiently short period of time, activation of aerosols,...
    1421       \end{itemize}
     1375   \textbf{The Lagrangian Cloud Model has many advantages:}
     1376   \begin{itemize}
     1377      \item Dynamics and microphysics of the cloud are directly related to physical processes of the individual droplets
     1378      \item Many microphysical processes are modeled by first principles \\
     1379      $\Rightarrow$ (almost) no parameterizations
     1380      \item The LCM provides detailed information, e.\,g., spatial and temporal evolution of the droplet spectrum, spatial distribution of the droplet concentration, droplet trajectories, ...
     1381   \end{itemize}
     1382      \textbf{How to use these advantages?}
     1383   \begin{itemize}
     1384      \item Many cloud microphysical processes are still not sufficiently understood, but have a large impact on macroscopic cloud properties
     1385      \item Open Issues: production of rain, interaction of clouds and aerosols, ...
     1386      \item Using the LCM, we are able to simulate cloud microphysics on a very accurate level, but are also able to cope the macroscale, i.\,e., the whole cloud or cloud ensemble\\
     1387      $\Rightarrow$ \textbf{new insights on clouds and their physics}
    14221388   \end{itemize}
    14231389   \vspace{1.5mm}
    1424    \textbf{What is our goal?}
    1425    \begin{itemize}
    1426       \item Analyze in-cloud turbulence effects on droplet growth and precipitation formation using an LCM
    1427    \end{itemize}
    1428    \vspace{1.5mm}
    1429    \textbf{What are the advantages?}
    1430    \begin{itemize}
    1431       \item dynamics and microphysics of the cloud are directly related to physical processes of the individual droplets
    1432       \item provides detailed information e.g. spatial and temporal evolution of the droplet spectrum, spatial distribution of the droplet concentration, droplet tracks, ...
    1433    \end{itemize} 
    1434 \end{frame}
    1435 
    1436 % Folie 32
    1437 \begin{frame}[fragile]
    1438    \frametitle{Application Example: Simulation of a Convective Cloud with LCM (II)}
     1390\end{frame}
     1391
     1392% Folie 31
     1393\begin{frame}[t]
     1394   \frametitle{Application Examples of the LCM (II)}
    14391395   \footnotesize
    1440    \textbf{Extract from the corresponding parameter file:}
    1441    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!30, text width=0.9\textwidth, font=\tiny,scale=1.0]
    1442    \begin{tikzpicture}
    1443    \node [yellow] {\begin{lstlisting} 
    1444 &inipar          humidity = .TRUE., cloud_droplets = .TRUE., ... /
    1445 
    1446 &d3par           end_time = 1800.0, ... /
    1447 
    1448 &particles_par   dt_write_particle_data = 100.0,
    1449                  bc_par_b = 'absorb',
    1450                  density_ratio = 0.001,
    1451                  
    1452                  initial_weighting_factor = 9.0E9,
    1453                  radius = 1.0E-6,
    1454                  
    1455                  psb = 20.0, pst = 2800.0,
    1456                  pdx = 4.5, pdy = 4.5, pdz = 4.5,
    1457                  
    1458                  random_start_position = .TRUE.,
    1459                  number_of_particle_groups = 1,
    1460                  dt_dopts = 100.0, dt_prel = 9000.0,/ n
    1461 \end{lstlisting}
    1462    };
    1463    \end{tikzpicture}
    1464 \end{frame}
    1465 
    1466 % Folie 33
    1467 \begin{frame}[t]
    1468    \frametitle{Application Example: Simulation of a Convective Cloud with LCM (III)}
    1469    \footnotesize
    1470    \centering
    1471    \includegraphics[scale=0.4]{particle_model_figures/snapshot.png}\\
    1472    Snapshot of cloud droplet evolution% using\\ visualization tool DVRP\\
    1473 \end{frame}
    1474 
    1475 % Folie 34
    1476 \begin{frame}[t]
    1477    \frametitle{Application Example: Simulation of a Convective Cloud with LCM (IV)}
    1478    \footnotesize
    1479    
    1480    \begin{tikzpicture}[remember picture, overlay]
    1481       \node [shift={(6.3 cm, 3.6 cm)}]  at (current page.south west)
    1482          {%
    1483          \begin{tikzpicture}[remember picture, overlay]
    1484             \node at (0.0,0.0) {   \includegraphics[scale=0.15]{particle_model_figures/turbulence_effects.png}};
    1485             \node at (0.0,2.55) {after 1600 s};
    1486             \node at (-3.3,3) {Kernel without turbulence effects};
    1487             \node at (3,3) {Kernel with turbulence effects};
    1488 
    1489          \end{tikzpicture}
    1490          };
    1491    \end{tikzpicture} 
    1492    
    1493 \end{frame}
    1494 
    1495 % Folie 35
    1496 \begin{frame}[t]
    1497    \frametitle{Application Example: Simulation of a Convective Cloud with LCM (V)}
    1498    \footnotesize
     1396   \textbf{From Riechelmann et al. (2012, NJP):}
    14991397      \begin{tikzpicture}[remember picture, overlay]
    15001398      \node [shift={(6.3 cm, 4.2 cm)}]  at (current page.south west)
     
    15091407   \end{tikzpicture}
    15101408   \ \\ 
    1511    \vspace{48mm}
     1409   \vspace{52mm}
    15121410   $\rightarrow$ Turbulence effects enhance droplet growth and lead to more realistic mass distribution function\\
    15131411\end{frame}
    15141412
    1515 % Folie 36
     1413% Folie 32
     1414\begin{frame}[t]
     1415   \frametitle{Application Examples of the LCM (III)}
     1416   \footnotesize
     1417      \textbf{From Lee et al. (2014, MAP):}
     1418   \begin{center}
     1419   \includegraphics[scale=0.25]{particle_model_figures/lee.jpg}
     1420   \end{center}
     1421   $\rightarrow$ Confirm the importance of the cloud top and the affiliated mixing processes for the initiation of rain
     1422\end{frame}
     1423
     1424% Folie 33
     1425\begin{frame}[t]
     1426   \frametitle{Application Examples of the LCM (IV)}
     1427   \footnotesize
     1428      \textbf{From Hoffmann et al. (2015, AR):}
     1429   \begin{center}
     1430   \includegraphics[scale=0.25]{particle_model_figures/hoffmann.jpg}
     1431   \end{center}
     1432   $\rightarrow$ \textcolor{blue}{Laterally entrained aerosols} contribute about two-thirds to the activation above cloud base
     1433\end{frame}
     1434
     1435% Folie 34
    15161436\begin{frame}
    15171437   \frametitle{General Warning}
Note: See TracChangeset for help on using the changeset viewer.