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