/[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.10 - (show annotations) (download) (as text)
Mon Aug 30 23:09:19 2010 UTC (14 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint01, HEAD
Changes since 1.9: +39 -35 lines
File MIME type: application/x-tex
Error occurred while calculating annotation data.
clean-up latex built:
 (remove multiple definition of label; fix missing reference; replace
  non-standard latex stuff; ...)

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

  ViewVC Help
Powered by ViewVC 1.1.22