Index: palm/trunk/TUTORIAL/SOURCE/ncl.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/ncl.tex	(revision 1515)
+++ palm/trunk/TUTORIAL/SOURCE/ncl.tex	(revision 1532)
@@ -1,10 +1,9 @@
 %$Id$
 \input{header_tmp.tex}
-%\input{../header_lectures.tex}
+%\input{header_lectures.tex}
 
 \usepackage[utf8]{inputenc}
 \usepackage{ngerman}
 \usepackage{pgf}
-\usetheme{Dresden}
 \usepackage{subfigure}
 \usepackage{units}
@@ -28,5 +27,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{\"a}t Hannover}
+\selectlanguage{english}
 \date{last update: \today}
 \event{PALM Seminar}
@@ -48,5 +48,5 @@
 
 \title[Introduction to NCL]{Introduction to NCL}
-\author{Siegfried Raasch}
+\author{PALM group}
 
 \begin{document}
@@ -67,6 +67,7 @@
 	   \item<1-> There are several ways how you can visualize netCDF data
 	   \item<1-> If you are lacking experience in the visualization of netCDF data or if you have not yet found your favourite way how to visualize netCDF data, here is one recommendation:
-      \item<2-> NCL â The \textbf{N}CAR \textbf{C}ommand \textbf{L}anguage
-      \item<2-> Developed by the Computational \& Information Systems Laboratory at the NCAR (continuously updated)
+	   
+	   \begin{center}NCL -- The \textbf{N}CAR \textbf{C}ommand \textbf{L}anguage\end{center}
+      \item<2-> Developed at the NCAR (and continuously updated)
       \item<2-> Detailed information is available under http://www.ncl.ucar.edu
       \item<3-> With the information revealed in this talk you will be able to visualize the output of this week's simulations
@@ -82,12 +83,12 @@
                 data processing and visualization, freely available
       \item<2-> Portable: it is running on many different operating systems
-                including AIX, Linux, MacOSX, Cygwin/Windows
-      \item<3-> It's a powerful tool for file input and output, visualization 
-                and data analysis (but please \textbf{avoid the excessive usage 
-                of loops}, as NCL is an interpreted language) $\rightarrow$ 
-                integrated processing environment
-   \end{itemize}  
-   \centering
-   \onslide<3-> \includegraphics[scale=0.28]{ncl_figures/ncl.png}
+                including Linux, Mac OS X, Windows, ...
+      \item<3-> It's a powerful tool for file input and output, visualization and data analysis $\rightarrow$ integrated processing environment
+      \vspace{-0.2cm}
+                  \begin{center}
+                   \onslide<3-> \includegraphics[scale=0.315]{ncl_figures/ncl.png}
+                   \end{center}
+      \end{itemize}  
+
    
 \end{frame}
@@ -98,15 +99,14 @@
    \small
    \begin{itemize}     
-	   \item<1-> Supports calling C and FORTRAN extended routines
+	   \item<1-> Supports calling of C and FORTRAN routines
 	   \item<1-> Over 600 functions and procedures for visualization and 
 	             data analysis are provided with NCL
-	   \item<2-> Interactive mode: \texttt{\$ ncl}\\
-      \texttt{ncl 0>}
-      \item<3-> each line is interpreted as it is entered
-      \item<4-> Batch mode: \texttt{\$ ncl ncl\underline{ }script.ncl}\\
-      interpreter of complete scripts, variables within the NCL script can\\
-      be steered by providing additional parameters with the ncl call\\
-      \texttt{\$ ncl ncl\underline{ }script.ncl parameter1=value}
-      \texttt{'parameter2=\dq string\dq ' ...}
+	   \item<2-> \textbf{Interactive mode}: \texttt{\$ ncl}\\	   
+      \hspace{2.95cm}\texttt{ncl 0> ...}
+      \item<2-> Each line is interpreted as it is entered
+      \item<3-> \textbf{Batch mode}: \texttt{\$ ncl ncl\underline{ }script.ncl}
+      \item<3-> Interpreter of complete scripts, variables within the NCL script can be steered by providing additional parameters with the NCL call:\\
+      \texttt{\$ ncl ncl\underline{ }script.ncl parameter1=value ...}
+       \item<4-> Since NCL is an interpreted language, \textbf{the excessive usage of loops seriously decrease the performance of NCL!}
    \end{itemize}  
 
@@ -121,16 +121,16 @@
 	   \begin{itemize}   
 	      \footnotesize
-	      \item<1-> data types
+	      \item<1-> data types (float, double, integer, logical, ...)
 	      \item<1-> variables
 	      \item<1-> operators
 	      \item<1-> expressions
 	      \item<1-> loops
-	      \item<1-> functions/procedures/graphics
+	      \item<1-> functions and procedures (e.g., \texttt{dim\_stat4(data\_array)})
       \end{itemize}  
 	   \item<2-> Features
 	   \begin{itemize}   
 	      \footnotesize
-	      \item<2-> query / manipulate meta data
-	      \item<2-> import data in a variety of formats
+	      \item<2-> manipulate meta data
+	      \item<2-> import data in a variety of formats (netCDF, ASCII, ...)
 	      \item<2-> array syntax / operations
 	      \item<2-> can use user FORTRAN/C codes and commercial libraries
@@ -146,7 +146,7 @@
    \small
    \begin{itemize}     
-      \item<1-> Detailed information is available under\\
+      \item<1-> Detailed information is available under:\\
                 \underline{http://www.ncl.ucar.edu/Download/index.shtml}
-      \item<1-> Request an Earth System Grid account
+      \item<1-> For downloading, request an Earth System Grid account:\\
                 \underline{http://www.earthsystemgrid.org/}
       \item<2-> Download the appropriate binaries e.g. \texttt{A.tar.gz} 
@@ -154,6 +154,6 @@
       \item<2-> \texttt{\% gunzip \$HOME/A.tar.gz}
       \item<2-> \texttt{\% mkdir -p /usr/local}\\
-      \quad \texttt{\% cd /usr/local}\\
-      \quad \texttt{\% tar -xvf \$HOME/A.tar}
+      \texttt{\% cd /usr/local}\\
+      \texttt{\% tar -xvf \$HOME/A.tar}
    \end{itemize}  
 
@@ -166,5 +166,5 @@
    \begin{itemize}     
       \item<1-> Set the \texttt{NCARG\underline{ }ROOT} environment variable and
-                your search path to where NCL/NCARG resides\\
+                your search path to where NCL/NCARG resides:\\
                 csh: \texttt{setenv NCARG\underline{ }ROOT /usr/local/}\\
                 \hspace{1.6em} \texttt{setenv PATH /usr/local/bin:\$PATH}\\
@@ -173,13 +173,13 @@
       \vspace{3mm}
       \item<2-> Set the DISPLAY environment variable to indicate where to 
-                display graphics as for any X11 Windows application that you 
-                run\\
-                e.g. ksh: \texttt{export DISPLAY=localhost:13.0}, or use 
-                \texttt{ssh -X} to tunnel X-communication.\\
+                display graphics (as for any X11 Windows application that you 
+                run):\\
+                ksh: \texttt{export DISPLAY=localhost:13.0}, \\
+                or use \texttt{ssh -X} to tunnel X-communication
       \vspace{3mm}
-      \item<3-> Test your NCL installation\\
-                \quad \texttt{\% ng4ex gsun01}\\
-                NCL script gsun01n.ncl is copied to your working directory and 
-                run through NCL. An X11 window should pop up.
+      \item<3-> Test your NCL installation:\\
+                \quad \texttt{\% ng4ex gsun01n}\\
+                The NCL script gsun01n.ncl is copied to your working directory and 
+                executed by NCL. An X11 window should pop up.
    \end{itemize}  
 
@@ -191,5 +191,5 @@
    \footnotesize 
    \begin{itemize}     
-      \item<1-> Together with the PALM installation you have also received four NCL scripts, a configuration file and a manual; they can be found in the directory\\
+      \item<1-> Together with the PALM installation you have also received four NCL scripts, a configuration file and a manual; they can be found in the directory:\\
                 \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS/NCL/}
       \item<2-> All standard netCDF data output of PALM can be visualized by one
@@ -198,11 +198,11 @@
                    \scriptsize
                    \item[-]<2-> \texttt{cross\underline{ }sections.ncl} 
-                                (2D/3D data, e.g. contour or vector plots)
-                   \item[-]<2-> \texttt{profiles.ncl} (profile data)
+                                (contour or vector plots from 2D/3D data)
+                   \item[-]<2-> \texttt{profiles.ncl} (profiles from profiles/3D data)
                    \item[-]<2-> \texttt{timeseries.ncl} (time series data)
                    \item[-]<2-> \texttt{spectra.ncl} (spectra data)
                 \end{itemize}  
       \item<3-> To run these NCL scripts you can use the shell script 
-                \texttt{palmplot} which can be found in the directory\\
+                \texttt{palmplot} which can be found in the directory:\\
                 \texttt{\$HOME/palm/current\underline{ }version/trunk/SCRIPTS}
       \item<4-> The output of the plots can be changed with several parameters;
@@ -218,16 +218,16 @@
    \frametitle{NCL Scripts Delivered with PALM (II)}
 
-   Using \texttt{.ncl.config}
-   \small
-   \begin{itemize}     
-      \item[-]<1-> Please create a personal configuration file by copying 
+   Using \texttt{.ncl.config}:
+   \small
+   \begin{itemize}     
+      \item<1-> Please create a personal configuration file by copying 
                    the default configuration file 
                    \texttt{.ncl.config.default} to the PALM working 
                    directory \texttt{\$HOME/palm/current\underline{ }version}
                    and naming it \texttt{.ncl.config}
-      \item[-]<2-> \texttt{.ncl.config} is used by NCL directly, thus the 
+      \item<2-> \texttt{.ncl.config} is used by NCL directly, thus the 
                    parameters have to be written according to the rules of the 
                    scripting language NCL
-      \item[-]<3-> The configuration file contains all steering parameters with 
+      \item<3-> The configuration file contains all steering parameters with 
                    a short description and can be adjusted to personal needs
    \end{itemize}  
@@ -242,7 +242,7 @@
    \footnotesize
    \begin{itemize}     
-      \item[-]<1-> The shell script is used as follows:\\
+      \item<1-> The shell script is used as follows:\\
                    \texttt{palmplot <plot\underline{ }identifier>}
-      \item[-]<1-> \texttt{<plot\underline{ }identifier>} has to be \texttt{xy},
+      \item<1-> \texttt{<plot\underline{ }identifier>} has to be \texttt{xy},
                    \texttt{xz}, \texttt{yz}, \texttt{pr}, \texttt{sp} or 
                    \texttt{ts} depending on the data to be plotted
@@ -250,13 +250,15 @@
    \vspace{3mm}
    \onslide<2->
+   \begin{center}
       \begin{tabular}{ccc}
          \textbf{plot\underline{ }identifier} & \textbf{data used} & \textbf{ncl script}\\
-         xy & instantaneous or time-averaged xy or 3D data & cross\underline{ }sections.ncl\\
-         xz & instantaneous or time-averaged xz or 3D data & cross\underline{ }sections.ncl\\
-         yz & instantaneous or time-averaged yz or 3D data & cross\underline{ }sections.ncl\\
+         xy & xy or 3D data & cross\underline{ }sections.ncl\\
+         xz & xz or 3D data & cross\underline{ }sections.ncl\\
+         yz & yz or 3D data & cross\underline{ }sections.ncl\\
          pr & profile or 3D data & profiles.ncl\\
          sp & spectra data & spectra.ncl\\
          ts & time series data & timeseries.ncl\\ 
    \end{tabular}
+   \end{center}
 
 \end{frame}
@@ -269,19 +271,19 @@
    \footnotesize
    \begin{itemize}     
-      \item[-]<1-> To change the output of the plot you can also use:\\
+      \item<1-> To change the output of the plot you can also use the prompt:\\
                    \scriptsize 
                    \texttt{palmplot \textbf{plot\underline{ }identifier} 
-                   parameter=value parameter=string ...} 
+                   parameter=value parameter='string' ...} 
       \footnotesize \\
       \vspace{2mm}
-      \item[-]<2-> A list of all available parameters can be found in the 
+      \item<2-> A list of all available parameters can be found in the 
                    configuration file \texttt{.ncl.config} or in the 
                    documentation:\\
                    \uncover<3->{\texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist}}\\
       \vspace{2mm}
