2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
\section{Example: Four layer Baroclinic Ocean Gyre In Spherical Coordinates} |
\section{Example: Four layer Baroclinic Ocean Gyre In Spherical Coordinates} |
5 |
\label{sec:eg-fourlayer} |
\label{sect:eg-fourlayer} |
6 |
|
|
7 |
\bodytext{bgcolor="#FFFFFFFF"} |
\bodytext{bgcolor="#FFFFFFFF"} |
8 |
|
|
19 |
This document describes an example experiment using MITgcm |
This document describes an example experiment using MITgcm |
20 |
to simulate a baroclinic ocean gyre in spherical |
to simulate a baroclinic ocean gyre in spherical |
21 |
polar coordinates. The barotropic |
polar coordinates. The barotropic |
22 |
example experiment in section \ref{sec:eg-baro} |
example experiment in section \ref{sect:eg-baro} |
23 |
ilustrated how to configure the code for a single layer |
illustrated how to configure the code for a single layer |
24 |
simulation in a cartesian grid. In this example a similar physical problem |
simulation in a Cartesian grid. In this example a similar physical problem |
25 |
is simulated, but the code is now configured |
is simulated, but the code is now configured |
26 |
for four layers and in a spherical polar coordinate system. |
for four layers and in a spherical polar coordinate system. |
27 |
|
|
29 |
|
|
30 |
This example experiment demonstrates using the MITgcm to simulate |
This example experiment demonstrates using the MITgcm to simulate |
31 |
a baroclinic, wind-forced, ocean gyre circulation. The experiment |
a baroclinic, wind-forced, ocean gyre circulation. The experiment |
32 |
is a numerical rendition of the gyre circulation problem simliar |
is a numerical rendition of the gyre circulation problem similar |
33 |
to the problems described analytically by Stommel in 1966 |
to the problems described analytically by Stommel in 1966 |
34 |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
\cite{Stommel66} and numerically in Holland et. al \cite{Holland75}. |
35 |
\\ |
\\ |
37 |
In this experiment the model is configured to represent a mid-latitude |
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 |
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 |
lateral extent. The fluid is $2$~km deep and is forced |
40 |
by a constant in time zonal wind stress, $\tau_x$, that varies sinusoidally |
by a constant in time zonal wind stress, $\tau_{\lambda}$, that varies |
41 |
in the north-south direction. Topologically the simulated |
sinusoidally in the north-south direction. Topologically the simulated |
42 |
domain is a sector on a sphere and the coriolis parameter, $f$, is defined |
domain is a sector on a sphere and the coriolis parameter, $f$, is defined |
43 |
according to latitude, $\varphi$ |
according to latitude, $\varphi$ |
44 |
|
|
54 |
|
|
55 |
\begin{equation} |
\begin{equation} |
56 |
\label{EQ:taux} |
\label{EQ:taux} |
57 |
\tau_x(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}}) |
\tau_{\lambda}(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}}) |
58 |
\end{equation} |
\end{equation} |
59 |
|
|
60 |
\noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and |
\noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and |
62 |
\\ |
\\ |
63 |
|
|
64 |
Figure \ref{FIG:simulation_config} |
Figure \ref{FIG:simulation_config} |
65 |
summarises the configuration simulated. |
summarizes the configuration simulated. |
66 |
In contrast to the example in section \ref{sec:eg-baro}, the |
In contrast to the example in section \ref{sect:eg-baro}, the |
67 |
current experiment simulates a spherical polar domain. However, as indicated |
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 |
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 |
in a locally orthogonal coordinate $(x,y,z)$. For this experiment description |
70 |
of this document the local orthogonal model coordinate $(x,y,z)$ is synonomous |
the local orthogonal model coordinate $(x,y,z)$ is synonymous |
71 |
with the spherical polar coordinate shown in figure |
with the coordinates $(\lambda,\varphi,r)$ shown in figure |
72 |
\ref{fig:spherical-polar-coord} |
\ref{fig:spherical-polar-coord} |
73 |
\\ |
\\ |
74 |
|
|
95 |
|
|
96 |
\noindent with $\rho_{0}=999.8\,{\rm kg\,m}^{-3}$ and |
\noindent with $\rho_{0}=999.8\,{\rm kg\,m}^{-3}$ and |
97 |
$\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in |
$\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in |
98 |
this configuration the model state variable {\bf theta} is synonomous with |
this configuration the model state variable {\bf theta} is equivalent to |
99 |
either in-situ temperature, $T$, or potential temperature, $\theta$. For |
either in-situ temperature, $T$, or potential temperature, $\theta$. For |
100 |
consistency with later examples, in which the equation of state is |
consistency with later examples, in which the equation of state is |
101 |
non-linear, we use $\theta$ to represent temperature here. This is |
non-linear, we use $\theta$ to represent temperature here. This is |
110 |
\caption{Schematic of simulation domain and wind-stress forcing function |
\caption{Schematic of simulation domain and wind-stress forcing function |
111 |
for the four-layer gyre numerical experiment. The domain is enclosed by solid |
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. |
walls at $0^{\circ}$~E, $60^{\circ}$~E, $0^{\circ}$~N and $60^{\circ}$~N. |
113 |
In the four-layer case an initial temperature stratification is |
An initial stratification is |
114 |
imposed by setting the potential temperature, $\theta$, in each layer. |
imposed by setting the potential temperature, $\theta$, in each layer. |
115 |
The vertical spacing, $\Delta z$, is constant and equal to $500$m. |
The vertical spacing, $\Delta z$, is constant and equal to $500$m. |
116 |
} |
} |
118 |
\end{figure} |
\end{figure} |
119 |
|
|
120 |
\subsection{Equations solved} |
\subsection{Equations solved} |
121 |
|
For this problem |
122 |
The implicit free surface form of the |
the implicit free surface, {\bf HPE} (see section \ref{sect:hydrostatic_and_quasi-hydrostatic_forms}) form of the |
123 |
pressure equation described in Marshall et. al \cite{Marshall97a} is |
equations described in Marshall et. al \cite{marshall:97a} are |
124 |
employed. |
employed. The flow is three-dimensional with just temperature, $\theta$, as |
125 |
A horizontal laplacian operator $\nabla_{h}^2$ provides viscous |
an active tracer. The equation of state is linear. |
126 |
dissipation. The wind-stress momentum input is added to the momentum equation |
A horizontal Laplacian operator $\nabla_{h}^2$ provides viscous |
127 |
for the ``zonal flow'', $u$. Other terms in the model |
dissipation and provides a diffusive sub-grid scale closure for the |
128 |
are explicitly switched off for this experiement configuration (see section |
temperature equation. A wind-stress momentum forcing is added to the momentum |
129 |
\ref{SEC:code_config} ). This yields an active set of equations in |
equation for the zonal flow, $u$. Other terms in the model |
130 |
|
are explicitly switched off for this experiment 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 |
solved in this configuration, written in spherical polar coordinates as |
133 |
follows |
follows |
134 |
|
|
135 |
\begin{eqnarray} |
\begin{eqnarray} |
136 |
\label{EQ:model_equations} |
\label{EQ:model_equations} |
137 |
\frac{Du}{Dt} - fv + |
\frac{Du}{Dt} - fv + |
138 |
\frac{1}{\rho}\frac{\partial p^{'}}{\partial \lambda} - |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} - |
139 |
A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} |
A_{h}\nabla_{h}^2u - A_{z}\frac{\partial^{2}u}{\partial z^{2}} |
140 |
& = & |
& = & |
141 |
\cal{F} |
\cal{F}_{\lambda} |
142 |
\\ |
\\ |
143 |
\frac{Dv}{Dt} + fu + |
\frac{Dv}{Dt} + fu + |
144 |
\frac{1}{\rho}\frac{\partial p^{'}}{\partial \varphi} - |
\frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \varphi} - |
145 |
A_{h}\nabla_{h}^2v - A_{z}\frac{\partial^{2}v}{\partial z^{2}} |
A_{h}\nabla_{h}^2v - A_{z}\frac{\partial^{2}v}{\partial z^{2}} |
146 |
& = & |
& = & |
147 |
0 |
0 |
148 |
\\ |
\\ |
149 |
\frac{\partial \eta}{\partial t} + \frac{\partial H \hat{u}}{\partial \lambda} + |
\frac{\partial \eta}{\partial t} + \frac{\partial H \widehat{u}}{\partial \lambda} + |
150 |
\frac{\partial H \hat{v}}{\partial \varphi} |
\frac{\partial H \widehat{v}}{\partial \varphi} |
151 |
&=& |
&=& |
152 |
0 |
0 |
153 |
|
\label{eq:fourl_example_continuity} |
154 |
\\ |
\\ |
155 |
\frac{D\theta}{Dt} - |
\frac{D\theta}{Dt} - |
156 |
K_{h}\nabla_{h}^2\theta - K_{z}\frac{\partial^{2}\theta}{\partial z^{2}} |
K_{h}\nabla_{h}^2\theta - K_{z}\frac{\partial^{2}\theta}{\partial z^{2}} |
157 |
& = & |
& = & |
158 |
0 |
0 |
159 |
|
\label{eq:eg_fourl_theta} |
160 |
\\ |
\\ |
161 |
p^{'} & = & |
p^{\prime} & = & |
162 |
g\rho_{0} \eta + \int^{0}_{-z}\rho^{'} dz |
g\rho_{0} \eta + \int^{0}_{-z}\rho^{\prime} dz |
163 |
\\ |
\\ |
164 |
\rho^{'} & = &- \alpha_{\theta}\rho_{0}\theta^{'} |
\rho^{\prime} & = &- \alpha_{\theta}\rho_{0}\theta^{\prime} |
165 |
\\ |
\\ |
166 |
{\cal F} |_{s} & = & \frac{\tau_{x}}{\rho_{0}\Delta z_{s}} |
{\cal F}_{\lambda} |_{s} & = & \frac{\tau_{\lambda}}{\rho_{0}\Delta z_{s}} |
167 |
\\ |
\\ |
168 |
{\cal F} |_{i} & = & 0 |
{\cal F}_{\lambda} |_{i} & = & 0 |
169 |
\end{eqnarray} |
\end{eqnarray} |
170 |
|
|
171 |
\noindent where $u$ and $v$ are the components of the horizontal |
\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}$). |
flow vector $\vec{u}$ on the sphere ($u=\dot{\lambda},v=\dot{\varphi}$). |
173 |
The suffices ${s},{i}$ indicate surface and interior of the domain. |
The terms $H\widehat{u}$ and $H\widehat{v}$ are the components of the vertical |
174 |
The forcing $\cal F$ is only applied at the surface. |
integral term given in equation \ref{eq:free-surface} and |
175 |
The pressure field $p^{'}$ is separated into a barotropic part |
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 |
due to variations in sea-surface height, $\eta$, and a hydrostatic |
185 |
part due to variations in density, $\rho^{'}$, over the water column. |
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} |
\subsection{Discrete Numerical Configuration} |
205 |
|
|
206 |
The model is configured in hydrostatic form. The domain is discretised with |
The domain is discretised with |
207 |
a uniform grid spacing in latitude and longitude |
a uniform grid spacing in latitude and longitude |
208 |
$\Delta \lambda=\Delta \varphi=1^{\circ}$, so |
$\Delta \lambda=\Delta \varphi=1^{\circ}$, so |
209 |
that there are sixty grid cells in the zonal and meridional directions. |
that there are sixty grid cells in the zonal and meridional directions. |
210 |
Vertically the |
Vertically the |
211 |
model is configured with a four layers with constant depth, |
model is configured with four layers with constant depth, |
212 |
$\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate |
$\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate |
213 |
variables $x$ and $y$ are initialised from the values of |
variables $x$ and $y$ are initialized from the values of |
214 |
$\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in |
$\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in |
215 |
radians according to |
radians according to |
216 |
|
|
221 |
|
|
222 |
The procedure for generating a set of internal grid variables from a |
The procedure for generating a set of internal grid variables from a |
223 |
spherical polar grid specification is discussed in section |
spherical polar grid specification is discussed in section |
224 |
\ref{sec:spatial_discrete_horizontal_grid}. |
\ref{sect:spatial_discrete_horizontal_grid}. |
225 |
|
|
226 |
\noindent\fbox{ \begin{minipage}{5.5in} |
\noindent\fbox{ \begin{minipage}{5.5in} |
227 |
{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em |
{\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em |
242 |
|
|
243 |
|
|
244 |
|
|
245 |
As described in \ref{sec:tracer_equations}, the time evolution of potential |
As described in \ref{sect:tracer_equations}, the time evolution of potential |
246 |
temperature, |
temperature, |
247 |
$\theta$, equation is solved prognostically. |
$\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{sect: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{sect:flux-form_momentum_eqautions}. |
254 |
The pressure forces that drive the fluid motions, ( |
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 |
$\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. |
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{sect:finding_the_pressure_field}. |
262 |
|
|
263 |
\subsubsection{Numerical Stability Criteria} |
\subsubsection{Numerical Stability Criteria} |
264 |
|
|
265 |
The laplacian dissipation coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
The Laplacian viscosity coefficient, $A_{h}$, is set to $400 m s^{-1}$. |
266 |
This value is chosen to yield a Munk layer width \cite{Adcroft_thesis}, |
This value is chosen to yield a Munk layer width, |
267 |
|
|
268 |
\begin{eqnarray} |
\begin{eqnarray} |
269 |
\label{EQ:munk_layer} |
\label{EQ:munk_layer} |
271 |
\end{eqnarray} |
\end{eqnarray} |
272 |
|
|
273 |
\noindent of $\approx 100$km. This is greater than the model |
\noindent of $\approx 100$km. This is greater than the model |
274 |
resolution in mid-latitudes $\Delta x$, ensuring that the frictional |
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. |
boundary layer is well resolved. |
278 |
\\ |
\\ |
279 |
|
|
280 |
\noindent The model is stepped forward with a |
\noindent The model is stepped forward with a |
281 |
time step $\delta t=1200$secs. With this time step the stability |
time step $\delta t=1200$secs. With this time step the stability |
282 |
parameter to the horizontal laplacian friction \cite{Adcroft_thesis} |
parameter to the horizontal Laplacian friction |
283 |
|
|
284 |
\begin{eqnarray} |
\begin{eqnarray} |
285 |
\label{EQ:laplacian_stability} |
\label{EQ:laplacian_stability} |
287 |
\end{eqnarray} |
\end{eqnarray} |
288 |
|
|
289 |
\noindent evaluates to 0.012, which is well below the 0.3 upper limit |
\noindent evaluates to 0.012, which is well below the 0.3 upper limit |
290 |
for stability. |
for stability for this term under ABII time-stepping. |
291 |
\\ |
\\ |
292 |
|
|
293 |
\noindent The vertical dissipation coefficient, $A_{z}$, is set to |
\noindent The vertical dissipation coefficient, $A_{z}$, is set to |
305 |
\\ |
\\ |
306 |
|
|
307 |
\noindent The numerical stability for inertial oscillations |
\noindent The numerical stability for inertial oscillations |
|
\cite{Adcroft_thesis} |
|
308 |
|
|
309 |
\begin{eqnarray} |
\begin{eqnarray} |
310 |
\label{EQ:inertial_stability} |
\label{EQ:inertial_stability} |
315 |
limit for stability. |
limit for stability. |
316 |
\\ |
\\ |
317 |
|
|
318 |
\noindent The advective CFL \cite{Adcroft_thesis} for a extreme maximum |
\noindent The advective CFL for a extreme maximum |
319 |
horizontal flow |
horizontal flow |
320 |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
speed of $ | \vec{u} | = 2 ms^{-1}$ |
321 |
|
|
322 |
\begin{eqnarray} |
\begin{eqnarray} |
323 |
\label{EQ:cfl_stability} |
\label{EQ:cfl_stability} |
324 |
S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
C_{a} = \frac{| \vec{u} | \delta t}{ \Delta x} |
325 |
\end{eqnarray} |
\end{eqnarray} |
326 |
|
|
327 |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the stability |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the stability |
328 |
limit of 0.5. |
limit of 0.5. |
329 |
\\ |
\\ |
330 |
|
|
331 |
\noindent The stability parameter for internal gravity waves |
\noindent The stability parameter for internal gravity waves |
332 |
\cite{Adcroft_thesis} |
propagating at $2~{\rm m}~{\rm s}^{-1}$ |
333 |
|
|
334 |
\begin{eqnarray} |
\begin{eqnarray} |
335 |
\label{EQ:igw_stability} |
\label{EQ:igw_stability} |
336 |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
S_{c} = \frac{c_{g} \delta t}{ \Delta x} |
337 |
\end{eqnarray} |
\end{eqnarray} |
338 |
|
|
339 |
\noindent evaluates to $5 \times 10^{-2}$. This is well below the linear |
\noindent evaluates to $\approx 5 \times 10^{-2}$. This is well below the linear |
340 |
stability limit of 0.25. |
stability limit of 0.25. |
341 |
|
|
342 |
\subsection{Code Configuration} |
\subsection{Code Configuration} |
343 |
\label{SEC:code_config} |
\label{SEC:eg_fourl_code_config} |
344 |
|
|
345 |
The model configuration for this experiment resides under the |
The model configuration for this experiment resides under the |
346 |
directory {\it verification/exp1/}. The experiment files |
directory {\it verification/exp2/}. The experiment files |
347 |
\begin{itemize} |
\begin{itemize} |
348 |
\item {\it input/data} |
\item {\it input/data} |
349 |
\item {\it input/data.pkg} |
\item {\it input/data.pkg} |
355 |
\item {\it code/SIZE.h}. |
\item {\it code/SIZE.h}. |
356 |
\end{itemize} |
\end{itemize} |
357 |
contain the code customisations and parameter settings for this |
contain the code customisations and parameter settings for this |
358 |
experiements. Below we describe the customisations |
experiments. Below we describe the customisations |
359 |
to these files associated with this experiment. |
to these files associated with this experiment. |
360 |
|
|
361 |
\subsubsection{File {\it input/data}} |
\subsubsection{File {\it input/data}} |
372 |
the initial and reference values of potential temperature at each model |
the initial and reference values of potential temperature at each model |
373 |
level in units of $^{\circ}$C. |
level in units of $^{\circ}$C. |
374 |
The entries are ordered from surface to depth. For each |
The entries are ordered from surface to depth. For each |
375 |
depth level the inital and reference profiles will be uniform in |
depth level the initial and reference profiles will be uniform in |
376 |
$x$ and $y$. The values specified here are read into the |
$x$ and $y$. The values specified here are read into the |
377 |
variable |
variable |
378 |
{\bf |
{\bf |
418 |
|
|
419 |
\item Line 6, |
\item Line 6, |
420 |
\begin{verbatim} viscAz=1.E-2, \end{verbatim} |
\begin{verbatim} viscAz=1.E-2, \end{verbatim} |
421 |
this line sets the vertical laplacian dissipation coefficient to |
this line sets the vertical Laplacian dissipation coefficient to |
422 |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
$1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions |
423 |
for this operator are specified later. |
for this operator are specified later. |
424 |
The variable |
The variable |
438 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml} |
439 |
viscAr |
viscAr |
440 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
441 |
}. |
}. At each time step, the viscous term contribution to the momentum equations |
442 |
|
is calculated in routine |
443 |
|
{\it S/R CALC\_DIFFUSIVITY}. |
444 |
|
|
445 |
\fbox{ |
\fbox{ |
446 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
471 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
472 |
INI\_PARMS |
INI\_PARMS |
473 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
474 |
}. |
} and applied in routines {\it CALC\_MOM\_RHS} and {\it CALC\_GW}. |
475 |
|
|
476 |
\fbox{ |
\fbox{ |
477 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
514 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
515 |
INI\_PARMS |
INI\_PARMS |
516 |
\begin{rawhtml} </A>\end{rawhtml} |
\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{ |
\fbox{ |
547 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
548 |
INI\_PARMS |
INI\_PARMS |
549 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
550 |
}. |
} and is applied in the routine {\it S/R CALC\_MOM\_RHS}. |
551 |
|
|
552 |
\fbox{ |
\fbox{ |
553 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
579 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
580 |
INI\_PARMS |
INI\_PARMS |
581 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
582 |
}. |
} and used in routine {\it S/R CALC\_GT}. |
583 |
|
|
584 |
\fbox{ \begin{minipage}{5.0in} |
\fbox{ \begin{minipage}{5.0in} |
585 |
{\it S/R CALC\_GT}({\it calc\_gt.F}) |
{\it S/R CALC\_GT}({\it calc\_gt.F}) |
615 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml} |
616 |
diffKrT |
diffKrT |
617 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
618 |
}. |
} which is used in routine {\it S/R CALC\_DIFFUSIVITY}. |
619 |
|
|
620 |
\fbox{ \begin{minipage}{5.0in} |
\fbox{ \begin{minipage}{5.0in} |
621 |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F}) |
646 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
647 |
INI\_PARMS |
INI\_PARMS |
648 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
649 |
}. |
}. The routine {\it S/R FIND\_RHO} makes use of {\bf tAlpha}. |
650 |
|
|
651 |
\fbox{ |
\fbox{ |
652 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
675 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
676 |
INI\_PARMS |
INI\_PARMS |
677 |
\begin{rawhtml} </A>\end{rawhtml} |
\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{ |
\fbox{ |
682 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
697 |
\end{verbatim} |
\end{verbatim} |
698 |
This line requests that the simulation be performed in a |
This line requests that the simulation be performed in a |
699 |
spherical polar coordinate system. It affects the interpretation of |
spherical polar coordinate system. It affects the interpretation of |
700 |
grid inoput parameters, for exampl {\bf delX} and {\bf delY} and |
grid input parameters, for example {\bf delX} and {\bf delY} and |
701 |
causes the grid generation routines to initialise an internal grid based |
causes the grid generation routines to initialize an internal grid based |
702 |
on spherical polar geometry. |
on spherical polar geometry. |
703 |
The variable |
The variable |
704 |
{\bf |
{\bf |
711 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
712 |
INI\_PARMS |
INI\_PARMS |
713 |
\begin{rawhtml} </A>\end{rawhtml} |
\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{ |
\fbox{ |
719 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
733 |
This line sets the southern boundary of the modeled |
This line sets the southern boundary of the modeled |
734 |
domain to $0^{\circ}$ latitude. This value affects both the |
domain to $0^{\circ}$ latitude. This value affects both the |
735 |
generation of the locally orthogonal grid that the model |
generation of the locally orthogonal grid that the model |
736 |
uses internally and affects the initialisation of the coriolis force. |
uses internally and affects the initialization of the coriolis force. |
737 |
Note - it is not required to set |
Note - it is not required to set |
738 |
a longitude boundary, since the absolute longitude does |
a longitude boundary, since the absolute longitude does |
739 |
not alter the kernel equation discretisation. |
not alter the kernel equation discretisation. |
748 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
749 |
INI\_PARMS |
INI\_PARMS |
750 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
751 |
}. |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
752 |
|
|
753 |
\fbox{ |
\fbox{ |
754 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
778 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
779 |
INI\_PARMS |
INI\_PARMS |
780 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
781 |
}. |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
782 |
|
|
783 |
\fbox{ |
\fbox{ |
784 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
808 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
809 |
INI\_PARMS |
INI\_PARMS |
810 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
811 |
}. |
} and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}. |
812 |
|
|
813 |
\fbox{ |
\fbox{ |
814 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
846 |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Y.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/names/10Y.htm> \end{rawhtml} |
847 |
delR |
delR |
848 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
849 |
}. |
} which is used in routine {\it INI\_VERTICAL\_GRID}. |
850 |
|
|
851 |
\fbox{ |
\fbox{ |
852 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
885 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
886 |
INI\_PARMS |
INI\_PARMS |
887 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
888 |
}. |
}. The bathymetry file is read in the routine {\it INI\_DEPTHS}. |
889 |
|
|
890 |
\fbox{ |
\fbox{ |
891 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
904 |
zonalWindFile='windx.sin_y' |
zonalWindFile='windx.sin_y' |
905 |
\end{verbatim} |
\end{verbatim} |
906 |
This line specifies the name of the file from which the x-direction |
This line specifies the name of the file from which the x-direction |
907 |
surface wind stress is read. This file is also a two-dimensional |
(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 |
($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 |
bathymetry file. The matlab program {\it input/gendata.m} includes example |
910 |
code to generate a valid |
code to generate a valid |
921 |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
\begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml} |
922 |
INI\_PARMS |
INI\_PARMS |
923 |
\begin{rawhtml} </A>\end{rawhtml} |
\begin{rawhtml} </A>\end{rawhtml} |
924 |
}. |
}. The wind-stress file is read in the routine |
925 |
|
{\it EXTERNAL\_FIELDS\_LOAD}. |
926 |
|
|
927 |
\fbox{ |
\fbox{ |
928 |
\begin{minipage}{5.0in} |
\begin{minipage}{5.0in} |
937 |
|
|
938 |
\end{itemize} |
\end{itemize} |
939 |
|
|
940 |
\noindent other lines in the file {\it input/data} are standard values |
\noindent other lines in the file {\it input/data} are standard values. |
|
that are described in the MITgcm Getting Started and MITgcm Parameters |
|
|
notes. |
|
941 |
|
|
942 |
\begin{rawhtml}<PRE>\end{rawhtml} |
\begin{rawhtml}<PRE>\end{rawhtml} |
943 |
\begin{small} |
\begin{small} |
958 |
\subsubsection{File {\it input/windx.sin\_y}} |
\subsubsection{File {\it input/windx.sin\_y}} |
959 |
|
|
960 |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
The {\it input/windx.sin\_y} file specifies a two-dimensional ($x,y$) |
961 |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$. |
map of wind stress ,$\tau_{x}$, values. The units used are $Nm^{-2}$ (the |
962 |
Although $\tau_{x}$ is only a function of $y$n in this experiment |
default for MITgcm). |
963 |
|
Although $\tau_{x}$ is only a function of latitude, $y$, |
964 |
|
in this experiment |
965 |
this file must still define a complete two-dimensional map in order |
this file must still define a complete two-dimensional map in order |
966 |
to be compatible with the standard code for loading forcing fields |
to be compatible with the standard code for loading forcing fields |
967 |
in MITgcm. The included matlab program {\it input/gendata.m} gives a complete |
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. |
code for creating the {\it input/windx.sin\_y} file. |
970 |
|
|
971 |
\subsubsection{File {\it input/topog.box}} |
\subsubsection{File {\it input/topog.box}} |
973 |
|
|
974 |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
The {\it input/topog.box} file specifies a two-dimensional ($x,y$) |
975 |
map of depth values. For this experiment values are either |
map of depth values. For this experiment values are either |
976 |
$0m$ or $-2000\,{\rm m}$, corresponding respectively to a wall or to deep |
$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 |
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. |
in the same way as standard MITgcm two-dimensional, horizontal arrays. |
979 |
The included matlab program {\it input/gendata.m} gives a complete |
The included matlab program {\it input/gendata.m} gives a complete |
1034 |
\subsubsection{Code Download} |
\subsubsection{Code Download} |
1035 |
|
|
1036 |
In order to run the examples you must first download the code distribution. |
In order to run the examples you must first download the code distribution. |
1037 |
Instructions for downloading the code can be found in the Getting Started |
Instructions for downloading the code can be found in section |
1038 |
Guide \cite{MITgcm_Getting_Started}. |
\ref{sect:obtainingCode}. |
1039 |
|
|
1040 |
\subsubsection{Experiment Location} |
\subsubsection{Experiment Location} |
1041 |
|
|
1042 |
This example experiments is located under the release sub-directory |
This example experiments is located under the release sub-directory |
1043 |
|
|
1044 |
\vspace{5mm} |
\vspace{5mm} |
1045 |
{\it verification/exp1/ } |
{\it verification/exp2/ } |
1046 |
|
|
1047 |
\subsubsection{Running the Experiment} |
\subsubsection{Running the Experiment} |
1048 |
|
|
1061 |
% pwd |
% pwd |
1062 |
\end{verbatim} |
\end{verbatim} |
1063 |
|
|
1064 |
You shold see a response on the screen ending in |
You should see a response on the screen ending in |
1065 |
|
|
1066 |
{\it verification/exp1/input } |
{\it verification/exp2/input } |
1067 |
|
|
1068 |
|
|
1069 |
\item Run the genmake script to create the experiment {\it Makefile} |
\item Run the genmake script to create the experiment {\it Makefile} |