1 |
% $Header: /u/u0/gcmpack/mitgcmdoc/part3/case_studies/barotropic_gyre/baro.tex,v 1.2 2001/09/27 00:58:17 cnh Exp $ |
2 |
% $Name: $ |
3 |
|
4 |
\section{Example: Barotropic Ocean Gyre In Cartesian Coordinates} |
5 |
\label{sec:eg-baro} |
6 |
|
7 |
\bodytext{bgcolor="#FFFFFFFF"} |
8 |
|
9 |
%\begin{center} |
10 |
%{\Large \bf Using MITgcm to Simulate a Barotropic Ocean Gyre In Cartesian |
11 |
%Coordinates} |
12 |
% |
13 |
%\vspace*{4mm} |
14 |
% |
15 |
%\vspace*{3mm} |
16 |
%{\large May 2001} |
17 |
%\end{center} |
18 |
|
19 |
This is the first in a series of sections describing |
20 |
example MITgcm numerical experiments. The example experiments |
21 |
include both straightforward examples of idealised geophysical |
22 |
fluid simulations and more involved cases encompassing |
23 |
large scale modeling and |
24 |
automatic differentiation. Both hydrostatic and non-hydrostatic |
25 |
experiments are presented, as well as experiments employing |
26 |
cartesian, spherical-polar and cube-sphere coordinate systems. |
27 |
These ``case study'' documents include information describing |
28 |
the experimental configuration and detailed information on how to |
29 |
configure the MITgcm code and input files for each experiment. |
30 |
|
31 |
\subsection{Experiment Overview} |
32 |
|
33 |
This example experiment demonstrates using the MITgcm to simulate |
34 |
a barotropic, wind-forced, ocean gyre circulation. The experiment |
35 |
is a numerical rendition of the gyre circulation problem simliar |
36 |
to the problems described analytically by Stommel in 1966 |
37 |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
38 |
|
39 |
In this experiment the model |
40 |
is configured to represent a rectangular enclosed box of fluid, |
41 |
$1200 \times 1200 $~km in lateral extent. The fluid is $5$~km deep and is forced |
42 |
by a constant in time zonal wind stress, $\tau_x$, that varies sinusoidally |
43 |
in the ``north-south'' direction. Topologically the grid is cartesian and |
44 |
the coriolis parameter $f$ is defined according to a mid-latitude beta-plane |
45 |
equation |
46 |
|
47 |
\begin{equation} |
48 |
\label{EQ:fcori} |
49 |
f(y) = f_{0}+\beta y |
50 |
\end{equation} |
51 |
|
52 |
\noindent where $y$ is the distance along the ``north-south'' axis of the |
53 |
simulated domain. For this experiment $f_{0}$ is set to $10^{-4}s^{-1}$ in |
54 |
(\ref{EQ:fcori}) and $\beta = 10^{-11}s^{-1}m^{-1}$. |
55 |
\\ |
56 |
\\ |
57 |
The sinusoidal wind-stress variations are defined according to |
58 |
|
59 |
\begin{equation} |
60 |
\label{EQ:taux} |
61 |
\tau_x(y) = \tau_{0}\sin(\pi \frac{y}{L_y}) |
62 |
\end{equation} |
63 |
|
64 |
\noindent where $L_{y}$ is the lateral domain extent ($1200$~km) and |
65 |
$\tau_0$ is set to $0.1N m^{-2}$. |
66 |
\\ |
67 |
\\ |
68 |
Figure \ref{FIG:simulation_config} |
69 |
summarises the configuration simulated. |
70 |
|
71 |
\begin{figure} |
72 |
\begin{center} |
73 |
\resizebox{7.5in}{5.5in}{ |
74 |
\includegraphics*[0.2in,0.7in][10.5in,10.5in] |
75 |
{part3/case_studies/barotropic_gyre/simulation_config.eps} } |
76 |
\end{center} |
77 |
\caption{Schematic of simulation domain and wind-stress forcing function |
78 |
for barotropic gyre numerical experiment. The domain is enclosed bu solid |
79 |
walls at $x=$~0,1200km and at $y=$~0,1200km.} |
80 |
\label{FIG:simulation_config} |
81 |
\end{figure} |
82 |
|
83 |
\subsection{Equations Solved} |
84 |
The model is configured in hydrostatic form. The implicit free surface form of the |
85 |
pressure equation described in Marshall et. al \cite{Marshall97a} is |
86 |
employed. |
87 |
A horizontal laplacian operator $\nabla_{h}^2$ provides viscous |
88 |
dissipation. The wind-stress momentum input is added to the momentum equation |
89 |
for the ``zonal flow'', $u$. Other terms in the model |
90 |
are explicitly switched off for this experiement configuration (see section |
91 |
\ref{SEC:code_config} ), yielding an active set of equations solved in this |
92 |
configuration as follows |
93 |
|
94 |
\begin{eqnarray} |
95 |
\label{EQ:model_equations} |
96 |
\frac{Du}{Dt} - fv + |
97 |
g\frac{\partial \eta}{\partial x} - |
98 |
A_{h}\nabla_{h}^2u |
99 |
& = & |
100 |
\frac{\tau_{x}}{\rho_{0}\Delta z} |
101 |
\\ |
102 |
\frac{Dv}{Dt} + fu + g\frac{\partial \eta}{\partial y} - |
103 |
A_{h}\nabla_{h}^2v |
104 |
& = & |
105 |
0 |
106 |
\\ |
107 |
\frac{\partial \eta}{\partial t} + \nabla_{h}\cdot \vec{u} |
108 |
&=& |
109 |
0 |
110 |
\end{eqnarray} |
111 |
|
112 |
\noindent where $u$ and $v$ and the $x$ and $y$ components of the |
113 |
flow vector $\vec{u}$. |
114 |
\\ |
115 |
|
116 |
|
117 |
\subsection{Discrete Numerical Configuration} |
118 |
|
119 |
The domain is discretised with |
120 |
a uniform grid spacing in the horizontal set to |
121 |
$\Delta x=\Delta y=20$~km, so |
122 |
that there are sixty grid cells in the $x$ and $y$ directions. Vertically the |
123 |
model is configured with a single layer with depth, $\Delta z$, of $5000$~m. |
124 |
|
125 |
\subsubsection{Numerical Stability Criteria} |
126 |
|
127 |
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}, |
129 |
|
130 |
\begin{eqnarray} |
131 |
\label{EQ:munk_layer} |
132 |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
133 |
\end{eqnarray} |
134 |
|
135 |
\noindent of $\approx 100$km. This is greater than the model |
136 |
resolution $\Delta x$, ensuring that the frictional boundary |
137 |
layer is well resolved. |
138 |
\\ |
139 |
|
140 |
\noindent The model is stepped forward with a |
141 |
time step $\delta t=1200$secs. With this time step the stability |
142 |
parameter to the horizontal laplacian friction \cite{Adcroft_thesis} |
143 |
|
144 |
|
145 |
|
146 |
\begin{eqnarray} |
147 |
\label{EQ:laplacian_stability} |
148 |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
149 |
\end{eqnarray} |
150 |
|
151 |
\noindent evaluates to 0.012, which is well below the 0.3 upper limit |
152 |
for stability. |
153 |
\\ |
154 |
|
155 |
\noindent The numerical stability for inertial oscillations |
156 |
\cite{Adcroft_thesis} |
157 |
|
158 |
\begin{eqnarray} |
159 |
\label{EQ:inertial_stability} |
160 |
S_{i} = f^{2} {\delta t}^2 |
161 |
\end{eqnarray} |
162 |
|
163 |
\noindent evaluates to $0.0144$, which is well below the $0.5$ upper |
164 |
limit for stability. |
165 |
\\ |
166 |
|
167 |
\noindent The advective CFL \cite{Adcroft_thesis} for an extreme maximum |
168 |
horizontal flow speed of $ | \vec{u} | = 2 ms^{-1}$ |
169 |
|
170 |
\begin{eqnarray} |
171 |
\label{EQ:cfl_stability} |
172 |
S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
173 |
\end{eqnarray} |
174 |
|
175 |
\noindent evaluates to 0.12. This is approaching the stability limit |
176 |
of 0.5 and limits $\delta t$ to $1200s$. |
177 |
|
178 |
\subsection{Code Configuration} |
179 |
\label{SEC:code_config} |
180 |
|
181 |
The model configuration for this experiment resides under the |
182 |
directory {\it verification/exp0/}. The experiment files |
183 |
\begin{itemize} |
184 |
\item {\it input/data} |
185 |
\item {\it input/data.pkg} |
186 |
\item {\it input/eedata}, |
187 |
\item {\it input/windx.sin\_y}, |
188 |
\item {\it input/topog.box}, |
189 |
\item {\it code/CPP\_EEOPTIONS.h} |
190 |
\item {\it code/CPP\_OPTIONS.h}, |
191 |
\item {\it code/SIZE.h}. |
192 |
\end{itemize} |
193 |
contain the code customisations and parameter settings for this |
194 |
experiements. Below we describe the customisations |
195 |
to these files associated with this experiment. |
196 |
|
197 |
\subsubsection{File {\it input/data}} |
198 |
|
199 |
This file, reproduced completely below, specifies the main parameters |
200 |
for the experiment. The parameters that are significant for this configuration |
201 |
are |
202 |
|
203 |
\begin{itemize} |
204 |
|
205 |
\item Line 7, \begin{verbatim} viscAh=4.E2, \end{verbatim} this line sets |
206 |
the laplacian friction coefficient to $400 m^2s^{-1}$ |
207 |
\item Line 10, \begin{verbatim} beta=1.E-11, \end{verbatim} this line sets |
208 |
$\beta$ (the gradient of the coriolis parameter, $f$) to $10^{-11} s^{-1}m^{-1}$ |
209 |
|
210 |
\item Lines 15 and 16 |
211 |
\begin{verbatim} |
212 |
rigidLid=.FALSE., |
213 |
implicitFreeSurface=.TRUE., |
214 |
\end{verbatim} |
215 |
these lines suppress the rigid lid formulation of the surface |
216 |
pressure inverter and activate the implicit free surface form |
217 |
of the pressure inverter. |
218 |
|
219 |
\item Line 27, |
220 |
\begin{verbatim} |
221 |
startTime=0, |
222 |
\end{verbatim} |
223 |
this line indicates that the experiment should start from $t=0$ |
224 |
and implicitly supresses searching for checkpoint files associated |
225 |
with restarting an numerical integration from a previously saved state. |
226 |
|
227 |
\item Line 29, |
228 |
\begin{verbatim} |
229 |
endTime=12000, |
230 |
\end{verbatim} |
231 |
this line indicates that the experiment should start finish at $t=12000s$. |
232 |
A restart file will be written at this time that will enable the |
233 |
simulation to be continued from this point. |
234 |
|
235 |
\item Line 30, |
236 |
\begin{verbatim} |
237 |
deltaTmom=1200, |
238 |
\end{verbatim} |
239 |
This line sets the momentum equation timestep to $1200s$. |
240 |
|
241 |
\item Line 39, |
242 |
\begin{verbatim} |
243 |
usingCartesianGrid=.TRUE., |
244 |
\end{verbatim} |
245 |
This line requests that the simulation be performed in a |
246 |
cartesian coordinate system. |
247 |
|
248 |
\item Line 41, |
249 |
\begin{verbatim} |
250 |
delX=60*20E3, |
251 |
\end{verbatim} |
252 |
This line sets the horizontal grid spacing between each x-coordinate line |
253 |
in the discrete grid. The syntax indicates that the discrete grid |
254 |
should be comprise of $60$ grid lines each separated by $20 \times 10^{3}m$ |
255 |
($20$~km). |
256 |
|
257 |
\item Line 42, |
258 |
\begin{verbatim} |
259 |
delY=60*20E3, |
260 |
\end{verbatim} |
261 |
This line sets the horizontal grid spacing between each y-coordinate line |
262 |
in the discrete grid to $20 \times 10^{3}m$ ($20$~km). |
263 |
|
264 |
\item Line 43, |
265 |
\begin{verbatim} |
266 |
delZ=5000, |
267 |
\end{verbatim} |
268 |
This line sets the vertical grid spacing between each z-coordinate line |
269 |
in the discrete grid to $5000m$ ($5$~km). |
270 |
|
271 |
\item Line 46, |
272 |
\begin{verbatim} |
273 |
bathyFile='topog.box' |
274 |
\end{verbatim} |
275 |
This line specifies the name of the file from which the domain |
276 |
bathymetry is read. This file is a two-dimensional ($x,y$) map of |
277 |
depths. This file is assumed to contain 64-bit binary numbers |
278 |
giving the depth of the model at each grid cell, ordered with the x |
279 |
coordinate varying fastest. The points are ordered from low coordinate |
280 |
to high coordinate for both axes. The units and orientation of the |
281 |
depths in this file are the same as used in the MITgcm code. In this |
282 |
experiment, a depth of $0m$ indicates a solid wall and a depth |
283 |
of $-5000m$ indicates open ocean. The matlab program |
284 |
{\it input/gendata.m} shows an example of how to generate a |
285 |
bathymetry file. |
286 |
|
287 |
|
288 |
\item Line 49, |
289 |
\begin{verbatim} |
290 |
zonalWindFile='windx.sin_y' |
291 |
\end{verbatim} |
292 |
This line specifies the name of the file from which the x-direction |
293 |
surface wind stress is read. This file is also a two-dimensional |
294 |
($x,y$) map and is enumerated and formatted in the same manner as the |
295 |
bathymetry file. The matlab program {\it input/gendata.m} includes example |
296 |
code to generate a valid {\bf zonalWindFile} file. |
297 |
|
298 |
\end{itemize} |
299 |
|
300 |
\noindent other lines in the file {\it input/data} are standard values |
301 |
that are described in the MITgcm Getting Started and MITgcm Parameters |
302 |
notes. |
303 |
|
304 |
\begin{small} |
305 |
\input{part3/case_studies/barotropic_gyre/input/data} |
306 |
\end{small} |
307 |
|
308 |
\subsubsection{File {\it input/data.pkg}} |
309 |
|
310 |
This file uses standard default values and does not contain |
311 |
customisations for this experiment. |
312 |
|
313 |
\subsubsection{File {\it input/eedata}} |
314 |
|
315 |
This file uses standard default values and does not contain |
316 |
customisations for this experiment. |
317 |
|
318 |
\subsubsection{File {\it input/windx.sin\_y}} |
319 |
|
320 |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
321 |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$. |
322 |
Although $\tau_{x}$ is only a function of $y$n in this experiment |
323 |
this file must still define a complete two-dimensional map in order |
324 |
to be compatible with the standard code for loading forcing fields |
325 |
in MITgcm. The included matlab program {\it input/gendata.m} gives a complete |
326 |
code for creating the {\it input/windx.sin\_y} file. |
327 |
|
328 |
\subsubsection{File {\it input/topog.box}} |
329 |
|
330 |
|
331 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
332 |
map of depth values. For this experiment values are either |
333 |
$0m$ or {\bf -delZ}m, corresponding respectively to a wall or to deep |
334 |
ocean. The file contains a raw binary stream of data that is enumerated |
335 |
in the same way as standard MITgcm two-dimensional, horizontal arrays. |
336 |
The included matlab program {\it input/gendata.m} gives a complete |
337 |
code for creating the {\it input/topog.box} file. |
338 |
|
339 |
\subsubsection{File {\it code/SIZE.h}} |
340 |
|
341 |
Two lines are customized in this file for the current experiment |
342 |
|
343 |
\begin{itemize} |
344 |
|
345 |
\item Line 39, |
346 |
\begin{verbatim} sNx=60, \end{verbatim} this line sets |
347 |
the lateral domain extent in grid points for the |
348 |
axis aligned with the x-coordinate. |
349 |
|
350 |
\item Line 40, |
351 |
\begin{verbatim} sNy=60, \end{verbatim} this line sets |
352 |
the lateral domain extent in grid points for the |
353 |
axis aligned with the y-coordinate. |
354 |
|
355 |
\end{itemize} |
356 |
|
357 |
\begin{small} |
358 |
\input{part3/case_studies/barotropic_gyre/code/SIZE.h} |
359 |
\end{small} |
360 |
|
361 |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
362 |
|
363 |
This file uses standard default values and does not contain |
364 |
customisations for this experiment. |
365 |
|
366 |
|
367 |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
368 |
|
369 |
This file uses standard default values and does not contain |
370 |
customisations for this experiment. |
371 |
|