| 1 |
% $Header: /u/u0/gcmpack/mitgcmdoc/part3/case_studies/fourlayer_gyre/fourlayer.tex,v 1.5 2001/10/24 23:14:44 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 |
of this document the local orthogonal model coordinate $(x,y,z)$ is synonomous |
| 71 |
with the spherical polar coordinate 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 |
|
| 122 |
The implicit free surface {\bf HPE} form of the |
| 123 |
equations described in Marshall et. al \cite{Marshall97a} is |
| 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 and 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. The pressure forces that drive the fluid motions, ( |
| 252 |
$\frac{\partial p^{'}}{\partial \lambda}$ and $\frac{\partial p^{'}}{\partial \varphi}$), are found by summing pressure due to surface |
| 253 |
elevation $\eta$ and the hydrostatic pressure. The hydrostatic part of the |
| 254 |
pressure is evaluated explicitly by integrating density. The sea-surface |
| 255 |
height, $\eta$, is solved for implicitly as described in section |
| 256 |
\ref{sect:pressure-method-linear-backward}. |
| 257 |
|
| 258 |
\subsubsection{Numerical Stability Criteria} |
| 259 |
|
| 260 |
The laplacian dissipation coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
| 261 |
This value is chosen to yield a Munk layer width \cite{Adcroft_thesis}, |
| 262 |
|
| 263 |
\begin{eqnarray} |
| 264 |
\label{EQ:munk_layer} |
| 265 |
M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}} |
| 266 |
\end{eqnarray} |
| 267 |
|
| 268 |
\noindent of $\approx 100$km. This is greater than the model |
| 269 |
resolution in mid-latitudes $\Delta x$, ensuring that the frictional |
| 270 |
boundary layer is well resolved. |
| 271 |
|
| 272 |
\\ |
| 273 |
|
| 274 |
\noindent The model is stepped forward with a |
| 275 |
time step $\delta t=1200$secs. With this time step the stability |
| 276 |
parameter to the horizontal laplacian friction \cite{Adcroft_thesis} |
| 277 |
|
| 278 |
\begin{eqnarray} |
| 279 |
\label{EQ:laplacian_stability} |
| 280 |
S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2} |
| 281 |
\end{eqnarray} |
| 282 |
|
| 283 |
\noindent evaluates to 0.012, which is well below the 0.3 upper limit |
| 284 |
for stability. |
| 285 |
\\ |
| 286 |
|
| 287 |
\noindent The vertical dissipation coefficient, $A_{z}$, is set to |
| 288 |
$1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit |
| 289 |
|
| 290 |
\begin{eqnarray} |
| 291 |
\label{EQ:laplacian_stability_z} |
| 292 |
S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2} |
| 293 |
\end{eqnarray} |
| 294 |
|
| 295 |
\noindent evaluates to $4.8 \times 10^{-5}$ which is again well below |
| 296 |
the upper limit. |
| 297 |
The values of $A_{h}$ and $A_{z}$ are also used for the horizontal ($K_{h}$) |
| 298 |
and vertical ($K_{z}$) diffusion coefficients for temperature respectively. |
| 299 |
\\ |
| 300 |
|
| 301 |
\noindent The numerical stability for inertial oscillations |
| 302 |
\cite{Adcroft_thesis} |
| 303 |
|
| 304 |
\begin{eqnarray} |
| 305 |
\label{EQ:inertial_stability} |
| 306 |
S_{i} = f^{2} {\delta t}^2 |
| 307 |
\end{eqnarray} |
| 308 |
|
| 309 |
\noindent evaluates to $0.0144$, which is well below the $0.5$ upper |
| 310 |
limit for stability. |
| 311 |
\\ |
| 312 |
|
| 313 |
\noindent The advective CFL \cite{Adcroft_thesis} for a extreme maximum |
| 314 |
horizontal flow |
| 315 |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
| 316 |
|
| 317 |
\begin{eqnarray} |
| 318 |
\label{EQ:cfl_stability} |
| 319 |
S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
| 320 |
\end{eqnarray} |
| 321 |
|
| 322 |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the stability |
| 323 |
limit of 0.5. |
| 324 |
\\ |
| 325 |
|
| 326 |
\noindent The stability parameter for internal gravity waves |
| 327 |
\cite{Adcroft_thesis} |
| 328 |
|
| 329 |
\begin{eqnarray} |
| 330 |
\label{EQ:igw_stability} |
| 331 |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
| 332 |
\end{eqnarray} |
| 333 |
|
| 334 |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the linear |
| 335 |
stability limit of 0.25. |
| 336 |
|
| 337 |
\subsection{Code Configuration} |
| 338 |
\label{SEC:eg_fourl_code_config} |
| 339 |
|
| 340 |
The model configuration for this experiment resides under the |
| 341 |
directory {\it verification/exp1/}. The experiment files |
| 342 |
\begin{itemize} |
| 343 |
\item {\it input/data} |
| 344 |
\item {\it input/data.pkg} |
| 345 |
\item {\it input/eedata}, |
| 346 |
\item {\it input/windx.sin\_y}, |
| 347 |
\item {\it input/topog.box}, |
| 348 |
\item {\it code/CPP\_EEOPTIONS.h} |
| 349 |
\item {\it code/CPP\_OPTIONS.h}, |
| 350 |
\item {\it code/SIZE.h}. |
| 351 |
\end{itemize} |
| 352 |
contain the code customisations and parameter settings for this |
| 353 |
experiements. Below we describe the customisations |
| 354 |
to these files associated with this experiment. |
| 355 |
|
| 356 |
\subsubsection{File {\it input/data}} |
| 357 |
|
| 358 |
This file, reproduced completely below, specifies the main parameters |
| 359 |
for the experiment. The parameters that are significant for this configuration |
| 360 |
are |
| 361 |
|
| 362 |
\begin{itemize} |
| 363 |
|
| 364 |
\item Line 4, |
| 365 |
\begin{verbatim} tRef=20.,10.,8.,6., \end{verbatim} |
| 366 |
this line sets |
| 367 |
the initial and reference values of potential temperature at each model |
| 368 |
level in units of $^{\circ}$C. |
| 369 |
The entries are ordered from surface to depth. For each |
| 370 |
depth level the inital and reference profiles will be uniform in |
| 371 |
$x$ and $y$. The values specified here are read into the |
| 372 |
variable |
| 373 |
{\bf |
| 374 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml} |
| 375 |
tRef |
| 376 |
\begin{rawhtml} </A>\end{rawhtml} |
| 377 |
} |
| 378 |
in the model code, by procedure |
| 379 |
{\it |
| 380 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 381 |
INI\_PARMS |
| 382 |
\begin{rawhtml} </A>\end{rawhtml} |
| 383 |
}. |
| 384 |
|
| 385 |
%% \codelink{var:tref} tRef \endlink |
| 386 |
%% \codelink{file:ini_parms} {\it INI\_PARMS } \endlink |
| 387 |
%% \codelink{proc:ini_parms} {\it INI\_PARMS } \endlink |
| 388 |
%% \var{tref} |
| 389 |
%% \proc{ini_parms} |
| 390 |
%% \file{ini_parms} |
| 391 |
\newcommand{\VARtref}{ |
| 392 |
{\bf |
| 393 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml} |
| 394 |
tRef |
| 395 |
\begin{rawhtml} </A>\end{rawhtml} |
| 396 |
} |
| 397 |
} |
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
\fbox{ |
| 402 |
\begin{minipage}{5.0in} |
| 403 |
{\it S/R INI\_THETA} |
| 404 |
({\it ini\_theta.F}) |
| 405 |
\end{minipage} |
| 406 |
} |
| 407 |
{\bf |
| 408 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/98.htm> \end{rawhtml} |
| 409 |
goto code |
| 410 |
\begin{rawhtml} </A>\end{rawhtml} |
| 411 |
} |
| 412 |
|
| 413 |
|
| 414 |
\item Line 6, |
| 415 |
\begin{verbatim} viscAz=1.E-2, \end{verbatim} |
| 416 |
this line sets the vertical laplacian dissipation coefficient to |
| 417 |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
| 418 |
for this operator are specified later. |
| 419 |
The variable |
| 420 |
{\bf |
| 421 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZQ.htm> \end{rawhtml} |
| 422 |
viscAz |
| 423 |
\begin{rawhtml} </A>\end{rawhtml} |
| 424 |
} |
| 425 |
is read in the routine |
| 426 |
{\it |
| 427 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 428 |
INI\_PARMS |
| 429 |
\begin{rawhtml} </A>\end{rawhtml} |
| 430 |
} |
| 431 |
and is copied into model general vertical coordinate variable |
| 432 |
{\bf |
| 433 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml} |
| 434 |
viscAr |
| 435 |
\begin{rawhtml} </A>\end{rawhtml} |
| 436 |
}. |
| 437 |
|
| 438 |
\fbox{ |
| 439 |
\begin{minipage}{5.0in} |
| 440 |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
| 441 |
\end{minipage} |
| 442 |
} |
| 443 |
{\bf |
| 444 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml} |
| 445 |
goto code |
| 446 |
\begin{rawhtml} </A>\end{rawhtml} |
| 447 |
} |
| 448 |
|
| 449 |
\item Line 7, |
| 450 |
\begin{verbatim} |
| 451 |
viscAh=4.E2, |
| 452 |
\end{verbatim} |
| 453 |
this line sets the horizontal laplacian frictional dissipation coefficient to |
| 454 |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
| 455 |
for this operator are specified later. |
| 456 |
The variable |
| 457 |
{\bf |
| 458 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/SI.htm> \end{rawhtml} |
| 459 |
viscAh |
| 460 |
\begin{rawhtml} </A>\end{rawhtml} |
| 461 |
} |
| 462 |
is read in the routine |
| 463 |
{\it |
| 464 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 465 |
INI\_PARMS |
| 466 |
\begin{rawhtml} </A>\end{rawhtml} |
| 467 |
}. |
| 468 |
|
| 469 |
\fbox{ |
| 470 |
\begin{minipage}{5.0in} |
| 471 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
| 472 |
\end{minipage} |
| 473 |
} |
| 474 |
{\bf |
| 475 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
| 476 |
goto code |
| 477 |
\begin{rawhtml} </A>\end{rawhtml} |
| 478 |
} |
| 479 |
|
| 480 |
\fbox{ |
| 481 |
\begin{minipage}{5.0in} |
| 482 |
{\it S/R CALC\_GW}({\it calc\_gw.F}) |
| 483 |
\end{minipage} |
| 484 |
} |
| 485 |
{\bf |
| 486 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/58.htm> \end{rawhtml} |
| 487 |
goto code |
| 488 |
\begin{rawhtml} </A>\end{rawhtml} |
| 489 |
} |
| 490 |
|
| 491 |
\item Lines 8, |
| 492 |
\begin{verbatim} |
| 493 |
no_slip_sides=.FALSE. |
| 494 |
\end{verbatim} |
| 495 |
this line selects a free-slip lateral boundary condition for |
| 496 |
the horizontal laplacian friction operator |
| 497 |
e.g. $\frac{\partial u}{\partial y}$=0 along boundaries in $y$ and |
| 498 |
$\frac{\partial v}{\partial x}$=0 along boundaries in $x$. |
| 499 |
The variable |
| 500 |
{\bf |
| 501 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UT.htm> \end{rawhtml} |
| 502 |
no\_slip\_sides |
| 503 |
\begin{rawhtml} </A>\end{rawhtml} |
| 504 |
} |
| 505 |
is read in the routine |
| 506 |
{\it |
| 507 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 508 |
INI\_PARMS |
| 509 |
\begin{rawhtml} </A>\end{rawhtml} |
| 510 |
}. |
| 511 |
|
| 512 |
|
| 513 |
\fbox{ |
| 514 |
\begin{minipage}{5.0in} |
| 515 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
| 516 |
\end{minipage} |
| 517 |
} |
| 518 |
{\bf |
| 519 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
| 520 |
goto code |
| 521 |
\begin{rawhtml} </A>\end{rawhtml} |
| 522 |
} |
| 523 |
|
| 524 |
\item Lines 9, |
| 525 |
\begin{verbatim} |
| 526 |
no_slip_bottom=.TRUE. |
| 527 |
\end{verbatim} |
| 528 |
this line selects a no-slip boundary condition for bottom |
| 529 |
boundary condition in the vertical laplacian friction operator |
| 530 |
e.g. $u=v=0$ at $z=-H$, where $H$ is the local depth of the domain. |
| 531 |
The variable |
| 532 |
{\bf |
| 533 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UK.htm> \end{rawhtml} |
| 534 |
no\_slip\_bottom |
| 535 |
\begin{rawhtml} </A>\end{rawhtml} |
| 536 |
} |
| 537 |
is read in the routine |
| 538 |
{\it |
| 539 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 540 |
INI\_PARMS |
| 541 |
\begin{rawhtml} </A>\end{rawhtml} |
| 542 |
}. |
| 543 |
|
| 544 |
\fbox{ |
| 545 |
\begin{minipage}{5.0in} |
| 546 |
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F}) |
| 547 |
\end{minipage} |
| 548 |
} |
| 549 |
{\bf |
| 550 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml} |
| 551 |
goto code |
| 552 |
\begin{rawhtml} </A>\end{rawhtml} |
| 553 |
} |
| 554 |
|
| 555 |
\item Line 10, |
| 556 |
\begin{verbatim} |
| 557 |
diffKhT=4.E2, |
| 558 |
\end{verbatim} |
| 559 |
this line sets the horizontal diffusion coefficient for temperature |
| 560 |
to $400\,{\rm m^{2}s^{-1}}$. The boundary condition on this |
| 561 |
operator is $\frac{\partial}{\partial x}=\frac{\partial}{\partial y}=0$ at |
| 562 |
all boundaries. |
| 563 |
The variable |
| 564 |
{\bf |
| 565 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/RC.htm> \end{rawhtml} |
| 566 |
diffKhT |
| 567 |
\begin{rawhtml} </A>\end{rawhtml} |
| 568 |
} |
| 569 |
is read in the routine |
| 570 |
{\it |
| 571 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 572 |
INI\_PARMS |
| 573 |
\begin{rawhtml} </A>\end{rawhtml} |
| 574 |
}. |
| 575 |
|
| 576 |
\fbox{ \begin{minipage}{5.0in} |
| 577 |
{\it S/R CALC\_GT}({\it calc\_gt.F}) |
| 578 |
\end{minipage} |
| 579 |
} |
| 580 |
{\bf |
| 581 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/57.htm> \end{rawhtml} |
| 582 |
goto code |
| 583 |
\begin{rawhtml} </A>\end{rawhtml} |
| 584 |
} |
| 585 |
|
| 586 |
\item Line 11, |
| 587 |
\begin{verbatim} |
| 588 |
diffKzT=1.E-2, |
| 589 |
\end{verbatim} |
| 590 |
this line sets the vertical diffusion coefficient for temperature |
| 591 |
to $10^{-2}\,{\rm m^{2}s^{-1}}$. The boundary condition on this |
| 592 |
operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries. |
| 593 |
The variable |
| 594 |
{\bf |
| 595 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZT.htm> \end{rawhtml} |
| 596 |
diffKzT |
| 597 |
\begin{rawhtml} </A>\end{rawhtml} |
| 598 |
} |
| 599 |
is read in the routine |
| 600 |
{\it |
| 601 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 602 |
INI\_PARMS |
| 603 |
\begin{rawhtml} </A>\end{rawhtml} |
| 604 |
}. |
| 605 |
It is copied into model general vertical coordinate variable |
| 606 |
{\bf |
| 607 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml} |
| 608 |
diffKrT |
| 609 |
\begin{rawhtml} </A>\end{rawhtml} |
| 610 |
}. |
| 611 |
|
| 612 |
\fbox{ \begin{minipage}{5.0in} |
| 613 |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
| 614 |
\end{minipage} |
| 615 |
} |
| 616 |
{\bf |
| 617 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml} |
| 618 |
goto code |
| 619 |
\begin{rawhtml} </A>\end{rawhtml} |
| 620 |
} |
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
\item Line 13, |
| 625 |
\begin{verbatim} |
| 626 |
tAlpha=2.E-4, |
| 627 |
\end{verbatim} |
| 628 |
This line sets the thermal expansion coefficient for the fluid |
| 629 |
to $2 \times 10^{-4}\,{\rm degrees}^{-1}$ |
| 630 |
The variable |
| 631 |
{\bf |
| 632 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/ZV.htm> \end{rawhtml} |
| 633 |
tAlpha |
| 634 |
\begin{rawhtml} </A>\end{rawhtml} |
| 635 |
} |
| 636 |
is read in the routine |
| 637 |
{\it |
| 638 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 639 |
INI\_PARMS |
| 640 |
\begin{rawhtml} </A>\end{rawhtml} |
| 641 |
}. |
| 642 |
|
| 643 |
\fbox{ |
| 644 |
\begin{minipage}{5.0in} |
| 645 |
{\it S/R FIND\_RHO}({\it find\_rho.F}) |
| 646 |
\end{minipage} |
| 647 |
} |
| 648 |
{\bf |
| 649 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml} |
| 650 |
goto code |
| 651 |
\begin{rawhtml} </A>\end{rawhtml} |
| 652 |
} |
| 653 |
|
| 654 |
\item Line 18, |
| 655 |
\begin{verbatim} |
| 656 |
eosType='LINEAR' |
| 657 |
\end{verbatim} |
| 658 |
This line selects the linear form of the equation of state. |
| 659 |
The variable |
| 660 |
{\bf |
| 661 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/WV.htm> \end{rawhtml} |
| 662 |
eosType |
| 663 |
\begin{rawhtml} </A>\end{rawhtml} |
| 664 |
} |
| 665 |
is read in the routine |
| 666 |
{\it |
| 667 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 668 |
INI\_PARMS |
| 669 |
\begin{rawhtml} </A>\end{rawhtml} |
| 670 |
}. |
| 671 |
|
| 672 |
\fbox{ |
| 673 |
\begin{minipage}{5.0in} |
| 674 |
{\it S/R FIND\_RHO}({\it find\_rho.F}) |
| 675 |
\end{minipage} |
| 676 |
} |
| 677 |
{\bf |
| 678 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml} |
| 679 |
goto code |
| 680 |
\begin{rawhtml} </A>\end{rawhtml} |
| 681 |
} |
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
\item Line 40, |
| 686 |
\begin{verbatim} |
| 687 |
usingSphericalPolarGrid=.TRUE., |
| 688 |
\end{verbatim} |
| 689 |
This line requests that the simulation be performed in a |
| 690 |
spherical polar coordinate system. It affects the interpretation of |
| 691 |
grid inoput parameters, for exampl {\bf delX} and {\bf delY} and |
| 692 |
causes the grid generation routines to initialise an internal grid based |
| 693 |
on spherical polar geometry. |
| 694 |
The variable |
| 695 |
{\bf |
| 696 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10T.htm> \end{rawhtml} |
| 697 |
usingSphericalPolarGrid |
| 698 |
\begin{rawhtml} </A>\end{rawhtml} |
| 699 |
} |
| 700 |
is read in the routine |
| 701 |
{\it |
| 702 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 703 |
INI\_PARMS |
| 704 |
\begin{rawhtml} </A>\end{rawhtml} |
| 705 |
}. |
| 706 |
|
| 707 |
\fbox{ |
| 708 |
\begin{minipage}{5.0in} |
| 709 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
| 710 |
\end{minipage} |
| 711 |
} |
| 712 |
{\bf |
| 713 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
| 714 |
goto code |
| 715 |
\begin{rawhtml} </A>\end{rawhtml} |
| 716 |
} |
| 717 |
|
| 718 |
\item Line 41, |
| 719 |
\begin{verbatim} |
| 720 |
phiMin=0., |
| 721 |
\end{verbatim} |
| 722 |
This line sets the southern boundary of the modeled |
| 723 |
domain to $0^{\circ}$ latitude. This value affects both the |
| 724 |
generation of the locally orthogonal grid that the model |
| 725 |
uses internally and affects the initialisation of the coriolis force. |
| 726 |
Note - it is not required to set |
| 727 |
a longitude boundary, since the absolute longitude does |
| 728 |
not alter the kernel equation discretisation. |
| 729 |
The variable |
| 730 |
{\bf |
| 731 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/110.htm> \end{rawhtml} |
| 732 |
phiMin |
| 733 |
\begin{rawhtml} </A>\end{rawhtml} |
| 734 |
} |
| 735 |
is read in the routine |
| 736 |
{\it |
| 737 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 738 |
INI\_PARMS |
| 739 |
\begin{rawhtml} </A>\end{rawhtml} |
| 740 |
}. |
| 741 |
|
| 742 |
\fbox{ |
| 743 |
\begin{minipage}{5.0in} |
| 744 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
| 745 |
\end{minipage} |
| 746 |
} |
| 747 |
{\bf |
| 748 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
| 749 |
goto code |
| 750 |
\begin{rawhtml} </A>\end{rawhtml} |
| 751 |
} |
| 752 |
|
| 753 |
\item Line 42, |
| 754 |
\begin{verbatim} |
| 755 |
delX=60*1., |
| 756 |
\end{verbatim} |
| 757 |
This line sets the horizontal grid spacing between each y-coordinate line |
| 758 |
in the discrete grid to $1^{\circ}$ in longitude. |
| 759 |
The variable |
| 760 |
{\bf |
| 761 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Z.htm> \end{rawhtml} |
| 762 |
delX |
| 763 |
\begin{rawhtml} </A>\end{rawhtml} |
| 764 |
} |
| 765 |
is read in the routine |
| 766 |
{\it |
| 767 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 768 |
INI\_PARMS |
| 769 |
\begin{rawhtml} </A>\end{rawhtml} |
| 770 |
}. |
| 771 |
|
| 772 |
\fbox{ |
| 773 |
\begin{minipage}{5.0in} |
| 774 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
| 775 |
\end{minipage} |
| 776 |
} |
| 777 |
{\bf |
| 778 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
| 779 |
goto code |
| 780 |
\begin{rawhtml} </A>\end{rawhtml} |
| 781 |
} |
| 782 |
|
| 783 |
\item Line 43, |
| 784 |
\begin{verbatim} |
| 785 |
delY=60*1., |
| 786 |
\end{verbatim} |
| 787 |
This line sets the horizontal grid spacing between each y-coordinate line |
| 788 |
in the discrete grid to $1^{\circ}$ in latitude. |
| 789 |
The variable |
| 790 |
{\bf |
| 791 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/UB.htm> \end{rawhtml} |
| 792 |
delY |
| 793 |
\begin{rawhtml} </A>\end{rawhtml} |
| 794 |
} |
| 795 |
is read in the routine |
| 796 |
{\it |
| 797 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 798 |
INI\_PARMS |
| 799 |
\begin{rawhtml} </A>\end{rawhtml} |
| 800 |
}. |
| 801 |
|
| 802 |
\fbox{ |
| 803 |
\begin{minipage}{5.0in} |
| 804 |
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F}) |
| 805 |
\end{minipage} |
| 806 |
} |
| 807 |
{\bf |
| 808 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml} |
| 809 |
goto code |
| 810 |
\begin{rawhtml} </A>\end{rawhtml} |
| 811 |
} |
| 812 |
|
| 813 |
\item Line 44, |
| 814 |
\begin{verbatim} |
| 815 |
delZ=500.,500.,500.,500., |
| 816 |
\end{verbatim} |
| 817 |
This line sets the vertical grid spacing between each z-coordinate line |
| 818 |
in the discrete grid to $500\,{\rm m}$, so that the total model depth |
| 819 |
is $2\,{\rm km}$. |
| 820 |
The variable |
| 821 |
{\bf |
| 822 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10W.htm> \end{rawhtml} |
| 823 |
delZ |
| 824 |
\begin{rawhtml} </A>\end{rawhtml} |
| 825 |
} |
| 826 |
is read in the routine |
| 827 |
{\it |
| 828 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 829 |
INI\_PARMS |
| 830 |
\begin{rawhtml} </A>\end{rawhtml} |
| 831 |
}. |
| 832 |
It is copied into the internal |
| 833 |
model coordinate variable |
| 834 |
{\bf |
| 835 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Y.htm> \end{rawhtml} |
| 836 |
delR |
| 837 |
\begin{rawhtml} </A>\end{rawhtml} |
| 838 |
}. |
| 839 |
|
| 840 |
\fbox{ |
| 841 |
\begin{minipage}{5.0in} |
| 842 |
{\it S/R INI\_VERTICAL\_GRID}({\it ini\_vertical\_grid.F}) |
| 843 |
\end{minipage} |
| 844 |
} |
| 845 |
{\bf |
| 846 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/100.htm> \end{rawhtml} |
| 847 |
goto code |
| 848 |
\begin{rawhtml} </A>\end{rawhtml} |
| 849 |
} |
| 850 |
|
| 851 |
\item Line 47, |
| 852 |
\begin{verbatim} |
| 853 |
bathyFile='topog.box' |
| 854 |
\end{verbatim} |
| 855 |
This line specifies the name of the file from which the domain |
| 856 |
bathymetry is read. This file is a two-dimensional ($x,y$) map of |
| 857 |
depths. This file is assumed to contain 64-bit binary numbers |
| 858 |
giving the depth of the model at each grid cell, ordered with the x |
| 859 |
coordinate varying fastest. The points are ordered from low coordinate |
| 860 |
to high coordinate for both axes. The units and orientation of the |
| 861 |
depths in this file are the same as used in the MITgcm code. In this |
| 862 |
experiment, a depth of $0m$ indicates a solid wall and a depth |
| 863 |
of $-2000m$ indicates open ocean. The matlab program |
| 864 |
{\it input/gendata.m} shows an example of how to generate a |
| 865 |
bathymetry file. |
| 866 |
The variable |
| 867 |
{\bf |
| 868 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/179.htm> \end{rawhtml} |
| 869 |
bathyFile |
| 870 |
\begin{rawhtml} </A>\end{rawhtml} |
| 871 |
} |
| 872 |
is read in the routine |
| 873 |
{\it |
| 874 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 875 |
INI\_PARMS |
| 876 |
\begin{rawhtml} </A>\end{rawhtml} |
| 877 |
}. |
| 878 |
|
| 879 |
\fbox{ |
| 880 |
\begin{minipage}{5.0in} |
| 881 |
{\it S/R INI\_DEPTHS}({\it ini\_depths.F}) |
| 882 |
\end{minipage} |
| 883 |
} |
| 884 |
{\bf |
| 885 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/88.htm> \end{rawhtml} |
| 886 |
goto code |
| 887 |
\begin{rawhtml} </A>\end{rawhtml} |
| 888 |
} |
| 889 |
|
| 890 |
|
| 891 |
\item Line 50, |
| 892 |
\begin{verbatim} |
| 893 |
zonalWindFile='windx.sin_y' |
| 894 |
\end{verbatim} |
| 895 |
This line specifies the name of the file from which the x-direction |
| 896 |
surface wind stress is read. This file is also a two-dimensional |
| 897 |
($x,y$) map and is enumerated and formatted in the same manner as the |
| 898 |
bathymetry file. The matlab program {\it input/gendata.m} includes example |
| 899 |
code to generate a valid |
| 900 |
{\bf zonalWindFile} |
| 901 |
file. |
| 902 |
The variable |
| 903 |
{\bf |
| 904 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/13W.htm> \end{rawhtml} |
| 905 |
zonalWindFile |
| 906 |
\begin{rawhtml} </A>\end{rawhtml} |
| 907 |
} |
| 908 |
is read in the routine |
| 909 |
{\it |
| 910 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
| 911 |
INI\_PARMS |
| 912 |
\begin{rawhtml} </A>\end{rawhtml} |
| 913 |
}. |
| 914 |
|
| 915 |
\fbox{ |
| 916 |
\begin{minipage}{5.0in} |
| 917 |
{\it S/R EXTERNAL\_FIELDS\_LOAD}({\it external\_fields\_load.F}) |
| 918 |
\end{minipage} |
| 919 |
} |
| 920 |
{\bf |
| 921 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/75.htm> \end{rawhtml} |
| 922 |
goto code |
| 923 |
\begin{rawhtml} </A>\end{rawhtml} |
| 924 |
} |
| 925 |
|
| 926 |
\end{itemize} |
| 927 |
|
| 928 |
\noindent other lines in the file {\it input/data} are standard values |
| 929 |
that are described in the MITgcm Getting Started and MITgcm Parameters |
| 930 |
notes. |
| 931 |
|
| 932 |
\begin{rawhtml}<PRE>\end{rawhtml} |
| 933 |
\begin{small} |
| 934 |
\input{part3/case_studies/fourlayer_gyre/input/data} |
| 935 |
\end{small} |
| 936 |
\begin{rawhtml}</PRE>\end{rawhtml} |
| 937 |
|
| 938 |
\subsubsection{File {\it input/data.pkg}} |
| 939 |
|
| 940 |
This file uses standard default values and does not contain |
| 941 |
customisations for this experiment. |
| 942 |
|
| 943 |
\subsubsection{File {\it input/eedata}} |
| 944 |
|
| 945 |
This file uses standard default values and does not contain |
| 946 |
customisations for this experiment. |
| 947 |
|
| 948 |
\subsubsection{File {\it input/windx.sin\_y}} |
| 949 |
|
| 950 |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
| 951 |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$. |
| 952 |
Although $\tau_{x}$ is only a function of $y$n in this experiment |
| 953 |
this file must still define a complete two-dimensional map in order |
| 954 |
to be compatible with the standard code for loading forcing fields |
| 955 |
in MITgcm. The included matlab program {\it input/gendata.m} gives a complete |
| 956 |
code for creating the {\it input/windx.sin\_y} file. |
| 957 |
|
| 958 |
\subsubsection{File {\it input/topog.box}} |
| 959 |
|
| 960 |
|
| 961 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
| 962 |
map of depth values. For this experiment values are either |
| 963 |
$0m$ or $-2000\,{\rm m}$, corresponding respectively to a wall or to deep |
| 964 |
ocean. The file contains a raw binary stream of data that is enumerated |
| 965 |
in the same way as standard MITgcm two-dimensional, horizontal arrays. |
| 966 |
The included matlab program {\it input/gendata.m} gives a complete |
| 967 |
code for creating the {\it input/topog.box} file. |
| 968 |
|
| 969 |
\subsubsection{File {\it code/SIZE.h}} |
| 970 |
|
| 971 |
Two lines are customized in this file for the current experiment |
| 972 |
|
| 973 |
\begin{itemize} |
| 974 |
|
| 975 |
\item Line 39, |
| 976 |
\begin{verbatim} sNx=60, \end{verbatim} this line sets |
| 977 |
the lateral domain extent in grid points for the |
| 978 |
axis aligned with the x-coordinate. |
| 979 |
|
| 980 |
\item Line 40, |
| 981 |
\begin{verbatim} sNy=60, \end{verbatim} this line sets |
| 982 |
the lateral domain extent in grid points for the |
| 983 |
axis aligned with the y-coordinate. |
| 984 |
|
| 985 |
\item Line 49, |
| 986 |
\begin{verbatim} Nr=4, \end{verbatim} this line sets |
| 987 |
the vertical domain extent in grid points. |
| 988 |
|
| 989 |
\end{itemize} |
| 990 |
|
| 991 |
\begin{small} |
| 992 |
\include{part3/case_studies/fourlayer_gyre/code/SIZE.h} |
| 993 |
\end{small} |
| 994 |
|
| 995 |
\subsubsection{File {\it code/CPP\_OPTIONS.h}} |
| 996 |
|
| 997 |
This file uses standard default values and does not contain |
| 998 |
customisations for this experiment. |
| 999 |
|
| 1000 |
|
| 1001 |
\subsubsection{File {\it code/CPP\_EEOPTIONS.h}} |
| 1002 |
|
| 1003 |
This file uses standard default values and does not contain |
| 1004 |
customisations for this experiment. |
| 1005 |
|
| 1006 |
\subsubsection{Other Files } |
| 1007 |
|
| 1008 |
Other files relevant to this experiment are |
| 1009 |
\begin{itemize} |
| 1010 |
\item {\it model/src/ini\_cori.F}. This file initializes the model |
| 1011 |
coriolis variables {\bf fCorU} and {\bf fCorV}. |
| 1012 |
\item {\it model/src/ini\_spherical\_polar\_grid.F} This file |
| 1013 |
initializes the model grid discretisation variables {\bf |
| 1014 |
dxF, dyF, dxG, dyG, dxC, dyC}. |
| 1015 |
\item {\it model/src/ini\_parms.F}. |
| 1016 |
\end{itemize} |
| 1017 |
|
| 1018 |
\subsection{Running The Example} |
| 1019 |
\label{SEC:running_the_example} |
| 1020 |
|
| 1021 |
\subsubsection{Code Download} |
| 1022 |
|
| 1023 |
In order to run the examples you must first download the code distribution. |
| 1024 |
Instructions for downloading the code can be found in the Getting Started |
| 1025 |
Guide \cite{MITgcm_Getting_Started}. |
| 1026 |
|
| 1027 |
\subsubsection{Experiment Location} |
| 1028 |
|
| 1029 |
This example experiments is located under the release sub-directory |
| 1030 |
|
| 1031 |
\vspace{5mm} |
| 1032 |
{\it verification/exp1/ } |
| 1033 |
|
| 1034 |
\subsubsection{Running the Experiment} |
| 1035 |
|
| 1036 |
To run the experiment |
| 1037 |
|
| 1038 |
\begin{enumerate} |
| 1039 |
\item Set the current directory to {\it input/ } |
| 1040 |
|
| 1041 |
\begin{verbatim} |
| 1042 |
% cd input |
| 1043 |
\end{verbatim} |
| 1044 |
|
| 1045 |
\item Verify that current directory is now correct |
| 1046 |
|
| 1047 |
\begin{verbatim} |
| 1048 |
% pwd |
| 1049 |
\end{verbatim} |
| 1050 |
|
| 1051 |
You shold see a response on the screen ending in |
| 1052 |
|
| 1053 |
{\it verification/exp1/input } |
| 1054 |
|
| 1055 |
|
| 1056 |
\item Run the genmake script to create the experiment {\it Makefile} |
| 1057 |
|
| 1058 |
\begin{verbatim} |
| 1059 |
% ../../../tools/genmake -mods=../code |
| 1060 |
\end{verbatim} |
| 1061 |
|
| 1062 |
\item Create a list of header file dependencies in {\it Makefile} |
| 1063 |
|
| 1064 |
\begin{verbatim} |
| 1065 |
% make depend |
| 1066 |
\end{verbatim} |
| 1067 |
|
| 1068 |
\item Build the executable file. |
| 1069 |
|
| 1070 |
\begin{verbatim} |
| 1071 |
% make |
| 1072 |
\end{verbatim} |
| 1073 |
|
| 1074 |
\item Run the {\it mitgcmuv} executable |
| 1075 |
|
| 1076 |
\begin{verbatim} |
| 1077 |
% ./mitgcmuv |
| 1078 |
\end{verbatim} |
| 1079 |
|
| 1080 |
\end{enumerate} |
| 1081 |
|
| 1082 |
|