Index: palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex	(revision 1234)
+++ palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex	(revision 1515)
@@ -6,5 +6,4 @@
 \usepackage{ngerman}
 \usepackage{pgf}
-\usetheme{Dresden}
 \usepackage{subfigure}
 \usepackage{units}
@@ -27,5 +26,6 @@
         \ttfamily,showstringspaces=false,captionpos=b}
 
-\institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÃ€t Hannover}
+\institute{Institute of Meteorology and Climatology, Leibniz UniversitÃ€t Hannover}
+\selectlanguage{english}
 \date{last update: \today}
 \event{PALM Seminar}
@@ -47,5 +47,5 @@
 
 \title[The PALM User-Interface]{The PALM User-Interface}
-\author{Siegfried Raasch}
+\author{PALM group}
 
 \begin{document}
@@ -70,5 +70,5 @@
    \textbf{Problem:}
    \begin{itemize}
-      \item<3-> If a new PALM version is released (current release is 3.9) and the user wants to use it, he would have to add his modifications to the new release again.
+      \item<3-> New releases of PALM (current release is 3.10) would require the user to add his modifications to the new release again.
    \end{itemize}   
    \vspace{3mm}
@@ -76,6 +76,6 @@
    \textbf{Solution:}
    \begin{itemize}
-      \item<4-> PALM offers a \grqq user-interface\grqq, i.e. a set of subroutines, where the user can add his modifications and which can be re-used for future releases of the standard PALM code.
-      \item<5-> By using the user-interface, the standard code does not have to be modified by the user in most of all cases.
+      \item<4-> PALM offers a \grqq user-interface\grqq, i.e. a set of subroutines, where the user can add his modifications, and which can be re-used for future releases of the standard PALM code.
+      \item<5-> By using the user-interface, the standard code does not have to be modified by the user in most of the cases.
       \item<6-> The user-interface subroutines are almost \grqq empty\grqq\, by default. They are called from the standard PALM code but (with some very minor exceptions) do not contain any executable code.
    \end{itemize}   
@@ -105,4 +105,5 @@
                     \par\medskip
                     ~~~~\texttt{USE control\_parameters}\\
+                    ~~~~\texttt{USE kinds}\\
                     ~~~~\texttt{USE user}\\
                     \par\medskip
@@ -497,5 +498,5 @@
 	   \texttt{user\_lpm\_advec} & - - - & \texttt{lpm} & modification of particles after advection \\
 	   \hline
-	   \texttt{user\_lmp\_init} & - - - & \texttt{lpm\_init} & defining initial particle sources \\
+	   \texttt{user\_lpm\_init} & - - - & \texttt{lpm\_init} & defining initial particle sources \\
 	   \hline
 	   \texttt{user\_lpm\_set\_attributes} & - - - & \texttt{lpm} & defining particles attributes \\
@@ -529,5 +530,5 @@
       \begin{itemize}
          \scriptsize
-         \item<3-> by including the respective PALM modules in the user-interface subroutines.\\
+         \item<3-> by including the respective \textcolor{blue}{PALM modules} in the user-interface subroutines.\\
          \begin{center}
 %           \includegraphics[scale=0.3]{user_defined_code_figures/data_access_exchange.png}
@@ -554,5 +555,5 @@
       \begin{itemize}
          \scriptsize
-         \item by the module \texttt{\textcolor{red}{user}} (file \texttt{user\underline{ }module.f90}),  which is used in every subroutine included in the interface.\\ \textbf{This module is (and should be) never used in the standard PALM code, in order to avoid data flow from the user interface to the\\ PALM default code!}
+         \item by the module \texttt{\textcolor{red}{user}} (file \texttt{user\underline{ }module.f90}),  which is used in every subroutine included in the interface.\\ \textbf{This module is (and should be) never used in the standard PALM code (otherwise, the default code would depend on the user\\ interface).}
       \end{itemize}
    \end{itemize}
@@ -570,7 +571,7 @@
       \item<2-> Therefore, several calls of \texttt{user\underline{ }actions} can be found in the default PALM routines \texttt{time\underline{ }integration} and \texttt{prognostic\underline{ }equations}. The place from which it is called is communicated to the routine by a string-argument, e.g.\\
    \ \\
-   \quad \texttt{CALL user\underline{ }actions ( 'u-tendency' )}\\
+   \quad \texttt{CALL user\underline{ }actions( 'u-tendency' )}\\
    \ \\
-	\onslide<3-> It means that this call is from a place within \texttt{prognostic\underline{ }equations}, where the tendencies for the u-component are calculated and integrated:
+	\onslide<3-> It means that this call is from a line within \texttt{prognostic\underline{ }equations}, where the tendencies for the u-component are calculated and integrated:
    \end{itemize}
    \vspace{-3mm}
