--- manual/s_examples/baroclinic_gyre/fourlayer.tex	2001/09/27 00:58:17	1.2
+++ manual/s_examples/baroclinic_gyre/fourlayer.tex	2001/10/24 19:43:07	1.4
@@ -1,7 +1,8 @@
-% $Header: /home/ubuntu/mnt/e9_copy/manual/s_examples/baroclinic_gyre/fourlayer.tex,v 1.2 2001/09/27 00:58:17 cnh Exp $
+% $Header: /home/ubuntu/mnt/e9_copy/manual/s_examples/baroclinic_gyre/fourlayer.tex,v 1.4 2001/10/24 19:43:07 cnh Exp $
 % $Name:  $
 
 \section{Example: Four layer Baroclinic Ocean Gyre In Spherical Coordinates}
+\label{sec:eg-fourlayer}
 
 \bodytext{bgcolor="#FFFFFFFF"}
 
@@ -15,10 +16,11 @@
 %{\large May 2001}
 %\end{center}
 
-\subsection{Introduction}
-
-This document describes the second example MITgcm experiment. The first
-example experiment ilustrated how to configure the code for a single layer 
+This document describes an example experiment using MITgcm
+to simulate a baroclinic ocean gyre in spherical
+polar coordinates. The barotropic
+example experiment in section \ref{sec:eg-baro}
+ilustrated how to configure the code for a single layer 
 simulation in a cartesian grid. In this example a similar physical problem
 is simulated, but the code is now configured
 for four layers and in a spherical polar coordinate system.
@@ -38,11 +40,11 @@
 by a constant in time zonal wind stress, $\tau_x$, that varies sinusoidally
 in the north-south direction. Topologically the simulated 
 domain is a sector on a sphere and the coriolis parameter, $f$, is defined 
-according to latitude, $\phi$
+according to latitude, $\varphi$
 
 \begin{equation}
 \label{EQ:fcori}
-f(\phi) = 2 \Omega \sin( \phi )
+f(\varphi) = 2 \Omega \sin( \varphi )
 \end{equation}
  
 \noindent with the rotation rate, $\Omega$ set to $\frac{2 \pi}{86400s}$.
@@ -52,20 +54,22 @@
 
 \begin{equation}
 \label{EQ:taux}
-\tau_x(\phi) = \tau_{0}\sin(\pi \frac{\phi}{L_{\phi}})
+\tau_x(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}})
 \end{equation}
  
-\noindent where $L_{\phi}$ is the lateral domain extent ($60^{\circ}$) and 
+\noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and 
 $\tau_0$ is set to $0.1N m^{-2}$. 
 \\
 
 Figure \ref{FIG:simulation_config}
 summarises the configuration simulated.
-In contrast to example (1) \cite{baro_gyre_case_study}, the current 
-experiment simulates a spherical polar domain. However, as indicated
+In contrast to the example in section \ref{sec:eg-baro}, the 
+current experiment simulates a spherical polar domain. However, as indicated
 by the axes in the lower left of the figure the model code works internally
-in a locally orthoganal coordinate $(x,y,z)$. In the remainder of this
-document the local coordinate $(x,y,z)$ will be adopted.
+in a locally orthoganal coordinate $(x,y,z)$. For this experiment description 
+of this document the local orthogonal model coordinate $(x,y,z)$ is synonomous 
+with the spherical polar coordinate shown in figure 
+\ref{fig:spherical-polar-coord}
 \\
 
 The experiment has four levels in the vertical, each of equal thickness,
@@ -113,14 +117,8 @@
 \label{FIG:simulation_config}
 \end{figure}
 
-\subsection{Discrete Numerical Configuration}
+\subsection{Equations solved}
 
- The model is configured in hydrostatic form.  The domain is discretised with 
-a uniform grid spacing in latitude and longitude
- $\Delta x=\Delta y=1^{\circ}$, so 
-that there are sixty grid cells in the $x$ and $y$ directions. Vertically the 
-model is configured with a four layers with constant depth, 
-$\Delta z$, of $500$~m. 
 The implicit free surface form of the 
 pressure equation described in Marshall et. al \cite{Marshall97a} is 
 employed. 
@@ -128,24 +126,26 @@
 dissipation. The wind-stress momentum input is added to the momentum equation
 for the ``zonal flow'', $u$. Other terms in the model
 are explicitly switched off for this experiement configuration (see section
-\ref{SEC:code_config} ), yielding an active set of equations solved in this 
-configuration as follows
+\ref{SEC:code_config} ). This yields an active set of equations in 
+solved in this configuration, written in spherical polar coordinates as 
+follows
 
 \begin{eqnarray}
 \label{EQ:model_equations}
 \frac{Du}{Dt} - fv + 
