Changeset 1532 for palm/trunk/TUTORIAL/SOURCE
- Timestamp:
- Jan 26, 2015 1:59:17 PM (10 years ago)
- Location:
- palm/trunk/TUTORIAL/SOURCE
- Files:
-
- 12 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/TUTORIAL/SOURCE/ncl.tex
r1515 r1532 1 1 %$Id$ 2 2 \input{header_tmp.tex} 3 %\input{ ../header_lectures.tex}3 %\input{header_lectures.tex} 4 4 5 5 \usepackage[utf8]{inputenc} 6 6 \usepackage{ngerman} 7 7 \usepackage{pgf} 8 \usetheme{Dresden}9 8 \usepackage{subfigure} 10 9 \usepackage{units} … … 28 27 \ttfamily,showstringspaces=false,captionpos=b} 29 28 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} 31 31 \date{last update: \today} 32 32 \event{PALM Seminar} … … 48 48 49 49 \title[Introduction to NCL]{Introduction to NCL} 50 \author{ Siegfried Raasch}50 \author{PALM group} 51 51 52 52 \begin{document} … … 67 67 \item<1-> There are several ways how you can visualize netCDF data 68 68 \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) 71 72 \item<2-> Detailed information is available under http://www.ncl.ucar.edu 72 73 \item<3-> With the information revealed in this talk you will be able to visualize the output of this week's simulations … … 82 83 data processing and visualization, freely available 83 84 \item<2-> Portable: it is running on many different operating systems 84 including AIX, Linux, MacOSX, Cygwin/Windows85 \item<3-> It's a powerful tool for file input and output, visualization 86 and data analysis (but please \textbf{avoid the excessive usage87 of loops}, as NCL is an interpreted language) $\rightarrow$88 integrated processing environment89 \end{itemize}90 \centering91 \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 92 93 93 94 \end{frame} … … 98 99 \small 99 100 \begin{itemize} 100 \item<1-> Supports calling C and FORTRAN extendedroutines101 \item<1-> Supports calling of C and FORTRAN routines 101 102 \item<1-> Over 600 functions and procedures for visualization and 102 103 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!} 111 111 \end{itemize} 112 112 … … 121 121 \begin{itemize} 122 122 \footnotesize 123 \item<1-> data types 123 \item<1-> data types (float, double, integer, logical, ...) 124 124 \item<1-> variables 125 125 \item<1-> operators 126 126 \item<1-> expressions 127 127 \item<1-> loops 128 \item<1-> functions /procedures/graphics128 \item<1-> functions and procedures (e.g., \texttt{dim\_stat4(data\_array)}) 129 129 \end{itemize} 130 130 \item<2-> Features 131 131 \begin{itemize} 132 132 \footnotesize 133 \item<2-> query /manipulate meta data134 \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, ...) 135 135 \item<2-> array syntax / operations 136 136 \item<2-> can use user FORTRAN/C codes and commercial libraries … … 146 146 \small 147 147 \begin{itemize} 148 \item<1-> Detailed information is available under \\148 \item<1-> Detailed information is available under:\\ 149 149 \underline{http://www.ncl.ucar.edu/Download/index.shtml} 150 \item<1-> Request an Earth System Grid account150 \item<1-> For downloading, request an Earth System Grid account:\\ 151 151 \underline{http://www.earthsystemgrid.org/} 152 152 \item<2-> Download the appropriate binaries e.g. \texttt{A.tar.gz} … … 154 154 \item<2-> \texttt{\% gunzip \$HOME/A.tar.gz} 155 155 \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} 158 158 \end{itemize} 159 159 … … 166 166 \begin{itemize} 167 167 \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:\\ 169 169 csh: \texttt{setenv NCARG\underline{ }ROOT /usr/local/}\\ 170 170 \hspace{1.6em} \texttt{setenv PATH /usr/local/bin:\$PATH}\\ … … 173 173 \vspace{3mm} 174 174 \item<2-> Set the DISPLAY environment variable to indicate where to 175 display graphics as for any X11 Windows application that you176 run \\177 e.g. ksh: \texttt{export DISPLAY=localhost:13.0}, or use178 \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 179 179 \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 and183 run throughNCL. 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. 184 184 \end{itemize} 185 185 … … 191 191 \footnotesize 192 192 \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:\\ 194 194 \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS/NCL/} 195 195 \item<2-> All standard netCDF data output of PALM can be visualized by one … … 198 198 \scriptsize 199 199 \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) 202 202 \item[-]<2-> \texttt{timeseries.ncl} (time series data) 203 203 \item[-]<2-> \texttt{spectra.ncl} (spectra data) 204 204 \end{itemize} 205 205 \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:\\ 207 207 \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS} 208 208 \item<4-> The output of the plots can be changed with several parameters; … … 218 218 \frametitle{NCL Scripts Delivered with PALM (II)} 219 219 220 Using \texttt{.ncl.config} 221 \small 222 \begin{itemize} 223 \item [-]<1-> Please create a personal configuration file by copying220 Using \texttt{.ncl.config}: 221 \small 222 \begin{itemize} 223 \item<1-> Please create a personal configuration file by copying 224 224 the default configuration file 225 225 \texttt{.ncl.config.default} to the PALM working 226 226 directory \texttt{\$HOME/palm/current\underline{ }version} 227 227 and naming it \texttt{.ncl.config} 228 \item [-]<2-> \texttt{.ncl.config} is used by NCL directly, thus the228 \item<2-> \texttt{.ncl.config} is used by NCL directly, thus the 229 229 parameters have to be written according to the rules of the 230 230 scripting language NCL 231 \item [-]<3-> The configuration file contains all steering parameters with231 \item<3-> The configuration file contains all steering parameters with 232 232 a short description and can be adjusted to personal needs 233 233 \end{itemize} … … 242 242 \footnotesize 243 243 \begin{itemize} 244 \item [-]<1-> The shell script is used as follows:\\244 \item<1-> The shell script is used as follows:\\ 245 245 \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}, 247 247 \texttt{xz}, \texttt{yz}, \texttt{pr}, \texttt{sp} or 248 248 \texttt{ts} depending on the data to be plotted … … 250 250 \vspace{3mm} 251 251 \onslide<2-> 252 \begin{center} 252 253 \begin{tabular}{ccc} 253 254 \textbf{plot\underline{ }identifier} & \textbf{data used} & \textbf{ncl script}\\ 254 xy & instantaneous or time-averagedxy or 3D data & cross\underline{ }sections.ncl\\255 xz & instantaneous or time-averagedxz or 3D data & cross\underline{ }sections.ncl\\256 yz & instantaneous or time-averagedyz 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\\ 257 258 pr & profile or 3D data & profiles.ncl\\ 258 259 sp & spectra data & spectra.ncl\\ 259 260 ts & time series data & timeseries.ncl\\ 260 261 \end{tabular} 262 \end{center} 261 263 262 264 \end{frame} … … 269 271 \footnotesize 270 272 \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:\\ 272 274 \scriptsize 273 275 \texttt{palmplot \textbf{plot\underline{ }identifier} 274 parameter=value parameter= string...}276 parameter=value parameter='string' ...} 275 277 \footnotesize \\ 276 278 \vspace{2mm} 277 \item [-]<2-> A list of all available parameters can be found in the279 \item<2-> A list of all available parameters can be found in the 278 280 configuration file \texttt{.ncl.config} or in the 279 281 documentation:\\ 280 282 \uncover<3->{\texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist}}\\ 281 283 \vspace{2mm} 282 \item [-]<4-> Parameters specified in the prompt override parameters given284 \item<4-> Parameters specified in the prompt override parameters given 283 285 in the configuration file\\ 284 286 \vspace{2mm} 285 \item [-]<5-> String parameters which can contain lists (\texttt{var},287 \item<5-> String parameters which can contain lists (\texttt{var}, 286 288 \texttt{c\underline{ }var}, \texttt{vec1}, \texttt{vec2}, 287 289 \texttt{plotvec}) have to be set in single quotes and the … … 289 291 \texttt{var='pt u w'}\\ 290 292 \vspace{2mm} 291 \item [-]<6-> A short introduction for using the shell script is given by293 \item<6-> A short introduction for using the shell script is given by 292 294 typing\\ 293 295 \texttt{palmplot ?} … … 304 306 \item<1-> Starting the example run with the command\\ 305 307 \vspace{2mm} 306 \ texttt{mrun -d example\underline{ }cbl ... -r308 \hspace{0.5cm}\texttt{mrun -d example\underline{ }cbl ... -r 307 309 'd3\# pr\# ts\# xy\# xz\#'}\\ 308 310 \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\\ 310 322 \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 317 324 plot would be output to an X11 window) 318 325 \end{itemize} … … 327 334 \begin{itemize} 328 335 \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\\ 330 337 \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>} 339 343 \end{itemize} 340 344 … … 346 350 Run (example\underline{ }cbl) (III)} 347 351 \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.,\\ 349 354 \vspace{2mm} 350 355 \texttt{if(.not. isvar(\dq file\underline{ }1\dq))then}\\ … … 355 360 \vspace{2mm} 356 361 \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}\\ 358 364 \texttt{end if} 359 365 \end{itemize} 360 366 \end{frame} 361 367 … … 371 377 \end{itemize} 372 378 \centering 373 \onslide<2->\includegraphics[scale=0.2 5]{ncl_figures/vis1.png}379 \onslide<2->\includegraphics[scale=0.23]{ncl_figures/vis1.png} 374 380 375 381 \end{frame} … … 381 387 \footnotesize 382 388 \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.,\\ 384 390 \vspace{2mm} 385 391 \texttt{if(.not. isvar(\dq var\dq ))then}\\ … … 387 393 \texttt{end if} 388 394 \end{itemize} 395 \vspace{+0.2cm} 389 396 \centering 390 397 \onslide<2->\includegraphics[scale=0.3]{ncl_figures/vis2.png} … … 397 404 \frametitle{Application Example: Visualization of the Output of the Example 398 405 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} 414 419 \begin{tikzpicture}[remember picture, overlay] 415 420 \node at (current page.north west){% … … 426 431 \begin{frame} 427 432 \frametitle{More Comments} 428 \ small433 \footnotesize 429 434 \begin{itemize} 430 435 \item<1-> The other NCL scripts delivered with PALM can be used in … … 432 437 differ from script to script 433 438 \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 436 443 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 with439 thedefault values. Be sure to use the right data type440 (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})! 442 449 \end{itemize} 443 450 \end{frame} -
palm/trunk/TUTORIAL/SOURCE/particle_model_cloud_physics.tex
r1515 r1532 1 1 %$Id$ 2 2 \input{header_tmp.tex} 3 %\input{ ../header_lectures.tex}3 %\input{header_lectures.tex} 4 4 5 5 \usepackage[utf8]{inputenc} … … 24 24 \usepackage{graphicx} 25 25 \usepackage{listings} 26 \usepackage{textcomp} %neues paket 26 27 \lstset{showspaces=false,language=fortran,basicstyle= 27 28 \ttfamily,showstringspaces=false,captionpos=b} 28 29 29 \institute{Institute of Meteorology and Climatology, Leibniz Universit Àt Hannover}30 \institute{Institute of Meteorology and Climatology, Leibniz Universit{\"a}t Hannover} 30 31 \selectlanguage{english} 31 32 \date{last update: \today} … … 46 47 } 47 48 %\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}} 48 49 49 \title[PALM's Lagrangian Particle Model]{PALM's Lagrangian Particle Model} 50 50 \author{PALM group} … … 69 69 \begin{itemize} 70 70 \footnotesize 71 \item Cloud droplet simulation 71 \item Cloud droplet simulations 72 72 \item Dispersion modeling / Footprint analysis 73 73 \item Visualization … … 77 77 \begin{itemize} 78 78 \footnotesize 79 \item Particles can be transported (advected)\textbf{passively} with the \textbf{resolved-scale} flow80 \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}) 81 81 \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}) 82 82 \end{itemize} … … 445 445 \frametitle{Basic Particle Parameters (V)} 446 446 \small 447 Parameter that defines the mode of particle movement: \\ 447 Parameter that defines the mode of particle movement: 448 \vspace{+2mm} 449 448 450 The concept of LES ...\\ 449 \vspace{-5mm}450 451 \begin{center} 451 452 \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png} … … 453 454 \vspace{-5mm} 454 455 \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} 463 460 \onslide<3-> 464 Particle movement as a result of 461 \scriptsize 462 Accordingly, the particle movement is a result of: 465 463 \begin{itemize} 466 \item advection, resolved turbulence $\vec{V}_{i_{\text{resolved}}}$ 464 \scriptsize 465 \item<3-> resolved flow $\vec{V}_{{\text{resolved}}}$ 467 466 \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} 469 474 \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 489 481 \begin{frame}[t] 490 482 \frametitle{Basic Particle Parameters (VI)} … … 576 568 \end{frame} 577 569 578 % Folie 1 3570 % Folie 10 579 571 \begin{frame} 580 572 \frametitle{Basic Particle Parameters (VIII)} … … 594 586 \hspace{11.0em}location etc. 595 587 \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\\ 598 590 \hspace{11.0em}The Data Type Used for Particles),\\ 599 591 \hspace{11.0em}output is controlled by\\ … … 604 596 \end{frame} 605 597 606 % Folie 1 4598 % Folie 11 607 599 \begin{frame}[fragile] 608 600 \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] 610 603 \begin{tikzpicture} 611 604 \node [yellow] {\begin{lstlisting} 612 &inipar cloud_droplets = .TRUE., ................ / 613 614 &particles_par dt_dopts = 25.0, 605 &particles_par dt_dopts = 25.0, 615 606 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, 618 609 psb = 35.0, pst = 255.0, 619 610 psl = 935.0, psr = 1065.0, 620 pss = -5.0, 611 pss = -5.0, psn = 30.0, 621 612 pdx = 20.0, pdy = 20.0, pdz = 20.0, 622 613 random_start_position = .TRUE., / … … 624 615 }; 625 616 \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.) 628 620 \end{itemize} 629 621 \end{frame} … … 632 624 \subsection{Theory} 633 625 634 % Folie 1 5626 % Folie 12 635 627 \begin{frame}[t] 636 628 \frametitle{Theory of the Lagrangian Particle Model (I)} 637 629 \footnotesize 638 \textbf{Advection of Passive particles}\\630 \textbf{Advection of Passive Particles}\\ 639 631 \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: 650 647 \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) 652 649 {% 653 650 \begin{tikzpicture}[scale=0.3,remember picture, overlay] … … 682 679 \end{tikzpicture} 683 680 }; 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) 685 682 {% 686 683 \begin{tikzpicture}[scale=0.3,remember picture, overlay] … … 709 706 \end{tikzpicture} 710 707 }; 711 \node [shift={(9 cm, 0.6cm)}] at (current page.south west)708 \node [shift={(9 cm,2.8cm)}] at (current page.south west) 712 709 {% 713 710 \begin{tikzpicture}[scale=0.3,remember picture, overlay] … … 720 717 }; 721 718 \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 725 726 \begin{frame}[t] 726 727 \frametitle{Theory of the Lagrangian Particle Model (II)} … … 728 729 \textbf{Advection of Non-passive Particles}\\ 729 730 \ \\ 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):\\ 731 732 \vspace{4mm} 732 733 $\dfrac{dV_i}{dt} = \dfrac{1}{\tau_p} (u_i - V_i) - \delta_{i3}( 1 - \rho_0 / \rho_l ) g$\\ 733 734 \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} 736 737 \onslide<1-> 737 738 \begin{tabular}{llll} … … 744 745 \end{frame} 745 746 746 % Folie 1 7747 % Folie 14 747 748 \begin{frame}[t] 748 749 \frametitle{Theory of the Lagrangian Particle Model (III)} … … 751 752 \small 752 753 \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 1 8754 \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 760 761 \begin{frame}[t] 761 762 \frametitle{Theory of the Lagrangian Particle Model (IV)} … … 770 771 \item Every simulated droplet stands for a very high number\\ of real droplets 771 772 \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} 774 779 \item Initial weighting factor can be assigned with the parameter \texttt{initial\underline{ }weighting\underline{ }factor} 775 780 \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 collision780 781 \end{itemize} 781 782 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 794 787 \begin{frame}[t] 795 788 \frametitle{Theory of the Lagrangian Particle Model (V)} … … 798 791 \scriptsize 799 792 \begin{itemize} 800 \item \textbf{Condensation/evaporation}\\793 \item The growth of the radius of single droplet by condensation/evaporation:\\ 801 794 \vspace{1mm} 802 $ r_i \dfrac{dr_i}{dt} = \dfrac{(S - a r^{-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}}$\\ 803 796 \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$) 808 798 \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} 813 804 \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 821 809 \end{tabular} 822 810 823 811 \end{frame} 824 812 825 % Folie 20813 % Folie 17 826 814 \begin{frame}[t] 827 815 \frametitle{Theory of the Lagrangian Particle Model (VI)} 828 816 \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\\ 833 818 \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) 835 820 {% 836 821 \begin{tikzpicture}[remember picture, overlay] 837 \node at (0.0,0.0) {\includegraphics[scale=0.2 0]{particle_model_figures/collision1.png}};822 \node at (0.0,0.0) {\includegraphics[scale=0.25]{particle_model_figures/collision1.png}}; 838 823 \end{tikzpicture} 839 824 }; … … 841 826 \end{frame} 842 827 843 % Folie 21828 % Folie 18 844 829 \begin{frame}[t] 845 830 \frametitle{Theory of the Lagrangian Particle Model (VII)} 846 831 \footnotesize 847 832 \textbf{Simulation of Cloud Droplets (IV)}\\ 848 \ \\849 \scriptsize850 Concept of droplet collision with collision efficiency $\neq$ 1851 \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 22863 \begin{frame}[t]864 \frametitle{Theory of the Lagrangian Particle Model (VIII)}865 \footnotesize866 \textbf{Simulation of Cloud Droplets (V)}\\867 833 \scriptsize 868 834 \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} 870 843 \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}$: 871 844 \scriptsize … … 876 849 \end{alignat*} 877 850 \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 889 854 \begin{frame}[t] 890 \frametitle{Theory of the Lagrangian Particle Model ( IX)}855 \frametitle{Theory of the Lagrangian Particle Model (VIII)} 891 856 \footnotesize 892 \textbf{Simulation of Cloud Droplets (V I)}\\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}:\\ 895 860 \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})]$\\ 897 862 \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):\\ 899 866 \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} 902 871 \end{itemize} 903 872 \begin{tabular}{ll} 904 $\eta_E$ & = turbulent enhancement factor forcollision efficiency \\905 $E ^g$ & = collection efficiency\\873 $\eta_E$ & = turbulent enhancement of collision efficiency \\ 874 $E$ & = collision efficiency (Hall, 1980, JAS)\\ 906 875 $\langle| w_r |\rangle$ & = radial relative velocity \\ 907 $g_ {Rr}$ & = radial distribution function \\876 $g_\text{RDF}$ & = radial distribution function 908 877 \end{tabular} 909 878 910 879 \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) 912 881 {% 913 882 \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)}; 916 885 \end{tikzpicture} 917 886 }; … … 923 892 \begin{tikzpicture}[remember picture, overlay] 924 893 \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)}; 926 895 \end{tikzpicture} 927 896 }; … … 932 901 \subsection{Implementation} 933 902 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} 948 DO 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 957 ENDDO 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} 969 DO n = n_start(k,j,i), n_end(k,j,i) 970 ... 971 ENDDO 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 934 1075 % 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} 1100 DO 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} 1132 WRITE ( 85 ) simulated_time 1133 WRITE ( 85 ) prt_count 1134 1135 DO 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 1145 ENDDO 1146 \end{lstlisting} 1147 }; 1148 \end{tikzpicture} 1149 \end{frame} 1150 1151 % Folie 26 935 1152 \begin{frame} 936 1153 \frametitle{Flow Chart of Particle Code (I)} … … 1016 1233 \end{frame} 1017 1234 1018 % Folie 2 51235 % Folie 27 1019 1236 \begin{frame} 1020 1237 \frametitle{Flow Chart of Particle Code (II)} … … 1053 1270 1054 1271 \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}; 1064 1280 1065 1281 \coordinate[below=5.5cm of timeintegration] (K); … … 1076 1292 1077 1293 \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); 1082 1296 1083 1297 \node[gelb1, right=0.6cm of O] (boundary) {boundary\underline{ }conds}; 1084 1298 \node[gelb1, right=0.0cm of boundary] {swap\underline{ }timelevel}; 1085 1299 1086 \coordinate[below= 8.4cm of timeintegration] (P);1300 \coordinate[below=7.8cm of timeintegration] (P); 1087 1301 1088 1302 \node[gelb1, right=0.6cm of P] (inflow) {inflow\underline{ }turbulence}; … … 1108 1322 \draw[-, thick] (advecparticles.south) -- (L); 1109 1323 \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); 1112 1325 \draw[-, thick] (O) -- (boundary.west); 1113 1326 \draw[dashed, thick] (P) -- (inflow.west); … … 1119 1332 \end{frame} 1120 1333 1121 % Folie 2 61334 % Folie 28 1122 1335 \begin{frame} 1123 1336 \frametitle{Detailed Flow Chart of \texttt{lpm} (I)} … … 1125 1338 \begin{tikzpicture}[scale=0.87, transform shape] 1126 1339 \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.7 5cm] {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};} 1129 1342 \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})};} 1130 1343 \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})};} 1131 1344 \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})};} 1132 1345 \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})};} 1134 1347 \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-5.55cm] {calculate particle reflection from walls (subroutine \texttt{lpm\underline{ }boundary\underline{ }conds})};} 1135 1348 \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-6.15cm] {user defined actions (subroutine \texttt{user\underline{ }lpm\underline{ }advec})};} … … 1140 1353 \end{frame} 1141 1354 1142 % Folie 2 71355 % Folie 29 1143 1356 \begin{frame} 1144 1357 \frametitle{Detailed Flow Chart of \texttt{lpm} (II)} … … 1146 1359 \begin{tikzpicture}[auto, node distance=0] 1147 1360 \node (0) at (0,0) {}; 1148 \uncover<1->{\node[draw, right=0.5cm of 0, yshift=-0.7cm, text width=25em] {delete and packparticles\\ (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})};} 1149 1362 \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})};} 1150 1363 \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})};} … … 1153 1366 \end{frame} 1154 1367 1155 % Folie 281156 \begin{frame}[fragile]1157 \frametitle{The Data Type Used for Particles}1158 \small1159 \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_attributes1166 :1167 TYPE particle_type1168 SEQUENCE1169 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, z1172 INTEGER(iwp) :: class, group, tailpoints, tail_id1173 LOGICAL :: particle_mask1174 INTEGER(iwp) :: block_nr1175 END TYPE particle_type1176 1177 TYPE(particle_type), DIMENSION(:), POINTER :: particles1178 TYPE(particle_type) :: zero_particle1179 1180 TYPE particle_groups_type1181 SEQUENCE1182 REAL(wp) :: density_ratio, radius, exp_arg, exp_term1183 END TYPE particle_groups_type1184 1185 TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) :: &1186 particle_groups1187 \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 array1196 \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 \scriptsize1199 \begin{lstlisting}1200 DO n = 1, N1201 DO k = 1, N1202 IF ( k /= n ) THEN1203 IF ( ABS( particles(k)%x - particles(n)%x ) &1204 < threshold ) THEN1205 ...1206 ENDIF1207 ENDIF1208 ENDDO1209 ENDDO1210 \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 \scriptsize1219 \begin{lstlisting}1220 DO n = n_start(k,j,i), n_end(k,j,i)1221 ...1222 ENDDO1223 \end{lstlisting}1224 \normalsize1225 \item reducing CPU time of LPM by 9.6\,\%1226 \item sorting increases CPU time and demands a second one-dimensional array for efficient sorting1227 \item this was done in the previous version of PALM1228 \item \textbf{new approach} in the current PALM version:1229 1230 a four-dimensional array1231 \end{itemize}1232 \end{frame}1233 1234 1235 % Folie 91236 \begin{frame}[t]1237 \frametitle{Storing Lagrangian particles (III)}1238 \small1239 \begin{tikzpicture}[scale=0.6]1240 \definecolor{darkgreen}{rgb}{0.2,0.7,0.2}1241 1242 % Coordinates1243 \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 Boxes1267 \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 dots1275 \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 box1304 \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 needed1322 };}1323 \end{tikzpicture}1324 1325 1326 1327 1328 \end{frame}1329 1330 \begin{frame}[fragile]1331 \frametitle{Storing Lagrangian particles (IV)}1332 \small1333 \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_attributes1340 1341 :1342 1343 TYPE grid_particle_def1344 :1345 TYPE(particle_type), POINTER, DIMENSION(:) :: particles1346 END TYPE grid_particle_def1347 1348 TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: grid_particles1349 1350 \end{lstlisting}1351 };1352 \end{tikzpicture}1353 \item particles are called at every grid-box:1354 \Tiny1355 \begin{lstlisting}1356 DO i = nxl, nxr1357 DO j = nys, nyn1358 DO k = nzb+1, nzt1359 n_par = prt_count(k,j,i)1360 particles => grid_particles(k,j,i)%particles(1:n_par)1361 IF ( n_par <= 0 ) CYCLE1362 DO n = 1, n_par1363 ...1364 ENDDO1365 ENDDO1366 ENDDO1367 ENDDO1368 \end{lstlisting}1369 \end{itemize}1370 1371 \end{frame}1372 1373 1374 % Folie 291375 \begin{frame}[fragile]1376 \frametitle{How to Read netCDF Particle Data from an External Program}1377 \scriptsize1378 \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_time1390 WRITE ( 85 ) prt_count1391 1392 DO ip = nxl, nxr1393 DO jp = nys, nyn1394 DO kp = nzb+1, nzt1395 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 ) CYCLE1398 WRITE ( 85 ) particles1399 ENDDO1400 ENDDO1401 ENDDO1402 \end{lstlisting}1403 };1404 \end{tikzpicture}1405 \end{frame}1406 1407 1368 \section{Application Example} 1408 1369 \subsection{Application Example} … … 1410 1371 % Folie 30 1411 1372 \begin{frame}[t] 1412 \frametitle{Application Example : Simulation of a Convective Cloud withLCM (I)}1373 \frametitle{Application Examples of the LCM (I)} 1413 1374 \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} 1422 1388 \end{itemize} 1423 1389 \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)} 1439 1395 \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):} 1499 1397 \begin{tikzpicture}[remember picture, overlay] 1500 1398 \node [shift={(6.3 cm, 4.2 cm)}] at (current page.south west) … … 1509 1407 \end{tikzpicture} 1510 1408 \ \\ 1511 \vspace{ 48mm}1409 \vspace{52mm} 1512 1410 $\rightarrow$ Turbulence effects enhance droplet growth and lead to more realistic mass distribution function\\ 1513 1411 \end{frame} 1514 1412 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 1516 1436 \begin{frame} 1517 1437 \frametitle{General Warning}
Note: See TracChangeset
for help on using the changeset viewer.