<p><b>qchen3@fsu.edu</b> 2013-01-02 11:15:20 -0700 (Wed, 02 Jan 2013)</p><p>For GM design document: more details laid down.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/documents/ocean/current_design_doc/gm/gm.tex
===================================================================
--- trunk/documents/ocean/current_design_doc/gm/gm.tex        2012-12-21 17:53:00 UTC (rev 2371)
+++ trunk/documents/ocean/current_design_doc/gm/gm.tex        2013-01-02 18:15:20 UTC (rev 2372)
@@ -840,32 +840,32 @@
 
 \chapter{Design and Implementation}\label{cha:design-impl}
 
-\section{Support in the overall code structure for the GM parametrization }\label{sec:code-changes}
-</font>
<font color="red">oindent Namelist:\\
-Add rhox, rhoz, zMidx and k33.
+\section{General procedure for the implementation of GM in MPAS }\label{sec:code-changes}
+</font>
<font color="blue">oindent In Registry:\\
+Add {\tt slope(nVertLevels+1 nEdges Time)} and {\tt k33(nVertLevels nCells Time)}.
 
 \vspace{5mm}
 </font>
<font color="red">oindent In ocn\_diagnostic\_solve:\\
-Compute rhox, rhoz, zMidx and k33.\\
-Call subroutine ocn\_gm\_compute\_uBolus(rhox, rhoz, zMidx,
-s\%uBolusGM\%array)
+%Compute rhox, rhoz, zMidx and k33.\\
+Call subroutine {\tt ocn\_gm\_compute\_uBolus(rho, zMid, slope, k33, uBolusGM)}
 
 \vspace{5mm}
 </font>
<font color="red">oindent In ocn\_tend\_h:\\
-Call subroutine ocn\_thick\_hadv\_tend with uTransport instead of u.
+Call subroutine {\tt ocn\_thick\_hadv\_tend} with uTransport instead of u.
 
 \vspace{5mm}
 </font>
<font color="red">oindent In ocn\_tend\_scalar:\\
-Calculate uh with h\_edge and uTransport instead of u.\\
-Pass rhox, rhoz and zMidx along with other necessary arguments to
-the subroutine ocn\_tracer\_hmix\_tend for calculation of horizontal
+Calculate {\tt uh} with {\tt h\_edge} and {\tt uTransport} instead of
+{\tt u}.\\
+Pass {\tt slope} along with other necessary arguments to
+the subroutine {\tt ocn\_tracer\_hmix\_tend} for calculation of horizontal
 compoents of the Redi diffusion.\\
-Pass k33 to the subroutine ocn\_tracer\_vmix\_tend\_explicit for inclusion
+Pass {\tt k33} to the subroutine {\tt ocn\_tracer\_vmix\_tend\_explicit} for inclusion
 of the vertical component of the Redi diffusion.
 
 \vspace{5mm}
 </font>
<font color="gray">oindent In ocn\_time\_integration:\\
-Pass k33 to ocn\_tracer\_tend\_implicit for inclusion of the vertical
+Pass {\tt k33} to {\tt ocn\_tracer\_tend\_implicit} for inclusion of the vertical
 component of the Redi diffusion. (????)
 
 
@@ -893,22 +893,43 @@
 $s$ and/or $\gamma$ should be specified on the cell edges and at the
 layer interfaces. 
 
-% \section{Sequence of actions in the GM module}
-% \label{sec:sequence-actions-gm}
-% \begin{itemize}
-% \item  Step 1. Compute $\frac{\p\rho}{\p n}|_r$ at cell edge and layer center.
-% \item Step 2. Compute $\frac{\p\rho}{\p z}$ at cell center and layer
-%   interface.
-% \item Step 3. Compute $(\p z/\p n)|_r$ at cell edge and layer center.
-% \item Step 4a. Compute the slope S and then the uBolusGM according to
-%   \eqref{eq:12}. Or
-% \item Step 4b. Compute the stream function $\gamma$ according to
-%   \eqref{eq:19}--~\eqref{eq:20}, and uBolusGM according to
-%   \eqref{eq:13}.
-% \item 5. Compute $K_{33}$ according \eqref{eq:57}.
-% \item 6. Pass out $(\p\rho/\p n)_r$, $\rho_z$, $(\p z/\p n)_r$ and $K_{33}$.
-% \end{itemize}
+ \section{Computation steps in the GM module}
+\label{sec:sequence-actions-gm}
+\begin{itemize}
+\item  Step 1. Compute $\frac{\p\rho}{\p n}|_r$ at cell edge and layer center.
+\item Step 2. Compute $\frac{\p\rho}{\p z}$ at cell center and layer
+  interface.
+\item Step 3. Compute $(\p z/\p n)|_r$ at cell edge and layer center.
+\item Step 4. Interpolate $\frac{\p\rho}{\p z}$ to cell edge and layer
+  interface.
+\item Step 5. Interpolate $\frac{\p\rho}{\p z}$ to cell center and
+  middle of layers.
+\item Step 6. Interpolate $\frac{\p\rho}{\p n}|_r$ to cell edge and
+  layer interface.
+\item Step 7. Interpolate $(\p z/\p n)|_r$ to cell edge and layer
+  interface.
+\item Step 8a. Compute the slope $S$ according to \eqref{eq:9} and then the uBolusGM according to
+  \eqref{eq:12}. Or
+\item Step 8b. Compute the stream function $\gamma$ according to
+  \eqref{eq:19}--~\eqref{eq:20}, and uBolusGM according to
+  \eqref{eq:13}.
+\item Step 9. Compte $\tilde S$ (i.e.~{\tt slope}) at cell edge and layer interface
+  according to \eqref{eq:56}.
+\item 10. Compute $K_{33}$ according \eqref{eq:57}.
+\item 11. Pass out uBolusGM, $\tilde S$ and $K_{33}$.
+\end{itemize}
 
+\subsection{Additional computation steps in {\tt 
+    ocn\_tracer\_hmix\_tend}}
+\label{sec:addit-comp-steps}
+\begin{itemize}
+\item Interpolate {\tt slope} to cell edge and middle of layers.
+\item Interpolate $(\p\varphi/\p n)|_r$ to cell edge and layer interface.
+\item Comute  $</font>
<font color="blue">abla_r\cdot\left(\tilde{\mathbf{S}}\frac{\p\varphi}{\p
+      z}\right)$ according to \eqref{eq:58}.
+\item Compute $\tilde{\mathbf{S}}\cdot</font>
<font color="blue">abla_r\varphi$ according to \eqref{eq:59}.
+\end{itemize}
+
 %-----------------------------------------------------------------------
 
 \chapter{Testing}\label{cha:testing}

</font>
</pre>