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