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