| 2 |
% $Name$ |
% $Name$ |
| 3 |
|
|
| 4 |
\section[Baroclinic Gyre MITgcm Example]{Four Layer Baroclinic Ocean Gyre In Spherical Coordinates} |
\section[Baroclinic Gyre MITgcm Example]{Four Layer Baroclinic Ocean Gyre In Spherical Coordinates} |
| 5 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 6 |
\label{sect:eg-fourlayer} |
\label{sec:eg-fourlayer} |
| 7 |
\begin{rawhtml} |
\begin{rawhtml} |
| 8 |
<!-- CMIREDIR:eg-fourlayer: --> |
<!-- CMIREDIR:eg-fourlayer: --> |
| 9 |
\end{rawhtml} |
\end{rawhtml} |
| 29 |
in the verification directory under tutorial\_baroclinic\_gyre. |
in the verification directory under tutorial\_baroclinic\_gyre. |
| 30 |
|
|
| 31 |
\subsection{Overview} |
\subsection{Overview} |
| 32 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 33 |
|
|
| 34 |
This example experiment demonstrates using the MITgcm to simulate |
This example experiment demonstrates using the MITgcm to simulate |
| 35 |
a baroclinic, wind-forced, ocean gyre circulation. The experiment |
a baroclinic, wind-forced, ocean gyre circulation. The experiment |
| 47 |
according to latitude, $\varphi$ |
according to latitude, $\varphi$ |
| 48 |
|
|
| 49 |
\begin{equation} |
\begin{equation} |
| 50 |
\label{EQ:eg-fourlayer-fcori} |
\label{eq:eg-fourlayer-fcori} |
| 51 |
f(\varphi) = 2 \Omega \sin( \varphi ) |
f(\varphi) = 2 \Omega \sin( \varphi ) |
| 52 |
\end{equation} |
\end{equation} |
| 53 |
|
|
| 57 |
The sinusoidal wind-stress variations are defined according to |
The sinusoidal wind-stress variations are defined according to |
| 58 |
|
|
| 59 |
\begin{equation} |
\begin{equation} |
| 60 |
\label{EQ:taux} |
\label{eq:taux} |
| 61 |
\tau_{\lambda}(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}}) |
\tau_{\lambda}(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}}) |
| 62 |
\end{equation} |
\end{equation} |
| 63 |
|
|
| 65 |
$\tau_0$ is set to $0.1N m^{-2}$. |
$\tau_0$ is set to $0.1N m^{-2}$. |
| 66 |
\\ |
\\ |
| 67 |
|
|
| 68 |
Figure \ref{FIG:eg-fourlayer-simulation_config} |
Figure \ref{fig:eg-fourlayer-simulation_config} |
| 69 |
summarizes the configuration simulated. |
summarizes the configuration simulated. |
| 70 |
In contrast to the example in section \ref{sect:eg-baro}, the |
In contrast to the example in section \ref{sec:eg-baro}, the |
| 71 |
current experiment simulates a spherical polar domain. As indicated |
current experiment simulates a spherical polar domain. As indicated |
| 72 |
by the axes in the lower left of the figure the model code works internally |
by the axes in the lower left of the figure the model code works internally |
| 73 |
in a locally orthogonal coordinate $(x,y,z)$. For this experiment description |
in a locally orthogonal coordinate $(x,y,z)$. For this experiment description |
| 86 |
linear |
linear |
| 87 |
|
|
| 88 |
\begin{equation} |
\begin{equation} |
| 89 |
\label{EQ:eg-fourlayer-linear1_eos} |
\label{eq:eg-fourlayer-linear1_eos} |
| 90 |
\rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} ) |
\rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} ) |
| 91 |
\end{equation} |
\end{equation} |
| 92 |
|
|
| 93 |
\noindent which is implemented in the model as a density anomaly equation |
\noindent which is implemented in the model as a density anomaly equation |
| 94 |
|
|
| 95 |
\begin{equation} |
\begin{equation} |
| 96 |
\label{EQ:eg-fourlayer-linear1_eos_pert} |
\label{eq:eg-fourlayer-linear1_eos_pert} |
| 97 |
\rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'} |
\rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'} |
| 98 |
\end{equation} |
\end{equation} |
| 99 |
|
|
| 122 |
imposed by setting the potential temperature, $\theta$, in each layer. |
imposed by setting the potential temperature, $\theta$, in each layer. |
| 123 |
The vertical spacing, $\Delta z$, is constant and equal to $500$m. |
The vertical spacing, $\Delta z$, is constant and equal to $500$m. |
| 124 |
} |
} |
| 125 |
\label{FIG:eg-fourlayer-simulation_config} |
\label{fig:eg-fourlayer-simulation_config} |
| 126 |
\end{figure} |
\end{figure} |
| 127 |
|
|
| 128 |
\subsection{Equations solved} |
\subsection{Equations solved} |
| 129 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 130 |
For this problem |
For this problem |
| 131 |
the implicit free surface, {\bf HPE} (see section \ref{sect:hydrostatic_and_quasi-hydrostatic_forms}) form of the |
the implicit free surface, {\bf HPE} (see section \ref{sec:hydrostatic_and_quasi-hydrostatic_forms}) form of the |
| 132 |
equations described in Marshall et. al \cite{marshall:97a} are |
equations described in Marshall et. al \cite{marshall:97a} are |
| 133 |
employed. The flow is three-dimensional with just temperature, $\theta$, as |
employed. The flow is three-dimensional with just temperature, $\theta$, as |
| 134 |
an active tracer. The equation of state is linear. |
an active tracer. The equation of state is linear. |
| 137 |
temperature equation. A wind-stress momentum forcing is added to the momentum |
temperature equation. A wind-stress momentum forcing is added to the momentum |
| 138 |
equation for the zonal flow, $u$. Other terms in the model |
equation for the zonal flow, $u$. Other terms in the model |
| 139 |
are explicitly switched off for this experiment configuration (see section |
are explicitly switched off for this experiment configuration (see section |
| 140 |
\ref{SEC:eg_fourl_code_config} ). This yields an active set of equations |
\ref{sec:eg_fourl_code_config} ). This yields an active set of equations |
| 141 |
solved in this configuration, written in spherical polar coordinates as |
solved in this configuration, written in spherical polar coordinates as |
| 142 |
follows |
follows |
| 143 |
|
|
| 144 |
\begin{eqnarray} |
\begin{eqnarray} |
| 145 |
\label{EQ:eg-fourlayer-model_equations} |
\label{eq:eg-fourlayer-model_equations} |
| 146 |
\frac{Du}{Dt} - fv + |
\frac{Du}{Dt} - fv + |
| 147 |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} - |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} - |
| 148 |
A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} |
A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} |
| 181 |
flow vector $\vec{u}$ on the sphere ($u=\dot{\lambda},v=\dot{\varphi}$). |
flow vector $\vec{u}$ on the sphere ($u=\dot{\lambda},v=\dot{\varphi}$). |
| 182 |
The terms $H\widehat{u}$ and $H\widehat{v}$ are the components of the vertical |
The terms $H\widehat{u}$ and $H\widehat{v}$ are the components of the vertical |
| 183 |
integral term given in equation \ref{eq:free-surface} and |
integral term given in equation \ref{eq:free-surface} and |
| 184 |
explained in more detail in section \ref{sect:pressure-method-linear-backward}. |
explained in more detail in section \ref{sec:pressure-method-linear-backward}. |
| 185 |
However, for the problem presented here, the continuity relation (equation |
However, for the problem presented here, the continuity relation (equation |
| 186 |
\ref{eq:fourl_example_continuity}) differs from the general form given |
\ref{eq:fourl_example_continuity}) differs from the general form given |
| 187 |
in section \ref{sect:pressure-method-linear-backward}, |
in section \ref{sec:pressure-method-linear-backward}, |
| 188 |
equation \ref{eq:linear-free-surface=P-E+R}, because the source terms |
equation \ref{eq:linear-free-surface=P-E}, because the source terms |
| 189 |
${\cal P}-{\cal E}+{\cal R}$ |
${\cal P}-{\cal E}+{\cal R}$ |
| 190 |
are all $0$. |
are all $0$. |
| 191 |
|
|
| 203 |
lateral and vertical boundary conditions for the $\nabla_{h}^{2}$ |
lateral and vertical boundary conditions for the $\nabla_{h}^{2}$ |
| 204 |
and $\frac{\partial^{2}}{\partial z^{2}}$ operators are specified |
and $\frac{\partial^{2}}{\partial z^{2}}$ operators are specified |
| 205 |
when the numerical simulation is run - see section |
when the numerical simulation is run - see section |
| 206 |
\ref{SEC:eg_fourl_code_config}. For temperature |
\ref{sec:eg_fourl_code_config}. For temperature |
| 207 |
the boundary condition is ``zero-flux'' |
the boundary condition is ``zero-flux'' |
| 208 |
e.g. $\frac{\partial \theta}{\partial \varphi}= |
e.g. $\frac{\partial \theta}{\partial \varphi}= |
| 209 |
\frac{\partial \theta}{\partial \lambda}=\frac{\partial \theta}{\partial z}=0$. |
\frac{\partial \theta}{\partial \lambda}=\frac{\partial \theta}{\partial z}=0$. |
| 211 |
|
|
| 212 |
|
|
| 213 |
\subsection{Discrete Numerical Configuration} |
\subsection{Discrete Numerical Configuration} |
| 214 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 215 |
|
|
| 216 |
The domain is discretised with |
The domain is discretised with |
| 217 |
a uniform grid spacing in latitude and longitude |
a uniform grid spacing in latitude and longitude |
| 231 |
|
|
| 232 |
The procedure for generating a set of internal grid variables from a |
The procedure for generating a set of internal grid variables from a |
| 233 |
spherical polar grid specification is discussed in section |
spherical polar grid specification is discussed in section |
| 234 |
\ref{sect:spatial_discrete_horizontal_grid}. |
\ref{sec:spatial_discrete_horizontal_grid}. |
| 235 |
|
|
| 236 |
\noindent\fbox{ \begin{minipage}{5.5in} |
\noindent\fbox{ \begin{minipage}{5.5in} |
| 237 |
{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em |
{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em |
| 252 |
|
|
| 253 |
|
|
| 254 |
|
|
| 255 |
As described in \ref{sect:tracer_equations}, the time evolution of potential |
As described in \ref{sec:tracer_equations}, the time evolution of potential |
| 256 |
temperature, |
temperature, |
| 257 |
$\theta$, (equation \ref{eq:eg_fourl_theta}) |
$\theta$, (equation \ref{eq:eg_fourl_theta}) |
| 258 |
is evaluated prognostically. The centered second-order scheme with |
is evaluated prognostically. The centered second-order scheme with |
| 259 |
Adams-Bashforth time stepping described in section |
Adams-Bashforth time stepping described in section |
| 260 |
\ref{sect:tracer_equations_abII} is used to step forward the temperature |
\ref{sec:tracer_equations_abII} is used to step forward the temperature |
| 261 |
equation. Prognostic terms in |
equation. Prognostic terms in |
| 262 |
the momentum equations are solved using flux form as |
the momentum equations are solved using flux form as |
| 263 |
described in section \ref{sect:flux-form_momentum_eqautions}. |
described in section \ref{sec:flux-form_momentum_equations}. |
| 264 |
The pressure forces that drive the fluid motions, ( |
The pressure forces that drive the fluid motions, ( |
| 265 |
$\frac{\partial p^{'}}{\partial \lambda}$ and $\frac{\partial p^{'}}{\partial \varphi}$), are found by summing pressure due to surface |
$\frac{\partial p^{'}}{\partial \lambda}$ and $\frac{\partial p^{'}}{\partial \varphi}$), are found by summing pressure due to surface |
| 266 |
elevation $\eta$ and the hydrostatic pressure. The hydrostatic part of the |
elevation $\eta$ and the hydrostatic pressure. The hydrostatic part of the |
| 267 |
pressure is diagnosed explicitly by integrating density. The sea-surface |
pressure is diagnosed explicitly by integrating density. The sea-surface |
| 268 |
height, $\eta$, is diagnosed using an implicit scheme. The pressure |
height, $\eta$, is diagnosed using an implicit scheme. The pressure |
| 269 |
field solution method is described in sections |
field solution method is described in sections |
| 270 |
\ref{sect:pressure-method-linear-backward} and |
\ref{sec:pressure-method-linear-backward} and |
| 271 |
\ref{sect:finding_the_pressure_field}. |
\ref{sec:finding_the_pressure_field}. |
| 272 |
|
|
| 273 |
\subsubsection{Numerical Stability Criteria} |
\subsubsection{Numerical Stability Criteria} |
| 274 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 275 |
|
|
| 276 |
The Laplacian viscosity coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
The Laplacian viscosity coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
| 277 |
This value is chosen to yield a Munk layer width, |
This value is chosen to yield a Munk layer width, |
| 278 |
|
|
| 279 |
\begin{eqnarray} |
\begin{eqnarray} |
| 280 |
\label{EQ:eg-fourlayer-munk_layer} |
\label{eq:eg-fourlayer-munk_layer} |
| 281 |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
| 282 |
\end{eqnarray} |
\end{eqnarray} |
| 283 |
|
|
| 293 |
parameter to the horizontal Laplacian friction |
parameter to the horizontal Laplacian friction |
| 294 |
|
|
| 295 |
\begin{eqnarray} |
\begin{eqnarray} |
| 296 |
\label{EQ:eg-fourlayer-laplacian_stability} |
\label{eq:eg-fourlayer-laplacian_stability} |
| 297 |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
| 298 |
\end{eqnarray} |
\end{eqnarray} |
| 299 |
|
|
| 305 |
$1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit |
$1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit |
| 306 |
|
|
| 307 |
\begin{eqnarray} |
\begin{eqnarray} |
| 308 |
\label{EQ:eg-fourlayer-laplacian_stability_z} |
\label{eq:eg-fourlayer-laplacian_stability_z} |
| 309 |
S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2} |
S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2} |
| 310 |
\end{eqnarray} |
\end{eqnarray} |
| 311 |
|
|
| 318 |
\noindent The numerical stability for inertial oscillations |
\noindent The numerical stability for inertial oscillations |
| 319 |
|
|
| 320 |
\begin{eqnarray} |
\begin{eqnarray} |
| 321 |
\label{EQ:eg-fourlayer-inertial_stability} |
\label{eq:eg-fourlayer-inertial_stability} |
| 322 |
S_{i} = f^{2} {\delta t}^2 |
S_{i} = f^{2} {\delta t}^2 |
| 323 |
\end{eqnarray} |
\end{eqnarray} |
| 324 |
|
|
| 331 |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
| 332 |
|
|
| 333 |
\begin{eqnarray} |
\begin{eqnarray} |
| 334 |
\label{EQ:eg-fourlayer-cfl_stability} |
\label{eq:eg-fourlayer-cfl_stability} |
| 335 |
C_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
C_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
| 336 |
\end{eqnarray} |
\end{eqnarray} |
| 337 |
|
|
| 343 |
propagating at $2~{\rm m}~{\rm s}^{-1}$ |
propagating at $2~{\rm m}~{\rm s}^{-1}$ |
| 344 |
|
|
| 345 |
\begin{eqnarray} |
\begin{eqnarray} |
| 346 |
\label{EQ:eg-fourlayer-igw_stability} |
\label{eq:eg-fourlayer-igw_stability} |
| 347 |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
| 348 |
\end{eqnarray} |
\end{eqnarray} |
| 349 |
|
|
| 351 |
stability limit of 0.25. |
stability limit of 0.25. |
| 352 |
|
|
| 353 |
\subsection{Code Configuration} |
\subsection{Code Configuration} |
| 354 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 355 |
\label{SEC:eg_fourl_code_config} |
\label{sec:eg_fourl_code_config} |
| 356 |
|
|
| 357 |
The model configuration for this experiment resides under the |
The model configuration for this experiment resides under the |
| 358 |
directory {\it verification/tutorial\_barotropic\_gyre/}. |
directory {\it verification/tutorial\_barotropic\_gyre/}. |
| 372 |
associated with this experiment. |
associated with this experiment. |
| 373 |
|
|
| 374 |
\subsubsection{File {\it input/data}} |
\subsubsection{File {\it input/data}} |
| 375 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 376 |
|
|
| 377 |
This file, reproduced completely below, specifies the main parameters |
This file, reproduced completely below, specifies the main parameters |
| 378 |
for the experiment. The parameters that are significant for this configuration |
for the experiment. The parameters that are significant for this configuration |
| 684 |
\begin{rawhtml}</PRE>\end{rawhtml} |
\begin{rawhtml}</PRE>\end{rawhtml} |
| 685 |
|
|
| 686 |
\subsubsection{File {\it input/data.pkg}} |
\subsubsection{File {\it input/data.pkg}} |
| 687 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 688 |
|
|
| 689 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
| 690 |
customisations for this experiment. |
customisations for this experiment. |
| 691 |
|
|
| 692 |
\subsubsection{File {\it input/eedata}} |
\subsubsection{File {\it input/eedata}} |
| 693 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 694 |
|
|
| 695 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
| 696 |
customisations for this experiment. |
customisations for this experiment. |
| 697 |
|
|
| 698 |
\subsubsection{File {\it input/windx.sin\_y}} |
\subsubsection{File {\it input/windx.sin\_y}} |
| 699 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 700 |
|
|
| 701 |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
| 702 |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$ |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$ |
| 709 |
input/windx.sin\_y} file. |
input/windx.sin\_y} file. |
| 710 |
|
|
| 711 |
\subsubsection{File {\it input/topog.box}} |
\subsubsection{File {\it input/topog.box}} |
| 712 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 713 |
|
|
| 714 |
|
|
| 715 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
| 721 |
code for creating the {\it input/topog.box} file. |
code for creating the {\it input/topog.box} file. |
| 722 |
|
|
| 723 |
\subsubsection{File {\it code/SIZE.h}} |
\subsubsection{File {\it code/SIZE.h}} |
| 724 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 725 |
|
|
| 726 |
Two lines are customized in this file for the current experiment |
Two lines are customized in this file for the current experiment |
| 727 |
|
|
| 748 |
\end{small} |
\end{small} |
| 749 |
|
|
| 750 |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
| 751 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 752 |
|
|
| 753 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
| 754 |
customisations for this experiment. |
customisations for this experiment. |
| 755 |
|
|
| 756 |
|
|
| 757 |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
| 758 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 759 |
|
|
| 760 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
| 761 |
customisations for this experiment. |
customisations for this experiment. |
| 762 |
|
|
| 763 |
\subsubsection{Other Files } |
\subsubsection{Other Files } |
| 764 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 765 |
|
|
| 766 |
Other files relevant to this experiment are |
Other files relevant to this experiment are |
| 767 |
\begin{itemize} |
\begin{itemize} |
| 774 |
\end{itemize} |
\end{itemize} |
| 775 |
|
|
| 776 |
\subsection{Running The Example} |
\subsection{Running The Example} |
| 777 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 778 |
\label{SEC:running_the_example} |
%\label{sec:running_the_example} |
| 779 |
|
|
| 780 |
\subsubsection{Code Download} |
\subsubsection{Code Download} |
| 781 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 782 |
|
|
| 783 |
In order to run the examples you must first download the code distribution. |
In order to run the examples you must first download the code distribution. |
| 784 |
Instructions for downloading the code can be found in section |
Instructions for downloading the code can be found in section |
| 785 |
\ref{sect:obtainingCode}. |
\ref{sec:obtainingCode}. |
| 786 |
|
|
| 787 |
\subsubsection{Experiment Location} |
\subsubsection{Experiment Location} |
| 788 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 789 |
|
|
| 790 |
This example experiments is located under the release sub-directory |
This example experiments is located under the release sub-directory |
| 791 |
|
|
| 793 |
{\it verification/exp2/ } |
{\it verification/exp2/ } |
| 794 |
|
|
| 795 |
\subsubsection{Running the Experiment} |
\subsubsection{Running the Experiment} |
| 796 |
\label{www:tutorials} |
%\label{www:tutorials} |
| 797 |
|
|
| 798 |
To run the experiment |
To run the experiment |
| 799 |
|
|