-      \item[-]<4-> Parameters specified in the prompt override parameters given
+      \item<4-> Parameters specified in the prompt override parameters given
                    in the configuration file\\
       \vspace{2mm}
-      \item[-]<5-> String parameters which can contain lists (\texttt{var}, 
+      \item<5-> String parameters which can contain lists (\texttt{var}, 
                    \texttt{c\underline{ }var}, \texttt{vec1}, \texttt{vec2}, 
                    \texttt{plotvec}) have to be set in single quotes and the 
@@ -289,5 +291,5 @@
                    \texttt{var='pt u w'}\\
       \vspace{2mm}
-      \item[-]<6-> A short introduction for using the shell script is given by 
+      \item<6-> A short introduction for using the shell script is given by 
                    typing\\
                    \texttt{palmplot ?}
@@ -304,15 +306,20 @@
       \item<1-> Starting the example run with the command\\
                 \vspace{2mm}
-                \texttt{mrun -d example\underline{ }cbl ... -r
+                \hspace{0.5cm}\texttt{mrun -d example\underline{ }cbl ... -r
                         'd3\# pr\# ts\# xy\# xz\#'}\\
                 \vspace{2mm}
-                results in the following output files in\\
+                results in the following output files
+                
+                \hspace{0.5cm}\texttt{example\underline{ }cbl\underline{ }pr.nc}, \texttt{example\underline{ }cbl\underline{ }xy.nc},\\
+                 \hspace{0.5cm}\texttt{example\underline{ }cbl\underline{ }xz.nc}, \texttt{example\underline{ }cbl\underline{ }ts.nc}
+                
+                located in
+                
+                \hspace{0.5cm}\texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}
+
+                
+      \item<2-> Example: Visualization of time series data\\
                 \vspace{2mm}
-                \texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}:\\
-                \texttt{example\underline{ }cbl\underline{ }pr.nc}, \texttt{example\underline{ }cbl\underline{ }xy.nc}, \texttt{example\underline{ }cbl\underline{ }xz.nc},\\
-                \texttt{example\underline{ }cbl\underline{ }ts.nc}
-      \item<2-> Example: Visualization of the time series data\\
-                \vspace{2mm}
-                Goal: Output as eps-file \texttt{timeseries.eps} (by default the
+       \item<3-> Goal: Output the eps-file \texttt{timeseries.eps} (by default the
                 plot would be output to an X11 window)
    \end{itemize}     
@@ -327,14 +334,11 @@
    \begin{itemize}     
       \item<1-> In order to reach the goal you can either ...
-      \item<1-> ... Change to the directory\\
+      \item<1-> ... change to the directory\\
                 \texttt{\$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/}\\
-                and use the shell script with the command\\
-                \vspace{2mm}
-                \texttt{palmplot ts file\underline{ }1=example\underline{ }cbl\underline{ }ts.nc format\underline{ }out=eps file\underline{ }out=timeseries}\\
-                \vspace{2mm}
-                Thus, the script \texttt{timeseries.ncl} is called and some of the parameters in the configuration file \texttt{.ncl.config} are directly set by specifying the related parameters in the command line,\\
-                \vspace{2mm}
-                \onslide<2-> e.g. \texttt{file\underline{ }1 = <netCDF file>} 
-                \textbf{(Note: the input file has always to be specified!)}, \texttt{file\underline{ }out = <output file>}
+                and use the shell script with the command:\\
+                \hspace{0.5cm}\texttt{palmplot ts file\underline{ }1=example\underline{ }cbl\underline{ }ts.nc format\underline{ }out=eps}\\ 
+                \hspace{0.5cm}\texttt{file\underline{ }out=timeseries}\\
+                Thus, the script \texttt{timeseries.ncl} is called and some of the parameters in the configuration file \texttt{.ncl.config} are directly set by specifying the related parameters in the command line, e.\,g.,\\
+                \onslide<2-> \hspace{0.5cm}\texttt{file\underline{ }1 = <netCDF file> file\underline{ }out = <output file>}
    \end{itemize}     
 
@@ -346,5 +350,6 @@
                Run (example\underline{ }cbl) (III)}
    \footnotesize
