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

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

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


Revision 1.5 - (hide annotations) (download) (as text)
Wed Oct 24 23:14:44 2001 UTC (23 years, 8 months ago) by cnh
Branch: MAIN
Changes since 1.4: +60 -28 lines
File MIME type: application/x-tex
Equations, labels, cross-links etc..

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

  ViewVC Help
Powered by ViewVC 1.1.22