Index: palm/trunk/TUTORIAL/SOURCE/program_structure.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/program_structure.tex	(revision 945)
+++ palm/trunk/TUTORIAL/SOURCE/program_structure.tex	(revision 1226)
@@ -84,5 +84,5 @@
    \frametitle{PALM Code: General Features}
    \begin{itemize}
-      \item<2->{PALM is written in FORTRAN90. Current version number is 3.8.}
+      \item<2->{PALM is written in FORTRAN90. Current version number is 3.9.}
       \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.
@@ -107,5 +107,5 @@
          \end{lstlisting}
       \end{minipage}
-      \mbox{All modules can be found in file .../trunk/SOURCE/modules.f90}}
+      \mbox{Most modules can be found in file .../trunk/SOURCE/modules.f90}}
    \end{itemize}
 \end{frame}
@@ -129,4 +129,5 @@
    \tikzstyle{white2} = [rectangle, text width=0]
    \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.2\textwidth, minimum size=15pt, font=\tiny]
+   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=15pt, font=\tiny]
    \tikzstyle{line} = [draw, -]
 
@@ -134,43 +135,37 @@
       \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<2->{\node [yellow, below=0.2cm of PALMspace] (initcoup) {init\_coupling};}
+      \path<2-> [line] (PALM.south) |- (initcoup.west);
+
+      \uncover<3->{\node [yellow, below=0.05cm of initcoup] (localtre) {local\_tremain\_ini};}
+      \path<3-> [line] (PALM.south) |- (localtre.west);
+
+      \uncover<4->{\node [yellow, below=0.05cm of localtre] (initdvrp) {init\_dvrp\_logging};}
+      \path<4-> [line] (PALM.south) |- (initdvrp.west);
+
+      \uncover<5->{\node [yellow, below=0.05cm of initdvrp] (parin) {parin};}
+      \path<5-> [line] (PALM.south) |- (parin.west);
+      \uncover<5->{\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<5->{\node [yellow, below=0.05cm of readvar] (packageparin) {package\_parin};}
+         \path<5-> [line,dashed] (parin.south) |- (packageparin.west);
+
+          \uncover<5->{\node [green, below=0.05cm of packageparin] (userparin) {user\_parin};}
+          \path<5-> [line] (parin.south) |- (userparin.west);
+
+      \uncover<6->{\node [yellow, below=1.4cm of parin] (initpeg) {init\_pegrid};}
+      \path<6-> [line] (PALM.south) |- (initpeg.west);
+      \uncover<6->{\node [white, right=0.2cm of initpeg] (initpegspace) {};}
+
+      \uncover<7->{\node [yellow, below=0.05cm of initpeg] (initgrid) {init\_grid};}
+      \path<7-> [line] (PALM.south) |- (initgrid.west);
+      \uncover<7->{\node [white, right=0.2cm of initgrid] (initgridspace) {};}
+      
+         \uncover<7->{\node [green, below=0cm of initgridspace] (userinitgrid) {user\_init\_grid};}
+         \path<7-> [line,dashed] (initgrid.south) |- (userinitgrid.west);
 
       \uncover<1->{\node [white, below=5.8cm of PALM] (continu2) {};}
@@ -194,4 +189,6 @@
    \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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{green1} = [rectangle, draw, fill=green!20, text width=0.23\textwidth, minimum size=13pt, font=\tiny]
    \tikzstyle{line} = [draw, -]
 
@@ -200,76 +197,62 @@
       \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<1->{\node [yellow, right=0.2cm of PALM] (checkpara) {check\_parameters};}
+      \path<1-> [line] (PALM.south) |- (checkpara.west);
+      \uncover<1->{\node [white, right=0.2cm of checkpara] (checkparaspace) {};}
+      \uncover<1->{\node [white, right=0.365cm of checkpara] (checkparaspacelarge) {};}
+  
+          \uncover<2->{\node [green1, below=0cm of checkparaspacelarge] (usercheckdatapr) {user\_check\_data\_output\_pr};}
+          \path<2-> [line] (checkpara.south) |- (usercheckdatapr.west);
+
+          \uncover<2->{\node [green, below=0.52cm of checkparaspace] (usercheckdata) {user\_check\_data\_output};}
+          \path<2-> [line] (checkpara.south) |- (usercheckdata.west);
+
+          \uncover<2->{\node [yellow, below=0.05cm of usercheckdata] (initmasks) {init\_masks};}
+          \path<2-> [line,dashed] (checkpara.south) |- (initmasks.west);
+
+             \uncover<2->{\node [green, right=0.2cm of initmasks] (usercheckdata2) {user\_check\_data\_output};}
+             \path<2-> [line] (initmasks.east) |- (usercheckdata2.west);
+
+          \uncover<2->{\node [yellow, below=0.05cm of initmasks] (usercheckpara) {user\_check\_parameters};}
+          \path<2-> [line] (checkpara.south) |- (usercheckpara.west);
+
+      \uncover<3->{\node [yellow, below=1.9cm of checkpara] (init3d) {init\_3d\_model};}
+      \path<3-> [line] (PALM.south) |- (init3d.west);
+      \uncover<3->{\node [white, right=0.05cm of init3d] (init3dspace) {};}
+      \uncover<3->{\node [whitelarge, right=0.05cm of init3d] (init3dspacelarge) {};}
+
+         \uncover<4->{\node [yellowLarge, below=-0.05cm of init3dspacelarge] (init1d) {init\_1d\_model (calls various subroutines)};}
+         \path<4-> [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<4->{\node [green, below=0.05cm of initslope] (userinit3d) {user\_init\_3d\_model};}
+         \path<4-> [line,dashed] (init3d.south) |- (userinit3d.west);
+
+         \uncover<4->{\node [yellow, below=0.05cm of userinit3d] (disturbh) {disturb\_heatflux};}
+         \path<4-> [line,dashed] (init3d.south) |- (disturbh.west);
+
+         \uncover<4->{\node [yellow, below=0.05cm of disturbh] (initrank) {init\_rankine};}
+         \path<4-> [line,dashed] (init3d.south) |- (initrank.west);
+
+            \uncover<4->{\node [yellow, right=0.05cm of initrank] (pres) {pres};}
+            \path<4-> [line] (initrank.east) -- (pres.west);
+            \uncover<4->{\node [white, below=-0.05cm of pres] (presspace) {};}
+
+               \uncover<4->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};}
+               \path<4-> [line] (pres.east) -| (poisfft.north);
+
+               \uncover<4->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};}
+               \path<4-> [line] (pres.east) -| (sor.north);
+
+               \uncover<4->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};}
+               \path<4-> [line] (pres.east) -| (poismg.north);
+
+         \uncover<4->{\node [yellow, below=0.05cm of initrank] (initpt) {init\_pt\_anomaly};}
+         \path<4-> [line,dashed] (init3d.south) |- (initpt.west);
+
+         \uncover<4->{\node [yellow, below=0.05cm of initpt] (randomfuncini) {random\_function\_ini};}
+         \path<4-> [line] (init3d.south) |- (randomfuncini.west);
 
       \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
