1 |
% $Header: /u/u0/gcmpack/mitgcmdoc/part3/case_studies/fourlayer_gyre/fourlayer.tex,v 1.6 2001/10/25 00:55:28 cnh Exp $ |
2 |
% $Name: $ |
3 |
|
4 |
\section{Example: Four layer Baroclinic Ocean Gyre In Spherical Coordinates} |
5 |
\label{sec:eg-fourlayer} |
6 |
|
7 |
\bodytext{bgcolor="#FFFFFFFF"} |
8 |
|
9 |
%\begin{center} |
10 |
%{\Large \bf Using MITgcm to Simulate a Baroclinic Ocean Gyre In Spherical |
11 |
%Polar Coordinates} |
12 |
% |
13 |
%\vspace*{4mm} |
14 |
% |
15 |
%\vspace*{3mm} |
16 |
%{\large May 2001} |
17 |
%\end{center} |
18 |
|
19 |
This document describes an example experiment using MITgcm |
20 |
to simulate a baroclinic ocean gyre in spherical |
21 |
polar coordinates. The barotropic |
22 |
example experiment in section \ref{sec:eg-baro} |
23 |
ilustrated how to configure the code for a single layer |
24 |
simulation in a cartesian grid. In this example a similar physical problem |
25 |
is simulated, but the code is now configured |
26 |
for four layers and in a spherical polar coordinate system. |
27 |
|
28 |
\subsection{Overview} |
29 |
|
30 |
This example experiment demonstrates using the MITgcm to simulate |
31 |
a baroclinic, wind-forced, ocean gyre circulation. The experiment |
32 |
is a numerical rendition of the gyre circulation problem simliar |
33 |
to the problems described analytically by Stommel in 1966 |
34 |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
35 |
\\ |
36 |
|
37 |
In this experiment the model is configured to represent a mid-latitude |
38 |
enclosed sector of fluid on a sphere, $60^{\circ} \times 60^{\circ}$ in |
39 |
lateral extent. The fluid is $2$~km deep and is forced |
40 |
by a constant in time zonal wind stress, $\tau_{\lambda}$, that varies |
41 |
sinusoidally in the north-south direction. Topologically the simulated |
42 |
domain is a sector on a sphere and the coriolis parameter, $f$, is defined |
43 |
according to latitude, $\varphi$ |
44 |
|
45 |
\begin{equation} |
46 |
\label{EQ:fcori} |
47 |
f(\varphi) = 2 \Omega \sin( \varphi ) |
48 |
\end{equation} |
49 |
|
50 |
\noindent with the rotation rate, $\Omega$ set to $\frac{2 \pi}{86400s}$. |
51 |
\\ |
52 |
|
53 |
The sinusoidal wind-stress variations are defined according to |
54 |
|
55 |
\begin{equation} |
56 |
\label{EQ:taux} |
57 |
\tau_{\lambda}(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}}) |
58 |
\end{equation} |
59 |
|
60 |
\noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and |
61 |
$\tau_0$ is set to $0.1N m^{-2}$. |
62 |
\\ |
63 |
|
64 |
Figure \ref{FIG:simulation_config} |
65 |
summarises the configuration simulated. |
66 |
In contrast to the example in section \ref{sec:eg-baro}, the |
67 |
current experiment simulates a spherical polar domain. As indicated |
68 |
by the axes in the lower left of the figure the model code works internally |
69 |
in a locally orthoganal coordinate $(x,y,z)$. For this experiment description |
70 |
the local orthogonal model coordinate $(x,y,z)$ is synonomous |
71 |
with the coordinates $(\lambda,\varphi,r)$ shown in figure |
72 |
\ref{fig:spherical-polar-coord} |
73 |
\\ |
74 |
|
75 |
The experiment has four levels in the vertical, each of equal thickness, |
76 |
$\Delta z = 500$~m. Initially the fluid is stratified with a reference |
77 |
potential temperature profile, |
78 |
$\theta_{250}=20^{\circ}$~C, |
79 |
$\theta_{750}=10^{\circ}$~C, |
80 |
$\theta_{1250}=8^{\circ}$~C, |
81 |
$\theta_{1750}=6^{\circ}$~C. The equation of state used in this experiment is |
82 |
linear |
83 |
|
84 |
\begin{equation} |
85 |
\label{EQ:linear1_eos} |
86 |
\rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} ) |
87 |
\end{equation} |
88 |
|
89 |
\noindent which is implemented in the model as a density anomaly equation |
90 |
|
91 |
\begin{equation} |
92 |
\label{EQ:linear1_eos_pert} |
93 |
\rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'} |
94 |
\end{equation} |
95 |
|
96 |
\noindent with $\rho_{0}=999.8\,{\rm kg\,m}^{-3}$ and |
97 |
$\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in |
98 |
this configuration the model state variable {\bf theta} is equivalent to |
99 |
either in-situ temperature, $T$, or potential temperature, $\theta$. For |
100 |
consistency with later examples, in which the equation of state is |
101 |
non-linear, we use $\theta$ to represent temperature here. This is |
102 |
the quantity that is carried in the model core equations. |
103 |
|
104 |
\begin{figure} |
105 |
\begin{center} |
106 |
\resizebox{7.5in}{5.5in}{ |
107 |
\includegraphics*[0.2in,0.7in][10.5in,10.5in] |
108 |
{part3/case_studies/fourlayer_gyre/simulation_config.eps} } |
109 |
\end{center} |
110 |
\caption{Schematic of simulation domain and wind-stress forcing function |
111 |
for the four-layer gyre numerical experiment. The domain is enclosed by solid |
112 |
walls at $0^{\circ}$~E, $60^{\circ}$~E, $0^{\circ}$~N and $60^{\circ}$~N. |
113 |
An initial stratification is |
114 |
imposed by setting the potential temperature, $\theta$, in each layer. |
115 |
The vertical spacing, $\Delta z$, is constant and equal to $500$m. |
116 |
} |
117 |
\label{FIG:simulation_config} |
118 |
\end{figure} |
119 |
|
120 |
\subsection{Equations solved} |
121 |
For this problem |
122 |
the implicit free surface, {\bf HPE} (see section \ref{sec:hydrostatic_and_quasi-hydrostatic_forms}) form of the |
123 |
equations described in Marshall et. al \cite{Marshall97a} are |
124 |
employed. The flow is three-dimensional with just temperature, $\theta$, as |
125 |
an active tracer. The equation of state is linear. |
126 |
A horizontal laplacian operator $\nabla_{h}^2$ provides viscous |
127 |
dissipation and provides a diffusive sub-grid scale closure for the |
128 |
temperature equation. A wind-stress momentum forcing is added to the momentum |
129 |
equation for the zonal flow, $u$. Other terms in the model |
130 |
are explicitly switched off for this experiement configuration (see section |
131 |
\ref{SEC:eg_fourl_code_config} ). This yields an active set of equations |
132 |
solved in this configuration, written in spherical polar coordinates as |
133 |
follows |
134 |
|
135 |
\begin{eqnarray} |
136 |
\label{EQ:model_equations} |
137 |
\frac{Du}{Dt} - fv + |
138 |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} - |
139 |
A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} |
140 |
& = & |
141 |
\cal{F}_{\lambda} |
142 |
\\ |
143 |
\frac{Dv}{Dt} + fu + |
144 |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \varphi} - |
145 |
A_{h}\nabla_{h}^2v - A_{z}\frac{\partial^{2}v}{\partial z^{2}} |
146 |
& = & |
147 |
0 |
148 |
\\ |
149 |
\frac{\partial \eta}{\partial t} + \frac{\partial H \widehat{u}}{\partial \lambda} + |
150 |
\frac{\partial H \widehat{v}}{\partial \varphi} |
151 |
&=& |
152 |
0 |
153 |
\label{eq:fourl_example_continuity} |
154 |
\\ |
155 |
\frac{D\theta}{Dt} - |
156 |
K_{h}\nabla_{h}^2\theta - K_{z}\frac{\partial^{2}\theta}{\partial z^{2}} |
157 |
& = & |
158 |
0 |
159 |
\label{eq:eg_fourl_theta} |
160 |
\\ |
161 |
p^{\prime} & = & |
162 |
g\rho_{0} \eta + \int^{0}_{-z}\rho^{\prime} dz |
163 |
\\ |
164 |
\rho^{\prime} & = &- \alpha_{\theta}\rho_{0}\theta^{\prime} |
165 |
\\ |
166 |
{\cal F}_{\lambda} |_{s} & = & \frac{\tau_{\lambda}}{\rho_{0}\Delta z_{s}} |
167 |
\\ |
168 |
{\cal F}_{\lambda} |_{i} & = & 0 |
169 |
\end{eqnarray} |
170 |
|
171 |
\noindent where $u$ and $v$ are the components of the horizontal |
172 |
flow vector $\vec{u}$ on the sphere ($u=\dot{\lambda},v=\dot{\varphi}$). |
173 |
The terms $H\widehat{u}$ and $H\widehat{v}$ are the components of the vertical |
174 |
integral term given in equation \ref{eq:free-surface} and |
175 |
explained in more detail in section \ref{sect:pressure-method-linear-backward}. |
176 |
However, for the problem presented here, the continuity relation (equation |
177 |
\ref{eq:fourl_example_continuity}) differs from the general form given |
178 |
in section \ref{sect:pressure-method-linear-backward}, |
179 |
equation \ref{eq:linear-free-surface=P-E+R}, because the source terms |
180 |
${\cal P}-{\cal E}+{\cal R}$ |
181 |
are all $0$. |
182 |
|
183 |
The pressure field, $p^{\prime}$, is separated into a barotropic part |
184 |
due to variations in sea-surface height, $\eta$, and a hydrostatic |
185 |
part due to variations in density, $\rho^{\prime}$, integrated |
186 |
through the water column. |
187 |
|
188 |
The suffices ${s},{i}$ indicate surface layer and the interior of the domain. |
189 |
The windstress forcing, ${\cal F}_{\lambda}$, is applied in the surface layer |
190 |
by a source term in the zonal momentum equation. In the ocean interior |
191 |
this term is zero. |
192 |
|
193 |
In the momentum equations |
194 |
lateral and vertical boundary conditions for the $\nabla_{h}^{2}$ |
195 |
and $\frac{\partial^{2}}{\partial z^{2}}$ operators are specified |
196 |
when the numerical simulation is run - see section |
197 |
\ref{SEC:eg_fourl_code_config}. For temperature |
198 |
the boundary condition is ``zero-flux'' |
199 |
e.g. $\frac{\partial \theta}{\partial \varphi}= |
200 |
\frac{\partial \theta}{\partial \lambda}=\frac{\partial \theta}{\partial z}=0$. |
201 |
|
202 |
|
203 |
|
204 |
\subsection{Discrete Numerical Configuration} |
205 |
|
206 |
The domain is discretised with |
207 |
a uniform grid spacing in latitude and longitude |
208 |
$\Delta \lambda=\Delta \varphi=1^{\circ}$, so |
209 |
that there are sixty grid cells in the zonal and meridional directions. |
210 |
Vertically the |
211 |
model is configured with four layers with constant depth, |
212 |
$\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate |
213 |
variables $x$ and $y$ are initialised from the values of |
214 |
$\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in |
215 |
radians according to |
216 |
|
217 |
\begin{eqnarray} |
218 |
x=r\cos(\varphi)\lambda,~\Delta x & = &r\cos(\varphi)\Delta \lambda \\ |
219 |
y=r\varphi,~\Delta y &= &r\Delta \varphi |
220 |
\end{eqnarray} |
221 |
|
222 |
The procedure for generating a set of internal grid variables from a |
223 |
spherical polar grid specification is discussed in section |
224 |
\ref{sec:spatial_discrete_horizontal_grid}. |
225 |
|
226 |
\noindent\fbox{ \begin{minipage}{5.5in} |
227 |
{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em |
228 |
model/src/ini\_spherical\_polar\_grid.F}) |
229 |
|
230 |
$A_c$, $A_\zeta$, $A_w$, $A_s$: {\bf rAc}, {\bf rAz}, {\bf rAw}, {\bf rAs} |
231 |
({\em GRID.h}) |
232 |
|
233 |
$\Delta x_g$, $\Delta y_g$: {\bf DXg}, {\bf DYg} ({\em GRID.h}) |
234 |
|
235 |
$\Delta x_c$, $\Delta y_c$: {\bf DXc}, {\bf DYc} ({\em GRID.h}) |
236 |
|
237 |
$\Delta x_f$, $\Delta y_f$: {\bf DXf}, {\bf DYf} ({\em GRID.h}) |
238 |
|
239 |
$\Delta x_v$, $\Delta y_u$: {\bf DXv}, {\bf DYu} ({\em GRID.h}) |
240 |
|
241 |
\end{minipage} }\\ |
242 |
|
243 |
|
244 |
|
245 |
As described in \ref{sec:tracer_equations}, the time evolution of potential |
246 |
temperature, |
247 |
$\theta$, (equation \ref{eq:eg_fourl_theta}) |
248 |
is evaluated prognostically. The centered second-order scheme with |
249 |
Adams-Bashforth time stepping described in section |
250 |
\ref{sec:tracer_equations_abII} is used to step forward the temperature |
251 |
equation. Prognostic terms in |
252 |
the momentum equations are solved using flux form as |
253 |
described in section \ref{sec:flux-form_momentum_eqautions}. |
254 |
The pressure forces that drive the fluid motions, ( |
255 |
$\frac{\partial p^{'}}{\partial \lambda}$ and $\frac{\partial p^{'}}{\partial \varphi}$), are found by summing pressure due to surface |
256 |
elevation $\eta$ and the hydrostatic pressure. The hydrostatic part of the |
257 |
pressure is diagnosed explicitly by integrating density. The sea-surface |
258 |
height, $\eta$, is diagnosed using an implicit scheme. The pressure |
259 |
field solution method is described in sections |
260 |
\ref{sect:pressure-method-linear-backward} and |
261 |
\ref{sec:finding_the_pressure_field}. |
262 |
|
263 |
\subsubsection{Numerical Stability Criteria} |
264 |
|
265 |
The laplacian viscosity coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
266 |
This value is chosen to yield a Munk layer width, |
267 |
|
268 |
\begin{eqnarray} |
269 |
\label{EQ:munk_layer} |
270 |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
271 |
\end{eqnarray} |
272 |
|
273 |
\noindent of $\approx 100$km. This is greater than the model |
274 |
resolution in mid-latitudes |
275 |
$\Delta x=r \cos(\varphi) \Delta \lambda \approx 80~{\rm km}$ at |
276 |
$\varphi=45^{\circ}$, ensuring that the frictional |
277 |
boundary layer is well resolved. |
278 |
\\ |
279 |
|
280 |
\noindent The model is stepped forward with a |
281 |
time step $\delta t=1200$secs. With this time step the stability |
282 |
parameter to the horizontal laplacian friction |
283 |
|
284 |
\begin{eqnarray} |
285 |
\label{EQ:laplacian_stability} |
286 |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
287 |
\end{eqnarray} |
288 |
|
289 |
\noindent evaluates to 0.012, which is well below the 0.3 upper limit |
290 |
for stability for this term under ABII time-stepping. |
291 |
\\ |
292 |
|
293 |
\noindent The vertical dissipation coefficient, $A_{z}$, is set to |
294 |
$1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit |
295 |
|
296 |
\begin{eqnarray} |
297 |
\label{EQ:laplacian_stability_z} |
298 |
S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2} |
299 |
\end{eqnarray} |
300 |
|
301 |
\noindent evaluates to $4.8 \times 10^{-5}$ which is again well below |
302 |
the upper limit. |
303 |
The values of $A_{h}$ and $A_{z}$ are also used for the horizontal ($K_{h}$) |
304 |
and vertical ($K_{z}$) diffusion coefficients for temperature respectively. |
305 |
\\ |
306 |
|
307 |
\noindent The numerical stability for inertial oscillations |
308 |
|
309 |
\begin{eqnarray} |
310 |
\label{EQ:inertial_stability} |
311 |
S_{i} = f^{2} {\delta t}^2 |
312 |
\end{eqnarray} |
313 |
|
314 |
\noindent evaluates to $0.0144$, which is well below the $0.5$ upper |
315 |
limit for stability. |
316 |
\\ |
317 |
|
318 |
\noindent The advective CFL for a extreme maximum |
319 |
horizontal flow |
320 |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
321 |
|
322 |
\begin{eqnarray} |
323 |
\label{EQ:cfl_stability} |
324 |
C_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
325 |
\end{eqnarray} |
326 |
|
327 |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the stability |
328 |
limit of 0.5. |
329 |
\\ |
330 |
|
331 |
\noindent The stability parameter for internal gravity waves |
332 |
propogating at $2~{\rm m}~{\rm s}^{-1}$ |
333 |
|
334 |
\begin{eqnarray} |
335 |
\label{EQ:igw_stability} |
336 |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
337 |
\end{eqnarray} |
338 |
|
339 |
\noindent evaluates to $\approx 5 \times 10^{-2}$. This is well below the linear |
340 |
stability limit of 0.25. |
341 |
|
342 |
\subsection{Code Configuration} |
343 |
\label{SEC:eg_fourl_code_config} |
344 |
|
345 |
The model configuration for this experiment resides under the |
346 |
directory {\it verification/exp2/}. The experiment files |
347 |
\begin{itemize} |
348 |
\item {\it input/data} |
349 |
\item {\it input/data.pkg} |
350 |
\item {\it input/eedata}, |
351 |
\item {\it input/windx.sin\_y}, |
352 |
\item {\it input/topog.box}, |
353 |
\item {\it code/CPP\_EEOPTIONS.h} |
354 |
\item {\it code/CPP\_OPTIONS.h}, |
355 |
\item {\it code/SIZE.h}. |
356 |
\end{itemize} |
357 |
contain the code customisations and parameter settings for this |
358 |
experiements. Below we describe the customisations |
359 |
to these files associated with this experiment. |
360 |
|
361 |
\subsubsection{File {\it input/data}} |
362 |
|
363 |
This file, reproduced completely below, specifies the main parameters |
364 |
for the experiment. The parameters that are significant for this configuration |
365 |
are |
366 |
|
367 |
\begin{itemize} |
368 |
|
369 |
\item Line 4, |
370 |
\begin{verbatim} tRef=20.,10.,8.,6., \end{verbatim} |
371 |
this line sets |
372 |
the initial and reference values of potential temperature at each model |
373 |
level in units of $^{\circ}$C. |
374 |
The entries are ordered from surface to depth. For each |
375 |
depth level the inital and reference profiles will be uniform in |
376 |
$x$ and $y$. The values specified here are read into the |
377 |
variable |
378 |
{\bf |
379 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml} |
380 |
tRef |
381 |
\begin{rawhtml} </A>\end{rawhtml} |
382 |
} |
383 |
in the model code, by procedure |
384 |
{\it |
385 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
386 |
INI\_PARMS |
387 |
\begin{rawhtml} </A>\end{rawhtml} |
388 |
}. |
389 |
|
390 |
%% \codelink{var:tref} tRef \endlink |
391 |
%% \codelink{file:ini_parms} {\it INI\_PARMS } \endlink |
392 |
%% \codelink{proc:ini_parms} {\it INI\_PARMS } \endlink |
393 |
%% \var{tref} |
394 |
%% \proc{ini_parms} |
395 |
%% \file{ini_parms} |
396 |
\newcommand{\VARtref}{ |
397 |
{\bf |
398 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml} |
399 |
tRef |
400 |
\begin{rawhtml} </A>\end{rawhtml} |
401 |
} |
402 |
} |
403 |
|
404 |
|
405 |
|
406 |
\fbox{ |
407 |
\begin{minipage}{5.0in} |
408 |
{\it S/R INI\_THETA} |
409 |
({\it ini\_theta.F}) |
410 |
\end{minipage} |
411 |
} |
412 |
{\bf |
413 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/98.htm> \end{rawhtml} |
414 |
goto code |
415 |
\begin{rawhtml} </A>\end{rawhtml} |
416 |
} |
417 |
|
418 |
|
419 |
\item Line 6, |
420 |
\begin{verbatim} viscAz=1.E-2, \end{verbatim} |
421 |
this line sets the vertical laplacian dissipation coefficient to |
422 |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
423 |
for this operator are specified later. |
424 |
The variable |
425 |
{\bf |
426 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZQ.htm> \end{rawhtml} |
427 |
viscAz |
428 |
\begin{rawhtml} </A>\end{rawhtml} |
429 |
} |
430 |
is read in the routine |
431 |
{\it |
432 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
433 |
INI\_PARMS |
434 |
\begin{rawhtml} </A>\end{rawhtml} |
435 |
} |
436 |
and is copied into model general vertical coordinate variable |
437 |
{\bf |
438 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml} |
439 |
viscAr |
440 |
\begin{rawhtml} </A>\end{rawhtml} |
441 |
}. At each time step, the viscous term contribution to the momentum eqautions |
442 |
is calculated in routine |
443 |
{\it S/R CALC\_DIFFUSIVITY}. |
444 |
|
445 |
\fbox{ |
446 |
\begin{minipage}{5.0in} |
447 |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
448 |
\end{minipage} |
449 |
} |
450 |
{\bf |
451 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml} |
452 |
goto code |
453 |
\begin{rawhtml} </A>\end{rawhtml} |
454 |
} |
455 |
|
456 |
\item Line 7, |
457 |
\begin{verbatim} |
458 |
viscAh=4.E2, |
459 |
\end{verbatim} |
460 |
this line sets the horizontal laplacian frictional dissipation coefficient to |
461 |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
462 |
for this operator are specified later. |
463 |
The variable |
464 |
{\bf |
465 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/SI.htm> \end{rawhtml} |
466 |
viscAh |
467 |
\begin{rawhtml} </A>\end{rawhtml} |
468 |
} |
469 |
is read in the routine |
470 |
{\it |
471 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
472 |
INI\_PARMS |
473 |
\begin{rawhtml} </A>\end{rawhtml} |
474 |
} and applied in routines {\it CALC\_MOM\_RHS} and {\it CALC\_GW}. |
475 |
|
476 |
\fbox{ |
477 |
\begin{minipage}{5.0in} |
478 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
479 |
\end{minipage} |
480 |
} |
481 |
{\bf |
482 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
483 |
goto code |
484 |
\begin{rawhtml} </A>\end{rawhtml} |
485 |
} |
486 |
|
487 |
\fbox{ |
488 |
\begin{minipage}{5.0in} |
489 |
{\it S/R CALC\_GW}({\it calc\_gw.F}) |
490 |
\end{minipage} |
491 |
} |
492 |
{\bf |
493 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/58.htm> \end{rawhtml} |
494 |
goto code |
495 |
\begin{rawhtml} </A>\end{rawhtml} |
496 |
} |
497 |
|
498 |
\item Lines 8, |
499 |
\begin{verbatim} |
500 |
no_slip_sides=.FALSE. |
501 |
\end{verbatim} |
502 |
this line selects a free-slip lateral boundary condition for |
503 |
the horizontal laplacian friction operator |
504 |
e.g. $\frac{\partial u}{\partial y}$=0 along boundaries in $y$ and |
505 |
$\frac{\partial v}{\partial x}$=0 along boundaries in $x$. |
506 |
The variable |
507 |
{\bf |
508 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UT.htm> \end{rawhtml} |
509 |
no\_slip\_sides |
510 |
\begin{rawhtml} </A>\end{rawhtml} |
511 |
} |
512 |
is read in the routine |
513 |
{\it |
514 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
515 |
INI\_PARMS |
516 |
\begin{rawhtml} </A>\end{rawhtml} |
517 |
} and the boundary condition is evaluated in routine |
518 |
{\it S/R CALC\_MOM\_RHS}. |
519 |
|
520 |
|
521 |
\fbox{ |
522 |
\begin{minipage}{5.0in} |
523 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
524 |
\end{minipage} |
525 |
} |
526 |
{\bf |
527 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
528 |
goto code |
529 |
\begin{rawhtml} </A>\end{rawhtml} |
530 |
} |
531 |
|
532 |
\item Lines 9, |
533 |
\begin{verbatim} |
534 |
no_slip_bottom=.TRUE. |
535 |
\end{verbatim} |
536 |
this line selects a no-slip boundary condition for bottom |
537 |
boundary condition in the vertical laplacian friction operator |
538 |
e.g. $u=v=0$ at $z=-H$, where $H$ is the local depth of the domain. |
539 |
The variable |
540 |
{\bf |
541 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UK.htm> \end{rawhtml} |
542 |
no\_slip\_bottom |
543 |
\begin{rawhtml} </A>\end{rawhtml} |
544 |
} |
545 |
is read in the routine |
546 |
{\it |
547 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
548 |
INI\_PARMS |
549 |
\begin{rawhtml} </A>\end{rawhtml} |
550 |
} and is applied in the routine {\it S/R CALC\_MOM\_RHS}. |
551 |
|
552 |
\fbox{ |
553 |
\begin{minipage}{5.0in} |
554 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
555 |
\end{minipage} |
556 |
} |
557 |
{\bf |
558 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
559 |
goto code |
560 |
\begin{rawhtml} </A>\end{rawhtml} |
561 |
} |
562 |
|
563 |
\item Line 10, |
564 |
\begin{verbatim} |
565 |
diffKhT=4.E2, |
566 |
\end{verbatim} |
567 |
this line sets the horizontal diffusion coefficient for temperature |
568 |
to $400\,{\rm m^{2}s^{-1}}$. The boundary condition on this |
569 |
operator is $\frac{\partial}{\partial x}=\frac{\partial}{\partial y}=0$ at |
570 |
all boundaries. |
571 |
The variable |
572 |
{\bf |
573 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/RC.htm> \end{rawhtml} |
574 |
diffKhT |
575 |
\begin{rawhtml} </A>\end{rawhtml} |
576 |
} |
577 |
is read in the routine |
578 |
{\it |
579 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
580 |
INI\_PARMS |
581 |
\begin{rawhtml} </A>\end{rawhtml} |
582 |
} and used in routine {\it S/R CALC\_GT}. |
583 |
|
584 |
\fbox{ \begin{minipage}{5.0in} |
585 |
{\it S/R CALC\_GT}({\it calc\_gt.F}) |
586 |
\end{minipage} |
587 |
} |
588 |
{\bf |
589 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/57.htm> \end{rawhtml} |
590 |
goto code |
591 |
\begin{rawhtml} </A>\end{rawhtml} |
592 |
} |
593 |
|
594 |
\item Line 11, |
595 |
\begin{verbatim} |
596 |
diffKzT=1.E-2, |
597 |
\end{verbatim} |
598 |
this line sets the vertical diffusion coefficient for temperature |
599 |
to $10^{-2}\,{\rm m^{2}s^{-1}}$. The boundary condition on this |
600 |
operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries. |
601 |
The variable |
602 |
{\bf |
603 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZT.htm> \end{rawhtml} |
604 |
diffKzT |
605 |
\begin{rawhtml} </A>\end{rawhtml} |
606 |
} |
607 |
is read in the routine |
608 |
{\it |
609 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
610 |
INI\_PARMS |
611 |
\begin{rawhtml} </A>\end{rawhtml} |
612 |
}. |
613 |
It is copied into model general vertical coordinate variable |
614 |
{\bf |
615 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml} |
616 |
diffKrT |
617 |
\begin{rawhtml} </A>\end{rawhtml} |
618 |
} which is used in routine {\it S/R CALC\_DIFFUSIVITY}. |
619 |
|
620 |
\fbox{ \begin{minipage}{5.0in} |
621 |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
622 |
\end{minipage} |
623 |
} |
624 |
{\bf |
625 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml} |
626 |
goto code |
627 |
\begin{rawhtml} </A>\end{rawhtml} |
628 |
} |
629 |
|
630 |
|
631 |
|
632 |
\item Line 13, |
633 |
\begin{verbatim} |
634 |
tAlpha=2.E-4, |
635 |
\end{verbatim} |
636 |
This line sets the thermal expansion coefficient for the fluid |
637 |
to $2 \times 10^{-4}\,{\rm degrees}^{-1}$ |
638 |
The variable |
639 |
{\bf |
640 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZV.htm> \end{rawhtml} |
641 |
tAlpha |
642 |
\begin{rawhtml} </A>\end{rawhtml} |
643 |
} |
644 |
is read in the routine |
645 |
{\it |
646 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
647 |
INI\_PARMS |
648 |
\begin{rawhtml} </A>\end{rawhtml} |
649 |
}. The routine {\it S/R FIND\_RHO} makes use of {\bf tAlpha}. |
650 |
|
651 |
\fbox{ |
652 |
\begin{minipage}{5.0in} |
653 |
{\it S/R FIND\_RHO}({\it find\_rho.F}) |
654 |
\end{minipage} |
655 |
} |
656 |
{\bf |
657 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml} |
658 |
goto code |
659 |
\begin{rawhtml} </A>\end{rawhtml} |
660 |
} |
661 |
|
662 |
\item Line 18, |
663 |
\begin{verbatim} |
664 |
eosType='LINEAR' |
665 |
\end{verbatim} |
666 |
This line selects the linear form of the equation of state. |
667 |
The variable |
668 |
{\bf |
669 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/WV.htm> \end{rawhtml} |
670 |
eosType |
671 |
\begin{rawhtml} </A>\end{rawhtml} |
672 |
} |
673 |
is read in the routine |
674 |
{\it |
675 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
676 |
INI\_PARMS |
677 |
\begin{rawhtml} </A>\end{rawhtml} |
678 |
}. The values of {\bf eosType} sets which formula in routine |
679 |
{\it FIND\_RHO} is used to calculate density. |
680 |
|
681 |
\fbox{ |
682 |
\begin{minipage}{5.0in} |
683 |
{\it S/R FIND\_RHO}({\it find\_rho.F}) |
684 |
\end{minipage} |
685 |
} |
686 |
{\bf |
687 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml} |
688 |
goto code |
689 |
\begin{rawhtml} </A>\end{rawhtml} |
690 |
} |
691 |
|
692 |
|
693 |
|
694 |
\item Line 40, |
695 |
\begin{verbatim} |
696 |
usingSphericalPolarGrid=.TRUE., |
697 |
\end{verbatim} |
698 |
This line requests that the simulation be performed in a |
699 |
spherical polar coordinate system. It affects the interpretation of |
700 |
grid inoput parameters, for exampl {\bf delX} and {\bf delY} and |
701 |
causes the grid generation routines to initialise an internal grid based |
702 |
on spherical polar geometry. |
703 |
The variable |
704 |
{\bf |
705 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10T.htm> \end{rawhtml} |
706 |
usingSphericalPolarGrid |
707 |
\begin{rawhtml} </A>\end{rawhtml} |
708 |
} |
709 |
is read in the routine |
710 |
{\it |
711 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
712 |
INI\_PARMS |
713 |
\begin{rawhtml} </A>\end{rawhtml} |
714 |
}. When set to {\bf .TRUE.} the settings of {\bf delX} and {\bf delY} are |
715 |
taken to be in degrees. These values are used in the |
716 |
routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
717 |
|
718 |
\fbox{ |
719 |
\begin{minipage}{5.0in} |
720 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
721 |
\end{minipage} |
722 |
} |
723 |
{\bf |
724 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
725 |
goto code |
726 |
\begin{rawhtml} </A>\end{rawhtml} |
727 |
} |
728 |
|
729 |
\item Line 41, |
730 |
\begin{verbatim} |
731 |
phiMin=0., |
732 |
\end{verbatim} |
733 |
This line sets the southern boundary of the modeled |
734 |
domain to $0^{\circ}$ latitude. This value affects both the |
735 |
generation of the locally orthogonal grid that the model |
736 |
uses internally and affects the initialisation of the coriolis force. |
737 |
Note - it is not required to set |
738 |
a longitude boundary, since the absolute longitude does |
739 |
not alter the kernel equation discretisation. |
740 |
The variable |
741 |
{\bf |
742 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/110.htm> \end{rawhtml} |
743 |
phiMin |
744 |
\begin{rawhtml} </A>\end{rawhtml} |
745 |
} |
746 |
is read in the routine |
747 |
{\it |
748 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
749 |
INI\_PARMS |
750 |
\begin{rawhtml} </A>\end{rawhtml} |
751 |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
752 |
|
753 |
\fbox{ |
754 |
\begin{minipage}{5.0in} |
755 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
756 |
\end{minipage} |
757 |
} |
758 |
{\bf |
759 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
760 |
goto code |
761 |
\begin{rawhtml} </A>\end{rawhtml} |
762 |
} |
763 |
|
764 |
\item Line 42, |
765 |
\begin{verbatim} |
766 |
delX=60*1., |
767 |
\end{verbatim} |
768 |
This line sets the horizontal grid spacing between each y-coordinate line |
769 |
in the discrete grid to $1^{\circ}$ in longitude. |
770 |
The variable |
771 |
{\bf |
772 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Z.htm> \end{rawhtml} |
773 |
delX |
774 |
\begin{rawhtml} </A>\end{rawhtml} |
775 |
} |
776 |
is read in the routine |
777 |
{\it |
778 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
779 |
INI\_PARMS |
780 |
\begin{rawhtml} </A>\end{rawhtml} |
781 |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
782 |
|
783 |
\fbox{ |
784 |
\begin{minipage}{5.0in} |
785 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
786 |
\end{minipage} |
787 |
} |
788 |
{\bf |
789 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
790 |
goto code |
791 |
\begin{rawhtml} </A>\end{rawhtml} |
792 |
} |
793 |
|
794 |
\item Line 43, |
795 |
\begin{verbatim} |
796 |
delY=60*1., |
797 |
\end{verbatim} |
798 |
This line sets the horizontal grid spacing between each y-coordinate line |
799 |
in the discrete grid to $1^{\circ}$ in latitude. |
800 |
The variable |
801 |
{\bf |
802 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UB.htm> \end{rawhtml} |
803 |
delY |
804 |
\begin{rawhtml} </A>\end{rawhtml} |
805 |
} |
806 |
is read in the routine |
807 |
{\it |
808 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
809 |
INI\_PARMS |
810 |
\begin{rawhtml} </A>\end{rawhtml} |
811 |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
812 |
|
813 |
\fbox{ |
814 |
\begin{minipage}{5.0in} |
815 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
816 |
\end{minipage} |
817 |
} |
818 |
{\bf |
819 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
820 |
goto code |
821 |
\begin{rawhtml} </A>\end{rawhtml} |
822 |
} |
823 |
|
824 |
\item Line 44, |
825 |
\begin{verbatim} |
826 |
delZ=500.,500.,500.,500., |
827 |
\end{verbatim} |
828 |
This line sets the vertical grid spacing between each z-coordinate line |
829 |
in the discrete grid to $500\,{\rm m}$, so that the total model depth |
830 |
is $2\,{\rm km}$. |
831 |
The variable |
832 |
{\bf |
833 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10W.htm> \end{rawhtml} |
834 |
delZ |
835 |
\begin{rawhtml} </A>\end{rawhtml} |
836 |
} |
837 |
is read in the routine |
838 |
{\it |
839 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
840 |
INI\_PARMS |
841 |
\begin{rawhtml} </A>\end{rawhtml} |
842 |
}. |
843 |
It is copied into the internal |
844 |
model coordinate variable |
845 |
{\bf |
846 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Y.htm> \end{rawhtml} |
847 |
delR |
848 |
\begin{rawhtml} </A>\end{rawhtml} |
849 |
} which is used in routine {\it INI\_VERTICAL\_GRID}. |
850 |
|
851 |
\fbox{ |
852 |
\begin{minipage}{5.0in} |
853 |
{\it S/R INI\_VERTICAL\_GRID}({\it ini\_vertical\_grid.F}) |
854 |
\end{minipage} |
855 |
} |
856 |
{\bf |
857 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/100.htm> \end{rawhtml} |
858 |
goto code |
859 |
\begin{rawhtml} </A>\end{rawhtml} |
860 |
} |
861 |
|
862 |
\item Line 47, |
863 |
\begin{verbatim} |
864 |
bathyFile='topog.box' |
865 |
\end{verbatim} |
866 |
This line specifies the name of the file from which the domain |
867 |
bathymetry is read. This file is a two-dimensional ($x,y$) map of |
868 |
depths. This file is assumed to contain 64-bit binary numbers |
869 |
giving the depth of the model at each grid cell, ordered with the x |
870 |
coordinate varying fastest. The points are ordered from low coordinate |
871 |
to high coordinate for both axes. The units and orientation of the |
872 |
depths in this file are the same as used in the MITgcm code. In this |
873 |
experiment, a depth of $0m$ indicates a solid wall and a depth |
874 |
of $-2000m$ indicates open ocean. The matlab program |
875 |
{\it input/gendata.m} shows an example of how to generate a |
876 |
bathymetry file. |
877 |
The variable |
878 |
{\bf |
879 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/179.htm> \end{rawhtml} |
880 |
bathyFile |
881 |
\begin{rawhtml} </A>\end{rawhtml} |
882 |
} |
883 |
is read in the routine |
884 |
{\it |
885 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
886 |
INI\_PARMS |
887 |
\begin{rawhtml} </A>\end{rawhtml} |
888 |
}. The bathymetry file is read in the routine {\it INI\_DEPTHS}. |
889 |
|
890 |
\fbox{ |
891 |
\begin{minipage}{5.0in} |
892 |
{\it S/R INI\_DEPTHS}({\it ini\_depths.F}) |
893 |
\end{minipage} |
894 |
} |
895 |
{\bf |
896 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/88.htm> \end{rawhtml} |
897 |
goto code |
898 |
\begin{rawhtml} </A>\end{rawhtml} |
899 |
} |
900 |
|
901 |
|
902 |
\item Line 50, |
903 |
\begin{verbatim} |
904 |
zonalWindFile='windx.sin_y' |
905 |
\end{verbatim} |
906 |
This line specifies the name of the file from which the x-direction |
907 |
(zonal) surface wind stress is read. This file is also a two-dimensional |
908 |
($x,y$) map and is enumerated and formatted in the same manner as the |
909 |
bathymetry file. The matlab program {\it input/gendata.m} includes example |
910 |
code to generate a valid |
911 |
{\bf zonalWindFile} |
912 |
file. |
913 |
The variable |
914 |
{\bf |
915 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/13W.htm> \end{rawhtml} |
916 |
zonalWindFile |
917 |
\begin{rawhtml} </A>\end{rawhtml} |
918 |
} |
919 |
is read in the routine |
920 |
{\it |
921 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
922 |
INI\_PARMS |
923 |
\begin{rawhtml} </A>\end{rawhtml} |
924 |
}. The wind-stress file is read in the routine |
925 |
{\it EXTERNAL\_FIELDS\_LOAD}. |
926 |
|
927 |
\fbox{ |
928 |
\begin{minipage}{5.0in} |
929 |
{\it S/R EXTERNAL\_FIELDS\_LOAD}({\it external\_fields\_load.F}) |
930 |
\end{minipage} |
931 |
} |
932 |
{\bf |
933 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/75.htm> \end{rawhtml} |
934 |
goto code |
935 |
\begin{rawhtml} </A>\end{rawhtml} |
936 |
} |
937 |
|
938 |
\end{itemize} |
939 |
|
940 |
\noindent other lines in the file {\it input/data} are standard values. |
941 |
|
942 |
\begin{rawhtml}<PRE>\end{rawhtml} |
943 |
\begin{small} |
944 |
\input{part3/case_studies/fourlayer_gyre/input/data} |
945 |
\end{small} |
946 |
\begin{rawhtml}</PRE>\end{rawhtml} |
947 |
|
948 |
\subsubsection{File {\it input/data.pkg}} |
949 |
|
950 |
This file uses standard default values and does not contain |
951 |
customisations for this experiment. |
952 |
|
953 |
\subsubsection{File {\it input/eedata}} |
954 |
|
955 |
This file uses standard default values and does not contain |
956 |
customisations for this experiment. |
957 |
|
958 |
\subsubsection{File {\it input/windx.sin\_y}} |
959 |
|
960 |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
961 |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$ (the |
962 |
default for MITgcm). |
963 |
Although $\tau_{x}$ is only a function of latituted, $y$, |
964 |
in this experiment |
965 |
this file must still define a complete two-dimensional map in order |
966 |
to be compatible with the standard code for loading forcing fields |
967 |
in MITgcm (routine {\it EXTERNAL\_FIELDS\_LOAD}. |
968 |
The included matlab program {\it input/gendata.m} gives a complete |
969 |
code for creating the {\it input/windx.sin\_y} file. |
970 |
|
971 |
\subsubsection{File {\it input/topog.box}} |
972 |
|
973 |
|
974 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
975 |
map of depth values. For this experiment values are either |
976 |
$0~{\rm m}$ or $-2000\,{\rm m}$, corresponding respectively to a wall or to deep |
977 |
ocean. The file contains a raw binary stream of data that is enumerated |
978 |
in the same way as standard MITgcm two-dimensional, horizontal arrays. |
979 |
The included matlab program {\it input/gendata.m} gives a complete |
980 |
code for creating the {\it input/topog.box} file. |
981 |
|
982 |
\subsubsection{File {\it code/SIZE.h}} |
983 |
|
984 |
Two lines are customized in this file for the current experiment |
985 |
|
986 |
\begin{itemize} |
987 |
|
988 |
\item Line 39, |
989 |
\begin{verbatim} sNx=60, \end{verbatim} this line sets |
990 |
the lateral domain extent in grid points for the |
991 |
axis aligned with the x-coordinate. |
992 |
|
993 |
\item Line 40, |
994 |
\begin{verbatim} sNy=60, \end{verbatim} this line sets |
995 |
the lateral domain extent in grid points for the |
996 |
axis aligned with the y-coordinate. |
997 |
|
998 |
\item Line 49, |
999 |
\begin{verbatim} Nr=4, \end{verbatim} this line sets |
1000 |
the vertical domain extent in grid points. |
1001 |
|
1002 |
\end{itemize} |
1003 |
|
1004 |
\begin{small} |
1005 |
\include{part3/case_studies/fourlayer_gyre/code/SIZE.h} |
1006 |
\end{small} |
1007 |
|
1008 |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
1009 |
|
1010 |
This file uses standard default values and does not contain |
1011 |
customisations for this experiment. |
1012 |
|
1013 |
|
1014 |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
1015 |
|
1016 |
This file uses standard default values and does not contain |
1017 |
customisations for this experiment. |
1018 |
|
1019 |
\subsubsection{Other Files } |
1020 |
|
1021 |
Other files relevant to this experiment are |
1022 |
\begin{itemize} |
1023 |
\item {\it model/src/ini\_cori.F}. This file initializes the model |
1024 |
coriolis variables {\bf fCorU} and {\bf fCorV}. |
1025 |
\item {\it model/src/ini\_spherical\_polar\_grid.F} This file |
1026 |
initializes the model grid discretisation variables {\bf |
1027 |
dxF, dyF, dxG, dyG, dxC, dyC}. |
1028 |
\item {\it model/src/ini\_parms.F}. |
1029 |
\end{itemize} |
1030 |
|
1031 |
\subsection{Running The Example} |
1032 |
\label{SEC:running_the_example} |
1033 |
|
1034 |
\subsubsection{Code Download} |
1035 |
|
1036 |
In order to run the examples you must first download the code distribution. |
1037 |
Instructions for downloading the code can be found in section |
1038 |
\ref{sect:obtainingCode}. |
1039 |
|
1040 |
\subsubsection{Experiment Location} |
1041 |
|
1042 |
This example experiments is located under the release sub-directory |
1043 |
|
1044 |
\vspace{5mm} |
1045 |
{\it verification/exp2/ } |
1046 |
|
1047 |
\subsubsection{Running the Experiment} |
1048 |
|
1049 |
To run the experiment |
1050 |
|
1051 |
\begin{enumerate} |
1052 |
\item Set the current directory to {\it input/ } |
1053 |
|
1054 |
\begin{verbatim} |
1055 |
% cd input |
1056 |
\end{verbatim} |
1057 |
|
1058 |
\item Verify that current directory is now correct |
1059 |
|
1060 |
\begin{verbatim} |
1061 |
% pwd |
1062 |
\end{verbatim} |
1063 |
|
1064 |
You shold see a response on the screen ending in |
1065 |
|
1066 |
{\it verification/exp2/input } |
1067 |
|
1068 |
|
1069 |
\item Run the genmake script to create the experiment {\it Makefile} |
1070 |
|
1071 |
\begin{verbatim} |
1072 |
% ../../../tools/genmake -mods=../code |
1073 |
\end{verbatim} |
1074 |
|
1075 |
\item Create a list of header file dependencies in {\it Makefile} |
1076 |
|
1077 |
\begin{verbatim} |
1078 |
% make depend |
1079 |
\end{verbatim} |
1080 |
|
1081 |
\item Build the executable file. |
1082 |
|
1083 |
\begin{verbatim} |
1084 |
% make |
1085 |
\end{verbatim} |
1086 |
|
1087 |
\item Run the {\it mitgcmuv} executable |
1088 |
|
1089 |
\begin{verbatim} |
1090 |
% ./mitgcmuv |
1091 |
\end{verbatim} |
1092 |
|
1093 |
\end{enumerate} |
1094 |
|
1095 |
|