<p><b>mpetersen@lanl.gov</b> 2012-10-15 15:19:13 -0600 (Mon, 15 Oct 2012)</p><p>Partial bottom cells design document<br>
</p><hr noshade><pre><font color="gray">Added: trunk/documents/ocean/current_design_doc/partial_bottom_cells/partial_bottom_cells.tex
===================================================================
--- trunk/documents/ocean/current_design_doc/partial_bottom_cells/partial_bottom_cells.tex                                (rev 0)
+++ trunk/documents/ocean/current_design_doc/partial_bottom_cells/partial_bottom_cells.tex        2012-10-15 21:19:13 UTC (rev 2211)
@@ -0,0 +1,157 @@
+\documentclass[11pt]{report}
+
+\usepackage{epsf,amsmath,amsfonts}
+\usepackage{graphicx}
+
+\setlength{\textwidth}{6.5in}
+\setlength{\oddsidemargin}{0in}
+\setlength{\evensidemargin}{0in}
+\setlength{\textheight}{8.5in}
+\setlength{\topmargin}{0in}
+
+\begin{document}
+
+\title{
+Requirements and Design\\
+Partial Bottom Cells}
+\author{MPAS Development Team}
+
+\maketitle
+\tableofcontents
+
+%-----------------------------------------------------------------------
+
+\chapter{Summary}
+
+Partial bottom cells (PBCs) allow bottom topography to be represented more realistically.  Currently, MPAS-Ocean only suports full ocean cells, so the bottom depth of a column is restricted to the depth of each vertical cell interface.  With partial bottom cells, the bottom depth may take on any value.  This is still a z-level-type formulation, where cells that are fully below the bottom depth are considered land cells.  The PBC formulation will work with z-level, z-star, and z-tilde formulations.
+
+%figure template
+%\begin{figure}
+%  \center{\includegraphics[width=14cm]{./Figure1.pdf}}
+%  \caption{A graphical representation of the discrete boundary.}
+%  \label{Figure1}
+%\end{figure} 
+
+%-----------------------------------------------------------------------
+
+\chapter{Requirements}
+
+\section{Requirement: initial conditions with consistant variables}
+Date last modified: 2012/10/15 \\
+Contributors: Mark Petersen \\
+
+The following variables must be consistent upon starting a new simulation with mpas-ocean: bottomDepth, maxLevelCell, thickness $h$, location of initial tracers in bottom cell.
+
+\section{Requirement: horizontal advection}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+Horizontal advection must take place through a thickness that accounts for the partial bottom cell at the bottom of the column.
+
+\section{Requirement: pressure gradient}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+Pressure gradients must not contain spurious effects due to the partial bottom cells.
+
+
+
+%-----------------------------------------------------------------------
+
+\chapter{Algorithmic Formulations}
+
+\section{Design Solution: initial conditions with consistant variables}
+
+Date last modified: 2012/10/15 \\
+Contributors: Mark Petersen \\
+
+The thickness variable {\tt h(k,iCell,iStep)} will continue to be the actual thickness of fluid in the cell.  
+A new variable, {\tt bottomDepth(iCell)}, is the depth below the average sea surface height ($z=0$) in each cell, and is a positive number.    The variable {\tt maxLevelCell(iCell)} is an integer of the deepest active (water-filled) cell, and {\tt refBottomDepth(k)} is the depth of the bottom of each cell in z-level coordinates.  Note that depth variables are positive, $z$ variables are negative and decrease with greater depths, and the $k$ index increases with greater depth.
+
+In generating the initial conditions (IC), the following steps are taken:
+\begin{enumerate}
+\item An additional parameter, {\tt max\_partial\_bottom\_cell}, may be set between zero and one, with default .95, in the initial condition generation.  Then {\tt bottomDepth} must be altered so that a partial bottom cell has a maximum of (say) 95\% land.  This parameter may be adjusted after testing. 
+\item The thickness {\tt h} at {\tt k=maxLevelCell} is reduced to take into account the thickness removed by the partial bottom cell.
+\item Initial tracer values in the bottom cell are interpolated to the center of the pbc, rather than the center of the full cell.
+\item Check that {\tt bottomDepth} corresponds to {\tt maxLevelCell} (because they are redundant):\\
+when {\tt k=maxLevelCell(iCell)}:\\
+{\tt refBottomDepth(k)&lt;bottomDepth(iCell)&lt; refBottomDepth(k-1)}
+\end{enumerate}
+
+The ICs could be altered in basin.F or upon start-up with mpas.  We chose to alter the ICs in mpas to reduce the number and IC files and the complexity of IC generation.  The initial netcdf file (ocean.nc, produced by basin), include a realistic
+ bottomDepth variable and thickness and tracer variables for full thickness cells.
+
+Upon start-up with {\tt config\_do\_restart = .false.}, ICs are altered as described above.  An additional flag is used as follows:
+\begin{itemize}
+\item If running with pbcs, set {\tt config\_alter\_ICs\_for\_pbc=.true.} Then thin pbc cells
+   will be changed, and thickness and tracers will be altered to match the pbcs (steps 1-3, above).
+\item If running without pbcs, set {\tt config\_alter\_ICs\_for\_pbc=.false.} Then 
+   bottomDepth will be altered so it is full cells everywhere.
+   If your input file does not include bottomDepth, the false option will
+   initialize bottomDepth correctly for a non-pbc run.
+\end{itemize}
+In either case, consistency between {\tt bottomDepth} and {\tt maxLevelCell} is verified afterwards.
+
+
+\section{Design Solution: horizontal advection}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+{\bf Option 1: Do nothing (this option was chosen)}\\
+
+If nothing is changed in the current code, {\tt h\_edge} is computed from from the thickness of nearby cells, regardless of PBCs in the bottom layer.  This is a clean and simple solution, but if PBCs are very thin, a cell could be evacuated of water.\\
+
+{\bf Option 2: h\_edge is limited by minimum depth of neighboring cells}\\
+
+In POP, the thickness of a U-cell is the minimum of the four surrounding T-Cells.  Likewise in MPAS-Ocean, one could compute the edge thickness using the minimum bottom depth of the two surrounding cells.  For the computation of {\tt h\_edge} using higher order advection methods, this will require further thought.
+
+\section{Design Solution: pressure gradient}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+{\bf Option 1: Do nothing (this option was chosen)}\\
+
+MPAS-Ocean currently has two terms related to the pressure gradient,
+\begin{equation}
+- \frac{1}{\rho_0}</font>
<font color="black">abla p_k  - \frac{\rho g}{\rho_0}</font>
<font color="blue">abla z^{mid}_k.
+\end{equation}
+where the gradient of $z^{mid}$ makes up pressure differences due to tilted levels.  However, in a stratified ocean, pressure gradient errors occur when the tilting of levels is large.  In a z-star system without PBCs, these perturbations are limited by the ratio of sea surface height to total depth, so only a few percent.  With the inclusion of PBCs, $z^{mid}$ could vary from one gridcell to the next by half the layer thickness.\\
+
+{\bf Option 2: Interpolate T \&amp; S to center of bottom cell for pressure computation}\\
+
+If the pressure gradient errors are deemed to be too large, one could extrapolate the temperature and salinity values to the mid-depth of the bottom cell, and compute density and pressure at that location.  This will require a special case when {\tt k=maxLevelCell}.  There will need to be an extra case in the computation of $</font>
<font color="blue">abla z^{mid}$ as well, so that $z^{mid}$ at the bottom cell is at the cell center.
+
+
+%-----------------------------------------------------------------------
+
+\chapter{Design and Implementation}
+
+\section{Implementation: consistency between thickness and partial bottom cell variables}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+
+\section{Implementation: horizontal advection}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+
+\section{Implementation: pressure gradient}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+
+%-----------------------------------------------------------------------
+
+\chapter{Testing}
+
+\section{Testing and Validation: Partial bottom cells}
+Date last modified: 2012/08/01 \\
+Contributors: Mark Petersen \\
+
+Use the test problem, already in the repository, following Ilicak ea 2012 overflow test case (\#4).
+
+
+%-----------------------------------------------------------------------
+
+\end{document}

</font>
</pre>