% $Id: program_structure.tex 945 2012-07-17 15:43:01Z letzel $ \input{header_tmp.tex} %\input{../header_lectures.tex} \usepackage[utf8]{inputenc} \usepackage{ngerman} \usepackage{pgf} \usetheme{Dresden} \usepackage{subfigure} \usepackage{units} \usepackage{multimedia} \newcommand{\event}[1]{\newcommand{\eventname}{#1}} \usepackage{xmpmulti} \usepackage{tikz} \usepackage{pdfcomment} \usetikzlibrary{shapes,arrows,positioning} \def\Tiny{\fontsize{4pt}{4pt}\selectfont} \usepackage{listings} \lstset{language=[90]Fortran, basicstyle=\ttfamily \tiny, keywordstyle=\color{black}, commentstyle=\color{black}, morecomment=[l]{!\ }% Comment only with space after ! } \institute{Institut für Meteorologie und Klimatologie, Leibniz Universität Hannover} \date{last update: \today} \event{PALM Seminar} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline} {% \begin{beamercolorbox}[rightskip=-0.1cm]& {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}} \end{beamercolorbox} \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}% {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}% \end{beamercolorbox}% % \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}% % \end{beamercolorbox} } %\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.png}} \title[PALM Program Structure]{PALM Program Structure} \author{Siegfried Raasch} % Notes: % jede subsection bekommt einen punkt im menu (vertikal ausgerichtet. % jeder frame in einer subsection bekommt einen punkt (horizontal ausgerichtet) \begin{document} \begin{frame} \titlepage \end{frame} \section{PALM Program Structure} \subsection{PALM Program Structure} %Folie 01 \begin{frame} \begin{center} PALM - Program Structure \end{center} \end{frame} %Folie 02 \begin{frame} \frametitle{Contents} \begin{flushleft} This part gives a brief overview about the structure of the PALM code: \end{flushleft} \begin{itemize} \item<2->{Flow chart} \item<3->{Most important variables and how they are declared} \item<4->{Machine dependencies} \end{itemize} \end{frame} %Folie 03 \begin{frame}[fragile] \frametitle{PALM Code: General Features} \begin{itemize} \item<2->{PALM is written in FORTRAN90. Current version number is 3.8.} \item<3->{With some very minor exceptions, the code is using the FORTRAN standard, so it should compile without error on any FORTRAN90/95 compiler.} \item<4->{Data handling between subroutines is mostly done using FORTRAN90-modules instead of using parameter lists. \begin{minipage}{0.45\textwidth} \centering \begin{lstlisting} SUBROUTINE parin USE control_parameters USE grid_variables . . \end{lstlisting} \end{minipage} \begin{minipage}{0.45\textwidth} \centering \begin{lstlisting} SUBROUTINE parin( a, b, c, ... ) INTEGER :: a, b REAL :: c, ... . . \end{lstlisting} \end{minipage} \mbox{All modules can be found in file .../trunk/SOURCE/modules.f90}} \end{itemize} \end{frame} %Folie 04 \begin{frame} \frametitle{PALM Code: General Features} \begin{itemize} \item<2->{Machine dependent code segments, e.g. calls for flushing of buffers (CALL FLUSH / CALL FLUSH\_), or calls of special software (e.g. netCDF or dvrp), which are available on some machines only, are activated using preprocessor directives.} \item<3->{The serial and parallel PALM version is also activated by preprocessor directives.} \item<4->{The code is splitted into several files, most of them containing just one subroutine, e.g. file ``parin.f90'' contains ``SUBROUTINE parin''.} \item<5->{The code includes an interface which can be used by users to add their own code extensions. Advantage: These code extensions can be reused (normally) for future PALM releases without requiring any changes.} \end{itemize} \end{frame} %Folie 05 \begin{frame} \frametitle{PALM Flow Chart (I)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=15pt, font=\tiny] \tikzstyle{line} = [draw, -] \begin{tikzpicture}[auto, node distance=0] \uncover<1->{\node [yellow] (PALM) {PALM};} \uncover<1->{\node [white2, right=0.2cm of PALM] (PALMspace) {};} \uncover<2->{\node [yellow, below=0.2cm of PALMspace] (localtre) {local\_tremain\_ini};} \path<2-> [line] (PALM.south) |- (localtre.west); \uncover<3->{\node [yellow, below=0.05cm of localtre] (initdvrp) {init\_dvrp\_logging};} \path<3-> [line] (PALM.south) |- (initdvrp.west); \uncover<4->{\node [yellow, below=0.05cm of initdvrp] (parin) {parin};} \path<4-> [line] (PALM.south) |- (parin.west); \uncover<4->{\node [white, right=0.2cm of parin] (parinspace) {};} \uncover<5->{\node [yellow, below=0cm of parinspace] (readvar) {read\_var\_list};} \path<5-> [line,dashed] (parin.south) |- (readvar.west); \uncover<6->{\node [yellow, below=0.05cm of readvar] (packageparin) {package\_parin};} \path<6-> [line,dashed] (parin.south) |- (packageparin.west); \uncover<7->{\node [yellow, below=0.05cm of packageparin] (userparin) {user\_parin};} \path<7-> [line] (parin.south) |- (userparin.west); \uncover<8->{\node [yellow, below=1.4cm of parin] (initpeg) {init\_pegrid};} \path<8-> [line] (PALM.south) |- (initpeg.west); \uncover<8->{\node [white, right=0.2cm of initpeg] (initpegspace) {};} \uncover<9->{\node [yellow, below=0cm of initpegspace] (poisfftinit) {poisfft\_init};} \path<9-> [line] (initpeg.south) |- (poisfftinit.west); \uncover<10->{\node [yellow, below=0.3cm of initpeg] (initgrid) {init\_grid};} \path<10-> [line] (PALM.south) |- (initgrid.west); \uncover<11->{\node [yellow, below=0.05cm of initgrid] (checkpara) {check\_parameters};} \path<11-> [line] (PALM.south) |- (checkpara.west); \uncover<12->{\node [yellow, below=0.05cm of checkpara] (header) {header};} \path<12-> [line] (PALM.south) |- (header.west); \uncover<12->{\node [white, right=0.2cm of header] (headerspace) {};} \uncover<13->{\node [yellow, below=0cm of headerspace] (userheader) {user\_header};} \path<13-> [line,dashed] (header.south) |- (userheader.west); \uncover<1->{\node [white, below=5.8cm of PALM] (continu2) {};} \path<1-> [line,dashed] (PALM.south) |- (continu2.north); \uncover<1->{\node [white, below=5.2cm of PALM] (continu1) {};} \path<1-> [line] (PALM.south) |- (continu1.north); \end{tikzpicture} \end{frame} %Folie 06 \begin{frame} \frametitle{PALM Flow Chart (II)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{whitelarge} = [rectangle, text width=0.43\textwidth, font=\tiny] \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.43\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{line} = [draw, -] \begin{tikzpicture}[auto, node distance=0] \uncover<1->{\node [white2] (contino1) {};} \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};} \uncover<2->{\node [yellow, right=0.2cm of PALM] (init3d) {init\_3d\_model};} \path<2-> [line] (PALM.south) |- (init3d.west); \uncover<2->{\node [white, right=0.05cm of init3d] (init3dspace) {};} \uncover<2->{\node [whitelarge, right=0.05cm of init3d] (init3dspacelarge) {};} \uncover<3->{\node [yellowLarge, below=-0.05cm of init3dspacelarge] (init1d) {init\_1d\_model (calls various subroutines)};} \path<3-> [line,dashed] (init3d.south) |- (init1d.west); \uncover<4->{\node [yellow, below=0.5cm of init3dspace] (initslope) {init\_slope};} \path<4-> [line,dashed] (init3d.south) |- (initslope.west); \uncover<5->{\node [yellow, below=0.05cm of initslope] (disturbh) {disturb\_heatflux};} \path<5-> [line,dashed] (init3d.south) |- (disturbh.west); \uncover<6->{\node [yellow, below=0.05cm of disturbh] (initrank) {init\_rankine};} \path<6-> [line,dashed] (init3d.south) |- (initrank.west); \uncover<7->{\node [yellow, right=0.05cm of initrank] (initpt) {init\_pt\_anomaly};} \path<7-> [line] (initrank.east) -- (initpt.west); \uncover<8->{\node [yellow, below=0.05cm of initrank] (disturbf) {disturb\_field};} \path<8-> [line,dashed] (init3d.south) |- (disturbf.west); \uncover<9->{\node [yellow, right=0.05cm of disturbf] (pres) {pres};} \path<9-> [line] (disturbf.east) -- (pres.west); \uncover<9->{\node [white, below=-0.05cm of pres] (presspace) {};} \uncover<10->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};} \path<10-> [line] (pres.east) -| (poisfft.north); \uncover<11->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};} \path<11-> [line] (pres.east) -| (sor.north); \uncover<12->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};} \path<12-> [line] (pres.east) -| (poismg.north); \uncover<13->{\node [yellow, below=0.4cm of disturbf] (read3d) {read\_3d\_binary};} \path<13-> [line,dashed] (init3d.south) |- (read3d.west); \uncover<14->{\node [yellow, right=0.05cm of read3d] (initdvrp) {init\_dvrp};} \path<14-> [line] (read3d.east) -- (initdvrp.west); \uncover<15->{\node [yellowlarge, right=0.05cm of initdvrp] (initcloud) {init\_cloud\_physics};} \path<15-> [line] (initdvrp.east) -- (initcloud.west); \uncover<16->{\node [yellow, below=0.05cm of read3d] (initpart) {init\_particles};} \path<16-> [line] (init3d.south) |- (initpart.west); \uncover<16->{\node [white, right=0.05cm of initpart] (initpartspace) {};} \uncover<17->{\node [yellow, below=-0.05cm of initpartspace] (userinitpart) {user\_init\_particles};} \path<17-> [line] (initpart.south) |- (userinitpart.west); \uncover<18->{\node [yellow, below=0.05cm of userinitpart] (sortpart) {sort\_particles};} \path<18-> [line] (initpart.south) |- (sortpart.west); \uncover<19->{\node [yellow, below=0.05cm of sortpart] (dataoutput) {data\_output\_dvrp};} \path<19-> [line,dashed] (initpart.south) |- (dataoutput.west); \uncover<20->{\node [yellow, right=0.05cm of dataoutput] (userdvrp) {user\_dvrp\_coltab};} \path<20-> [line,dashed] (dataoutput.east) -- (userdvrp.west); \uncover<21->{\node [yellow, below=1.45cm of initpart] (initadvec) {init\_advec};} \path<21-> [line] (init3d.south) |- (initadvec.west); \uncover<22->{\node [yellow, right=0.05cm of initadvec] (userinit) {user\_init};} \path<22-> [line] (initadvec.east) -- (userinit.west); \uncover<23->{\node [yellow, below=5.8cm of init3d] (dataout2d) {data\_output\_2d};} \path<23-> [line,dashed] (PALM.south) |- (dataout2d.west); \uncover<24->{\node [yellow, right=0.05cm of dataout2d] (dataout3d) {data\_output\_3d};} \path<24-> [line] (dataout2d.east) -- (dataout3d.west); \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};} \path<1-> [line,dashed] (contino1.south) |- (continu2.north); \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};} \path<1-> [line] (PALM.south) |- (continu1.north); \end{tikzpicture} \end{frame} %Folie 07 \begin{frame} \frametitle{PALM Flow Chart (III)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny] \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{line} = [draw, -] \tikzstyle{linered} = [draw, color=red, -] \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny] \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny] \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny] %"align=center" hinzufügen, um in den boxen zu zentrieren. \begin{tikzpicture}[auto, node distance=0] \uncover<1->{\node [white2] (contino1) {};} \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};} \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};} \uncover<1->{\node [whitebox, right=0.3cm of PALM] (timeintegrline) {};} \path<1-> [line] (PALM.south) |- (timeintegr.west); \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};} \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};} \uncover<1->{\node [Bigwhite, right=0.05cm of timeintegr] (timeintegrspacebox) {};} \uncover<1->{\node [yellow, below=-0.05cm of timeintegrspace] (timestep) {timestep};} \path<1-> [line] (timeintegr.south) |- (timestep.west); \uncover<1->{\node [yellow, below=0.05cm of timestep] (runcontrol) {run\_control};} \path<1-> [line] (timeintegr.south) |- (runcontrol.west); \uncover<1->{\node [yellow, right=0.05cm of runcontrol] (flowstatistics) {flow\_statistics};} \path<1-> [line] (runcontrol.east) -- (flowstatistics.west); \uncover<1->{\node [yellowLarge, below=0.95cm of timeintegrspacelarge] (useractions) {user\_actions (before\_timestep)};} \path<1-> [line] (timeintegr.south) |- (useractions.west); \uncover<1->{\node [yellowLarge, below=0.05cm of useractions] (timestepscheme) {timestep\_scheme\_steering};} \path<1-> [line] (timeintegr.south) |- (timestepscheme.west); \uncover<1->{\node [Bigbox, below=1.75cm of timeintegrspacebox] (bigbox) {};} % \path<1-> [line] (timeintegr.south) |- (bigbox.west); \uncover<1->{\node [white, below=2cm of timeintegrline] (boxlinespace) {};} \path<1-> [line] (timeintegrline.south) |- (boxlinespace.north); \uncover<1->{\node [yellowLarge, below=0.4cm of timestepscheme] (prognosticequno) {prognostic\_equations\_noopt};} \uncover<1->{\node [yellowLarge, right=0.05cm of prognosticequno] (prognosticequca) {prognostic\_equations\_cache};} \uncover<1->{\node [yellowLarge, below=0.05cm of prognosticequca] (prognosticequve) {prognostic\_equations\_vector};} \uncover<1->{\node [boxinfo, below=-0.025cm of prognosticequno] (Boxinfo) {For details, see \\ PALM Flow Chart (V).};} \path<1-> [linered] (boxlinespace.north) -| (prognosticequca.north); \path<1-> [line] (boxlinespace.north) -| (prognosticequno.north); \uncover<1->{\node [redsmall, above=0.3cm of prognosticequca] (redadv) {standard\\advection};} \uncover<1->{\node [yellow, below=2.7cm of runcontrol] (advecpart) {advec\_particles};} \path<1-> [line,dashed] (advecpart.west) -| (timeintegr.south); \uncover<1->{\node [yellowLarge, right=0.05cm of advecpart] (userpartatt) {user\_particle\_attributes + more};} \path<1-> [line] (advecpart.east) -- (userpartatt.west); \uncover<1->{\node [yellowLarge, below=2.15cm of timestepscheme] (interactiondrop) {interaction\_droplets\_ptq};} \path<1-> [line,dashed] (interactiondrop.west) -| (timeintegr.south); \uncover<1->{\node [yellow, below=0.535cm of advecpart] (asselinfilter) {asselin\_filter};} \path<1-> [line,dashed] (asselinfilter.west) -| (timeintegr.south); \uncover<1->{\node [yellow, below=0.05cm of asselinfilter] (swaptimelevel) {swap\_timelevel};} \path<1-> [line] (swaptimelevel.west) -| (timeintegr.south); \uncover<1->{\node [yellow, right=0.05cm of swaptimelevel] (boundaryconds) {boundary\_conds};} \path<1-> [line] (swaptimelevel.east) -- (boundaryconds.west); \uncover<1->{\node [yellow, below=0.05cm of swaptimelevel] (disturbfield) {disturb\_field};} \path<1-> [line,dashed] (disturbfield.west) -| (timeintegr.south); \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};} \path<1-> [line,dashed] (contino1.south) |- (continu2.north); \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};} \path<1-> [line] (PALM.south) |- (continu1.north); \end{tikzpicture} \end{frame} %Folie 08 \begin{frame} \frametitle{PALM Flow Chart (IV)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny] \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{line} = [draw, -] \tikzstyle{linered} = [draw, color=red, -] \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny] \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny] \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny] %"align=center" hinzufügen, um in den boxen zu zentrieren. \begin{tikzpicture}[auto, node distance=0] \uncover<1->{\node [white2] (contino1) {};} \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};} \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};} \path<1-> [line] (PALM.south) |- (timeintegr.west); \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};} \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};} \uncover<1->{\node [yellow, below=-0.05cm of timeintegrspace] (pres) {pres};} \path<1-> [line] (timeintegr.south) |- (pres.west); \uncover<1->{\node [white, below=-0.05cm of pres] (presspace) {};} \uncover<1->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};} \path<1-> [line] (pres.east) -| (poisfft.north); \uncover<1->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};} \path<1-> [line] (pres.east) -| (sor.north); \uncover<1->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};} \path<1-> [line] (pres.east) -| (poismg.north); \uncover<1->{\node [yellow, below=0.355cm of pres] (boundaryconds) {boundary\_conds};} \path<1-> [line,dashed] (timeintegr.south) |- (boundaryconds.west); \uncover<1->{\node [yellow, below=0.05cm of boundaryconds] (computevpt) {compute\_vpt};} \path<1-> [line,dashed] (timeintegr.south) |- (computevpt.west); \uncover<1->{\node [yellowLarge, right=0.05cm of computevpt] (calcliquidwatercontent) {calc\_liquid\_water\_content};} \path<1-> [line] (computevpt.east) -- (calcliquidwatercontent.west); \uncover<1->{\node [yellow, below=0.05cm of computevpt] (prandtlfluxes) {prandtl\_fluxes};} \path<1-> [line,dashed] (timeintegr.south) |- (prandtlfluxes.west); \uncover<1->{\node [yellow, below=0.05cm of prandtlfluxes] (diffusivities) {diffusivities};} \path<1-> [line] (timeintegr.south) |- (diffusivities.west); \uncover<1->{\node [yellowLarge, below=2.855cm of timeintegrspacelarge] (useractionsafter) {user\_actions (after\_integration)};} \path<1-> [line] (timeintegr.south) |- (useractionsafter.west); \uncover<1->{\node [yellow, below=0.575cm of diffusivities] (checkforrestart) {check\_for\_restart};} \path<1-> [line] (timeintegr.south) |- (checkforrestart.west); \uncover<1->{\node [yellow, right=0.05cm of checkforrestart] (localtremain) {local\_tremain};} \path<1-> [line] (checkforrestart.east) -- (localtremain.west); \uncover<1->{\node [yellow, below=1.1cm of diffusivities] (flowstatistics) {flow\_statistics};} \path<1-> [line,dashed] (timeintegr.south) |- (flowstatistics.west); \uncover<1->{\node [yellow, right=0.05cm of flowstatistics] (sumup3ddata) {sum\_up\_3d\_data};} \path<1-> [line] (flowstatistics.east) -- (sumup3ddata.west); \uncover<1->{\node [yellow, right=0.05cm of sumup3ddata] (calcspectra) {calc\_spectra};} \path<1-> [line] (sumup3ddata.east) -- (calcspectra.west); \uncover<1->{\node [yellow, below=0.05cm of flowstatistics] (runcontrol) {run\_control};} \path<1-> [line,dashed] (timeintegr.south) |- (runcontrol.west); \uncover<1->{\node [yellow, right=0.05cm of runcontrol] (dataoutput) {data\_output\_***};} \path<1-> [line] (runcontrol.east) -- (dataoutput.west); \uncover<1->{\node [yellow, below=0.05cm of runcontrol] (disturbheatflux) {disturb\_heatflux};} \path<1-> [line,dashed] (timeintegr.south) |- (disturbheatflux.west); \uncover<1->{\node [yellowLarge, below=2.125cm of useractionsafter] (useractionsaftert) {user\_actions (after\_timestep)};} \path<1-> [line] (timeintegr.south) |- (useractionsaftert.west); \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};} \path<1-> [line,dashed] (contino1.south) |- (continu2.north); \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};} \path<1-> [line] (PALM.south) |- (continu1.north); \end{tikzpicture} \end{frame} %Folie 09 \begin{frame} \frametitle{PALM Flow Chart (V)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny] \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.255\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{yellowLarge} = [rectangle, draw, align=center, fill=yellow!20, text width=0.32\textwidth, minimum size=12pt, font=\scriptsize] \tikzstyle{line} = [draw, -] \tikzstyle{linered} = [draw, color=red, -] \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny] \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=1\textwidth, minimum size=183pt, font=\tiny] \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.18\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{bigbox} = [rectangle, draw, fill=white!100, text width=0.21\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{bigbox2} = [rectangle, draw, align=center, fill=white!100, text width=0.29\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{framebox} = [rectangle, draw, text width=0.2\textwidth, minimum size=104pt, font=\tiny] \tikzstyle{Endbox} = [rectangle, draw, fill=gray!20, text width=0.21\textwidth, minimum size=12pt, font=\tiny] %"align=center" hinzufügen, um in den boxen zu zentrieren. \begin{tikzpicture}[auto, node distance=0, >=stealth] \uncover<1->{\node [Bigbox] (bigbox) {};} \uncover<1->{\node [redsmall, above=-0.23cm of bigbox] (redadv) {standard advection};} \uncover<1->{\node [yellow, below=0.1cm of redadv] (calcmeanptprofile) {calc\_mean\_pt\_profile};} \uncover<1->{\node [yellowLarge, left=0.5cm of calcmeanptprofile] (prognosticequationsnoopt) {prognostic\_equations\_noopt};} \uncover<1->{\node [yellowLarge, right=0.5cm of calcmeanptprofile] (prognosticequationscache) {prognostic\_equations\_cache};} \uncover<1->{\node [yellowLarge, below=2.35cm of prognosticequationscache] (prognosticequationsvector) {prognostic\_equations\_vector};} \uncover<1->{\node [yellow, below=-0.05cm of calcmeanptprofile] (calcradiation) {calc\_radiation};} \uncover<1->{\node [yellow, below=-0.05cm of calcradiation] (impactoflatentheat) {impact\_of\_latent\_heat};} \uncover<1->{\node [yellow, below=-0.05cm of impactoflatentheat] (calcprecipitation) {calc\_precipitation};} \uncover<1->{\node [yellow, below=-0.05cm of calcprecipitation] (productioneinit) {production\_e\_init};} \uncover<1->{\node [whitesmall, left=-1.4cm of productioneinit] (productioneinitspace1) {};} \uncover<1->{\node [whitesmall, below=0cm of productioneinitspace1] (productioneinitspace2) {};} \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationscache] (listingscache) { \texttt{\linespread {0.7}\selectfont\noindent DO i=nxl,nxr\\ \quad DO j=nys,nyn\\ \quad \quad CALL \textcolor{blue}{u-subr}\\ \quad \quad CALL \textcolor{blue}{v-subr}\\ \quad \quad CALL \textcolor{blue}{w-subr}\\ \quad \quad CALL \textcolor{blue}{pt-subr}\\ \quad \quad CALL \textcolor{blue}{q or s-subr}\\ \quad \quad CALL \textcolor{blue}{e-subr}\\ \quad ENDDO\\ ENDDO\\ } };} \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationsvector] (listingsvector) { \texttt{\linespread {0.7}\selectfont\noindent CALL \textcolor{blue}{u-subr}\\ CALL \textcolor{blue}{v-subr}\\ .\\ .\\ .\\ !within subroutines:\\ DO i=nxl,nxr\\ \quad DO j=nys,nyn\\ \quad \quad DO k=nzb+1,nzt\\ \quad \quad \quad \quad ...\\ \quad \quad ENDDO\\ \quad ENDDO\\ ENDDO\\ } };} \uncover<1->{\node [bigbox, below=0.05cm of prognosticequationsnoopt] (listingsnoopt1) { \texttt{\linespread {0.7}\selectfont\noindent DO i=nxl,nxr\\ \quad DO j=nys,nyn\\ \quad \quad CALL \textcolor{blue}{u-subr}\\ \quad ENDDO\\ ENDDO\\ } };} \uncover<1->{\node [bigbox, below=0.05cm of listingsnoopt1] (listingsnoopt2) { \texttt{\linespread {0.7}\selectfont\noindent DO i=nxl,nxr\\ \quad DO j=nys,nyn\\ \quad \quad CALL \textcolor{blue}{v-subr}\\ \quad ENDDO\\ ENDDO\\ } };} \uncover<1->{\node [bigbox, below=1.95cm of listingsnoopt2] (listingsnoopt3) { \texttt{\linespread {0.7}\selectfont\noindent DO i=nxl,nxr\\ \quad DO j=nys,nyn\\ \quad \quad CALL \textcolor{blue}{e-subr}\\ \quad ENDDO\\ ENDDO\\ } };} \path<1-> [line,dotted] (listingsnoopt2.south) |- (listingsnoopt3.north); \uncover<1->{\node [whitesmall, right=-1.35cm of listingsnoopt2] (listingsnoopt251) {};} \uncover<1->{\node [whitesmall, below=0.8cm of listingsnoopt251] (listingsnoopt252) {\texttt{\textcolor{blue}{w\\pt\\q or s}}};} \uncover<1->{\node [bigbox2, below=-0.25cm of productioneinitspace2] (foreachvariable) { \textcolor{blue}{ \textbf{\underline{For each variable:}}\\ u-, v-, w-component,\\ pt, q or s, sa, e (SGS-TKE) } };} \uncover<1->{\node [whitesmall, right=-2.08cm of foreachvariable] (foreachvariablespace1) {};} \uncover<1->{\node [whitesmall, below=-0.18cm of foreachvariablespace1] (foreachvariablespace2) {};} \uncover<1->{\node [yellowlarge, below=0.05cm of foreachvariablespace2] (advecuvws) {advec\_\{uvws\}};} \path<1-> [line] (advecuvws.west) -| (foreachvariable.west); \uncover<1->{\node [yellowlarge, below=-0.05cm of advecuvws] (diffusionuvwse) {diffusion\_\{uvwse\}};} \path<1-> [line] (diffusionuvwse.west) -| (foreachvariable.west); \uncover<1->{\node [yellowlarge, below=-0.05cm of diffusionuvwse] (coriolis) {coriolis};} \path<1-> [line,dashed] (coriolis.west) -| (foreachvariable.west); \uncover<1->{\node [yellowlarge, below=-0.05cm of coriolis] (buoyancy) {buoyancy};} \path<1-> [line,dashed] (buoyancy.west) -| (foreachvariable.west); \uncover<1->{\node [yellowlarge, below=-0.05cm of buoyancy] (useractionstend) {\mbox{user\_actions (i,j,***-tendency)}};} \path<1-> [line] (useractionstend.west) -| (foreachvariable.west); \uncover<1->{\node [yellowlarge, below=-0.05cm of useractionstend] (productione) {production\_e};} \path<1-> [line,dashed] (productione.west) -| (foreachvariable.west); \uncover<1->{\node [framebox, below=-1.025cm of foreachvariable] (foreachvariableframe) {};} \uncover<1->{\draw [<-,line width=5pt, color=blue] (1,0.2) -- (1.5,1);} \uncover<1->{\draw [<-,line width=5pt, color=blue] (-1.54,0.2) -- (-2.04,1);} \uncover<2->{\node [Endbox, below=6.05cm of redadv] (endbox) { \texttt{\linespread {0.7}\selectfont\noindent !within subroutines:\\ DO k=nzb+1,nzt\\ \quad \quad \textcolor{blue}{...}\\ ENDDO\\ } };} \uncover<2->{\draw [<-,thick] (endbox.east) -- (listingscache.west);} \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt1.east);} \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt2.east);} \uncover<2->{\draw [<-,thick] (endbox.west) -- (listingsnoopt3.east);} \end{tikzpicture} \end{frame} %Folie 10 \begin{frame} \frametitle{PALM Flow Chart (VI)} \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny] \tikzstyle{whitelarge} = [rectangle, text width=0.3\textwidth, font=\tiny] \tikzstyle{whitesmall} = [rectangle, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{white2} = [rectangle, text width=0] \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.08\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowlarge} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{yellowLarge} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, minimum size=13pt, font=\tiny] \tikzstyle{line} = [draw, -] \tikzstyle{linered} = [draw, color=red, -] \tikzstyle{Bigwhite} = [rectangle, text width=0.63\textwidth, minimum size=35pt, font=\tiny] \tikzstyle{Bigbox} = [rectangle, draw, fill=gray!20, text width=0.65\textwidth, minimum size=33pt, font=\tiny] \tikzstyle{redsmall} = [rectangle, draw, align=center, fill=red!100, text width=0.08\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{boxinfo} = [rectangle, align=center, text width=0.3\textwidth, minimum size=12pt, font=\tiny] \tikzstyle{whitebox} = [rectangle, text width=0.2\textwidth, minimum size=12pt, font=\tiny] %"align=center" hinzufügen, um in den boxen zu zentrieren. \begin{tikzpicture}[auto, node distance=0] \uncover<1->{\node [white2] (contino1) {};} \uncover<1->{\node [white2, below=0.26cm of contino1] (PALM) {};} \uncover<1->{\node [yellow, right=0.2cm of PALM] (timeintegr) {time\_integration};} \path<1-> [line] (PALM.south) |- (timeintegr.west); \uncover<1->{\node [white, right=0.05cm of timeintegr] (timeintegrspace) {};} \uncover<1->{\node [whitelarge, right=0.05cm of timeintegr] (timeintegrspacelarge) {};} \uncover<1->{\node [white, below=0.8cm of timeintegr] (boxlinespace) {};} \uncover<1->{\node [white, below=1.3cm of timeintegr] (boxlinespacedash) {};} \path<1-> [line] (timeintegr.south) |- (boxlinespace.north); \path<1-> [line,dashed] (timeintegr.south) |- (boxlinespacedash.north); \uncover<1->{\node [yellow, below=2cm of timeintegr] (write3dbinary) {write\_3d\_binary};} \path<1-> [line,dashed] (PALM.south) |- (write3dbinary.west); \uncover<1->{\node [yellow, right=0.05cm of write3dbinary] (writevarlist) {write\_var\_list};} \path<1-> [line] (write3dbinary.east) -- (writevarlist.west); \uncover<1->{\node [yellow, below=0.05cm of write3dbinary] (writeparticles) {write\_particles};} \path<1-> [line] (PALM.south) |- (writeparticles.west); \uncover<1->{\node [yellow, below=0.05cm of writeparticles] (header) {header};} \path<1-> [line] (PALM.south) |- (header.west); \uncover<1->{\node [yellow, right=0.05cm of header] (userheader) {user\_header};} \path<1-> [line] (header.east) -- (userheader.west); \uncover<1->{\node [yellow, below=0.05cm of header] (userlastactions) {user\_last\_actions};} \path<1-> [line] (PALM.south) |- (userlastactions.west); \uncover<1->{\node [yellow, below=0.05cm of userlastactions] (cpustatistics) {cpu\_statistics};} \path<1-> [line] (PALM.south) |- (cpustatistics.west); \uncover<1->{\node [white2, below=5.6cm of PALM] (continu2) {};} \path<1-> [line,dashed] (contino1.south) |- (continu2.north); \uncover<1->{\node [white2, below=5.0cm of PALM] (continu1) {};} \path<1-> [line] (PALM.south) |- (continu1.north); \end{tikzpicture} \end{frame} %Folie 11 \begin{frame}[fragile] \frametitle{Important Variables and Their Declaration} \begin{itemize} \item<2->{3D-arrays of prognostic variables are named $\Psi_m$, $\Psi$, and $\Psi_p$ for time level $t-\Delta t$, $t$, and $t+\Delta T$, respectively, with $\Psi = u$, $v$, $w$, $pt$, $q$, $e$, $sa$} \item<3->{They are by default declared as $\Psi$($z$,$y$,$x$) or $\Psi$($k$,$j$,$i$), e.g.\\ \begin{minipage}{0.2\textwidth} with\\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} u(nzb:nzt+1,nysg:nyng,nxlg:nxrg) nysg = nys - ngl, nyng = nyn + ngl nxlg = nxl - ngl, nxrg = nxr + ngl nzb, nzt (bottom, top) nys, nyn (south, north) nxl, nxr (left, right) \end{lstlisting} \end{minipage}\\ as the index limits of the (sub-)domain. ngl is the number of ghost layers which depends on the advection scheme ( ngl = 3 for the default Wicker-Skamarock scheme) } \end{itemize} \end{frame} %Folie 12 \begin{frame}[fragile] \frametitle{Important Variables and Their Declaration} \begin{itemize} \item<1->{If only one processor is used, then\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} nxl = 0; nxr = nx nys = 0; nyn = ny \end{lstlisting} \end{minipage}\\ } \item<2->{For speed optimization, most of the 3D-variables are declared as pointers, e.g.\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} REAL, DIMENSION(:,:,:), POINTER :: u, u_m, u_p, ... \end{lstlisting} \end{minipage}\\ This does not affect the usage of these variables in the code in (almost) any way. } \end{itemize} \end{frame} %Folie 13 \begin{frame}[fragile] \frametitle{Some Other Frequently Used Variables} \begin{table}[htbp] \centering % \caption{Add caption} \begin{tabular}{|l|l|p{0.22\linewidth}|l|} \hline variable & index bounds & meaning & comment\\ \hline \hline \texttt{\tiny zu } & \texttt{\tiny nzb:nzt+1 }& \tiny heights of the scalar (u,v) grid levels & \texttt{\tiny zu(0)=-zu(1)}\\ \hline \texttt{\tiny zw } & \texttt{\tiny nzb:nzt+1 }& \tiny heights of the w grid level & \texttt{\tiny zw(0)=0 }\\ \hline \texttt{\tiny dzu } & \texttt{\tiny 1:nzt+1 }& \tiny vertical grid spacings between scalar grid levels & \texttt{\tiny dzu(k)=zu(k)-zu(k-1)}\\ \hline \texttt{\tiny ddzu } & \texttt{\tiny 1:nzt+1 }& \tiny inverse of grid spacings & \texttt{\tiny ddzu(k)=1.0/dzu(k)}\\ \hline \texttt{\tiny dx } & & {\tiny grid spacing along x} & \\ \hline \texttt{\tiny ddx } & & {\tiny inverse of dx} & \texttt{\tiny ddx=1.0/dx }\\ \hline \texttt{\tiny current\_timestep\_number} & & {\tiny timestep counter} & \\ \hline \texttt{\tiny simulated\_time }& & {\tiny simulated time in seconds} & \\ \hline \end{tabular}% % \label{tab:addlabel}% \end{table}% \end{frame} %Folie 14 \begin{frame}[fragile] \frametitle{Preprocessor Directives (I)} \begin{itemize} \item<1->{Preprocessor directives are special lines in the code which allows to compile alternative parts of the code depending on so-called \textbf{define-string} switches.\\ Code example:\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} #if defined( __abc ) CALL FLUSH( 9 ) #else CALL FLUSH_( 9 ) #endif \end{lstlisting} \end{minipage}\\ If now the compiler is called e.g.\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} ifort -cpp -D __abc ... (other options) \end{lstlisting} \end{minipage}\\ then the line containing ``\texttt{\tiny CALL FLUSH( 9 )}'' is compiled. \\If the compiler call is\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} ifort -cpp ... (other options) \end{lstlisting} \end{minipage}\\ the line containing ``\texttt{\tiny CALL FLUSH\_( 9 )}'' is compiled. } \end{itemize} \end{frame} %Folie 14 \begin{frame}[fragile] \frametitle{Preprocessor Directives (I)} \begin{itemize} \item<1->{The preprocessor directives require to include the compiler option ``\texttt{\scriptsize-cpp}'' in any way. Otherwise, the compilation will give error messages. \textbf{The option has to be given in the configuration file} \texttt{\scriptsize .mrun.config.} \textbf{Different compilers may require different options!}}\\ \item<2->{Define-string switches can be combined using logical AND / OR operators \&\& / $\lvert \lvert$.\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} #if defined ( __abc && __def ) \end{lstlisting} \end{minipage} } \end{itemize} \end{frame} %Folie 15 \begin{frame}[fragile] \frametitle{Preprocessor Directives (II)} In the PALM code, define-string switches are used for following reasons: \begin{itemize} \item<2->{To switch between system dependent subroutines for:\\ \begin{itemize} \item<2->{\texttt{\scriptsize \_\_ibm}} \quad IBM-Regatta systems\\ \item<2->{\texttt{\scriptsize \_\_lc}}\;\: \quad Linux clusters (using Intel compiler ifort)\\ \item<2->{\texttt{\scriptsize \_\_nec}} \quad NEC-SX systems\\ \end{itemize} Switches are set automatically depending on mrun-option ``\texttt{\scriptsize-h}'', eg. ``\texttt{\scriptsize-h lcmine}'' sets ``\texttt{\scriptsize-D \_\_lc}''} \item<3->{To switch between the serial and the parallel code:\\ \begin{itemize} \item<3->{\texttt{\scriptsize \_\_parallel}} \end{itemize} This switch is set by mrun-option ``\texttt{\scriptsize-K parallel}''.} \end{itemize} \end{frame} %Folie 15 \begin{frame}[fragile] \frametitle{Preprocessor Directives (II)} In the PALM code, define-string switches are used for following reasons: \begin{itemize} \item<1->{To enable usage of special software packages which are not included in the compilation process by default\\ \begin{itemize} \item<1->{\texttt{\scriptsize \_\_dvrp\_graphics}} \quad 3D visualization system\\ \item<1->{\texttt{\scriptsize \_\_spectra}} \quad \quad \quad \quad calculation and output of power spectra\\ \end{itemize} Switches are activated with mrun-option ``\texttt{\scriptsize-p}'', \mbox{eg. ``\texttt{\scriptsize-p} ``\texttt{\scriptsize spectra dvrp\_graphics}''''}} \end{itemize} {\small \quad\\ \quad\\ \quad}\\ \quad \\ \quad %nicht fragen, was das soll!! Mir ist leider nichts bsseres eingefallen um den Satz unter der Überschrift deckungsgleich auf beiden Folien zu haben. \end{frame} %Folie 14 \begin{frame}[fragile] \frametitle{Preprocessor Directives (III)} \begin{itemize} \item<1->{Preprocessor directives are also used for string replacement in the code.\\ Example:\\A compiler call with preprocessor option\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} ifort -cpp -Dabcd=efgh \end{lstlisting} \end{minipage} will replace all strings ``\texttt{\scriptsize abcd}'' in the code with ``\texttt{\scriptsize efgh}'' \textbf{before} the code is compiled.\\ This is used in PALM to change the MPI\_REAL datatypes (which are 4 Byte long by default), to 8 Bytes. The respective cpp-directives are given in the configuration file \texttt{\scriptsize .mrun.config.}:\\ \begin{minipage}{0.2\textwidth} \quad \\\\ \end{minipage} \begin{minipage}{0.7\textwidth} \centering \begin{lstlisting} %cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION: -DMPI_2REAL=MPI_2DOUBLE_PRECISION: .... \end{lstlisting} \end{minipage} } \end{itemize} \end{frame} \end{document}