@@ -278,11 +261,201 @@
       \uncover<1->{\node [white2, below=6.0cm of PALM] (continu1) {};}
       \path<1-> [line] (PALM.south) |- (continu1.north);
+
+      \uncover<4->{\node [white2, below=6.6cm of checkpara] (continu3) {};}
+      \path<4-> [line,dashed] (init3d.south) |- (continu3.north);
+
+      \uncover<4->{\node [white2, below=6.0cm of checkpara] (continu4) {};}
+      \path<4-> [line] (init3d.south) |- (continu4.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.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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{green1} = [rectangle, draw, fill=green!20, text width=0.23\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<1->{\node [yellow, right=0.2cm of PALM] (init3d) {init\_3d\_model};}
+       \path<1-> [line] (PALM.south) |- (init3d.west);
+       \uncover<1->{\node [white, right=0.05cm of init3d] (init3dspace) {};}
+       \uncover<1->{\node [whitelarge, right=0.05cm of init3d] (init3dspacelarge) {};}
+
+         \uncover<2->{\node [yellow, below=0.05cm of init3dspace] (read3d) {read\_3d\_binary};}
+         \path<2-> [line,dashed] (init3d.south) |- (read3d.west);
+
+            \uncover<2->{\node [green, right=0.05cm of read3d] (userreadrestart) {user\_read\_restart\_data};}
+            \path<2-> [line] (read3d.east) -- (userreadrestart.west);
+
+         \uncover<2->{\node [yellow, below=0.5cm of init3dspace] (initslope) {init\_slope};}
+         \path<2-> [line,dashed] (init3d.south) |- (initslope.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of initslope] (initadvec) {init\_advec};}
+         \path<2-> [line] (init3d.south) |- (initadvec.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of initadvec] (distfield) {disturb\_field};}
+         \path<2-> [line,dashed] (init3d.south) |- (distfield.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of distfield] (pres) {pres};}
+         \path<2-> [line,dashed] (init3d.south) |- (pres.west);
+         \uncover<2->{\node [white, below=-0.05cm of pres] (presspace) {};}
+
+            \uncover<2->{\node [yellowsmall, right=0.05cm of presspace] (poisfft) {poisfft};}
+            \path<2-> [line] (pres.east) -| (poisfft.north);
+
+            \uncover<2->{\node [yellowsmall, right=0.05cm of poisfft] (sor) {sor};}
+            \path<2-> [line] (pres.east) -| (sor.north);
+
+            \uncover<2->{\node [yellowsmall, right=0.05cm of sor] (poismg) {poismg};}
+            \path<2-> [line] (pres.east) -| (poismg.north);
+
+         \uncover<2->{\node [green, below=0.05cm of pres] (userinitplant) {user\_init\_plant\_canopy};}
+         \path<2-> [line,dashed] (init3d.south) |- (userinitplant.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of userinitplant] (initdvrp) {init\_dvrp};}
+         \path<2-> [line,dashed] (init3d.south) |- (initdvrp.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of initdvrp] (initocean) {init\_ocean};}
+         \path<2-> [line,dashed] (init3d.south) |- (initocean.west);
+
+            \uncover<2->{\node [yellow, right=0.05cm of initocean] (eqnstsea) {eqn\_state\_seawater};}
+            \path<2-> [line] (initocean.east) -| (eqnstsea.west);
+
+         \uncover<2->{\node [yellow, below=0.05cm of initocean] (initcloudphys) {init\_cloud\_physics};}
+         \path<2-> [line,dashed] (init3d.south) |- (initcloudphys.west);
+
+        \uncover<2->{\node [yellow, below=0.05cm of initcloudphys] (lpminit) {lpm\_init};}
+        \path<2-> [line,dashed] (init3d.south) |- (lpminit.west);
+        \uncover<2->{\node [white, right=0.2cm of lpminit] (lpminspace) {};}
+
+            \uncover<2->{\node [yellow, below=0.05cm of lpminspace] (lpmreadrestart) {lpm\_read\_restart\_file};}
+            \path<2-> [line,dashed] (lpminit.south) |- (lpmreadrestart.west);
+
+            \uncover<2->{\node [green, below=0.05cm of lpmreadrestart] (userlpmin) {user\_lpm\_init};}
+            \path<2-> [line] (lpminit.south) |- (userlpmin.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);
+
+      \uncover<2->{\node [white2, below=6.6cm of init3d] (continu3) {};}
+      \path<2-> [line,dashed] (init3d.south) |- (continu3.north);
+
+      \uncover<2->{\node [white2, below=6.0cm of init3d] (continu4) {};}
+      \path<2-> [line] (init3d.south) |- (continu4.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.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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{green1} = [rectangle, draw, fill=green!20, text width=0.23\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 [yellow, below=0.05cm of init3dspace] (lpminit) {lpm\_init};}
+       \path<3-> [line,dashed] (init3d.south) |- (lpminit.west);
+       \uncover<3->{\node [white, right=0.2cm of lpminit] (lpminspace) {};}
+
+            \uncover<4->{\node [yellow, below=0.05cm of lpminspace] (lpmsortar) {lpm\_sort\_arrays};}
+            \path<4-> [line,dashed] (lpminit.south) |- (lpmsortar.west);
+
+            \uncover<5->{\node [yellow, below=0.05cm of lpmsortar] (dataoutpdvrp) {data\_output\_dvrp};}
+            \path<5-> [line,dashed] (lpminit.south) |- (dataoutpdvrp.west);
+            \uncover<5->{\node [white, right=0.2cm of dataoutpdvrp] (dataoutpdvrpspace) {};}
+
+               \uncover<6->{\node [green, below=0.05cm of dataoutpdvrpspace] (usercoltap) {user\_dvrp\_coltab};}
+               \path<6-> [line,dashed] (dataoutpdvrp.south) |- (usercoltap.west);
+
+               \uncover<7->{\node [green, below=0.05cm of usercoltap] (userdataoutdvrp) {user\_data\_output\_dvrp};}
+               \path<7-> [line] (dataoutpdvrp.south) |- (userdataoutdvrp.west);
+
+       \uncover<8->{\node [green, below=1cm of lpminit] (userinit) {user\_init};}
+       \path<8-> [line] (init3d.south) |- (userinit.west);
+
+       \uncover<9->{\node [yellow, below=2.3cm of init3d] (header) {header};}
+       \path<9-> [line] (PALM.south) |- (header.west);
+
+          \uncover<10->{\node [green, right=0.05cm of header] (userheader) {user\_header};}
+          \path<10-> [line] (header.east) |- (userheader.west);
+
+       \uncover<11->{\node [yellow, below=0.05cm of header] (dataoutput2d) {data\_output\_2d};}
+       \path<11-> [line,dashed] (PALM.south) |- (dataoutput2d.west);
+
+          \uncover<12->{\node [green, right=0.05cm of dataoutput2d] (userdataoutput2d) {user\_data\_output\_2d};}
+          \path<12-> [line] (dataoutput2d.east) |- (userdataoutput2d.west);
+
+       \uncover<13->{\node [yellow, below=0.05cm of dataoutput2d] (dataoutput3d) {data\_output\_3d};}
+       \path<13-> [line,dashed] (PALM.south) |- (dataoutput3d.west);
+
+          \uncover<14->{\node [green, right=0.05cm of dataoutput3d] (userdataoutput3d) {user\_data\_output\_3d};}
+          \path<14-> [line] (dataoutput3d.east) |- (userdataoutput3d.west);
+
+       \uncover<15->{\node [yellow, below=0.05cm of dataoutput3d] (timeintegr) {time\_integration};}
+       \path<15-> [line] (PALM.south) |- (timeintegr.west);
+       \uncover<15->{\node [white, right=0.2cm of timeintegr] (timeintspace) {};}
+
+          \uncover<16->{\node [yellow, below=0.05cm of timeintspace] (runcontr) {run\_control};}
+          \path<16-> [line] (timeintegr.south) |- (runcontr.west);
+          \uncover<16->{\node [white, right=0.2cm of runcontr] (runcontrspace) {};}
+
+             \uncover<17->{\node [yellow, below=0.05cm of runcontrspace] (flowstat1) {flow\_statistics};}
+             \path<17-> [line,dashed] (runcontr.south) |- (flowstat1.west);
+
+                \uncover<18->{\node [green, right=0.05cm of flowstat1] (userstat1) {user\_statistics};}
+                \path<18-> [line] (flowstat1.east) |- (userstat1.west);
+
+          \uncover<19->{\node [yellow, below=0.5cm of runcontr] (surfcoup) {surface\_coupler};}
+          \path<19-> [line,dashed] (timeintegr.south) |- (surfcoup.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]
@@ -294,4 +467,7 @@
    \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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{green1} = [rectangle, draw, fill=green!20, text width=0.23\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{greenLarge} = [rectangle, draw, fill=green!20, text width=0.3\textwidth, minimum size=12pt, font=\tiny]
    \tikzstyle{line} = [draw, -]
    \tikzstyle{linered} = [draw, color=red, -]
@@ -318,11 +494,8 @@
          \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)};}