@@ -648,7 +649,7 @@
          \begin{itemize}
             \item<1-> The different versions of \texttt{prognostic\underline{ }equations} (\texttt{prognostic\underline{ }equations\underline{ }cache}, \texttt{prognostic\underline{ }equations\underline{ }vector}) contain different calls of \texttt{user\underline{ }actions}:
-            \item<2-> From \texttt{prognostic\underline{ }equations\underline{ }vector}: \hspace{0.6em}\texttt{CALL user\underline{ }actions ( 'u-tendency' )}
+            \item<2-> From \texttt{prognostic\underline{ }equations\underline{ }vector}: \hspace{0.6em}\texttt{CALL user\underline{ }actions( 'u-tendency' )}
             \item<3-> From \texttt{prognostic\underline{ }equations},\\
-            \texttt{prognostic\underline{ }equations\underline{ }cache}:\hspace{4em}\texttt{CALL user\underline{ }actions ( i, j, 'u-tendency' )}
+            \texttt{prognostic\underline{ }equations\underline{ }cache}:\hspace{4em}\texttt{CALL user\underline{ }actions( i, j, 'u-tendency' )}
             \vspace{3mm}
             \item<4-> In case that \texttt{prognostic\underline{ }equations}\\
@@ -660,5 +661,5 @@
             \item<5-> Here, only the \texttt{k}-loop (vertical direction)\\
             has to be used, because loops over\\
-            i and j are carried out in\\
+            i and j are executed in\\
             \texttt{prognostic\underline{ }equations\underline{ }cache}.
          \end{itemize}
@@ -678,5 +679,5 @@
                                                                           ~~~\texttt{CHARACTER (LEN=*) ::  location}\\
                                                                           \par\medskip
-                                                                          ~~~\texttt{INTEGER ::  i, idum, j}\\
+                                                                          ~~~\texttt{INTEGER(iwp) ::  i, idum, j}\\
                                                                           \par\medskip
                                                                           \texttt{!}\\
@@ -722,5 +723,5 @@
                              \texttt{...}\\
                              \vspace{0.4mm}
-                             ~\texttt{REAL \hspace{0.4cm}:: ~~\textcolor{blue}{foo = 0.0}}\\
+                             ~\texttt{REAL(wp) \hspace{0.4cm}:: ~~\textcolor{blue}{foo = 0.0}}\\
                              \vspace{0.4mm}
                              \texttt{...}\\
@@ -865,5 +866,5 @@
 \begin{frame}
    \frametitle{Using the User-Interface with \texttt{mrun}}
-   \scriptsize
+   \tiny
    \begin{columns}[T]
       \begin{column}{1.1\textwidth}
@@ -872,5 +873,5 @@
          \begin{enumerate}
             \item<2-> Copy the default (empty) user-interface files that you need (e.g. user\underline{ }module.f90, user\underline{ }parin.f90, user\underline{ }actions.f90) to a directory of your choice, e.g.:\\
-            \tiny
+            \scriptsize
             \par\smallskip
 	         \quad \texttt{cd \~{ }/palm/current\underline{ }version}\\
@@ -879,18 +880,18 @@
 	         \quad \texttt{cp trunk/SOURCE/user\underline{ }parin.f90\hspace{1em}USER\underline{ }CODE/example\underline{ }cbl/user\underline{ }parin.f90}\\
             \quad \texttt{...}
-            \scriptsize
-            \vspace{-1mm}
+            
             \item<3-> Set an additional path in the configuration file \texttt{.mrun.config} to allow \texttt{mrun} to find and include this file:\\
             \tiny
-	         \quad \texttt{\%add\underline{ }source\underline{ }path \hspace{1em} \$base\underline{ }directory/USER\underline{ }CODE/\$fname}
-	         \scriptsize
+            \par\smallskip
+	         \scriptsize \quad \texttt{\%add\underline{ }source\underline{ }path \hspace{1em} \$base\underline{ }directory/USER\underline{ }CODE/\$fname}
+            \par\smallskip
 	         \item<4-> Modify the interface routines according to your needs.
 	         \item<5-> Start a PALM run by executing\\
+            \par\smallskip
+	         \scriptsize \quad	\texttt{mrun -d example\underline{ }cbl ...}\\
+            \par\smallskip
 	         \tiny
-	         \quad	\texttt{mrun -d example\underline{ }cbl ...}\\
-	         \scriptsize
 	         The files user\underline{ }*.f90 will be automatically compiled within the job / interactive run and will replace the respective PALM default user-interface files.
 	      \end{enumerate}
-	      \vspace{-2mm}
          \begin{itemize}
 	         \item<6-> \textbf{The modified user-interface file cannot be pre-compiled by using} \texttt{mbuild}!