-   ... or you can modify the configuration file \texttt{.ncl.config}, e.g.\\
+   \begin{itemize}
+   \item<1-> ... or you can modify the configuration file \texttt{.ncl.config}, e.\,g.,\\
    \vspace{2mm}
    \texttt{if(.not. isvar(\dq file\underline{ }1\dq))then}\\
@@ -355,7 +360,8 @@
    \vspace{2mm}
 \texttt{if(.not. isvar(\dq file\underline{ }1\dq))then}\\
-   \quad \quad \texttt{file\underline{ }1 = \dq \$HOME/palm/current\underline{ }version/JOBS/example\underline{ }cbl/OUTPUT/example\underline{ }cbl\underline{ }ts.nc\dq}\\
+   \quad \quad \texttt{file\underline{ }1 = \dq \$HOME/palm/current\underline{ }version/JOBS/...}\\
+   \hspace{+2.3cm}\texttt{...example\underline{ }cbl/OUTPUT/example\underline{ }cbl\underline{ }ts.nc\dq}\\
    \texttt{end if}
-
+\end{itemize}
 \end{frame}
 
@@ -371,5 +377,5 @@
    \end{itemize}
    \centering
-   \onslide<2->\includegraphics[scale=0.25]{ncl_figures/vis1.png}
+   \onslide<2->\includegraphics[scale=0.23]{ncl_figures/vis1.png}
    
 \end{frame}
