/[MITgcm]/manual/s_examples/deep_convection/convection.tex
ViewVC logotype

Contents of /manual/s_examples/deep_convection/convection.tex

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Dec 19 14:34:39 2001 UTC (23 years, 6 months ago) by helen
Branch: MAIN
File MIME type: application/x-tex
Added new tutorial, describing convection experiment in a doubly periodic
domain.

1 \section{Example: Surface driven convection}
2 \label{sect:eg-bconv}
3
4 \bodytext{bgcolor="#FFFFFFFF"}
5
6 %\begin{center}
7 %{\Large \bf Surface driven convection}
8 %
9 %\vspace*{4mm}
10 %
11 %\vspace*{3mm}
12 %{\large Dec 2001}
13 %\end{center}
14
15 \begin{figure}
16 \begin{center}
17 \resizebox{7.5cm}{5.5cm}{
18 \includegraphics*[0.2in,0.7in][10.5in,10.5in]
19 {part3/case_studies/doubly_periodic_convection/simulation_config.eps} }
20 \end{center}
21 \caption{Schematic of simulation domain
22 for the surface driven convection experiment. The domain is doubly periodic
23 with an initially uniform temperature of 20 $^oC$.
24 }
25 \label{FIG:simulation_config}
26 \end{figure}
27
28 This experiment, figure \ref{FIG:simulation_config}, showcasing MITgcm's non-hydrostatic capability, was designed to explore
29 the temporal and spatial characteristics of convection plumes as they might exist during a
30 period of oceanic deep convection. It is
31
32 \begin{itemize}
33 \item non-hydrostatic
34 \item doubly-periodic with cubic geometry
35 \item has 50 m resolution
36 \item Cartesian
37 \item is on an $f$-plane
38 \item with a linear equation of state
39 \end{itemize}
40
41 \subsection{Overview}
42
43 The model domain consists of an approximately 3
44 km square by 1 km deep box of initially
45 unstratified, resting fluid. The domain is doubly periodic.
46
47 The experiment has 20 levels in the vertical, each of equal thickness $\Delta z =$ 50
48 m (the horizontal resolution is also 50 m). The fluid is initially unstratified with a
49 uniform reference potential temperature $\theta = $ 20 $^o$C. The equation of state
50 used in this experiment is linear
51
52 \begin{equation}
53 \label{EQ:linear1_eos}
54 \rho = \rho_{0} ( 1 - \alpha_{\theta}\theta^{'} )
55 \end{equation}
56
57 \noindent which is implemented in the model as a density anomaly equation
58
59 \begin{equation}
60 \label{EQ:linear1_eos_pert}
61 \rho^{'} = -\rho_{0}\alpha_{\theta}\theta^{'}
62 \end{equation}
63
64 \noindent with $\rho_{0}=1000\,{\rm kg\,m}^{-3}$ and
65 $\alpha_{\theta}=2\times10^{-4}\,{\rm degrees}^{-1} $. Integrated forward in
66 this configuration the model state variable {\bf theta} is equivalent to
67 either in-situ temperature, $T$, or potential temperature, $\theta$. For
68 consistency with other examples, in which the equation of state is
69 non-linear, we use $\theta$ to represent temperature here. This is
70 the quantity that is carried in the model core equations.
71
72 As the fluid in the surface layer is cooled (at a mean rate of 800 Wm$^2$), it becomes
73 convectively unstable and
74 overturns, at first close to the grid-scale, but, as the flow matures, on larger scales
75 (figures \ref{FIG:vertsection} and \ref{FIG:horizsection}), under the influence of
76 rotation ($f_o = 10^{-4}$ s$^{-1}$) .
77
78 \begin{figure}
79 \begin{center}
80 \resizebox{15cm}{10cm}{
81 \includegraphics*[0.2in,0.7in][10.5in,10.5in]
82 {part3/case_studies/doubly_periodic_convection/verticalsection.ps} }
83 \end{center}
84 \caption{
85 }
86 \label{FIG:vertsection}
87 \end{figure}
88
89 \begin{figure}
90 \begin{center}
91 \resizebox{10cm}{10cm}{
92 \includegraphics*[0.2in,0.7in][10.5in,10.5in]
93 {part3/case_studies/doubly_periodic_convection/surfacesection.ps} }
94 \end{center}
95 \caption{
96 }
97 \label{FIG:horizsection}
98 \end{figure}
99
100 Model parameters are specified in file {\it input/data}. The grid dimensions are
101 prescribed in {\it code/SIZE.h}. The forcing (file {\it input/Qsurf.bin}) is specified
102 in a binary data file generated using the Matlab script {\it input/gendata.m}.
103
104 \subsection{Equations solved}
105
106 The model is configured in nonhydrostatic form, that is, all terms in the Navier
107 Stokes equations are retained and the pressure field is found, subject to appropriate
108 bounday condintions, through inversion of a three-dimensional elliptic equation.
109
110 The implicit free surface form of the
111 pressure equation described in Marshall et. al \cite{marshall:97a} is
112 employed. A horizontal Laplacian operator $\nabla_{h}^2$ provides viscous
113 dissipation. The thermodynamic forcing appears as a sink in the potential temperature,
114 $\theta$, equation (\ref{EQ:global_forcing_ft}). This produces a set of equations
115 solved in this configuration as follows:
116
117 \begin{eqnarray}
118 \label{EQ:model_equations}
119 \frac{Du}{Dt} - fv +
120 \frac{1}{\rho}\frac{\partial p^{'}}{\partial x} -
121 \nabla_{h}\cdot A_{h}\nabla_{h}u -
122 \frac{\partial}{\partial z}A_{z}\frac{\partial u}{\partial z}
123 & = &
124 \begin{cases}
125 0 & \text{(surface)} \\
126 0 & \text{(interior)}
127 \end{cases}
128 \\
129 \frac{Dv}{Dt} + fu +
130 \frac{1}{\rho}\frac{\partial p^{'}}{\partial y} -
131 \nabla_{h}\cdot A_{h}\nabla_{h}v -
132 \frac{\partial}{\partial z}A_{z}\frac{\partial v}{\partial z}
133 & = &
134 \begin{cases}
135 0 & \text{(surface)} \\
136 0 & \text{(interior)}
137 \end{cases}
138 \\
139 \frac{Dw}{Dt} + g \frac{\rho^{'}}{\rho} +
140 \frac{1}{\rho}\frac{\partial p^{'}}{\partial z} -
141 \nabla_{h}\cdot A_{h}\nabla_{h}w -
142 \frac{\partial}{\partial z}A_{z}\frac{\partial w}{\partial z}
143 & = &
144 \begin{cases}
145 0 & \text{(surface)} \\
146 0 & \text{(interior)}
147 \end{cases}
148 \\
149 \frac{\partial u}{\partial x} +
150 \frac{\partial v}{\partial y} +
151 \frac{\partial w}{\partial z} +
152 &=&
153 0
154 \\
155 \frac{D\theta}{Dt} -
156 \nabla_{h}\cdot K_{h}\nabla_{h}\theta
157 - \frac{\partial}{\partial z}K_{z}\frac{\partial\theta}{\partial z}
158 & = &
159 \begin{cases}
160 {\cal F}_\theta & \text{(surface)} \\
161 0 & \text{(interior)}
162 \end{cases}
163 \end{eqnarray}
164
165 \noindent where $u=\frac{Dx}{Dt}$, $v=\frac{Dy}{Dt}$ and
166 $w=\frac{Dz}{Dt}$ are the components of the
167 flow vector in directions $x$, $y$ and $z$.
168 The pressure is diagnosed through inversion (subject to appropriate boundary
169 conditions) of a 3-D elliptic equation derived from the divergence of the momentum
170 equations and continuity (see section \ref{sec:finding_the_pressure_field}).
171 \\
172
173 \subsection{Discrete numerical configuration}
174
175 The domain is discretised with a uniform grid spacing in each direction. There are 64
176 grid cells in directions $x$ and $y$ and 20 vertical levels thus the domain
177 comprises a total of just over 80 000 gridpoints.
178
179 \subsection{Numerical stability criteria and other considerations}
180
181 For a heat flux of 800 Wm$^2$ and a rotation rate of $10^{-4}$ s$^{-1}$ the
182 plume-scale can be expected to be a few hundred meters guiding our choice of grid
183 resolution. This in turn restricts the timestep we can take. It is also desirable to
184 minimise the level of diffusion and viscosity we apply.
185
186 For this class of problem it is generally the advective time-scale which restricts
187 the timestep.
188
189 For an extreme maximum flow speed of $ | \vec{u} | = 1 ms^{-1}$, at a resolution of
190 50 m, the implied maximum timestep for stability, $\delta t_u$ is
191
192 \begin{eqnarray}
193 \label{EQ:advectiveCFLcondition}
194 %\delta t_u = \frac{\Delta x}{| \vec{u} \} = 50 s
195 \end{eqnarray}
196
197 The choice of $\delta t = 10$ s is a safe 20 percent of this maximum.
198
199 Interpreted in terms of a mixing-length hypothesis, a magnitude of Laplacian
200 diffusion coefficient $\kappa_h (=
201 \kappa_v) = 0.1$ m$^2$s$^{-1}$ is consistent with an eddy velocity of 2 mm s$^{-1}$
202 correlated over 50 m.
203
204 \subsection{Experiment configuration}
205
206 The model configuration for this experiment resides under the directory
207 {\it verification/convection/}. The experiment files
208 \begin{itemize}
209 \item {\it code/CPP\_EEOPTIONS.h}
210 \item {\it code/CPP\_OPTIONS.h},
211 \item {\it code/SIZE.h}.
212 \item {\it input/data}
213 \item {\it input/data.pkg}
214 \item {\it input/eedata},
215 \item {\it input/Qsurf.bin},
216 \end{itemize}
217 contain the code customisations and parameter settings for this
218 experiment. Below we describe these experiment-specific customisations.
219
220 \subsubsection{File {\it code/CPP\_EEOPTIONS.h}}
221
222 This file uses standard default values and does not contain
223 customisations for this experiment.
224
225 \subsubsection{File {\it code/CPP\_OPTIONS.h}}
226
227 This file uses standard default values and does not contain
228 customisations for this experiment.
229
230 \subsubsection{File {\it code/SIZE.h}}
231
232 Three lines are customized in this file. These prescribe the domain grid dimensions.
233 \begin{itemize}
234
235 \item Line 36,
236 \begin{verbatim} sNx=64, \end{verbatim} this line sets
237 the lateral domain extent in grid points for the
238 axis aligned with the $x$-coordinate.
239
240 \item Line 37,
241 \begin{verbatim} sNy=64, \end{verbatim} this line sets
242 the lateral domain extent in grid points for the
243 axis aligned with the $y$-coordinate.
244
245 \item Line 46,
246 \begin{verbatim} Nr=20, \end{verbatim} this line sets
247 the vertical domain extent in grid points.
248
249 \end{itemize}
250
251 \begin{rawhtml}<PRE>\end{rawhtml}
252 \begin{small}
253 \input{part3/case_studies/doubly_periodic_convection/code/SIZE.h}
254 \end{small}
255 \begin{rawhtml}</PRE>\end{rawhtml}
256
257 \subsubsection{File {\it input/data}}
258
259 This file, reproduced completely below, specifies the main parameters
260 for the experiment. The parameters that are significant for this configuration
261 are
262
263 \begin{itemize}
264
265 \item Line 4,
266 \begin{verbatim}
267 4 tRef=20*20.0,
268 \end{verbatim}
269 this line sets
270 the initial and reference values of potential temperature at each model
271 level in units of $^{\circ}$C. Here the value is arbitrary since, in this case, the
272 flow evolves independently of the absolute magnitude of the reference temperature.
273 For each depth level the initial and reference profiles will be uniform in
274 $x$ and $y$. The values specified are read into the
275 variable
276 {\bf
277 \begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml}
278 tRef
279 \begin{rawhtml} </A>\end{rawhtml}
280 }
281 in the model code, by procedure
282 {\it
283 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
284 S/R INI\_PARMS ({\it ini\_parms.F})
285 \begin{rawhtml} </A>\end{rawhtml}.
286 }
287 The temperature field is initialised, by procedure
288 {\it
289 \begin{rawhtml} <A href=../../../code_reference/vdb/code/OK.htm> \end{rawhtml}
290 S/R INI\_THETA ({\it ini\_theta.F})
291 \begin{rawhtml} </A>\end{rawhtml}.
292 }
293
294
295 \item Line 5,
296 \begin{verbatim}
297 5 sRef=20*35.0,
298 \end{verbatim}
299 this line sets the initial and reference values of salinity at each model
300 level in units of ppt. In this case salinity is set to an (arbitrary) uniform value of
301 35.0 ppt. However since, in this example, density is independent of salinity,
302 an appropriatly defined initial salinity could provide a useful passive
303 tracer. For each depth level the initial and reference profiles will be uniform in
304 $x$ and $y$. The values specified are read into the
305 variable
306 {\bf
307 \begin{rawhtml} <A href=../../../code_reference/vdb/names/OK.htm> \end{rawhtml}
308 sRef
309 \begin{rawhtml} </A>\end{rawhtml}
310 }
311 in the model code, by procedure
312 {\it
313 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
314 S/R INI\_PARMS ({\it ini\_parms.F})
315 }
316 \begin{rawhtml} </A>\end{rawhtml}.
317 The salinity field is initialised, by procedure
318 {\it
319 \begin{rawhtml} <A href=../../../code_reference/vdb/code/OK.htm> \end{rawhtml}
320 S/R INI\_SALT ({\it ini\_salt.F})
321 \begin{rawhtml} </A>\end{rawhtml}.
322 }
323
324
325 \item Line 6,
326 \begin{verbatim}
327 6 viscAh=0.1,
328 \end{verbatim}
329 this line sets the horizontal laplacian dissipation coefficient to
330 0.1 ${\rm m^{2}s^{-1}}$. Boundary conditions
331 for this operator are specified later.
332 The variable
333 {\bf
334 \begin{rawhtml} <A href=../../../code_reference/vdb/names/SI.htm> \end{rawhtml}
335 viscAh
336 \begin{rawhtml} </A>\end{rawhtml}
337 }
338 is read in the routine
339 {\it
340 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
341 S/R INI\_PARMS ({\it ini\_params.F})
342 \begin{rawhtml} </A>\end{rawhtml}
343 } and applied in routines
344 {\it
345 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
346 S/R CALC\_MOM\_RHS ({\it calc\_mom\_rhs.F})
347 \begin{rawhtml} </A>\end{rawhtml}
348 } and
349 {\it
350 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
351 S/R CALC\_GW ({\it calc\_gw.F})
352 \begin{rawhtml} </A>\end{rawhtml}
353 }.
354
355
356 \item Line 7,
357 \begin{verbatim}
358 7 viscAz=0.1,
359 \end{verbatim}
360 this line sets the vertical laplacian frictional dissipation coefficient to
361 0.1 ${\rm m^{2}s^{-1}}$. Boundary conditions
362 for this operator are specified later.
363 The variable
364 {\bf
365 \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZQ.htm> \end{rawhtml}
366 viscAz
367 \begin{rawhtml} </A>\end{rawhtml}
368 }
369 is read in the routine
370 {\it
371 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
372 S/R INI\_PARMS ({\it ini\_parms.F})
373 \begin{rawhtml} </A>\end{rawhtml}
374 }
375 and is copied into model general vertical coordinate variable
376 {\bf
377 \begin{rawhtml} <A href=../../../code_reference/vdb/names/PF.htm> \end{rawhtml}
378 viscAr
379 \begin{rawhtml} </A>\end{rawhtml}
380 }. At each time step, the viscous term contribution to the momentum equations
381 is calculated in routine
382 {\it
383 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
384 S/R CALC\_DIFFUSIVITY ({\it calc\_diffusivity.F})
385 \begin{rawhtml} </A>\end{rawhtml}
386 }.
387
388
389 \item Line 8,
390 \begin{verbatim}
391 no_slip_sides=.FALSE.
392 \end{verbatim}
393 this line selects a free-slip lateral boundary condition for
394 the horizontal laplacian friction operator
395 e.g. $\frac{\partial u}{\partial y}$=0 along boundaries in $y$ and
396 $\frac{\partial v}{\partial x}$=0 along boundaries in $x$.
397 The variable
398 {\bf
399 \begin{rawhtml} <A href=../../../code_reference/vdb/names/UT.htm> \end{rawhtml}
400 no\_slip\_sides
401 \begin{rawhtml} </A>\end{rawhtml}
402 }
403 is read in the routine
404 {\it
405 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
406 S/R INI\_PARMS ({\it ini\_parms.F})
407 \begin{rawhtml} </A>\end{rawhtml}
408 } and the boundary condition is evaluated in routine
409 {\it
410 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
411 S/R CALC\_MOM\_RHS ({\it calc\_mom\_rhs.F})
412 \begin{rawhtml} </A>\end{rawhtml}
413 }.
414
415
416 \item Lines 9,
417 \begin{verbatim}
418 no_slip_bottom=.TRUE.
419 \end{verbatim}
420 this line selects a no-slip boundary condition for the bottom
421 boundary condition in the vertical laplacian friction operator
422 e.g. $u=v=0$ at $z=-H$, where $H$ is the local depth of the domain.
423 The variable
424 {\bf
425 \begin{rawhtml} <A href=../../../code_reference/vdb/names/UK.htm> \end{rawhtml}
426 no\_slip\_bottom
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 S/R INI\_PARMS ({\it ini\_parms.F})
433 \begin{rawhtml} </A>\end{rawhtml}
434 } and is applied in the routine
435 {\it
436 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
437 S/R CALC\_MOM\_RHS ({\it calc\_mom\_rhs.F})
438 \begin{rawhtml} </A>\end{rawhtml}
439 }.
440
441 \item Line 11,
442 \begin{verbatim}
443 diffKhT=0.1,
444 \end{verbatim}
445 this line sets the horizontal diffusion coefficient for temperature
446 to 0.1 $\rm m^{2}s^{-1}$. The boundary condition on this
447 operator is $\frac{\partial}{\partial x}=\frac{\partial}{\partial y}=0$ at
448 all boundaries.
449 The variable
450 {\bf
451 \begin{rawhtml} <A href=../../../code_reference/vdb/names/RC.htm> \end{rawhtml}
452 diffKhT
453 \begin{rawhtml} </A>\end{rawhtml}
454 }
455 is read in the routine
456 {\it
457 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
458 S/R INI\_PARMS ({\it ini\_parms.F})
459 \begin{rawhtml} </A>\end{rawhtml}
460 } and used in routine
461 {\it
462 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
463 S/R CALC\_GT ({\it calc\_gt.F})
464 \begin{rawhtml} </A>\end{rawhtml}
465 }.
466
467 \item Line 12,
468 \begin{verbatim}
469 diffKzT=0.1,
470 \end{verbatim}
471 this line sets the vertical diffusion coefficient for temperature
472 to 0.1 ${\rm m^{2}s^{-1}}$. The boundary condition on this
473 operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries.
474 The variable
475 {\bf
476 \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZT.htm> \end{rawhtml}
477 diffKzT
478 \begin{rawhtml} </A>\end{rawhtml}
479 }
480 is read in the routine
481 {\it
482 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
483 S/R INI\_PARMS ({\it ini\_parms.F})
484 \begin{rawhtml} </A>\end{rawhtml}
485 }.
486 It is copied into model general vertical coordinate variable
487 {\bf
488 \begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml}
489 diffKrT
490 \begin{rawhtml} </A>\end{rawhtml}
491 } which is used in routine
492 {\it
493 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
494 S/R CALC\_DIFFUSIVITY ({\it calc\_diffusivity.F})
495 \begin{rawhtml} </A>\end{rawhtml}
496 }.
497
498
499 \item Line 13,
500 \begin{verbatim}
501 diffKhS=0.1,
502 \end{verbatim}
503 this line sets the horizontal diffusion coefficient for salinity
504 to 0.1 $\rm m^{2}s^{-1}$. The boundary condition on this
505 operator is $\frac{\partial}{\partial x}=\frac{\partial}{\partial y}=0$ on
506 all boundaries.
507 The variable
508 {\bf
509 \begin{rawhtml} <A href=../../../code_reference/vdb/names/RC.htm> \end{rawhtml}
510 diffKsT
511 \begin{rawhtml} </A>\end{rawhtml}
512 }
513 is read in the routine
514 {\it
515 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
516 S/R INI\_PARMS ({\it ini\_parms.F})
517 \begin{rawhtml} </A>\end{rawhtml}
518 } and used in routine
519 {\it
520 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
521 S/R CALC\_GS ({\it calc\_gs.F})
522 \begin{rawhtml} </A>\end{rawhtml}
523 }.
524
525
526 \item Line 14,
527 \begin{verbatim}
528 diffKzS=0.1,
529 \end{verbatim}
530 this line sets the vertical diffusion coefficient for temperature
531 to 0.1 ${\rm m^{2}s^{-1}}$. The boundary condition on this
532 operator is $\frac{\partial}{\partial z}$ = 0 on all boundaries.
533 The variable
534 {\bf
535 \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZT.htm> \end{rawhtml}
536 diffKzS
537 \begin{rawhtml} </A>\end{rawhtml}
538 }
539 is read in the routine
540 {\it
541 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
542 S/R INI\_PARMS ({\it ini\_parms.F})
543 \begin{rawhtml} </A>\end{rawhtml}
544 }.
545 It is copied into model general vertical coordinate variable
546 {\bf
547 \begin{rawhtml} <A href=../../../code_reference/vdb/names/PD.htm> \end{rawhtml}
548 diffKrS
549 \begin{rawhtml} </A>\end{rawhtml}
550 } which is used in routine
551 {\it
552 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
553 S/R CALC\_DIFFUSIVITY ({\it calc\_diffusivity.F})
554 \begin{rawhtml} </A>\end{rawhtml}
555 }.
556
557
558 \item Line 15,
559 \begin{verbatim}
560 f0=1E-4,
561 \end{verbatim}
562 this line sets the Coriolis parameter to $1 \times 10^{-4}$ s$^{-1}$.
563 Since $\beta = 0.0$ this value is then adopted throughout the domain.
564
565
566 \item Line 16,
567 \begin{verbatim}
568 beta=0.E-11,
569 \end{verbatim}
570 this line sets the the variation of Coriolis parameter with latitude to $0$.
571
572
573 \item Line 17,
574 \begin{verbatim}
575 tAlpha=2.E-4,
576 \end{verbatim}
577 This line sets the thermal expansion coefficient for the fluid
578 to $2 \times 10^{-4}$ $^o$ C$^{-1}$.
579 The variable
580 {\bf
581 \begin{rawhtml} <A href=../../../code_reference/vdb/names/ZV.htm> \end{rawhtml}
582 tAlpha
583 \begin{rawhtml} </A>\end{rawhtml}
584 }
585 is read in the routine
586 {\it
587 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
588 S/R INI\_PARMS ({\it ini\_parms.F})
589 \begin{rawhtml} </A>\end{rawhtml}
590 }.
591 The routine
592 {\it
593 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
594 S/R FIND\_RHO ({\it find\_rho.F})
595 \begin{rawhtml} </A>\end{rawhtml}
596 } makes use of {\bf tAlpha}.
597
598 \item Line 18,
599 \begin{verbatim}
600 sBeta=0,
601 \end{verbatim}
602 This line sets the saline expansion coefficient for the fluid
603 to $0$ consistent with salt's passive role in this example.
604
605
606 \item Line 23-24,
607 \begin{verbatim}
608 rigidLid=.FALSE.,
609 implicitFreeSurface=.TRUE.,
610 \end{verbatim}
611 Selects the barotropic pressure equation to be the implicit free surface
612 formulation.
613
614 \item Line 25,
615 \begin{verbatim}
616 eosType='LINEAR',
617 \end{verbatim}
618 Selects the linear form of the equation of state.
619
620
621 \item Line 26,
622 \begin{verbatim}
623 nonHydrostatic=.TRUE.,
624 \end{verbatim}
625 Selects for non-hydrostatic code.
626
627
628 \item Line 27,
629 \begin{verbatim}
630 readBinaryPrec=64,
631 \end{verbatim}
632 Sets format for reading binary input datasets holding model fields to
633 use 64-bit representation for floating-point numbers.
634
635 \item Line 31,
636 \begin{verbatim}
637 cg2dMaxIters=1000,
638 \end{verbatim}
639 Inactive - the pressure field in a non-hydrostatic simulation is inverted through a 3D
640 elliptic equation.
641
642
643 \item Line 32,
644 \begin{verbatim}
645 cg2dTargetResidual=1.E-9,
646 \end{verbatim}
647 Inactive - the pressure field in a non-hydrostatic simulation is inverted through a 3D
648 elliptic equation.
649
650
651 \item Line 33,
652 \begin{verbatim}
653 cg3dMaxIters=40,
654 \end{verbatim}
655 This line sets the maximum number of iterations the three-dimensional, conjugate
656 gradient solver will use to 40, {\bf irrespective of the convergence
657 criteria being met}. Used in routine
658 {\it
659 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
660 S/R CG3D ({\it cg3d.F})
661 \begin{rawhtml} </A>\end{rawhtml}
662 }.
663
664
665
666 \item Line 34,
667 \begin{verbatim}
668 cg3dTargetResidual=1.E-9,
669 \end{verbatim}
670 Sets the tolerance which the three-dimensional, conjugate
671 gradient solver will use to test for convergence in equation
672 \ref{EQ:congrad_3d_resid} to $1 \times 10^{-9}$.
673 The solver will iterate until the
674 tolerance falls below this value or until the maximum number of
675 solver iterations is reached. Used in routine
676 {\it
677 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
678 S/R CG3D ({\it cg3d.F})
679 \begin{rawhtml} </A>\end{rawhtml}
680 }.
681
682
683 \item Line 38,
684 \begin{verbatim}
685 startTime=0,
686 \end{verbatim}
687 Sets the starting time for the model internal time counter.
688 When set to non-zero this option implicitly requests a
689 checkpoint file be read for initial state.
690 By default the checkpoint file is named according to
691 the integer number of time steps in the {\bf startTime} value.
692 The internal time counter works in seconds.
693
694 \item Line 39,
695 \begin{verbatim}
696 nTimeSteps=8640.,
697 \end{verbatim}
698 Sets the number of timesteps at which this simulation will terminate (in this case
699 8640 timesteps or 1 day or $\delta t = 10$ s).
700 At the end of a simulation a checkpoint file is automatically
701 written so that a numerical experiment can consist of multiple
702 stages.
703
704 \item Line 40,
705 \begin{verbatim}
706 deltaT=10,
707 \end{verbatim}
708 Sets the timestep $\delta t$ to 10 s.
709
710
711 \item Line 51,
712 \begin{verbatim}
713 dXspacing=50.0,
714 \end{verbatim}
715 Sets horizontal ($x$-direction) grid interval to 50 m.
716
717
718 \item Line 52,
719 \begin{verbatim}
720 dYspacing=50.0,
721 \end{verbatim}
722 Sets horizontal ($y$-direction) grid interval to 50 m.
723
724
725 \item Line 53,
726 \begin{verbatim}
727 delZ=20*50.0,
728 \end{verbatim}
729 Sets vertical grid spacing to 50 m. Must be consistent with {\it code/SIZE.h}. Here,
730 20 corresponds to the number of vertical levels.
731
732 \item Line 57,
733 \begin{verbatim}
734 surfQfile='Qsurf.bin'
735 \end{verbatim}
736 This line specifies the name of the file from which the surface heat flux
737 is read. This file is a two-dimensional
738 ($x,y$) map. It is assumed to contain 64-bit binary numbers
739 giving the value of $Q$ (W m$^2$) to be applied in each surface grid cell, ordered with
740 the $x$ coordinate varying fastest. The points are ordered from low coordinate
741 to high coordinate for both axes. The matlab program
742 {\it input/gendata.m} shows how to generate the
743 surface heat flux file used in the example.
744 The variable
745 {\bf
746 \begin{rawhtml} <A href=../../../code_reference/vdb/names/179.htm> \end{rawhtml}
747 Qsurf
748 \begin{rawhtml} </A>\end{rawhtml}
749 }
750 is read in the routine
751 {\it
752 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
753 S/R INI\_PARMS ({\it ini\_parms.F})
754 \begin{rawhtml} </A>\end{rawhtml}
755 }
756 and applied in
757 {\it
758 \begin{rawhtml} <A href=../../../code_reference/vdb/code/94.htm> \end{rawhtml}
759 S/R EXTERNAL\_FORCING\_SURF ({\it external\_forcing\_surf.F})
760 \begin{rawhtml} </A>\end{rawhtml}
761 } where the flux is converted to a temperature tendency.
762
763
764 \end{itemize}
765
766
767 \begin{rawhtml}<PRE>\end{rawhtml}
768 \begin{small}
769 \input{part3/case_studies/doubly_periodic_convection/input/data}
770 \end{small}
771 \begin{rawhtml}</PRE>\end{rawhtml}
772
773
774 \subsubsection{File {\it input/data.pkg}}
775
776 This file uses standard default values and does not contain
777 customisations for this experiment.
778
779 \subsubsection{File {\it input/eedata}}
780
781 This file uses standard default values and does not contain
782 customisations for this experiment.
783
784
785 \subsubsection{File {\it input/Qsurf.bin}}
786
787 The file {\it input/Qsurf.bin} specifies a two-dimensional ($x,y$)
788 map of heat flux values where
789 $Q = Q_o \times ( 0.5 + \mbox{random number between 0 and 1})$.
790
791 In the example $Q_o = 800$ W m$^{-2}$ so that values of $Q$ lie in the range 400 to
792 1200 W m$^{-2}$ with a mean of $Q_o$. Although the flux models a loss, because it is
793 directed upwards, according to the model's sign convention, $Q$ is positive.
794
795
796 \begin{figure}
797 \begin{center}
798 % \resizebox{15cm}{10cm}{
799 % \includegraphics*[0.2in,0.7in][10.5in,10.5in]
800 % {part3/case_studies/doubly_periodic_convection/Qsurf.ps} }
801 \end{center}
802 \caption{
803 }
804 \label{FIG:Qsurf}
805 \end{figure}
806
807 \subsection{Running the example}
808
809 \subsubsection{Code download}
810
811 In order to run the examples you must first download the code distribution.
812 Instructions for downloading the code can be found in \ref{sect:obtainingCode}.
813
814 \subsubsection{Experiment Location}
815
816 This example experiments is located under the release sub-directory
817
818 \vspace{5mm}
819 {\it verification/convection/ }
820
821 \subsubsection{Running the Experiment}
822
823 To run the experiment
824
825 \begin{enumerate}
826 \item Set the current directory to {\it input/ }
827
828 \begin{verbatim}
829 % cd input
830 \end{verbatim}
831
832 \item Verify that current directory is now correct
833
834 \begin{verbatim}
835 % pwd
836 \end{verbatim}
837
838 You should see a response on the screen ending in
839
840 {\it verification/convection/input }
841
842
843 \item Run the genmake script to create the experiment {\it Makefile}
844
845 \begin{verbatim}
846 % ../../../tools/genmake -mods=../code
847 \end{verbatim}
848
849 \item Create a list of header file dependencies in {\it Makefile}
850
851 \begin{verbatim}
852 % make depend
853 \end{verbatim}
854
855 \item Build the executable file.
856
857 \begin{verbatim}
858 % make
859 \end{verbatim}
860
861 \item Run the {\it mitgcmuv} executable
862
863 \begin{verbatim}
864 % ./mitgcmuv
865 \end{verbatim}
866
867 \end{enumerate}
868
869

  ViewVC Help
Powered by ViewVC 1.1.22