/[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.5 - (show annotations) (download) (as text)
Sat Oct 16 03:40:13 2004 UTC (20 years, 9 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57l_post
Changes since 1.4: +7 -4 lines
File MIME type: application/x-tex
 o add HTML comments as a step towards "URL permanence" which will help
   solve:
   - stale links from the CMI web site
   - rotten indexing by bonniefy.pl
 o also cleanup a merge-mangle in diagnostics.tex

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

  ViewVC Help
Powered by ViewVC 1.1.22