/[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.4 - (hide annotations) (download) (as text)
Wed Oct 24 19:43:07 2001 UTC (23 years, 8 months ago) by cnh
Branch: MAIN
Changes since 1.3: +12 -9 lines
File MIME type: application/x-tex
Few more cross-refs and explanations

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

  ViewVC Help
Powered by ViewVC 1.1.22