+            \uncover<1->{\node [yellow, right=0.05cm of timestep] (globminmax) {global\_min\_max};}
+            \path<1-> [line] (timestep.east) |- (globminmax.west);
+
+         \uncover<1->{\node [greenLarge, below=0.5cm of timeintegrspacelarge] (useractions) {user\_actions (before\_timestep)};}
          \path<1-> [line] (timeintegr.south) |- (useractions.west);
 
@@ -330,37 +503,37 @@
          \path<1-> [line] (timeintegr.south) |- (timestepscheme.west);
 
-         \uncover<1->{\node [Bigbox, below=1.75cm of timeintegrspacebox] (bigbox) {};}
+         \uncover<1->{\node [Bigbox, below=1.3cm 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).};}
+         \uncover<1->{\node [white, below=1.6cm of timeintegrline] (boxlinespace) {};}
+         \path<1-> [line] (timeintegr.south) |- (boxlinespace.north);
+
+            \uncover<1->{\node [yellowLarge, below=0.4cm of timestepscheme] (prognosticequve) {prognostic\_equations\_vector};}
+            \uncover<1->{\node [yellowLarge, right=0.05cm of prognosticequve] (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 prognosticequve] (Boxinfo) {For details, see \\ PALM Flow Chart (VIII).};}
             \path<1-> [linered] (boxlinespace.north) -| (prognosticequca.north);