@@ -381,5 +387,5 @@
    \footnotesize
    \begin{itemize}
-      \item<1-> If you only want to get the plot of the time series of one variable, e.g. the maximum of the velocity component u, you can add the command line parameter \texttt{var='umax'} or modify the configuration file respectively, e.g.\\
+      \item<1-> If you only want to get the plot of the time series of just one variable, e.\,g., the maximum of the velocity component $u$, you can add the command line parameter \texttt{var='umax'} or modify the configuration file respectively, e.\,g.,\\
       \vspace{2mm}
       \texttt{if(.not. isvar(\dq var\dq ))then}\\
@@ -387,4 +393,5 @@
       \texttt{end if}
    \end{itemize}
+   \vspace{+0.2cm}
    \centering
    \onslide<2->\includegraphics[scale=0.3]{ncl_figures/vis2.png}
@@ -397,19 +404,17 @@
    \frametitle{Application Example: Visualization of the Output of the Example 
                Run (example\underline{ }cbl) (VI)}
-   \footnotesize
-   Plot profiles with the command\\
-   \quad \texttt{palmplot pr file\underline{ }1=example\underline{ }cbl\underline{ }pr.nc}\\
-   \vspace{3mm}
-   Profiles of same dimension are plotted\\
-   together, e.g. total, resolved and\\
-   subgridscale temperature flux (default)\\
-   \vspace{3mm}
-   (This composition is written to the\\
-   NetCDF header by the \texttt{d3par}\\
-   parameter \texttt{cross\underline{ }profiles})\\
-   \vspace{3mm}
-   If you add the parameter var=all to\\
-   the command, all profiles will be plotted\\
-   separately 
+   %\footnotesize
+   \begin{itemize}
+   \item Plot profiles with the command\\
+   \quad \texttt{palmplot pr}\\
+   \quad \texttt{file\underline{ }1=example\underline{ }cbl\underline{ }pr.nc}
+   \item Profiles of same dimension are\\ 
+            plotted together, e.\,g., total, \\
+            resolved and sub-grid scale \\
+            temperature flux (default)
+    \item If you add the parameter \\
+            \texttt{var='all'} to the command,\\
+            all profiles are plotted separately 
+   \end{itemize}
    \begin{tikzpicture}[remember picture, overlay]
       \node at (current page.north west){%
@@ -426,5 +431,5 @@
 \begin{frame}
    \frametitle{More Comments}
-   \small
+   \footnotesize
    \begin{itemize}     
       \item<1-> The other NCL scripts delivered with PALM can be used in 
@@ -432,12 +437,14 @@
                 differ from script to script
       \item<2-> There are plenty of parameters for each script. Please have a 
-                look to the NCL documentation 
-                (\texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist})
+                look to the NCL documentation\\
+                
+                \quad \texttt{http://palm.muk.uni-hannover.de/wiki/doc/app/nclparlist}\\
+                
                 for detailed information 
-      \item<3-> If one of the program aborts and there is no comment, 
-                check the configuration file - the scripts should not abort with
-                the default values. Be sure to use the right data type 
-                (e.g.: integer = 2; float = 2.0; double = 2.0d; 
-                string = \dq name\dq )  
+      \item<3-> If one of the programs aborts and there is no comment, 
+                check the configuration file! The scripts should not abort with
+                default values. Be sure to use the right data type 
+                (e.\,g., \texttt{integer = 2}, \texttt{float = 2.0}, \texttt{double = 2.0d}, 
+                \texttt{string = \dq name\dq})!
    \end{itemize}   
 \end{frame}
