/[MITgcm]/manual/s_examples/baroclinic_gyre/fourlayer.tex
ViewVC logotype

Diff of /manual/s_examples/baroclinic_gyre/fourlayer.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by cnh, Wed Oct 24 15:21:27 2001 UTC revision 1.15 by edhill, Thu Aug 7 18:27:52 2003 UTC
# Line 1  Line 1 
1  % $Header$  % $Header$
2  % $Name$  % $Name$
3    
4  \section{Example: Four layer Baroclinic Ocean Gyre In Spherical Coordinates}  \section{Four Layer Baroclinic Ocean Gyre In Spherical Coordinates}
5  \label{sec:eg-fourlayer}  \label{www:tutorials}
6    \label{sect:eg-fourlayer}
7    
8  \bodytext{bgcolor="#FFFFFFFF"}  \bodytext{bgcolor="#FFFFFFFF"}
9    
# Line 19  Line 20 
20  This document describes an example experiment using MITgcm  This document describes an example experiment using MITgcm
21  to simulate a baroclinic ocean gyre in spherical  to simulate a baroclinic ocean gyre in spherical
22  polar coordinates. The barotropic  polar coordinates. The barotropic
23  example experiment in section \ref{sec:eg-baro}  example experiment in section \ref{sect:eg-baro}
24  ilustrated how to configure the code for a single layer  illustrated how to configure the code for a single layer
25  simulation in a cartesian grid. In this example a similar physical problem  simulation in a Cartesian grid. In this example a similar physical problem
26  is simulated, but the code is now configured  is simulated, but the code is now configured
27  for four layers and in a spherical polar coordinate system.  for four layers and in a spherical polar coordinate system.
28    
29  \subsection{Overview}  \subsection{Overview}
30    \label{www:tutorials}
31    
32  This example experiment demonstrates using the MITgcm to simulate  This example experiment demonstrates using the MITgcm to simulate
33  a baroclinic, wind-forced, ocean gyre circulation. The experiment  a baroclinic, wind-forced, ocean gyre circulation. The experiment
34  is a numerical rendition of the gyre circulation problem simliar  is a numerical rendition of the gyre circulation problem similar
35  to the problems described analytically by Stommel in 1966  to the problems described analytically by Stommel in 1966
36  \cite{Stommel66} and numerically in Holland et. al \cite{Holland75}.  \cite{Stommel66} and numerically in Holland et. al \cite{Holland75}.
37  \\  \\
# Line 37  to the problems described analytically b Line 39  to the problems described analytically b
39  In this experiment the model is configured to represent a mid-latitude  In this experiment the model is configured to represent a mid-latitude
40  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
41  lateral extent. The fluid is $2$~km deep and is forced  lateral extent. The fluid is $2$~km deep and is forced
42  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
43  in the north-south direction. Topologically the simulated  sinusoidally in the north-south direction. Topologically the simulated
44  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
45  according to latitude, $\varphi$  according to latitude, $\varphi$
46    
47  \begin{equation}  \begin{equation}
48  \label{EQ:fcori}  \label{EQ:eg-fourlayer-fcori}
49  f(\varphi) = 2 \Omega \sin( \varphi )  f(\varphi) = 2 \Omega \sin( \varphi )
50  \end{equation}  \end{equation}
51    
# Line 54  f(\varphi) = 2 \Omega \sin( \varphi ) Line 56  f(\varphi) = 2 \Omega \sin( \varphi )
56    
57  \begin{equation}  \begin{equation}
58  \label{EQ:taux}  \label{EQ:taux}
59  \tau_x(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}})  \tau_{\lambda}(\varphi) = \tau_{0}\sin(\pi \frac{\varphi}{L_{\varphi}})
60  \end{equation}  \end{equation}
61    
62  \noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and  \noindent where $L_{\varphi}$ is the lateral domain extent ($60^{\circ}$) and
63  $\tau_0$ is set to $0.1N m^{-2}$.  $\tau_0$ is set to $0.1N m^{-2}$.
64  \\  \\
65    
66  Figure \ref{FIG:simulation_config}  Figure \ref{FIG:eg-fourlayer-simulation_config}
67  summarises the configuration simulated.  summarizes the configuration simulated.
68  In contrast to the example in section \ref{sec:eg-baro}, the  In contrast to the example in section \ref{sect:eg-baro}, the
69  current experiment simulates a spherical polar domain. However, as indicated  current experiment simulates a spherical polar domain. As indicated
70  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
71  in a locally orthoganal coordinate $(x,y,z)$. For this experiment description  in a locally orthogonal coordinate $(x,y,z)$. For this experiment description
72  of this document the local orthogonal model coordinate $(x,y,z)$ is synonomous  the local orthogonal model coordinate $(x,y,z)$ is synonymous
73  with the spherical polar coordinate shown in figure  with the coordinates $(\lambda,\varphi,r)$ shown in figure
74  \ref{fig:spherical-polar-coord}  \ref{fig:spherical-polar-coord}
75  \\  \\
76    
# Line 82  $\theta_{1750}=6^{\circ}$~C. The equatio Line 84  $\theta_{1750}=6^{\circ}$~C. The equatio
84  linear  linear
85    
86  \begin{equation}  \begin{equation}
87  \label{EQ:linear1_eos}  \label{EQ:eg-fourlayer-linear1_eos}
88  \rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} )  \rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} )
89  \end{equation}  \end{equation}
90    
91  \noindent which is implemented in the model as a density anomaly equation  \noindent which is implemented in the model as a density anomaly equation
92    
93  \begin{equation}  \begin{equation}
94  \label{EQ:linear1_eos_pert}  \label{EQ:eg-fourlayer-linear1_eos_pert}
95  \rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'}  \rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'}
96  \end{equation}  \end{equation}
97    
98  \noindent with $\rho_{0}=999.8\,{\rm kg\,m}^{-3}$ and  \noindent with $\rho_{0}=999.8\,{\rm kg\,m}^{-3}$ and
99  $\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in  $\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in
100  this configuration the model state variable {\bf theta} is synonomous with  this configuration the model state variable {\bf theta} is equivalent to
101  either in-situ temperature, $T$, or potential temperature, $\theta$. For  either in-situ temperature, $T$, or potential temperature, $\theta$. For
102  consistency with later examples, in which the equation of state is  consistency with later examples, in which the equation of state is
103  non-linear, we use $\theta$ to represent temperature here. This is  non-linear, we use $\theta$ to represent temperature here. This is
# Line 110  the quantity that is carried in the mode Line 112  the quantity that is carried in the mode
112  \caption{Schematic of simulation domain and wind-stress forcing function  \caption{Schematic of simulation domain and wind-stress forcing function
113  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
114  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.
115  In the four-layer case an initial temperature stratification is  An initial stratification is
116  imposed by setting the potential temperature, $\theta$, in each layer.  imposed by setting the potential temperature, $\theta$, in each layer.
117  The vertical spacing, $\Delta z$, is constant and equal to $500$m.  The vertical spacing, $\Delta z$, is constant and equal to $500$m.
118  }  }
119  \label{FIG:simulation_config}  \label{FIG:eg-fourlayer-simulation_config}
120  \end{figure}  \end{figure}
121    
122  \subsection{Equations solved}  \subsection{Equations solved}
123    \label{www:tutorials}
124  The implicit free surface form of the  For this problem
125  pressure equation described in Marshall et. al \cite{Marshall97a} is  the implicit free surface, {\bf HPE} (see section \ref{sect:hydrostatic_and_quasi-hydrostatic_forms}) form of the
126  employed.  equations described in Marshall et. al \cite{marshall:97a} are
127  A horizontal laplacian operator $\nabla_{h}^2$ provides viscous  employed. The flow is three-dimensional with just temperature, $\theta$, as
128  dissipation. The wind-stress momentum input is added to the momentum equation  an active tracer.  The equation of state is linear.
129  for the ``zonal flow'', $u$. Other terms in the model  A horizontal Laplacian operator $\nabla_{h}^2$ provides viscous
130  are explicitly switched off for this experiement configuration (see section  dissipation and provides a diffusive sub-grid scale closure for the
131  \ref{SEC:code_config} ). This yields an active set of equations in  temperature equation. A wind-stress momentum forcing is added to the momentum
132    equation for the zonal flow, $u$. Other terms in the model
133    are explicitly switched off for this experiment configuration (see section
134    \ref{SEC:eg_fourl_code_config} ). This yields an active set of equations
135  solved in this configuration, written in spherical polar coordinates as  solved in this configuration, written in spherical polar coordinates as
136  follows  follows
137    
138  \begin{eqnarray}  \begin{eqnarray}
139  \label{EQ:model_equations}  \label{EQ:eg-fourlayer-model_equations}
140  \frac{Du}{Dt} - fv +  \frac{Du}{Dt} - fv +
141    \frac{1}{\rho}\frac{\partial p^{'}}{\partial \lambda} -    \frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \lambda} -
142    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}}
143  & = &  & = &
144  \cal{F}  \cal{F}_{\lambda}
145  \\  \\
146  \frac{Dv}{Dt} + fu +  \frac{Dv}{Dt} + fu +
147    \frac{1}{\rho}\frac{\partial p^{'}}{\partial \varphi} -    \frac{1}{\rho}\frac{\partial p^{\prime}}{\partial \varphi} -
148    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}}
149  & = &  & = &
150  0  0
151  \\  \\
152  \frac{\partial \eta}{\partial t} + \frac{\partial H \hat{u}}{\partial \lambda} +  \frac{\partial \eta}{\partial t} + \frac{\partial H \widehat{u}}{\partial \lambda} +
153  \frac{\partial H \hat{v}}{\partial \varphi}  \frac{\partial H \widehat{v}}{\partial \varphi}
154  &=&  &=&
155  0  0
156    \label{eq:fourl_example_continuity}
157  \\  \\
158  \frac{D\theta}{Dt} -  \frac{D\theta}{Dt} -
159   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}}
160  & = &  & = &
161  0  0
162    \label{eq:eg_fourl_theta}
163  \\  \\
164  p^{'} & = &  p^{\prime} & = &
165  g\rho_{0} \eta + \int^{0}_{-z}\rho^{'} dz  g\rho_{0} \eta + \int^{0}_{-z}\rho^{\prime} dz
166  \\  \\
167  \rho^{'} & = &- \alpha_{\theta}\rho_{0}\theta^{'}  \rho^{\prime} & = &- \alpha_{\theta}\rho_{0}\theta^{\prime}
168  \\  \\
169  {\cal F} |_{s} & = & \frac{\tau_{x}}{\rho_{0}\Delta z_{s}}  {\cal F}_{\lambda} |_{s} & = & \frac{\tau_{\lambda}}{\rho_{0}\Delta z_{s}}
170  \\  \\
171  {\cal F} |_{i} & = & 0  {\cal F}_{\lambda} |_{i} & = & 0
172  \end{eqnarray}  \end{eqnarray}
173    
174  \noindent where $u$ and $v$ are the components of the horizontal  \noindent where $u$ and $v$ are the components of the horizontal
175  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}$).
176  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
177  The forcing $\cal F$ is only applied at the surface.  integral term given in equation \ref{eq:free-surface} and
178  The pressure field $p^{'}$ is separated into a barotropic part  explained in more detail in section \ref{sect:pressure-method-linear-backward}.
179    However, for the problem presented here, the continuity relation (equation
180    \ref{eq:fourl_example_continuity}) differs from the general form given
181    in section \ref{sect:pressure-method-linear-backward},
182    equation \ref{eq:linear-free-surface=P-E+R}, because the source terms
183    ${\cal P}-{\cal E}+{\cal R}$
184    are all $0$.
185    
186    The pressure field, $p^{\prime}$, is separated into a barotropic part
187  due to variations in sea-surface height, $\eta$, and a hydrostatic  due to variations in sea-surface height, $\eta$, and a hydrostatic
188  part due to variations in density, $\rho^{'}$, over the water column.  part due to variations in density, $\rho^{\prime}$, integrated
189    through the water column.
190    
191    The suffices ${s},{i}$ indicate surface layer and the interior of the domain.
192    The windstress forcing, ${\cal F}_{\lambda}$, is applied in the surface layer
193    by a source term in the zonal momentum equation. In the ocean interior
194    this term is zero.
195    
196    In the momentum equations
197    lateral and vertical boundary conditions for the $\nabla_{h}^{2}$
198    and $\frac{\partial^{2}}{\partial z^{2}}$ operators are specified
199    when the numerical simulation is run - see section
200    \ref{SEC:eg_fourl_code_config}. For temperature
201    the boundary condition is ``zero-flux''
202    e.g. $\frac{\partial \theta}{\partial \varphi}=
203    \frac{\partial \theta}{\partial \lambda}=\frac{\partial \theta}{\partial z}=0$.
204    
205    
206    
207  \subsection{Discrete Numerical Configuration}  \subsection{Discrete Numerical Configuration}
208    \label{www:tutorials}
209    
210   The model is configured in hydrostatic form.  The domain is discretised with   The domain is discretised with
211  a uniform grid spacing in latitude and longitude  a uniform grid spacing in latitude and longitude
212   $\Delta \lambda=\Delta \varphi=1^{\circ}$, so   $\Delta \lambda=\Delta \varphi=1^{\circ}$, so
213  that there are sixty grid cells in the zonal and meridional directions.  that there are sixty grid cells in the zonal and meridional directions.
214  Vertically the  Vertically the
215  model is configured with a four layers with constant depth,  model is configured with four layers with constant depth,
216  $\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate  $\Delta z$, of $500$~m. The internal, locally orthogonal, model coordinate
217  variables $x$ and $y$ are initialised from the values of  variables $x$ and $y$ are initialized from the values of
218  $\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in  $\lambda$, $\varphi$, $\Delta \lambda$ and $\Delta \varphi$ in
219  radians according to  radians according to
220    
# Line 192  y=r\varphi,~\Delta y &= &r\Delta \varphi Line 225  y=r\varphi,~\Delta y &= &r\Delta \varphi
225    
226  The procedure for generating a set of internal grid variables from a  The procedure for generating a set of internal grid variables from a
227  spherical polar grid specification is discussed in section  spherical polar grid specification is discussed in section
228  \ref{sec:spatial_discrete_horizontal_grid}.  \ref{sect:spatial_discrete_horizontal_grid}.
229    
230  \noindent\fbox{ \begin{minipage}{5.5in}  \noindent\fbox{ \begin{minipage}{5.5in}
231  {\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em  {\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em
# Line 213  $\Delta x_v$, $\Delta y_u$: {\bf DXv}, { Line 246  $\Delta x_v$, $\Delta y_u$: {\bf DXv}, {
246    
247    
248    
249  As described in \ref{sec:tracer_equations}, the time evolution of potential  As described in \ref{sect:tracer_equations}, the time evolution of potential
250  temperature,  temperature,
251  $\theta$, equation is solved prognostically.  $\theta$, (equation \ref{eq:eg_fourl_theta})
252    is evaluated prognostically. The centered second-order scheme with
253    Adams-Bashforth time stepping described in section
254    \ref{sect:tracer_equations_abII} is used to step forward the temperature
255    equation. Prognostic terms in
256    the momentum equations are solved using flux form as
257    described in section \ref{sect:flux-form_momentum_eqautions}.
258  The pressure forces that drive the fluid motions, (  The pressure forces that drive the fluid motions, (
259  $\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
260  elevation $\eta$ and the hydrostatic pressure.  elevation $\eta$ and the hydrostatic pressure. The hydrostatic part of the
261    pressure is diagnosed explicitly by integrating density. The sea-surface
262    height, $\eta$, is diagnosed using an implicit scheme. The pressure
263    field solution method is described in sections
264    \ref{sect:pressure-method-linear-backward} and
265    \ref{sect:finding_the_pressure_field}.
266    
267  \subsubsection{Numerical Stability Criteria}  \subsubsection{Numerical Stability Criteria}
268    \label{www:tutorials}
269    
270  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}$.
271  This value is chosen to yield a Munk layer width \cite{Adcroft_thesis},  This value is chosen to yield a Munk layer width,
272    
273  \begin{eqnarray}  \begin{eqnarray}
274  \label{EQ:munk_layer}  \label{EQ:eg-fourlayer-munk_layer}
275  M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}}  M_{w} = \pi ( \frac { A_{h} }{ \beta } )^{\frac{1}{3}}
276  \end{eqnarray}  \end{eqnarray}
277    
278  \noindent  of $\approx 100$km. This is greater than the model  \noindent  of $\approx 100$km. This is greater than the model
279  resolution in mid-latitudes $\Delta x$, ensuring that the frictional  resolution in mid-latitudes
280    $\Delta x=r \cos(\varphi) \Delta \lambda \approx 80~{\rm km}$ at
281    $\varphi=45^{\circ}$, ensuring that the frictional
282  boundary layer is well resolved.  boundary layer is well resolved.
283  \\  \\
284    
285  \noindent The model is stepped forward with a  \noindent The model is stepped forward with a
286  time step $\delta t=1200$secs. With this time step the stability  time step $\delta t=1200$secs. With this time step the stability
287  parameter to the horizontal laplacian friction \cite{Adcroft_thesis}  parameter to the horizontal Laplacian friction
288    
289  \begin{eqnarray}  \begin{eqnarray}
290  \label{EQ:laplacian_stability}  \label{EQ:eg-fourlayer-laplacian_stability}
291  S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2}  S_{l} = 4 \frac{A_{h} \delta t}{{\Delta x}^2}
292  \end{eqnarray}  \end{eqnarray}
293    
294  \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
295  for stability.  for stability for this term under ABII time-stepping.
296  \\  \\
297    
298  \noindent The vertical dissipation coefficient, $A_{z}$, is set to  \noindent The vertical dissipation coefficient, $A_{z}$, is set to
299  $1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit  $1\times10^{-2} {\rm m}^2{\rm s}^{-1}$. The associated stability limit
300    
301  \begin{eqnarray}  \begin{eqnarray}
302  \label{EQ:laplacian_stability_z}  \label{EQ:eg-fourlayer-laplacian_stability_z}
303  S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2}  S_{l} = 4 \frac{A_{z} \delta t}{{\Delta z}^2}
304  \end{eqnarray}  \end{eqnarray}
305    
# Line 263  and vertical ($K_{z}$) diffusion coeffic Line 310  and vertical ($K_{z}$) diffusion coeffic
310  \\  \\
311    
312  \noindent The numerical stability for inertial oscillations  \noindent The numerical stability for inertial oscillations
 \cite{Adcroft_thesis}  
313    
314  \begin{eqnarray}  \begin{eqnarray}
315  \label{EQ:inertial_stability}  \label{EQ:eg-fourlayer-inertial_stability}
316  S_{i} = f^{2} {\delta t}^2  S_{i} = f^{2} {\delta t}^2
317  \end{eqnarray}  \end{eqnarray}
318    
# Line 274  S_{i} = f^{2} {\delta t}^2 Line 320  S_{i} = f^{2} {\delta t}^2
320  limit for stability.  limit for stability.
321  \\  \\
322    
323  \noindent The advective CFL \cite{Adcroft_thesis} for a extreme maximum  \noindent The advective CFL for a extreme maximum
324  horizontal flow  horizontal flow
325  speed of $ | \vec{u} | = 2 ms^{-1}$  speed of $ | \vec{u} | = 2 ms^{-1}$
326    
327  \begin{eqnarray}  \begin{eqnarray}
328  \label{EQ:cfl_stability}  \label{EQ:eg-fourlayer-cfl_stability}
329  S_{a} = \frac{| \vec{u} | \delta t}{ \Delta x}  C_{a} = \frac{| \vec{u} | \delta t}{ \Delta x}
330  \end{eqnarray}  \end{eqnarray}
331    
332  \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
333  limit of 0.5.  limit of 0.5.
334  \\  \\
335    
336  \noindent The stability parameter for internal gravity waves  \noindent The stability parameter for internal gravity waves
337  \cite{Adcroft_thesis}  propagating at $2~{\rm m}~{\rm s}^{-1}$
338    
339  \begin{eqnarray}  \begin{eqnarray}
340  \label{EQ:igw_stability}  \label{EQ:eg-fourlayer-igw_stability}
341  S_{c} = \frac{c_{g} \delta t}{ \Delta x}  S_{c} = \frac{c_{g} \delta t}{ \Delta x}
342  \end{eqnarray}  \end{eqnarray}
343    
344  \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
345  stability limit of 0.25.  stability limit of 0.25.
346        
347  \subsection{Code Configuration}  \subsection{Code Configuration}
348  \label{SEC:code_config}  \label{www:tutorials}
349    \label{SEC:eg_fourl_code_config}
350    
351  The model configuration for this experiment resides under the  The model configuration for this experiment resides under the
352  directory {\it verification/exp1/}.  The experiment files  directory {\it verification/exp2/}.  The experiment files
353  \begin{itemize}  \begin{itemize}
354  \item {\it input/data}  \item {\it input/data}
355  \item {\it input/data.pkg}  \item {\it input/data.pkg}
# Line 313  directory {\it verification/exp1/}.  The Line 360  directory {\it verification/exp1/}.  The
360  \item {\it code/CPP\_OPTIONS.h},  \item {\it code/CPP\_OPTIONS.h},
361  \item {\it code/SIZE.h}.  \item {\it code/SIZE.h}.
362  \end{itemize}  \end{itemize}
363  contain the code customisations and parameter settings for this  contain the code customisations and parameter settings for this
364  experiements. Below we describe the customisations  experiment. Below we describe the customisations to these files
365  to these files associated with this experiment.  associated with this experiment.
366    
367  \subsubsection{File {\it input/data}}  \subsubsection{File {\it input/data}}
368    \label{www:tutorials}
369    
370  This file, reproduced completely below, specifies the main parameters  This file, reproduced completely below, specifies the main parameters
371  for the experiment. The parameters that are significant for this configuration  for the experiment. The parameters that are significant for this configuration
# Line 331  this line sets Line 379  this line sets
379  the initial and reference values of potential temperature at each model  the initial and reference values of potential temperature at each model
380  level in units of $^{\circ}$C.  level in units of $^{\circ}$C.
381  The entries are ordered from surface to depth. For each  The entries are ordered from surface to depth. For each
382  depth level the inital and reference profiles will be uniform in  depth level the initial and reference profiles will be uniform in
383  $x$ and $y$. The values specified here are read into the  $x$ and $y$. The values specified here are read into the
384  variable  variable
385  {\bf  \varlink{tRef}{tRef}
386  \begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml}  %{\bf
387  tRef  %\begin{rawhtml} <A href=../code_reference/vdb/names/OK.htm> \end{rawhtml}
388  \begin{rawhtml} </A>\end{rawhtml}  %tRef
389  }  %\begin{rawhtml} </A>\end{rawhtml}
390    %}
391  in the model code, by procedure  in the model code, by procedure
392  {\it  \filelink{INI\_PARMS}{model-src-ini_parms.F}
393  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  %{\it
394  INI\_PARMS  %\begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
395  \begin{rawhtml} </A>\end{rawhtml}  %INI\_PARMS
396  }.  %\begin{rawhtml} </A>\end{rawhtml}
397    %}.
398    
399  %% \codelink{var:tref} tRef \endlink  %% \codelink{var:tref} tRef \endlink
400  %% \codelink{file:ini_parms} {\it INI\_PARMS } \endlink  %% \codelink{file:ini_parms} {\it INI\_PARMS } \endlink
# Line 354  INI\_PARMS Line 404  INI\_PARMS
404  %% \file{ini_parms}  %% \file{ini_parms}
405  \newcommand{\VARtref}{  \newcommand{\VARtref}{
406  {\bf  {\bf
407  \begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/OK.htm> \end{rawhtml}
408  tRef  tRef
409  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
410  }  }
# Line 368  tRef Line 418  tRef
418  ({\it ini\_theta.F})  ({\it ini\_theta.F})
419  \end{minipage}  \end{minipage}
420  }  }
421  {\bf  \filelink{ini\_theta.F}{model-src-ini_theta.F}
422  \begin{rawhtml} <A href=../../../code_reference/vdb/code/98.htm> \end{rawhtml}  %{\bf
423  goto code  %\begin{rawhtml} <A href=../code_reference/vdb/code/98.htm> \end{rawhtml}
424  \begin{rawhtml} </A>\end{rawhtml}  %goto code
425  }  %\begin{rawhtml} </A>\end{rawhtml}
426    %}
427    
428    
429  \item Line 6,  \item Line 6,
430  \begin{verbatim} viscAz=1.E-2, \end{verbatim}  \begin{verbatim} viscAz=1.E-2, \end{verbatim}
431  this line sets the vertical laplacian dissipation coefficient to  this line sets the vertical Laplacian dissipation coefficient to
432  $1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions  $1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions
433  for this operator are specified later.  for this operator are specified later.
434  The variable  The variable
435  {\bf  \varlink{viscAz}{viscAz}
436  \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZQ.htm> \end{rawhtml}  %{\bf
437  viscAz  %\begin{rawhtml} <A href=../code_reference/vdb/names/ZQ.htm> \end{rawhtml}
438  \begin{rawhtml} </A>\end{rawhtml}  %viscAz
439  }  %\begin{rawhtml} </A>\end{rawhtml}
440    %}
441  is read in the routine  is read in the routine
442  {\it  \filelink{ini\_parms.F}{model-src-ini_parms.F}
443  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  %{\it
444  INI\_PARMS  %\begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
445  \begin{rawhtml} </A>\end{rawhtml}  %INI\_PARMS
446  }  %\begin{rawhtml} </A>\end{rawhtml}
447    %}
448  and is copied into model general vertical coordinate variable  and is copied into model general vertical coordinate variable
449  {\bf  \varlink{viscAr}{viscAr}
450  \begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml}  %{\bf
451  viscAr  %\begin{rawhtml} <A href=../code_reference/vdb/names/PF.htm> \end{rawhtml}
452  \begin{rawhtml} </A>\end{rawhtml}  %viscAr
453  }.  %\begin{rawhtml} </A>\end{rawhtml}
454    %}.
455    At each time step, the viscous term contribution to the momentum equations
456    is calculated in routine
457    %{\it S/R CALC\_DIFFUSIVITY}.
458    \varlink{CALC\_DIFFUSIVITY}{CALC_DIFFUSIVITY}
459    
460  \fbox{  \fbox{
461  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
462  {\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})  {\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})
463  \end{minipage}  \end{minipage}
464  }  }
465  {\bf  %{\bf
466  \begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml}  %\begin{rawhtml} <A href=../code_reference/vdb/code/53.htm> \end{rawhtml}
467  goto code  %goto code
468  \begin{rawhtml} </A>\end{rawhtml}  %\begin{rawhtml} </A>\end{rawhtml}
469  }  %}
470    
471  \item Line 7,  \item Line 7,
472  \begin{verbatim}  \begin{verbatim}
# Line 418  this line sets the horizontal laplacian Line 476  this line sets the horizontal laplacian
476  $1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions  $1 \times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions
477  for this operator are specified later.  for this operator are specified later.
478  The variable  The variable
479  {\bf  \varlink{viscAh}{viscAh}
480  \begin{rawhtml} <A href=../../../code_reference/vdb/names/SI.htm> \end{rawhtml}  %{\bf
481  viscAh  %\begin{rawhtml} <A href=../code_reference/vdb/names/SI.htm> \end{rawhtml}
482  \begin{rawhtml} </A>\end{rawhtml}  %viscAh
483  }  %\begin{rawhtml} </A>\end{rawhtml}
484    %}
485  is read in the routine  is read in the routine
486  {\it  \varlink{INI\_PARMS}{INI_PARMS}
487  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  %{\it
488  INI\_PARMS  %\begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
489  \begin{rawhtml} </A>\end{rawhtml}  %INI\_PARMS
490  }.  %\begin{rawhtml} </A>\end{rawhtml}
491    %}
492    and applied in routines
493    %{\it CALC\_MOM\_RHS} and {\it CALC\_GW}.
494    \varlink{CALC\_MOM\_RHS}{CALC_MOM_RHS}
495    and
496    \varlink{CALC\_GW}{CALC_GW}.
497    
498    
499  \fbox{  \fbox{
500  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
501  {\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F})  {\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F})
502  \end{minipage}  \end{minipage}
503  }  }
504  {\bf  %{\bf
505  \begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml}  %\begin{rawhtml} <A href=../code_reference/vdb/code/60.htm> \end{rawhtml}
506  goto code  %goto code
507  \begin{rawhtml} </A>\end{rawhtml}  %\begin{rawhtml} </A>\end{rawhtml}
508  }  %}
509    
510  \fbox{  \fbox{
511  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
512  {\it S/R CALC\_GW}({\it calc\_gw.F})  {\it S/R CALC\_GW}({\it calc\_gw.F})
513  \end{minipage}  \end{minipage}
514  }  }
515  {\bf  %{\bf
516  \begin{rawhtml} <A href=../../../code_reference/vdb/code/58.htm> \end{rawhtml}  %\begin{rawhtml} <A href=../code_reference/vdb/code/58.htm> \end{rawhtml}
517  goto code  %goto code
518  \begin{rawhtml} </A>\end{rawhtml}  %\begin{rawhtml} </A>\end{rawhtml}
519  }  %}
520    
521  \item Lines 8,  \item Lines 8,
522  \begin{verbatim}  \begin{verbatim}
# Line 461  the horizontal laplacian friction operat Line 527  the horizontal laplacian friction operat
527  e.g. $\frac{\partial u}{\partial y}$=0 along boundaries in $y$ and  e.g. $\frac{\partial u}{\partial y}$=0 along boundaries in $y$ and
528  $\frac{\partial v}{\partial x}$=0 along boundaries in $x$.  $\frac{\partial v}{\partial x}$=0 along boundaries in $x$.
529  The variable  The variable
530  {\bf  \varlink{no\_slip\_sides}{no_slip_sides}
531  \begin{rawhtml} <A href=../../../code_reference/vdb/names/UT.htm> \end{rawhtml}  %{\bf
532  no\_slip\_sides  %\begin{rawhtml} <A href=../code_reference/vdb/names/UT.htm> \end{rawhtml}
533  \begin{rawhtml} </A>\end{rawhtml}  %no\_slip\_sides
534  }  %\begin{rawhtml} </A>\end{rawhtml}
535    %}
536  is read in the routine  is read in the routine
537  {\it  \varlink{INI\_PARMS}{INI_PARMS}
538  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  %{\it
539  INI\_PARMS  %\begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
540  \begin{rawhtml} </A>\end{rawhtml}  %INI\_PARMS
541  }.  %\begin{rawhtml} </A>\end{rawhtml}
542    %}
543    and the boundary condition is evaluated in routine
544    %{\it S/R CALC\_MOM\_RHS}.
545    
546    
547  \fbox{  \fbox{
# Line 480  INI\_PARMS Line 550  INI\_PARMS
550  \end{minipage}  \end{minipage}
551  }  }
552  {\bf  {\bf
553  \begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/60.htm> \end{rawhtml}
554  goto code  goto code
555  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
556  }  }
# Line 494  boundary condition in the vertical lapla Line 564  boundary condition in the vertical lapla
564  e.g. $u=v=0$ at $z=-H$, where $H$ is the local depth of the domain.  e.g. $u=v=0$ at $z=-H$, where $H$ is the local depth of the domain.
565  The variable  The variable
566  {\bf  {\bf
567  \begin{rawhtml} <A href=../../../code_reference/vdb/names/UK.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/UK.htm> \end{rawhtml}
568  no\_slip\_bottom  no\_slip\_bottom
569  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
570  }  }
571  is read in the routine  is read in the routine
572  {\it  {\it
573  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
574  INI\_PARMS  INI\_PARMS
575  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
576  }.  } and is applied in the routine {\it S/R CALC\_MOM\_RHS}.
577    
578  \fbox{  \fbox{
579  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 511  INI\_PARMS Line 581  INI\_PARMS
581  \end{minipage}  \end{minipage}
582  }  }
583  {\bf  {\bf
584  \begin{rawhtml} <A href=../../../code_reference/vdb/code/60.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/60.htm> \end{rawhtml}
585  goto code  goto code
586  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
587  }  }
# Line 526  operator is $\frac{\partial}{\partial x} Line 596  operator is $\frac{\partial}{\partial x}
596  all boundaries.  all boundaries.
597  The variable  The variable
598  {\bf  {\bf
599  \begin{rawhtml} <A href=../../../code_reference/vdb/names/RC.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/RC.htm> \end{rawhtml}
600  diffKhT  diffKhT
601  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
602  }  }
603  is read in the routine  is read in the routine
604  {\it  {\it
605  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
606  INI\_PARMS  INI\_PARMS
607  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
608  }.  } and used in routine {\it S/R CALC\_GT}.
609    
610  \fbox{ \begin{minipage}{5.0in}  \fbox{ \begin{minipage}{5.0in}
611  {\it S/R CALC\_GT}({\it calc\_gt.F})  {\it S/R CALC\_GT}({\it calc\_gt.F})
612  \end{minipage}  \end{minipage}
613  }  }
614  {\bf  {\bf
615  \begin{rawhtml} <A href=../../../code_reference/vdb/code/57.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/57.htm> \end{rawhtml}
616  goto code  goto code
617  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
618  }  }
# Line 556  to $10^{-2}\,{\rm m^{2}s^{-1}}$. The bou Line 626  to $10^{-2}\,{\rm m^{2}s^{-1}}$. The bou
626  operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries.  operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries.
627  The variable  The variable
628  {\bf  {\bf
629  \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZT.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/ZT.htm> \end{rawhtml}
630  diffKzT  diffKzT
631  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
632  }  }
633  is read in the routine  is read in the routine
634  {\it  {\it
635  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
636  INI\_PARMS  INI\_PARMS
637  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
638  }.  }.
639  It is copied into model general vertical coordinate variable  It is copied into model general vertical coordinate variable
640  {\bf  {\bf
641  \begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/PD.htm> \end{rawhtml}
642  diffKrT  diffKrT
643  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
644  }.  } which is used in routine {\it S/R CALC\_DIFFUSIVITY}.
645    
646  \fbox{ \begin{minipage}{5.0in}  \fbox{ \begin{minipage}{5.0in}
647  {\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})  {\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})
648  \end{minipage}  \end{minipage}
649  }  }
650  {\bf  {\bf
651  \begin{rawhtml} <A href=../../../code_reference/vdb/code/53.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/53.htm> \end{rawhtml}
652  goto code  goto code
653  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
654  }  }
# Line 593  This line sets the thermal expansion coe Line 663  This line sets the thermal expansion coe
663  to $2 \times 10^{-4}\,{\rm degrees}^{-1}$  to $2 \times 10^{-4}\,{\rm degrees}^{-1}$
664  The variable  The variable
665  {\bf  {\bf
666  \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZV.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/ZV.htm> \end{rawhtml}
667  tAlpha  tAlpha
668  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
669  }  }
670  is read in the routine  is read in the routine
671  {\it  {\it
672  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
673  INI\_PARMS  INI\_PARMS
674  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
675  }.  }. The routine {\it S/R FIND\_RHO} makes use of {\bf tAlpha}.
676    
677  \fbox{  \fbox{
678  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 610  INI\_PARMS Line 680  INI\_PARMS
680  \end{minipage}  \end{minipage}
681  }  }
682  {\bf  {\bf
683  \begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/79.htm> \end{rawhtml}
684  goto code  goto code
685  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
686  }  }
# Line 622  eosType='LINEAR' Line 692  eosType='LINEAR'
692  This line selects the linear form of the equation of state.  This line selects the linear form of the equation of state.
693  The variable  The variable
694  {\bf  {\bf
695  \begin{rawhtml} <A href=../../../code_reference/vdb/names/WV.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/WV.htm> \end{rawhtml}
696  eosType  eosType
697  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
698  }  }
699  is read in the routine  is read in the routine
700  {\it  {\it
701  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
702  INI\_PARMS  INI\_PARMS
703  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
704  }.  }. The values of {\bf eosType} sets which formula in routine
705    {\it FIND\_RHO} is used to calculate density.
706    
707  \fbox{  \fbox{
708  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 639  INI\_PARMS Line 710  INI\_PARMS
710  \end{minipage}  \end{minipage}
711  }  }
712  {\bf  {\bf
713  \begin{rawhtml} <A href=../../../code_reference/vdb/code/79.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/79.htm> \end{rawhtml}
714  goto code  goto code
715  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
716  }  }
# Line 652  usingSphericalPolarGrid=.TRUE., Line 723  usingSphericalPolarGrid=.TRUE.,
723  \end{verbatim}  \end{verbatim}
724  This line requests that the simulation be performed in a  This line requests that the simulation be performed in a
725  spherical polar coordinate system. It affects the interpretation of  spherical polar coordinate system. It affects the interpretation of
726  grid inoput parameters, for exampl {\bf delX} and {\bf delY} and  grid input parameters, for example {\bf delX} and {\bf delY} and
727  causes the grid generation routines to initialise an internal grid based  causes the grid generation routines to initialize an internal grid based
728  on spherical polar geometry.  on spherical polar geometry.
729  The variable  The variable
730  {\bf  {\bf
731  \begin{rawhtml} <A href=../../../code_reference/vdb/names/10T.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/10T.htm> \end{rawhtml}
732  usingSphericalPolarGrid  usingSphericalPolarGrid
733  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
734  }  }
735  is read in the routine  is read in the routine
736  {\it  {\it
737  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
738  INI\_PARMS  INI\_PARMS
739  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
740  }.  }. When set to {\bf .TRUE.} the settings of {\bf delX} and {\bf delY} are
741    taken to be in degrees. These values are used in the
742    routine {\it INI\_SPEHRICAL\_POLAR\_GRID}.
743    
744  \fbox{  \fbox{
745  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 674  INI\_PARMS Line 747  INI\_PARMS
747  \end{minipage}  \end{minipage}
748  }  }
749  {\bf  {\bf
750  \begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/97.htm> \end{rawhtml}
751  goto code  goto code
752  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
753  }  }
# Line 686  phiMin=0., Line 759  phiMin=0.,
759  This line sets the southern boundary of the modeled  This line sets the southern boundary of the modeled
760  domain to $0^{\circ}$ latitude. This value affects both the  domain to $0^{\circ}$ latitude. This value affects both the
761  generation of the locally orthogonal grid that the model  generation of the locally orthogonal grid that the model
762  uses internally and affects the initialisation of the coriolis force.  uses internally and affects the initialization of the coriolis force.
763  Note - it is not required to set  Note - it is not required to set
764  a longitude boundary, since the absolute longitude does  a longitude boundary, since the absolute longitude does
765  not alter the kernel equation discretisation.  not alter the kernel equation discretisation.
766  The variable  The variable
767  {\bf  {\bf
768  \begin{rawhtml} <A href=../../../code_reference/vdb/names/110.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/110.htm> \end{rawhtml}
769  phiMin  phiMin
770  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
771  }  }
772  is read in the routine  is read in the routine
773  {\it  {\it
774  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
775  INI\_PARMS  INI\_PARMS
776  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
777  }.  } and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}.
778    
779  \fbox{  \fbox{
780  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 709  INI\_PARMS Line 782  INI\_PARMS
782  \end{minipage}  \end{minipage}
783  }  }
784  {\bf  {\bf
785  \begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/97.htm> \end{rawhtml}
786  goto code  goto code
787  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
788  }  }
# Line 722  This line sets the horizontal grid spaci Line 795  This line sets the horizontal grid spaci
795  in the discrete grid to $1^{\circ}$ in longitude.  in the discrete grid to $1^{\circ}$ in longitude.
796  The variable  The variable
797  {\bf  {\bf
798  \begin{rawhtml} <A href=../../../code_reference/vdb/names/10Z.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/10Z.htm> \end{rawhtml}
799  delX  delX
800  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
801  }  }
802  is read in the routine  is read in the routine
803  {\it  {\it
804  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
805  INI\_PARMS  INI\_PARMS
806  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
807  }.  } and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}.
808    
809  \fbox{  \fbox{
810  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 739  INI\_PARMS Line 812  INI\_PARMS
812  \end{minipage}  \end{minipage}
813  }  }
814  {\bf  {\bf
815  \begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/97.htm> \end{rawhtml}
816  goto code  goto code
817  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
818  }  }
# Line 752  This line sets the horizontal grid spaci Line 825  This line sets the horizontal grid spaci
825  in the discrete grid to $1^{\circ}$ in latitude.  in the discrete grid to $1^{\circ}$ in latitude.
826  The variable  The variable
827  {\bf  {\bf
828  \begin{rawhtml} <A href=../../../code_reference/vdb/names/UB.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/UB.htm> \end{rawhtml}
829  delY    delY  
830  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
831  }  }
832  is read in the routine  is read in the routine
833  {\it  {\it
834  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
835  INI\_PARMS  INI\_PARMS
836  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
837  }.  } and is used in routine {\it INI\_SPEHRICAL\_POLAR\_GRID}.
838    
839  \fbox{  \fbox{
840  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 769  INI\_PARMS Line 842  INI\_PARMS
842  \end{minipage}  \end{minipage}
843  }  }
844  {\bf  {\bf
845  \begin{rawhtml} <A href=../../../code_reference/vdb/code/97.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/97.htm> \end{rawhtml}
846  goto code  goto code
847  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
848  }  }
# Line 783  in the discrete grid to $500\,{\rm m}$, Line 856  in the discrete grid to $500\,{\rm m}$,
856  is $2\,{\rm km}$.  is $2\,{\rm km}$.
857  The variable  The variable
858  {\bf  {\bf
859  \begin{rawhtml} <A href=../../../code_reference/vdb/names/10W.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/10W.htm> \end{rawhtml}
860  delZ  delZ
861  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
862  }  }
863  is read in the routine  is read in the routine
864  {\it  {\it
865  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
866  INI\_PARMS  INI\_PARMS
867  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
868  }.  }.
869  It is copied into the internal  It is copied into the internal
870  model coordinate variable  model coordinate variable
871  {\bf  {\bf
872  \begin{rawhtml} <A href=../../../code_reference/vdb/names/10Y.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/10Y.htm> \end{rawhtml}
873  delR  delR
874  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
875  }.  } which is used in routine {\it INI\_VERTICAL\_GRID}.
876    
877  \fbox{  \fbox{
878  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 807  delR Line 880  delR
880  \end{minipage}  \end{minipage}
881  }  }
882  {\bf  {\bf
883  \begin{rawhtml} <A href=../../../code_reference/vdb/code/100.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/100.htm> \end{rawhtml}
884  goto code  goto code
885  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
886  }  }
# Line 829  of $-2000m$ indicates open ocean. The ma Line 902  of $-2000m$ indicates open ocean. The ma
902  bathymetry file.  bathymetry file.
903  The variable  The variable
904  {\bf  {\bf
905  \begin{rawhtml} <A href=../../../code_reference/vdb/names/179.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/179.htm> \end{rawhtml}
906  bathyFile  bathyFile
907  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
908  }  }
909  is read in the routine  is read in the routine
910  {\it  {\it
911  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
912  INI\_PARMS  INI\_PARMS
913  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
914  }.  }. The bathymetry file is read in the routine {\it INI\_DEPTHS}.
915    
916  \fbox{  \fbox{
917  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 846  INI\_PARMS Line 919  INI\_PARMS
919  \end{minipage}  \end{minipage}
920  }  }
921  {\bf  {\bf
922  \begin{rawhtml} <A href=../../../code_reference/vdb/code/88.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/88.htm> \end{rawhtml}
923  goto code  goto code
924  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
925  }  }
# Line 857  goto code Line 930  goto code
930  zonalWindFile='windx.sin_y'  zonalWindFile='windx.sin_y'
931  \end{verbatim}  \end{verbatim}
932  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
933  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
934  ($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
935  bathymetry file. The matlab program {\it input/gendata.m} includes example  bathymetry file. The matlab program {\it input/gendata.m} includes example
936  code to generate a valid  code to generate a valid
# Line 865  code to generate a valid Line 938  code to generate a valid
938  file.    file.  
939  The variable  The variable
940  {\bf  {\bf
941  \begin{rawhtml} <A href=../../../code_reference/vdb/names/13W.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/names/13W.htm> \end{rawhtml}
942  zonalWindFile  zonalWindFile
943  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
944  }  }
945  is read in the routine  is read in the routine
946  {\it  {\it
947  \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/94.htm> \end{rawhtml}
948  INI\_PARMS  INI\_PARMS
949  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
950  }.  }.  The wind-stress file is read in the routine
951    {\it EXTERNAL\_FIELDS\_LOAD}.
952    
953  \fbox{  \fbox{
954  \begin{minipage}{5.0in}  \begin{minipage}{5.0in}
# Line 882  INI\_PARMS Line 956  INI\_PARMS
956  \end{minipage}  \end{minipage}
957  }  }
958  {\bf  {\bf
959  \begin{rawhtml} <A href=../../../code_reference/vdb/code/75.htm> \end{rawhtml}  \begin{rawhtml} <A href=../code_reference/vdb/code/75.htm> \end{rawhtml}
960  goto code  goto code
961  \begin{rawhtml} </A>\end{rawhtml}  \begin{rawhtml} </A>\end{rawhtml}
962  }  }
963    
964  \end{itemize}  \end{itemize}
965    
966  \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.  
967    
968  \begin{rawhtml}<PRE>\end{rawhtml}  \begin{rawhtml}<PRE>\end{rawhtml}
969  \begin{small}  \begin{small}
# Line 900  notes. Line 972  notes.
972  \begin{rawhtml}</PRE>\end{rawhtml}  \begin{rawhtml}</PRE>\end{rawhtml}
973    
974  \subsubsection{File {\it input/data.pkg}}  \subsubsection{File {\it input/data.pkg}}
975    \label{www:tutorials}
976    
977  This file uses standard default values and does not contain  This file uses standard default values and does not contain
978  customisations for this experiment.  customisations for this experiment.
979    
980  \subsubsection{File {\it input/eedata}}  \subsubsection{File {\it input/eedata}}
981    \label{www:tutorials}
982    
983  This file uses standard default values and does not contain  This file uses standard default values and does not contain
984  customisations for this experiment.  customisations for this experiment.
985    
986  \subsubsection{File {\it input/windx.sin\_y}}  \subsubsection{File {\it input/windx.sin\_y}}
987    \label{www:tutorials}
988    
989  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$)
990  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
991  Although $\tau_{x}$ is only a function of $y$n in this experiment  default for MITgcm).
992    Although $\tau_{x}$ is only a function of latitude, $y$,
993    in this experiment
994  this file must still define a complete two-dimensional map in order  this file must still define a complete two-dimensional map in order
995  to be compatible with the standard code for loading forcing fields  to be compatible with the standard code for loading forcing fields
996  in MITgcm. The included matlab program {\it input/gendata.m} gives a complete  in MITgcm (routine {\it EXTERNAL\_FIELDS\_LOAD}.
997    The included matlab program {\it input/gendata.m} gives a complete
998  code for creating the {\it input/windx.sin\_y} file.  code for creating the {\it input/windx.sin\_y} file.
999    
1000  \subsubsection{File {\it input/topog.box}}  \subsubsection{File {\it input/topog.box}}
1001    \label{www:tutorials}
1002    
1003    
1004  The {\it input/topog.box} file specifies a two-dimensional ($x,y$)  The {\it input/topog.box} file specifies a two-dimensional ($x,y$)
1005  map of depth values. For this experiment values are either  map of depth values. For this experiment values are either
1006  $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
1007  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
1008  in the same way as standard MITgcm two-dimensional, horizontal arrays.  in the same way as standard MITgcm two-dimensional, horizontal arrays.
1009  The included matlab program {\it input/gendata.m} gives a complete  The included matlab program {\it input/gendata.m} gives a complete
1010  code for creating the {\it input/topog.box} file.  code for creating the {\it input/topog.box} file.
1011    
1012  \subsubsection{File {\it code/SIZE.h}}  \subsubsection{File {\it code/SIZE.h}}
1013    \label{www:tutorials}
1014    
1015  Two lines are customized in this file for the current experiment  Two lines are customized in this file for the current experiment
1016    
# Line 957  the vertical domain extent in grid point Line 1037  the vertical domain extent in grid point
1037  \end{small}  \end{small}
1038    
1039  \subsubsection{File {\it code/CPP\_OPTIONS.h}}  \subsubsection{File {\it code/CPP\_OPTIONS.h}}
1040    \label{www:tutorials}
1041    
1042  This file uses standard default values and does not contain  This file uses standard default values and does not contain
1043  customisations for this experiment.  customisations for this experiment.
1044    
1045    
1046  \subsubsection{File {\it code/CPP\_EEOPTIONS.h}}  \subsubsection{File {\it code/CPP\_EEOPTIONS.h}}
1047    \label{www:tutorials}
1048    
1049  This file uses standard default values and does not contain  This file uses standard default values and does not contain
1050  customisations for this experiment.  customisations for this experiment.
1051    
1052  \subsubsection{Other Files }  \subsubsection{Other Files }
1053    \label{www:tutorials}
1054    
1055  Other files relevant to this experiment are  Other files relevant to this experiment are
1056  \begin{itemize}  \begin{itemize}
# Line 980  dxF, dyF, dxG, dyG, dxC, dyC}. Line 1063  dxF, dyF, dxG, dyG, dxC, dyC}.
1063  \end{itemize}  \end{itemize}
1064    
1065  \subsection{Running The Example}  \subsection{Running The Example}
1066    \label{www:tutorials}
1067  \label{SEC:running_the_example}  \label{SEC:running_the_example}
1068    
1069  \subsubsection{Code Download}  \subsubsection{Code Download}
1070    \label{www:tutorials}
1071    
1072   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.
1073  Instructions for downloading the code can be found in the Getting Started  Instructions for downloading the code can be found in section
1074  Guide \cite{MITgcm_Getting_Started}.  \ref{sect:obtainingCode}.
1075    
1076  \subsubsection{Experiment Location}  \subsubsection{Experiment Location}
1077    \label{www:tutorials}
1078    
1079   This example experiments is located under the release sub-directory   This example experiments is located under the release sub-directory
1080    
1081  \vspace{5mm}  \vspace{5mm}
1082  {\it verification/exp1/ }  {\it verification/exp2/ }
1083    
1084  \subsubsection{Running the Experiment}  \subsubsection{Running the Experiment}
1085    \label{www:tutorials}
1086    
1087   To run the experiment   To run the experiment
1088    
# Line 1012  Guide \cite{MITgcm_Getting_Started}. Line 1099  Guide \cite{MITgcm_Getting_Started}.
1099  % pwd  % pwd
1100  \end{verbatim}  \end{verbatim}
1101    
1102   You shold see a response on the screen ending in   You should see a response on the screen ending in
1103    
1104  {\it verification/exp1/input }  {\it verification/exp2/input }
1105    
1106    
1107  \item Run the genmake script to create the experiment {\it Makefile}  \item Run the genmake script to create the experiment {\it Makefile}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22