% $Id: exercise_interface.tex 1657 2015-09-17 18:31:36Z hoffmann $ \input{header_tmp.tex} %\input{../header_lectures.tex} \usepackage[utf8]{inputenc} \usepackage{ngerman} \usepackage{pgf} \usepackage{subfigure} \usepackage{units} \usepackage{tabto} \usepackage{multimedia} \usepackage{hyperref} \newcommand{\event}[1]{\newcommand{\eventname}{#1}} \usepackage{xmpmulti} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning} \usetikzlibrary{decorations.markings} %neues paket \usetikzlibrary{decorations.pathreplacing} %neues paket \def\Tiny{\fontsize{4pt}{4pt}\selectfont} \usepackage{amsmath} \usepackage{amssymb} \usepackage{multicol} \usepackage{pdfcomment} \usepackage{graphicx} \usepackage{listings} \lstset{language=[90]Fortran, basicstyle=\ttfamily \tiny, keywordstyle=\color{black}, commentstyle=\color{black}, morecomment=[l]{!\ }% Comment only with space after ! } \institute{Institute of Meteorology and Climatology, Leibniz Universität Hannover} \selectlanguage{english} \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.pdf}} \title[Exercise 3: User Interface]{Exercise 3: User Interface} \author{PALM group} \setbeamersize{text margin left=.2cm,text margin right=.2cm} \begin{document} \footnotesize % Folie 1 \begin{frame} \titlepage \end{frame} \section{Exercise} \subsection{Exercise} % Folie 2 \begin{frame} \frametitle{Exercise 3: User Interface} \begin{itemize} \item Carry out a run for a convective boundary layer where a surface heat flux is given for a limited rectangular area: \tikzstyle{green} = [rectangle, draw, fill=green!70, minimum size=51pt, font=\tiny] \tikzstyle{red} = [rectangle, draw, fill=red!90, text width=44.77pt, minimum size=20pt, font=\tiny] \tikzstyle{textd} = [rectangle, font=\normalsize] \tikzstyle{line} = [draw, -] \begin{center} \begin{tikzpicture}[auto, node distance=0] \uncover<2->{\node [green] (green) {};} \uncover<3->{\node [red, rotate=90] (red) {};} \uncover<4->{\node [textd] (textd) {$d$};} \uncover<4->{\draw [latex-,line width=0.8pt] (red.south) -- (textd.east);} \uncover<4->{\draw [latex-,line width=0.8pt] (red.north) -- (textd.west);} \end{tikzpicture} \end{center} \item<5-> It should be possible to control the area width $d$ by a user-defined parameter in the parameter file. All other parameters should be chosen as in the example run ({\texttt{\scriptsize example\_cbl}}). Chose a stripe width of $d=300$m. \item<6-> Create horizontal and vertical cross sections of variables in order to analyze the flow field. \only<7->{\scriptsize \textit{Recommendations: Create mean vertical profiles of temperature and resolved/subgrid-scale heatflux for the total domain but also for the limited rectangular area and the total domain without the limited area. Also create time series for these three domains. This can be done by using the \textbf{statistic region concept} already implemented in PALM.}} \end{itemize} \end{frame} % Folie 3 \begin{frame} \frametitle{The statistic region concept} \begin{itemize} \item<1-> By default, mean horizontal profiles are calculated and output for the total domain. \item<2-> The user can define up to nine so-called statistic regions, which can be arbitrary subsets of the total domain and PALM will calculate and output mean profiles for these regions, too. \end{itemize} \vspace{1em} \onslide<3->\textbf{Procedure:} \begin{enumerate} \item<3-> Set the number of statistic regions you additionally want to define by assigning a value to the {\texttt{\scriptsize {\&}inipar}}-parameter {\texttt{\scriptsize \textcolor{blue}{statistic\_regions}}}. \item<4-> Within the user-interface ({\texttt{\scriptsize user\_init}}), set the masking array {\texttt{\scriptsize rmask}}. It is an {\texttt{\scriptsize INTEGER}} array with array-bounds \begin{center} {\texttt{\scriptsize rmask(nysg:nyng,nxlg:nxrg,0:\textcolor{blue}{statistic\_regions})}} \end{center} The last index represents the respective statistic region (index {\texttt{\scriptsize 0}} stands for total domain). Assign a 1 to each array element (grid point) which shall belong to the respective statistic region. {\texttt{\scriptsize rmask}} is pre-set as: \begin{center} {\texttt{\scriptsize rmask(:,:,0:\textcolor{blue}{statistic\_regions}) = 1}} \end{center} \end{enumerate} \end{frame} % Folie 4 \begin{frame} \frametitle{Additional hints} \begin{itemize} \item<1-> Keep in mind that every PE calculates for a different subset of the total domain. Array bounds of the total domain are {\texttt{\scriptsize (0:ny,0:nx)}}, those of the subdomains {\texttt{\scriptsize (nys:nyn,nxl:nxr)}}, where {\texttt{\scriptsize nys, nyn, nxl, nxr}} vary for each subdomain. \item<2-> {\texttt{\scriptsize rmask}} can also be used to modify the array which defines the surface heatflux ({\texttt{\scriptsize shf}}): \begin{center} {\texttt{\scriptsize shf $=$ shf * rmask(:,:,1)}} \end{center} This sets the surface heatflux to zero at all those array elements (grid points) where {\texttt{\scriptsize rmask(...,1)}} is zero. \item<3-> In case of using the default netCDF format, the profile data for the additional statistic regions are added to the default local file {\texttt{\scriptsize DATA\_1D\_PR\_NETCDF}}. \item<4-> The developing mean flow is quasi two-dimensional (in the $xz$-plane). You can easily get plots of the mean flow by averaging results along the $y$-axis. The standard output provides such averages. See description of parameter {\texttt{\scriptsize \textcolor{blue}{section\_xz}}} on how to get averages along $y$. \end{itemize} \end{frame} % Folie 5 \begin{frame} \frametitle{Bonus (if you finished the exercise very fast):} \begin{itemize} \item<1-> Repeat the simulation, but now for a geostrophic wind of 0.5 m s$^{-1}$ (Consider the wind direction!) \item<1-> The resulting flow will be quite similar to the flow over an arctic lead \end{itemize} \begin{columns} \begin{column}{8cm} \includegraphics[angle=0,width=0.95\textwidth]{exercise_interface_figures/arctic_lead_nasa_2013.jpg} \end{column} \begin{column}{3cm} \tiny \vspace{-4.8cm} $\Leftarrow$ Image curtesy: NASA, 2013 \end{column} \end{columns} \end{frame} \bgroup \setbeamercolor{background canvas}{bg=white} \begin{frame}[plain,noframenumbering]{} \end{frame} \egroup % Folie 6 \section{Results \quad \, } \subsection{Results} % Folie 7 \begin{frame} \frametitle{xy cross-sections: vertical velocity and surface heat flux} \vspace{-0.15cm} \begin{center} \includegraphics[width=0.9\textwidth]{exercise_interface_figures/interface_shf.pdf} \end{center} \end{frame} % Folie 8 \begin{frame} \frametitle{vertical profiles: potential temperature} \begin{center} \includegraphics[angle=0,width=1.0\textwidth]{exercise_interface_figures/interface_pt.pdf} \end{center} \end{frame} % Folie 9 \begin{frame} \frametitle{xz cross-sections: vertical velocity} \vspace{-0.15cm} \begin{center} \includegraphics[angle=0,width=0.9\textwidth]{exercise_interface_figures/interface_w_av.pdf}\\ \end{center} \end{frame} % Folie 10 \begin{frame} \frametitle{vertical profiles: resolved vertical heat flux} \begin{center} \includegraphics[angle=0,width=1.0\textwidth]{exercise_interface_figures/interface_wpt_res.pdf} \end{center} \end{frame} % Folie 11 \begin{frame} \frametitle{vertical profiles: subgrid scale vertical heat flux} \begin{center} \includegraphics[angle=0,width=1.0\textwidth]{exercise_interface_figures/interface_wpt_sgs.pdf} \end{center} \end{frame} % Folie 12 \begin{frame} \frametitle{time series: potential temperature and vertical heat flux} \begin{center} \includegraphics[angle=0,width=0.85\textwidth]{exercise_interface_figures/interface_ts.pdf}\\ \end{center} \end{frame} % Folie 13 \begin{frame} \frametitle{Bonus: xz cross-sections: vertical velocity} \vspace{-0.15cm} \begin{center} \includegraphics[angle=0,width=0.9\textwidth]{exercise_interface_figures/interface_lead.pdf} \end{center} \end{frame} \end{document}