-            \path<1-> [line] (boxlinespace.north) -| (prognosticequno.north);
+            \path<1-> [line] (boxlinespace.north) -| (prognosticequve.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 [yellow, below=3.1cm of timeintegrspace] (lpm) {lpm};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (lpm.west) ;
+
+            \uncover<1->{\node [yellowLarge, right=0.05cm of lpm] (lpmmore) {user\_lpm\_advec + more};}
+            \path<1-> [line] (lpm.east) -- (lpmmore.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};}
+         \uncover<1->{\node [yellow, below=0.65cm of lpm] (boundconds) {boundary\_conds};}
+         \path<1-> [line,dashed] (boundconds.west) -| (timeintegr.south);
+
+         \uncover<1->{\node [yellow, below=0.05cm of boundconds] (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 [yellow, below=0.05cm of swaptimelevel] (inflowturb) {inflow\_turbulence};}
+         \path<1-> [line,dashed] (inflowturb.west) -| (timeintegr.south);
+
+         \uncover<1->{\node [yellow, below=0.05cm of inflowturb] (distfield) {disturb\_field};}
+         \path<1-> [line,dashed] (distfield.west) -| (timeintegr.south);
 
       \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
@@ -372,8 +545,7 @@
 \end{frame}
 
-
-%Folie 08
-\begin{frame}
-   \frametitle{PALM Flow Chart (IV)}
+%Folie 10
+\begin{frame}
+   \frametitle{PALM Flow Chart (VI)}
 
    \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
@@ -385,4 +557,6 @@
    \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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{greenLarge} = [rectangle, draw, fill=green!20, text width=0.3\textwidth, minimum size=13pt, font=\tiny]
    \tikzstyle{line} = [draw, -]
    \tikzstyle{linered} = [draw, color=red, -]
@@ -417,12 +591,9 @@
             \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};}
