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