1 |
% $Header$ |
% $Header$ |
2 |
% $Name$ |
% $Name$ |
3 |
|
|
|
\section{Example: Barotropic Ocean Gyre In Cartesian Coordinates} |
|
|
|
|
4 |
\bodytext{bgcolor="#FFFFFFFF"} |
\bodytext{bgcolor="#FFFFFFFF"} |
5 |
|
|
6 |
%\begin{center} |
%\begin{center} |
13 |
%{\large May 2001} |
%{\large May 2001} |
14 |
%\end{center} |
%\end{center} |
15 |
|
|
16 |
\subsection{Introduction} |
\section[Barotropic Gyre MITgcm Example]{Barotropic Ocean Gyre In Cartesian Coordinates} |
17 |
|
\label{sect:eg-baro} |
18 |
This document is the first in a series of documents describing |
\label{www:tutorials} |
19 |
example MITgcm numerical experiments. The example experiments |
\begin{rawhtml} |
20 |
include both straightforward examples of idealised geophysical |
<!-- CMIREDIR:eg-baro: --> |
21 |
fluid simulations and more involved cases encompassing |
\end{rawhtml} |
|
large scale modeling and |
|
|
automatic differentiation. Both hydrostatic and non-hydrostatic |
|
|
experiements are presented, as well as experiments employing |
|
|
cartesian, spherical-polar and cube-sphere coordinate systems. |
|
|
These ``case study'' documents include information describing |
|
|
the experimental configuration and detailed information on how to |
|
|
configure the MITgcm code and input files for each experiment. |
|
22 |
|
|
|
\subsection{Experiment Overview} |
|
23 |
|
|
24 |
This example experiment demonstrates using the MITgcm to simulate |
This example experiment demonstrates using the MITgcm to simulate |
25 |
a barotropic, wind-forced, ocean gyre circulation. The experiment |
a Barotropic, wind-forced, ocean gyre circulation. The files for this |
26 |
is a numerical rendition of the gyre circulation problem simliar |
experiment can be found in the verification directory tutorial\_barotropic\_gyre. |
27 |
|
The experiment is a numerical rendition of the gyre circulation problem similar |
28 |
to the problems described analytically by Stommel in 1966 |
to the problems described analytically by Stommel in 1966 |
29 |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
30 |
|
|
32 |
is configured to represent a rectangular enclosed box of fluid, |
is configured to represent a rectangular enclosed box of fluid, |
33 |
$1200 \times 1200 $~km in lateral extent. The fluid is $5$~km deep and is forced |
$1200 \times 1200 $~km in lateral extent. The fluid is $5$~km deep and is forced |
34 |
by a constant in time zonal wind stress, $\tau_x$, that varies sinusoidally |
by a constant in time zonal wind stress, $\tau_x$, that varies sinusoidally |
35 |
in the ``north-south'' direction. Topologically the grid is cartesian and |
in the ``north-south'' direction. Topologically the grid is Cartesian and |
36 |
the coriolis parameter $f$ is defined according to a mid-latitude beta-plane |
the coriolis parameter $f$ is defined according to a mid-latitude beta-plane |
37 |
equation |
equation |
38 |
|
|
39 |
\begin{equation} |
\begin{equation} |
40 |
\label{EQ:fcori} |
\label{EQ:eg-baro-fcori} |
41 |
f(y) = f_{0}+\beta y |
f(y) = f_{0}+\beta y |
42 |
\end{equation} |
\end{equation} |
43 |
|
|
44 |
\noindent where $y$ is the distance along the ``north-south'' axis of the |
\noindent where $y$ is the distance along the ``north-south'' axis of the |
45 |
simulated domain. For this experiment $f_{0}$ is set to $10^{-4}s^{-1}$ in |
simulated domain. For this experiment $f_{0}$ is set to $10^{-4}s^{-1}$ in |
46 |
(\ref{EQ:fcori}) and $\beta = 10^{-11}s^{-1}m^{-1}$. |
(\ref{EQ:eg-baro-fcori}) and $\beta = 10^{-11}s^{-1}m^{-1}$. |
47 |
\\ |
\\ |
48 |
\\ |
\\ |
49 |
The sinusoidal wind-stress variations are defined according to |
The sinusoidal wind-stress variations are defined according to |
50 |
|
|
51 |
\begin{equation} |
\begin{equation} |
52 |
\label{EQ:taux} |
\label{EQ:eg-baro-taux} |
53 |
\tau_x(y) = \tau_{0}\sin(\pi \frac{y}{L_y}) |
\tau_x(y) = \tau_{0}\sin(\pi \frac{y}{L_y}) |
54 |
\end{equation} |
\end{equation} |
55 |
|
|
57 |
$\tau_0$ is set to $0.1N m^{-2}$. |
$\tau_0$ is set to $0.1N m^{-2}$. |
58 |
\\ |
\\ |
59 |
\\ |
\\ |
60 |
Figure \ref{FIG:simulation_config} |
Figure \ref{FIG:eg-baro-simulation_config} |
61 |
summarises the configuration simulated. |
summarizes the configuration simulated. |
62 |
|
|
63 |
|
%% === eh3 === |
64 |
\begin{figure} |
\begin{figure} |
65 |
|
%% \begin{center} |
66 |
|
%% \resizebox{7.5in}{5.5in}{ |
67 |
|
%% \includegraphics*[0.2in,0.7in][10.5in,10.5in] |
68 |
|
%% {part3/case_studies/barotropic_gyre/simulation_config.eps} } |
69 |
|
%% \end{center} |
70 |
\centerline{ |
\centerline{ |
71 |
\resizebox{7.5in}{5.5in}{ |
\scalefig{.95} |
72 |
\includegraphics*[0.2in,0.7in][10.5in,10.5in] |
\epsfbox{part3/case_studies/barotropic_gyre/simulation_config.eps} |
|
{part3/case_studies/barotropic_gyre/simulation_config.eps} } |
|
73 |
} |
} |
74 |
\caption{Schematic of simulation domain and wind-stress forcing function |
\caption{Schematic of simulation domain and wind-stress forcing function |
75 |
for barotropic gyre numerical experiment. The domain is enclosed bu solid |
for barotropic gyre numerical experiment. The domain is enclosed bu solid |
76 |
walls at $x=$~0,1200km and at $y=$~0,1200km.} |
walls at $x=$~0,1200km and at $y=$~0,1200km.} |
77 |
\label{FIG:simulation_config} |
\label{FIG:eg-baro-simulation_config} |
78 |
\end{figure} |
\end{figure} |
79 |
|
|
80 |
\subsection{Discrete Numerical Configuration} |
\subsection{Equations Solved} |
81 |
|
\label{www:tutorials} |
82 |
The model is configured in hydrostatic form. The domain is discretised with |
The model is configured in hydrostatic form. The implicit free surface form of the |
83 |
a uniform grid spacing in the horizontal set to |
pressure equation described in Marshall et. al \cite{marshall:97a} is |
84 |
$\Delta x=\Delta y=20$~km, so |
employed. |
85 |
that there are sixty grid cells in the $x$ and $y$ directions. Vertically the |
A horizontal Laplacian operator $\nabla_{h}^2$ provides viscous |
|
model is configured with a single layer with depth, $\Delta z$, of $5000$~m. |
|
|
The implicit free surface form of the |
|
|
pressure equation described in Marshall et. al \cite{Marshall97a} is |
|
|
employed. |
|
|
A horizontal laplacian operator $\nabla_{h}^2$ provides viscous |
|
86 |
dissipation. The wind-stress momentum input is added to the momentum equation |
dissipation. The wind-stress momentum input is added to the momentum equation |
87 |
for the ``zonal flow'', $u$. Other terms in the model |
for the ``zonal flow'', $u$. Other terms in the model |
88 |
are explicitly switched off for this experiement configuration (see section |
are explicitly switched off for this experiment configuration (see section |
89 |
\ref{SEC:code_config} ), yielding an active set of equations solved in this |
\ref{SEC:code_config} ), yielding an active set of equations solved in this |
90 |
configuration as follows |
configuration as follows |
91 |
|
|
92 |
\begin{eqnarray} |
\begin{eqnarray} |
93 |
\label{EQ:model_equations} |
\label{EQ:eg-baro-model_equations} |
94 |
\frac{Du}{Dt} - fv + |
\frac{Du}{Dt} - fv + |
95 |
g\frac{\partial \eta}{\partial x} - |
g\frac{\partial \eta}{\partial x} - |
96 |
A_{h}\nabla_{h}^2u |
A_{h}\nabla_{h}^2u |
97 |
& = & |
& = & |
98 |
\frac{\tau_{x}}{\rho_{0}\Delta z} |
\frac{\tau_{x}}{\rho_{0}\Delta z} |
99 |
\\ |
\\ |
100 |
\frac{Dv}{Dt} + fu + g\frac{\partial \eta}{\partial y} - |
\frac{Dv}{Dt} + fu + g\frac{\partial \eta}{\partial y} - |
101 |
A_{h}\nabla_{h}^2v |
A_{h}\nabla_{h}^2v |
102 |
& = & |
& = & |
103 |
0 |
0 |
104 |
\\ |
\\ |
108 |
\end{eqnarray} |
\end{eqnarray} |
109 |
|
|
110 |
\noindent where $u$ and $v$ and the $x$ and $y$ components of the |
\noindent where $u$ and $v$ and the $x$ and $y$ components of the |
111 |
flow vector $\vec{u}$. |
flow vector $\vec{u}$. |
112 |
\\ |
\\ |
113 |
|
|
114 |
|
|
115 |
|
\subsection{Discrete Numerical Configuration} |
116 |
|
\label{www:tutorials} |
117 |
|
|
118 |
|
The domain is discretised with |
119 |
|
a uniform grid spacing in the horizontal set to |
120 |
|
$\Delta x=\Delta y=20$~km, so |
121 |
|
that there are sixty grid cells in the $x$ and $y$ directions. Vertically the |
122 |
|
model is configured with a single layer with depth, $\Delta z$, of $5000$~m. |
123 |
|
|
124 |
\subsubsection{Numerical Stability Criteria} |
\subsubsection{Numerical Stability Criteria} |
125 |
|
\label{www:tutorials} |
126 |
|
|
127 |
The laplacian dissipation coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
The Laplacian dissipation coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
128 |
This value is chosen to yield a Munk layer width \cite{Adcroft_thesis}, |
This value is chosen to yield a Munk layer width \cite{adcroft:95}, |
129 |
|
|
130 |
\begin{eqnarray} |
\begin{eqnarray} |
131 |
\label{EQ:munk_layer} |
\label{EQ:eg-baro-munk_layer} |
132 |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
133 |
\end{eqnarray} |
\end{eqnarray} |
134 |
|
|
139 |
|
|
140 |
\noindent The model is stepped forward with a |
\noindent The model is stepped forward with a |
141 |
time step $\delta t=1200$secs. With this time step the stability |
time step $\delta t=1200$secs. With this time step the stability |
142 |
parameter to the horizontal laplacian friction \cite{Adcroft_thesis} |
parameter to the horizontal Laplacian friction \cite{adcroft:95} |
143 |
|
|
144 |
|
|
145 |
|
|
146 |
\begin{eqnarray} |
\begin{eqnarray} |
147 |
\label{EQ:laplacian_stability} |
\label{EQ:eg-baro-laplacian_stability} |
148 |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
149 |
\end{eqnarray} |
\end{eqnarray} |
150 |
|
|
153 |
\\ |
\\ |
154 |
|
|
155 |
\noindent The numerical stability for inertial oscillations |
\noindent The numerical stability for inertial oscillations |
156 |
\cite{Adcroft_thesis} |
\cite{adcroft:95} |
157 |
|
|
158 |
\begin{eqnarray} |
\begin{eqnarray} |
159 |
\label{EQ:inertial_stability} |
\label{EQ:eg-baro-inertial_stability} |
160 |
S_{i} = f^{2} {\delta t}^2 |
S_{i} = f^{2} {\delta t}^2 |
161 |
\end{eqnarray} |
\end{eqnarray} |
162 |
|
|
164 |
limit for stability. |
limit for stability. |
165 |
\\ |
\\ |
166 |
|
|
167 |
\noindent The advective CFL \cite{Adcroft_thesis} for an extreme maximum |
\noindent The advective CFL \cite{adcroft:95} for an extreme maximum |
168 |
horizontal flow speed of $ | \vec{u} | = 2 ms^{-1}$ |
horizontal flow speed of $ | \vec{u} | = 2 ms^{-1}$ |
169 |
|
|
170 |
\begin{eqnarray} |
\begin{eqnarray} |
171 |
\label{EQ:cfl_stability} |
\label{EQ:eg-baro-cfl_stability} |
172 |
S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
173 |
\end{eqnarray} |
\end{eqnarray} |
174 |
|
|
176 |
of 0.5 and limits $\delta t$ to $1200s$. |
of 0.5 and limits $\delta t$ to $1200s$. |
177 |
|
|
178 |
\subsection{Code Configuration} |
\subsection{Code Configuration} |
179 |
\label{SEC:code_config} |
\label{www:tutorials} |
180 |
|
\label{SEC:eg-baro-code_config} |
181 |
|
|
182 |
The model configuration for this experiment resides under the |
The model configuration for this experiment resides under the |
183 |
directory {\it verification/exp0/}. The experiment files |
directory {\it verification/exp0/}. The experiment files |
191 |
\item {\it code/CPP\_OPTIONS.h}, |
\item {\it code/CPP\_OPTIONS.h}, |
192 |
\item {\it code/SIZE.h}. |
\item {\it code/SIZE.h}. |
193 |
\end{itemize} |
\end{itemize} |
194 |
contain the code customisations and parameter settings for this |
contain the code customizations and parameter settings for this |
195 |
experiements. Below we describe the customisations |
experiments. Below we describe the customizations |
196 |
to these files associated with this experiment. |
to these files associated with this experiment. |
197 |
|
|
198 |
\subsubsection{File {\it input/data}} |
\subsubsection{File {\it input/data}} |
199 |
|
\label{www:tutorials} |
200 |
|
|
201 |
This file, reproduced completely below, specifies the main parameters |
This file, reproduced completely below, specifies the main parameters |
202 |
for the experiment. The parameters that are significant for this configuration |
for the experiment. The parameters that are significant for this configuration |
205 |
\begin{itemize} |
\begin{itemize} |
206 |
|
|
207 |
\item Line 7, \begin{verbatim} viscAh=4.E2, \end{verbatim} this line sets |
\item Line 7, \begin{verbatim} viscAh=4.E2, \end{verbatim} this line sets |
208 |
the laplacian friction coefficient to $400 m^2s^{-1}$ |
the Laplacian friction coefficient to $400 m^2s^{-1}$ |
209 |
\item Line 10, \begin{verbatim} beta=1.E-11, \end{verbatim} this line sets |
\item Line 10, \begin{verbatim} beta=1.E-11, \end{verbatim} this line sets |
210 |
$\beta$ (the gradient of the coriolis parameter, $f$) to $10^{-11} s^{-1}m^{-1}$ |
$\beta$ (the gradient of the coriolis parameter, $f$) to $10^{-11} s^{-1}m^{-1}$ |
211 |
|
|
223 |
startTime=0, |
startTime=0, |
224 |
\end{verbatim} |
\end{verbatim} |
225 |
this line indicates that the experiment should start from $t=0$ |
this line indicates that the experiment should start from $t=0$ |
226 |
and implicitly supresses searching for checkpoint files associated |
and implicitly suppresses searching for checkpoint files associated |
227 |
with restarting an numerical integration from a previously saved state. |
with restarting an numerical integration from a previously saved state. |
228 |
|
|
229 |
\item Line 29, |
\item Line 29, |
245 |
usingCartesianGrid=.TRUE., |
usingCartesianGrid=.TRUE., |
246 |
\end{verbatim} |
\end{verbatim} |
247 |
This line requests that the simulation be performed in a |
This line requests that the simulation be performed in a |
248 |
cartesian coordinate system. |
Cartesian coordinate system. |
249 |
|
|
250 |
\item Line 41, |
\item Line 41, |
251 |
\begin{verbatim} |
\begin{verbatim} |
308 |
\end{small} |
\end{small} |
309 |
|
|
310 |
\subsubsection{File {\it input/data.pkg}} |
\subsubsection{File {\it input/data.pkg}} |
311 |
|
\label{www:tutorials} |
312 |
|
|
313 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
314 |
customisations for this experiment. |
customizations for this experiment. |
315 |
|
|
316 |
\subsubsection{File {\it input/eedata}} |
\subsubsection{File {\it input/eedata}} |
317 |
|
\label{www:tutorials} |
318 |
|
|
319 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
320 |
customisations for this experiment. |
customizations for this experiment. |
321 |
|
|
322 |
\subsubsection{File {\it input/windx.sin\_y}} |
\subsubsection{File {\it input/windx.sin\_y}} |
323 |
|
\label{www:tutorials} |
324 |
|
|
325 |
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$) |
326 |
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}$. |
331 |
code for creating the {\it input/windx.sin\_y} file. |
code for creating the {\it input/windx.sin\_y} file. |
332 |
|
|
333 |
\subsubsection{File {\it input/topog.box}} |
\subsubsection{File {\it input/topog.box}} |
334 |
|
\label{www:tutorials} |
335 |
|
|
336 |
|
|
337 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
343 |
code for creating the {\it input/topog.box} file. |
code for creating the {\it input/topog.box} file. |
344 |
|
|
345 |
\subsubsection{File {\it code/SIZE.h}} |
\subsubsection{File {\it code/SIZE.h}} |
346 |
|
\label{www:tutorials} |
347 |
|
|
348 |
Two lines are customized in this file for the current experiment |
Two lines are customized in this file for the current experiment |
349 |
|
|
366 |
\end{small} |
\end{small} |
367 |
|
|
368 |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
369 |
|
\label{www:tutorials} |
370 |
|
|
371 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
372 |
customisations for this experiment. |
customizations for this experiment. |
373 |
|
|
374 |
|
|
375 |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
376 |
|
\label{www:tutorials} |
377 |
|
|
378 |
This file uses standard default values and does not contain |
This file uses standard default values and does not contain |
379 |
customisations for this experiment. |
customizations for this experiment. |
380 |
|
|