+         \uncover<1->{\node [yellowLarge, below=0.8cm of timeintegrspacelarge] (calcliquidwatercontent) {calc\_liquid\_water\_content};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (calcliquidwatercontent.west);
+
+         \uncover<1->{\node [yellow, below=0.9cm of pres] (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};}
@@ -430,11 +601,11 @@
 
          \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,dashed] (timeintegr.south) |- (diffusivities.west);
+
+         \uncover<1->{\node [greenLarge, below=2.88cm 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);
+         \path<1-> [line,dashed] (timeintegr.south) |- (checkforrestart.west);
 
             \uncover<1->{\node [yellow, right=0.05cm of checkforrestart] (localtremain) {local\_tremain};}
@@ -444,21 +615,18 @@
          \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 [green, right=0.05cm of flowstatistics] (userstat) {user\_statistics};}
+            \path<1-> [line] (flowstatistics.east) -- (userstat.west);
+
+         \uncover<1->{\node [yellow, below=0.05cm of flowstatistics] (sumup3d) {sum\_up\_3d\_data};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (sumup3d.west);
+
+            \uncover<1->{\node [greenLarge, right=0.05cm of sumup3d] (user3ddataav) {user\_3d\_data\_averaging};}
+            \path<1-> [line] (sumup3d.east) -- (user3ddataav.west);
+
+         \uncover<1->{\node [yellow, below=0.05cm of sumup3d] (calcspec) {calc\_spectra};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (calcspec.west);
+
+            \uncover<1->{\node [green, right=0.05cm of calcspec] (userspec) {user\_spectra};}
+            \path<1-> [line] (calcspec.east) -- (userspec.west);
 
       \uncover<1->{\node [white2, below=6.6cm of PALM] (continu2) {};}
@@ -470,8 +638,68 @@
 \end{frame}
 
-
-%Folie 09
-\begin{frame}
-   \frametitle{PALM Flow Chart (V)}
+%Folie 11
+\begin{frame}
+   \frametitle{PALM Flow Chart (VII)}
+
+   \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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
+   \tikzstyle{greenLarge} = [rectangle, draw, fill=green!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] (runcontr) {run\_control};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (runcontr.west);
+         \uncover<1->{\node [white, right=0.2cm of runcontr] (runcontrspace) {};}
+
+             \uncover<1->{\node [yellow, below=0.05cm of runcontrspace] (flowstat1) {flow\_statistics};}
+             \path<1-> [line,dashed] (runcontr.south) |- (flowstat1.west);
+
+                \uncover<1->{\node [green, right=0.05cm of flowstat1] (userstat1) {user\_statistics};}
+                \path<1-> [line] (flowstat1.east) |- (userstat1.west);
+
+         \uncover<1->{\node [yellow, below=1cm of timeintegrspace] (print1d) {print\_1d};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (print1d.west);
+
+         \uncover<1->{\node [yellow, below=0.05cm of print1d] (dataoutp) {data\_output\_***};}
+         \path<1-> [line,dashed] (timeintegr.south) |- (dataoutp.west);
+
+         \uncover<1->{\node [greenLarge, below=2.15cm of timeintegrspacelarge] (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 12
+\begin{frame}
+   \frametitle{PALM Flow Chart (VIII)}
 
    \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
@@ -506,7 +734,7 @@
       \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 [yellowLarge, left=0.5cm of calcmeanptprofile] (prognosticequationsnoopt) {prognostic\_equations\_noopt};}
+      \uncover<1->{\node [yellowLarge, left=0.5cm of calcmeanptprofile] (prognosticequationscache) {prognostic\_equations\_cache};}
+      \uncover<1->{\node [yellowLarge, right=0.5cm of calcmeanptprofile] (prognosticequationsvector) {prognostic\_equations\_vector};}
 
       \uncover<1->{\node [yellow, below=-0.05cm of calcmeanptprofile] (calcradiation) {calc\_radiation};}
@@ -540,50 +768,14 @@
             .\\
             .\\
-            !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\\
+%             !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}{
@@ -621,5 +813,5 @@
 
 
-      \uncover<2->{\node [Endbox, below=6.05cm of redadv] (endbox) {
+      \uncover<2->{\node [Endbox, below=1.5cm of listingscache] (endboxcache) {
          \texttt{\linespread {0.7}\selectfont\noindent
             !within subroutines:\\
@@ -630,16 +822,26 @@
       };}
 
-      \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);}
+      \uncover<2->{\node [Endbox, below=2.5cm of listingsvector] (endboxvec) {
+         \texttt{\linespread {0.7}\selectfont\noindent
+            !within subroutines:\\
+            DO i = nxl, nxr \\
+            \quad DO j = nys, nyn \\
+            \quad \quad DO k=nzb+1,nzt\\
+            \quad \quad \quad \textcolor{blue}{...}\\
+            \quad \quad ENDDO \\
+            \quad ENDDO \\
+            ENDDO\\
+         }
+      };}
+
+      \uncover<2->{\draw [<-,thick] (endboxcache.north) -- (listingscache.south);}
+      \uncover<2->{\draw [<-,thick] (endboxvec.north) -- (listingsvector.south);}
 
    \end{tikzpicture}
 \end{frame}
 
-
-%Folie 10
-\begin{frame}
-   \frametitle{PALM Flow Chart (VI)}
+%Folie 13
+\begin{frame}
+   \frametitle{PALM Flow Chart (IX)}
 
    \tikzstyle{white} = [rectangle, text width=0.2\textwidth, font=\tiny]
@@ -651,4 +853,5 @@
    \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{green} = [rectangle, draw, fill=green!20, text width=0.2\textwidth, minimum size=13pt, font=\tiny]
    \tikzstyle{line} = [draw, -]
    \tikzstyle{linered} = [draw, color=red, -]
@@ -681,5 +884,5 @@
          \path<1-> [line] (write3dbinary.east) -- (writevarlist.west);
 
-      \uncover<1->{\node [yellow, below=0.05cm of write3dbinary] (writeparticles) {write\_particles};}
+      \uncover<1->{\node [yellow, below=0.05cm of write3dbinary] (writeparticles) {lpm\_write\_restart\_file};}
       \path<1-> [line] (PALM.south) |- (writeparticles.west);
 
@@ -687,8 +890,8 @@
       \path<1-> [line] (PALM.south) |- (header.west);
 
-         \uncover<1->{\node [yellow, right=0.05cm of header] (userheader) {user\_header};}
+         \uncover<1->{\node [green, 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};}
+      \uncover<1->{\node [green, below=0.05cm of header] (userlastactions) {user\_last\_actions};}
       \path<1-> [line] (PALM.south) |- (userlastactions.west);
 
@@ -704,5 +907,5 @@
 \end{frame}
 
-%Folie 11
+%Folie 14
 \begin{frame}[fragile]
    \frametitle{Important Variables and Their Declaration}
@@ -731,5 +934,5 @@
 \end{frame}
 
-%Folie 12
+%Folie 15
 \begin{frame}[fragile]
    \frametitle{Important Variables and Their Declaration}
@@ -754,5 +957,5 @@
          \centering
          \begin{lstlisting}
-REAL, DIMENSION(:,:,:), POINTER ::  u, u_m, u_p, ...
+REAL, DIMENSION(:,:,:), POINTER ::  u, u_p, v, v_p, ...
          \end{lstlisting}
       \end{minipage}\\
@@ -762,5 +965,5 @@
 \end{frame}
 
-%Folie 13
+%Folie 16
 \begin{frame}[fragile]
    \frametitle{Some Other Frequently Used Variables}
@@ -796,5 +999,5 @@
 
 
-%Folie 14
+%Folie 17
 \begin{frame}[fragile]
    \frametitle{Preprocessor Directives (I)}
@@ -840,9 +1043,10 @@
 
 
-%Folie 14
+%Folie 18
 \begin{frame}[fragile]
-   \frametitle{Preprocessor Directives (I)}
+   \frametitle{Preprocessor Directives (II)}
    \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<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} in the \texttt{\scriptsize \%cpp\_options} line. \textbf{Different compilers may require different options!}}\\
 
       \item<2->{Define-string switches can be combined using logical AND / OR operators \&\& / $\lvert \lvert$.\\
@@ -861,7 +1065,7 @@
 
 
-%Folie 15
+%Folie 19
 \begin{frame}[fragile]
-   \frametitle{Preprocessor Directives (II)}
+   \frametitle{Preprocessor Directives (III)}
    In the PALM code, define-string switches are used for following reasons:
    \begin{itemize}
@@ -882,7 +1086,7 @@
 
 
-%Folie 15
+%Folie 20
 \begin{frame}[fragile]
-   \frametitle{Preprocessor Directives (II)}
+   \frametitle{Preprocessor Directives (IV)}
    In the PALM code, define-string switches are used for following reasons:
    \begin{itemize}
@@ -898,7 +1102,7 @@
 
 
-%Folie 14
+%Folie 21
 \begin{frame}[fragile]
-   \frametitle{Preprocessor Directives (III)}
+   \frametitle{Preprocessor Directives (V)}
    \begin{itemize}
       \item<1->{Preprocessor directives are also used for string replacement in the code.\\ Example:\\A compiler call with preprocessor option\\
@@ -920,5 +1124,5 @@
          \centering
          \begin{lstlisting}
-%cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION:
+%cpp_options -cpp:-DMPI_REAL=MPI_DOUBLE_PRECISION:
              -DMPI_2REAL=MPI_2DOUBLE_PRECISION: ....
          \end{lstlisting}
