Ignore:
Timestamp:
Jan 2, 2015 11:35:51 AM (7 years ago)
Author:
boeske
Message:

several updates in the tutorial

File:
1 edited

Legend:

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

    r1234 r1515  
    66\usepackage{ngerman}
    77\usepackage{pgf}
    8 \usetheme{Dresden}
    98\usepackage{subfigure}
    109\usepackage{units}
     
    2726        \ttfamily,showstringspaces=false,captionpos=b}
    2827
    29 \institute{Institut fÃŒr Meteorologie und Klimatologie, Leibniz UniversitÀt Hannover}
     28\institute{Institute of Meteorology and Climatology, Leibniz UniversitÀt Hannover}
     29\selectlanguage{english}
    3030\date{last update: \today}
    3131\event{PALM Seminar}
     
    4747
    4848\title[The PALM User-Interface]{The PALM User-Interface}
    49 \author{Siegfried Raasch}
     49\author{PALM group}
    5050
    5151\begin{document}
     
    7070   \textbf{Problem:}
    7171   \begin{itemize}
    72       \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.
     72      \item<3-> New releases of PALM (current release is 3.10) would require the user to add his modifications to the new release again.
    7373   \end{itemize}   
    7474   \vspace{3mm}
     
    7676   \textbf{Solution:}
    7777   \begin{itemize}
    78       \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.
    79       \item<5-> By using the user-interface, the standard code does not have to be modified by the user in most of all cases.
     78      \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.
     79      \item<5-> By using the user-interface, the standard code does not have to be modified by the user in most of the cases.
    8080      \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.
    8181   \end{itemize}   
     
    105105                    \par\medskip
    106106                    ~~~~\texttt{USE control\_parameters}\\
     107                    ~~~~\texttt{USE kinds}\\
    107108                    ~~~~\texttt{USE user}\\
    108109                    \par\medskip
     
    497498           \texttt{user\_lpm\_advec} & - - - & \texttt{lpm} & modification of particles after advection \\
    498499           \hline
    499            \texttt{user\_lmp\_init} & - - - & \texttt{lpm\_init} & defining initial particle sources \\
     500           \texttt{user\_lpm\_init} & - - - & \texttt{lpm\_init} & defining initial particle sources \\
    500501           \hline
    501502           \texttt{user\_lpm\_set\_attributes} & - - - & \texttt{lpm} & defining particles attributes \\
     
    529530      \begin{itemize}
    530531         \scriptsize
    531          \item<3-> by including the respective PALM modules in the user-interface subroutines.\\
     532         \item<3-> by including the respective \textcolor{blue}{PALM modules} in the user-interface subroutines.\\
    532533         \begin{center}
    533534%           \includegraphics[scale=0.3]{user_defined_code_figures/data_access_exchange.png}
     
    554555      \begin{itemize}
    555556         \scriptsize
    556          \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!}
     557         \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).}
    557558      \end{itemize}
    558559   \end{itemize}
     
    570571      \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.\\
    571572   \ \\
    572    \quad \texttt{CALL user\underline{ }actions ( 'u-tendency' )}\\
     573   \quad \texttt{CALL user\underline{ }actions( 'u-tendency' )}\\
    573574   \ \\
    574         \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:
     575        \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:
    575576   \end{itemize}
    576577   \vspace{-3mm}
     
    648649         \begin{itemize}
    649650            \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}:
    650             \item<2-> From \texttt{prognostic\underline{ }equations\underline{ }vector}: \hspace{0.6em}\texttt{CALL user\underline{ }actions ( 'u-tendency' )}
     651            \item<2-> From \texttt{prognostic\underline{ }equations\underline{ }vector}: \hspace{0.6em}\texttt{CALL user\underline{ }actions( 'u-tendency' )}
    651652            \item<3-> From \texttt{prognostic\underline{ }equations},\\
    652             \texttt{prognostic\underline{ }equations\underline{ }cache}:\hspace{4em}\texttt{CALL user\underline{ }actions ( i, j, 'u-tendency' )}
     653            \texttt{prognostic\underline{ }equations\underline{ }cache}:\hspace{4em}\texttt{CALL user\underline{ }actions( i, j, 'u-tendency' )}
    653654            \vspace{3mm}
    654655            \item<4-> In case that \texttt{prognostic\underline{ }equations}\\
     
    660661            \item<5-> Here, only the \texttt{k}-loop (vertical direction)\\
    661662            has to be used, because loops over\\
    662             i and j are carried out in\\
     663            i and j are executed in\\
    663664            \texttt{prognostic\underline{ }equations\underline{ }cache}.
    664665         \end{itemize}
     
    678679                                                                          ~~~\texttt{CHARACTER (LEN=*) ::  location}\\
    679680                                                                          \par\medskip
    680                                                                           ~~~\texttt{INTEGER ::  i, idum, j}\\
     681                                                                          ~~~\texttt{INTEGER(iwp) ::  i, idum, j}\\
    681682                                                                          \par\medskip
    682683                                                                          \texttt{!}\\
     
    722723                             \texttt{...}\\
    723724                             \vspace{0.4mm}
    724                              ~\texttt{REAL \hspace{0.4cm}:: ~~\textcolor{blue}{foo = 0.0}}\\
     725                             ~\texttt{REAL(wp) \hspace{0.4cm}:: ~~\textcolor{blue}{foo = 0.0}}\\
    725726                             \vspace{0.4mm}
    726727                             \texttt{...}\\
     
    865866\begin{frame}
    866867   \frametitle{Using the User-Interface with \texttt{mrun}}
    867    \scriptsize
     868   \tiny
    868869   \begin{columns}[T]
    869870      \begin{column}{1.1\textwidth}
     
    872873         \begin{enumerate}
    873874            \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.:\\
    874             \tiny
     875            \scriptsize
    875876            \par\smallskip
    876877                 \quad \texttt{cd \~{ }/palm/current\underline{ }version}\\
     
    879880                 \quad \texttt{cp trunk/SOURCE/user\underline{ }parin.f90\hspace{1em}USER\underline{ }CODE/example\underline{ }cbl/user\underline{ }parin.f90}\\
    880881            \quad \texttt{...}
    881             \scriptsize
    882             \vspace{-1mm}
     882           
    883883            \item<3-> Set an additional path in the configuration file \texttt{.mrun.config} to allow \texttt{mrun} to find and include this file:\\
    884884            \tiny
    885                  \quad \texttt{\%add\underline{ }source\underline{ }path \hspace{1em} \$base\underline{ }directory/USER\underline{ }CODE/\$fname}
    886                  \scriptsize
     885            \par\smallskip
     886                 \scriptsize \quad \texttt{\%add\underline{ }source\underline{ }path \hspace{1em} \$base\underline{ }directory/USER\underline{ }CODE/\$fname}
     887            \par\smallskip
    887888                 \item<4-> Modify the interface routines according to your needs.
    888889                 \item<5-> Start a PALM run by executing\\
     890            \par\smallskip
     891                 \scriptsize \quad      \texttt{mrun -d example\underline{ }cbl ...}\\
     892            \par\smallskip
    889893                 \tiny
    890                  \quad  \texttt{mrun -d example\underline{ }cbl ...}\\
    891                  \scriptsize
    892894                 The files user\underline{ }*.f90 will be automatically compiled within the job / interactive run and will replace the respective PALM default user-interface files.
    893895              \end{enumerate}
    894               \vspace{-2mm}
    895896         \begin{itemize}
    896897                 \item<6-> \textbf{The modified user-interface file cannot be pre-compiled by using} \texttt{mbuild}!
Note: See TracChangeset for help on using the changeset viewer.