-  \frac{1}{\rho}\frac{\partial p^{'}}{\partial x} - 
+  \frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} - 
   A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} 
 & = &
 \cal{F}
 \\
 \frac{Dv}{Dt} + fu + 
-  \frac{1}{\rho}\frac{\partial p^{'}}{\partial y} - 
+  \frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \varphi} - 
   A_{h}\nabla_{h}^2v - A_{z}\frac{\partial^{2}v}{\partial z^{2}} 
 & = &
 0
 \\
-\frac{\partial \eta}{\partial t} + \nabla_{h}\cdot \vec{u}
+\frac{\partial \eta}{\partial t} + \frac{\partial H \hat{u}}{\partial \lambda} +
+\frac{\partial H \hat{v}}{\partial \varphi}
 &=&
 0
 \\
@@ -154,21 +154,74 @@
 & = &
 0
 \\
-g\rho_{0} \eta + \int^{0}_{-z}\rho^{'} dz & = & p^{'}
+p^{\prime} & = &
+g\rho_{0} \eta + \int^{0}_{-z}\rho^{\prime} dz
+\\
+\rho^{\prime} & = &- \alpha_{\theta}\rho_{0}\theta^{\prime}
 \\
 {\cal F} |_{s} & = & \frac{\tau_{x}}{\rho_{0}\Delta z_{s}}
 \\
 {\cal F} |_{i} & = & 0
 \end{eqnarray}
 
-\noindent where $u$ and $v$ are the $x$ and $y$ components of the
-flow vector $\vec{u}$. The suffices ${s},{i}$ indicate surface and
-interior model levels respectively. As described in
-MITgcm Numerical Solution Procedure \cite{MITgcm_Numerical_Scheme}, the time 
-evolution of potential temperature, $\theta$, equation is solved prognostically.
-The total pressure, $p$, is diagnosed by summing pressure due to surface 
+\noindent where $u$ and $v$ are the components of the horizontal
+flow vector $\vec{u}$ on the sphere ($u=\dot{\lambda},v=\dot{\varphi}$).
+The terms $H\hat{u}$ and $H\hat{v}$ are the components of the term
+integrated in eqaution \ref{eq:free-surface}, as descirbed in section
+
+The suffices ${s},{i}$ indicate surface and interior of the domain.
+The forcing $\cal F$ is only applied at the surface.
+The pressure field, $p^{\prime}$, is separated into a barotropic part
+due to variations in sea-surface height, $\eta$, and a hydrostatic
+part due to variations in density, $\rho^{\prime}$, over the water column.
+
+\subsection{Discrete Numerical Configuration}
+
+ The model is configured in hydrostatic form.  The domain is discretised with 
+a uniform grid spacing in latitude and longitude
+ $\Delta \lambda=\Delta \varphi=1^{\circ}$, so 
+that there are sixty grid cells in the zonal and meridional directions. 
+Vertically the 
+model is configured with four layers with constant depth, 
+$\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate 
+variables $x$ and $y$ are initialised from the values of
+$\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in
+radians according to
+
+\begin{eqnarray}
+x=r\cos(\varphi)\lambda,~\Delta x & = &r\cos(\varphi)\Delta \lambda \\
+y=r\varphi,~\Delta y &= &r\Delta \varphi
+\end{eqnarray}
+
+The procedure for generating a set of internal grid variables from a
+spherical polar grid specification is discussed in section 
+\ref{sec:spatial_discrete_horizontal_grid}.
+
+\noindent\fbox{ \begin{minipage}{5.5in}
+{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em
+model/src/ini\_spherical\_polar\_grid.F})
+
+$A_c$, $A_\zeta$, $A_w$, $A_s$: {\bf rAc}, {\bf rAz}, {\bf rAw}, {\bf rAs}
+({\em GRID.h})
+
+$\Delta x_g$, $\Delta y_g$: {\bf DXg}, {\bf DYg} ({\em GRID.h})
+
+$\Delta x_c$, $\Delta y_c$: {\bf DXc}, {\bf DYc} ({\em GRID.h})
+
+$\Delta x_f$, $\Delta y_f$: {\bf DXf}, {\bf DYf} ({\em GRID.h})
+
+$\Delta x_v$, $\Delta y_u$: {\bf DXv}, {\bf DYu} ({\em GRID.h})
+
+\end{minipage} }\\
+
+
+
+As described in \ref{sec:tracer_equations}, the time evolution of potential 
+temperature, 
+$\theta$, equation is solved prognostically.
+The pressure forces that drive the fluid motions, (
+$\frac{\partial p^{'}}{\partial \lambda}$ and $\frac{\partial p^{'}}{\partial \varphi}$), are found by summing pressure due to surface 
 elevation $\eta$ and the hydrostatic pressure.
-\\
 
 \subsubsection{Numerical Stability Criteria}
 
