1 |
adcroft |
1.10 |
% $Header: /u/gcmpack/mitgcmdoc/part2/tracer.tex,v 1.9 2001/11/13 15:32:28 adcroft Exp $ |
2 |
adcroft |
1.2 |
% $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
|
|
\section{Tracer equations} |
5 |
cnh |
1.6 |
\label{sec:tracer_equations} |
6 |
adcroft |
1.1 |
|
7 |
adcroft |
1.2 |
The basic discretization used for the tracer equations is the second |
8 |
|
|
order piece-wise constant finite volume form of the forced |
9 |
cnh |
1.8 |
advection-diffusion equations. There are many alternatives to second |
10 |
adcroft |
1.2 |
order method for advection and alternative parameterizations for the |
11 |
|
|
sub-grid scale processes. The Gent-McWilliams eddy parameterization, |
12 |
|
|
KPP mixing scheme and PV flux parameterization are all dealt with in |
13 |
|
|
separate sections. The basic discretization of the advection-diffusion |
14 |
|
|
part of the tracer equations and the various advection schemes will be |
15 |
|
|
described here. |
16 |
|
|
|
17 |
adcroft |
1.3 |
\subsection{Time-stepping of tracers: ABII} |
18 |
cnh |
1.7 |
\label{sec:tracer_equations_abII} |
19 |
adcroft |
1.3 |
|
20 |
|
|
The default advection scheme is the centered second order method which |
21 |
|
|
requires a second order or quasi-second order time-stepping scheme to |
22 |
|
|
be stable. Historically this has been the quasi-second order |
23 |
|
|
Adams-Bashforth method (ABII) and applied to all terms. For an |
24 |
|
|
arbitrary tracer, $\tau$, the forced advection-diffusion equation |
25 |
|
|
reads: |
26 |
|
|
\begin{equation} |
27 |
|
|
\partial_t \tau + G_{adv}^\tau = G_{diff}^\tau + G_{forc}^\tau |
28 |
|
|
\end{equation} |
29 |
|
|
where $G_{adv}^\tau$, $G_{diff}^\tau$ and $G_{forc}^\tau$ are the |
30 |
|
|
tendencies due to advection, diffusion and forcing, respectively, |
31 |
|
|
namely: |
32 |
|
|
\begin{eqnarray} |
33 |
|
|
G_{adv}^\tau & = & \partial_x u \tau + \partial_y v \tau + \partial_r w \tau |
34 |
|
|
- \tau \nabla \cdot {\bf v} \\ |
35 |
|
|
G_{diff}^\tau & = & \nabla \cdot {\bf K} \nabla \tau |
36 |
|
|
\end{eqnarray} |
37 |
|
|
and the forcing can be some arbitrary function of state, time and |
38 |
|
|
space. |
39 |
|
|
|
40 |
|
|
The term, $\tau \nabla \cdot {\bf v}$, is required to retain local |
41 |
|
|
conservation in conjunction with the linear implicit free-surface. It |
42 |
|
|
only affects the surface layer since the flow is non-divergent |
43 |
|
|
everywhere else. This term is therefore referred to as the surface |
44 |
|
|
correction term. Global conservation is not possible using the |
45 |
|
|
flux-form (as here) and a linearized free-surface |
46 |
adcroft |
1.10 |
(\cite{griffies:00,campin:02}). |
47 |
adcroft |
1.3 |
|
48 |
|
|
The continuity equation can be recovered by setting |
49 |
|
|
$G_{diff}=G_{forc}=0$ and $\tau=1$. |
50 |
|
|
|
51 |
cnh |
1.8 |
The driver routine that calls the routines to calculate tendencies are |
52 |
adcroft |
1.3 |
{\em S/R CALC\_GT} and {\em S/R CALC\_GS} for temperature and salt |
53 |
|
|
(moisture), respectively. These in turn call a generic advection |
54 |
|
|
diffusion routine {\em S/R GAD\_CALC\_RHS} that is called with the |
55 |
cnh |
1.8 |
flow field and relevant tracer as arguments and returns the collective |
56 |
|
|
tendency due to advection and diffusion. Forcing is add subsequently |
57 |
|
|
in {\em S/R CALC\_GT} or {\em S/R CALC\_GS} to the same tendency |
58 |
adcroft |
1.3 |
array. |
59 |
|
|
|
60 |
|
|
\fbox{ \begin{minipage}{4.75in} |
61 |
|
|
{\em S/R GAD\_CALC\_RHS} ({\em pkg/generic\_advdiff/gad\_calc\_rhs.F}) |
62 |
|
|
|
63 |
|
|
$\tau$: {\bf tracer} (argument) |
64 |
|
|
|
65 |
|
|
$G^{(n)}$: {\bf gTracer} (argument) |
66 |
|
|
|
67 |
|
|
$F_r$: {\bf fVerT} (argument) |
68 |
|
|
|
69 |
|
|
\end{minipage} } |
70 |
|
|
|
71 |
cnh |
1.8 |
The space and time discretization are treated separately (method of |
72 |
|
|
lines). Tendencies are calculated at time levels $n$ and $n-1$ and |
73 |
adcroft |
1.4 |
extrapolated to $n+1/2$ using the Adams-Bashforth method: |
74 |
adcroft |
1.3 |
\marginpar{$\epsilon$: {\bf AB\_eps}} |
75 |
|
|
\begin{equation} |
76 |
adcroft |
1.4 |
G^{(n+1/2)} = |
77 |
adcroft |
1.3 |
(\frac{3}{2} + \epsilon) G^{(n)} - (\frac{1}{2} + \epsilon) G^{(n-1)} |
78 |
|
|
\end{equation} |
79 |
|
|
where $G^{(n)} = G_{adv}^\tau + G_{diff}^\tau + G_{src}^\tau$ at time |
80 |
cnh |
1.8 |
step $n$. The tendency at $n-1$ is not re-calculated but rather the |
81 |
|
|
tendency at $n$ is stored in a global array for later re-use. |
82 |
adcroft |
1.4 |
|
83 |
|
|
\fbox{ \begin{minipage}{4.75in} |
84 |
|
|
{\em S/R ADAMS\_BASHFORTH2} ({\em model/src/adams\_bashforth2.F}) |
85 |
|
|
|
86 |
|
|
$G^{(n+1/2)}$: {\bf gTracer} (argument on exit) |
87 |
|
|
|
88 |
|
|
$G^{(n)}$: {\bf gTracer} (argument on entry) |
89 |
|
|
|
90 |
|
|
$G^{(n-1)}$: {\bf gTrNm1} (argument) |
91 |
|
|
|
92 |
|
|
$\epsilon$: {\bf ABeps} (PARAMS.h) |
93 |
|
|
|
94 |
|
|
\end{minipage} } |
95 |
|
|
|
96 |
cnh |
1.8 |
The tracers are stepped forward in time using the extrapolated tendency: |
97 |
adcroft |
1.4 |
\begin{equation} |
98 |
|
|
\tau^{(n+1)} = \tau^{(n)} + \Delta t G^{(n+1/2)} |
99 |
|
|
\end{equation} |
100 |
|
|
\marginpar{$\Delta t$: {\bf deltaTtracer}} |
101 |
|
|
|
102 |
|
|
\fbox{ \begin{minipage}{4.75in} |
103 |
|
|
{\em S/R TIMESTEP\_TRACER} ({\em model/src/timestep\_tracer.F}) |
104 |
|
|
|
105 |
|
|
$\tau^{(n+1)}$: {\bf gTracer} (argument on exit) |
106 |
|
|
|
107 |
|
|
$\tau^{(n)}$: {\bf tracer} (argument on entry) |
108 |
|
|
|
109 |
|
|
$G^{(n+1/2)}$: {\bf gTracer} (argument) |
110 |
|
|
|
111 |
|
|
$\Delta t$: {\bf deltaTtracer} (PARAMS.h) |
112 |
|
|
|
113 |
|
|
\end{minipage} } |
114 |
adcroft |
1.3 |
|
115 |
|
|
Strictly speaking the ABII scheme should be applied only to the |
116 |
cnh |
1.8 |
advection terms. However, this scheme is only used in conjunction with |
117 |
adcroft |
1.3 |
the standard second, third and fourth order advection |
118 |
|
|
schemes. Selection of any other advection scheme disables |
119 |
|
|
Adams-Bashforth for tracers so that explicit diffusion and forcing use |
120 |
|
|
the forward method. |
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
adcroft |
1.4 |
\section{Linear advection schemes} |
126 |
adcroft |
1.3 |
|
127 |
|
|
\begin{figure} |
128 |
|
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-lo.eps}} |
129 |
|
|
\caption{ |
130 |
|
|
Comparison of 1-D advection schemes. Courant number is 0.05 with 60 |
131 |
|
|
points and solutions are shown for T=1 (one complete period). |
132 |
|
|
a) Shows the upwind biased schemes; first order upwind, DST3, |
133 |
|
|
third order upwind and second order upwind. |
134 |
|
|
b) Shows the centered schemes; Lax-Wendroff, DST4, centered second order, |
135 |
|
|
centered fourth order and finite volume fourth order. |
136 |
|
|
c) Shows the second order flux limiters: minmod, Superbee, |
137 |
|
|
MC limiter and the van Leer limiter. |
138 |
|
|
d) Shows the DST3 method with flux limiters due to Sweby with |
139 |
|
|
$\mu=1$, $\mu=c/(1-c)$ and a fourth order DST method with Sweby limiter, |
140 |
|
|
$\mu=c/(1-c)$. |
141 |
|
|
\label{fig:advect-1d-lo} |
142 |
|
|
} |
143 |
|
|
\end{figure} |
144 |
|
|
|
145 |
|
|
\begin{figure} |
146 |
|
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-hi.eps}} |
147 |
|
|
\caption{ |
148 |
|
|
Comparison of 1-D advection schemes. Courant number is 0.89 with 60 |
149 |
|
|
points and solutions are shown for T=1 (one complete period). |
150 |
|
|
a) Shows the upwind biased schemes; first order upwind and DST3. |
151 |
|
|
Third order upwind and second order upwind are unstable at this Courant number. |
152 |
|
|
b) Shows the centered schemes; Lax-Wendroff, DST4. Centered second order, |
153 |
|
|
centered fourth order and finite volume fourth order and unstable at this |
154 |
|
|
Courant number. |
155 |
|
|
c) Shows the second order flux limiters: minmod, Superbee, |
156 |
|
|
MC limiter and the van Leer limiter. |
157 |
|
|
d) Shows the DST3 method with flux limiters due to Sweby with |
158 |
|
|
$\mu=1$, $\mu=c/(1-c)$ and a fourth order DST method with Sweby limiter, |
159 |
|
|
$\mu=c/(1-c)$. |
160 |
|
|
\label{fig:advect-1d-hi} |
161 |
|
|
} |
162 |
|
|
\end{figure} |
163 |
|
|
|
164 |
|
|
The advection schemes known as centered second order, centered fourth |
165 |
|
|
order, first order upwind and upwind biased third order are known as |
166 |
|
|
linear advection schemes because the coefficient for interpolation of |
167 |
|
|
the advected tracer are linear and a function only of the flow, not |
168 |
|
|
the tracer field it self. We discuss these first since they are most |
169 |
|
|
commonly used in the field and most familiar. |
170 |
|
|
|
171 |
adcroft |
1.2 |
\subsection{Centered second order advection-diffusion} |
172 |
|
|
|
173 |
|
|
The basic discretization, centered second order, is the default. It is |
174 |
cnh |
1.8 |
designed to be consistent with the continuity equation to facilitate |
175 |
adcroft |
1.3 |
conservation properties analogous to the continuum. However, centered |
176 |
cnh |
1.8 |
second order advection is notoriously noisy and must be used in |
177 |
|
|
conjunction with some finite amount of diffusion to produce a sensible |
178 |
adcroft |
1.3 |
solution. |
179 |
|
|
|
180 |
|
|
The advection operator is discretized: |
181 |
adcroft |
1.1 |
\begin{equation} |
182 |
adcroft |
1.3 |
{\cal A}_c \Delta r_f h_c G_{adv}^\tau = |
183 |
|
|
\delta_i F_x + \delta_j F_y + \delta_k F_r |
184 |
adcroft |
1.1 |
\end{equation} |
185 |
adcroft |
1.2 |
where the area integrated fluxes are given by: |
186 |
|
|
\begin{eqnarray} |
187 |
adcroft |
1.3 |
F_x & = & U \overline{ \tau }^i \\ |
188 |
|
|
F_y & = & V \overline{ \tau }^j \\ |
189 |
|
|
F_r & = & W \overline{ \tau }^k |
190 |
adcroft |
1.2 |
\end{eqnarray} |
191 |
adcroft |
1.1 |
The quantities $U$, $V$ and $W$ are volume fluxes defined: |
192 |
|
|
\marginpar{$U$: {\bf uTrans} } |
193 |
|
|
\marginpar{$V$: {\bf vTrans} } |
194 |
|
|
\marginpar{$W$: {\bf rTrans} } |
195 |
|
|
\begin{eqnarray} |
196 |
|
|
U & = & \Delta y_g \Delta r_f h_w u \\ |
197 |
|
|
V & = & \Delta x_g \Delta r_f h_s v \\ |
198 |
|
|
W & = & {\cal A}_c w |
199 |
|
|
\end{eqnarray} |
200 |
|
|
|
201 |
adcroft |
1.3 |
For non-divergent flow, this discretization can be shown to conserve |
202 |
|
|
the tracer both locally and globally and to globally conserve tracer |
203 |
adcroft |
1.10 |
variance, $\tau^2$. The proof is given in \cite{adcroft:95,adcroft:97}. |
204 |
adcroft |
1.3 |
|
205 |
|
|
\fbox{ \begin{minipage}{4.75in} |
206 |
|
|
{\em S/R GAD\_C2\_ADV\_X} ({\em gad\_c2\_adv\_x.F}) |
207 |
|
|
|
208 |
|
|
$F_x$: {\bf uT} (argument) |
209 |
|
|
|
210 |
|
|
$U$: {\bf uTrans} (argument) |
211 |
|
|
|
212 |
|
|
$\tau$: {\bf tracer} (argument) |
213 |
|
|
|
214 |
|
|
{\em S/R GAD\_C2\_ADV\_Y} ({\em gad\_c2\_adv\_y.F}) |
215 |
|
|
|
216 |
|
|
$F_y$: {\bf vT} (argument) |
217 |
|
|
|
218 |
|
|
$V$: {\bf vTrans} (argument) |
219 |
|
|
|
220 |
|
|
$\tau$: {\bf tracer} (argument) |
221 |
|
|
|
222 |
|
|
{\em S/R GAD\_C2\_ADV\_R} ({\em gad\_c2\_adv\_r.F}) |
223 |
|
|
|
224 |
|
|
$F_r$: {\bf wT} (argument) |
225 |
|
|
|
226 |
|
|
$W$: {\bf rTrans} (argument) |
227 |
|
|
|
228 |
|
|
$\tau$: {\bf tracer} (argument) |
229 |
|
|
|
230 |
|
|
\end{minipage} } |
231 |
|
|
|
232 |
|
|
|
233 |
|
|
\subsection{Third order upwind bias advection} |
234 |
|
|
|
235 |
|
|
Upwind biased third order advection offers a relatively good |
236 |
|
|
compromise between accuracy and smoothness. It is not a ``positive'' |
237 |
|
|
scheme meaning false extrema are permitted but the amplitude of such |
238 |
|
|
are significantly reduced over the centered second order method. |
239 |
|
|
|
240 |
|
|
The third order upwind fluxes are discretized: |
241 |
|
|
\begin{eqnarray} |
242 |
|
|
F_x & = & U \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^i |
243 |
|
|
+ \frac{1}{2} |U| \delta_i \frac{1}{6} \delta_{ii} \tau \\ |
244 |
|
|
F_y & = & V \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^j |
245 |
|
|
+ \frac{1}{2} |V| \delta_j \frac{1}{6} \delta_{jj} \tau \\ |
246 |
|
|
F_r & = & W \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^k |
247 |
|
|
+ \frac{1}{2} |W| \delta_k \frac{1}{6} \delta_{kk} \tau |
248 |
|
|
\end{eqnarray} |
249 |
|
|
|
250 |
|
|
At boundaries, $\delta_{\hat{n}} \tau$ is set to zero allowing |
251 |
cnh |
1.8 |
$\delta_{nn}$ to be evaluated. We are currently examine the accuracy |
252 |
adcroft |
1.3 |
of this boundary condition and the effect on the solution. |
253 |
|
|
|
254 |
adcroft |
1.4 |
\fbox{ \begin{minipage}{4.75in} |
255 |
|
|
{\em S/R GAD\_U3\_ADV\_X} ({\em gad\_u3\_adv\_x.F}) |
256 |
|
|
|
257 |
|
|
$F_x$: {\bf uT} (argument) |
258 |
|
|
|
259 |
|
|
$U$: {\bf uTrans} (argument) |
260 |
|
|
|
261 |
|
|
$\tau$: {\bf tracer} (argument) |
262 |
|
|
|
263 |
|
|
{\em S/R GAD\_U3\_ADV\_Y} ({\em gad\_u3\_adv\_y.F}) |
264 |
|
|
|
265 |
|
|
$F_y$: {\bf vT} (argument) |
266 |
|
|
|
267 |
|
|
$V$: {\bf vTrans} (argument) |
268 |
|
|
|
269 |
|
|
$\tau$: {\bf tracer} (argument) |
270 |
|
|
|
271 |
|
|
{\em S/R GAD\_U3\_ADV\_R} ({\em gad\_u3\_adv\_r.F}) |
272 |
|
|
|
273 |
|
|
$F_r$: {\bf wT} (argument) |
274 |
|
|
|
275 |
|
|
$W$: {\bf rTrans} (argument) |
276 |
|
|
|
277 |
|
|
$\tau$: {\bf tracer} (argument) |
278 |
|
|
|
279 |
|
|
\end{minipage} } |
280 |
adcroft |
1.3 |
|
281 |
|
|
\subsection{Centered fourth order advection} |
282 |
|
|
|
283 |
|
|
Centered fourth order advection is formally the most accurate scheme |
284 |
|
|
we have implemented and can be used to great effect in high resolution |
285 |
cnh |
1.8 |
simulation where dynamical scales are well resolved. However, the |
286 |
|
|
scheme is noisy like the centered second order method and so must be |
287 |
adcroft |
1.3 |
used with some finite amount of diffusion. Bi-harmonic is recommended |
288 |
|
|
since it is more scale selective and less likely to diffuse away the |
289 |
|
|
well resolved gradient the fourth order scheme worked so hard to |
290 |
|
|
create. |
291 |
|
|
|
292 |
|
|
The centered fourth order fluxes are discretized: |
293 |
|
|
\begin{eqnarray} |
294 |
|
|
F_x & = & U \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^i \\ |
295 |
|
|
F_y & = & V \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^j \\ |
296 |
|
|
F_r & = & W \overline{\tau - \frac{1}{6} \delta_{ii} \tau}^k |
297 |
|
|
\end{eqnarray} |
298 |
|
|
|
299 |
|
|
As for the third order scheme, the best discretization near boundaries |
300 |
cnh |
1.8 |
is under investigation but currently $\delta_i \tau=0$ on a boundary. |
301 |
adcroft |
1.3 |
|
302 |
adcroft |
1.4 |
\fbox{ \begin{minipage}{4.75in} |
303 |
|
|
{\em S/R GAD\_C4\_ADV\_X} ({\em gad\_c4\_adv\_x.F}) |
304 |
|
|
|
305 |
|
|
$F_x$: {\bf uT} (argument) |
306 |
|
|
|
307 |
|
|
$U$: {\bf uTrans} (argument) |
308 |
|
|
|
309 |
|
|
$\tau$: {\bf tracer} (argument) |
310 |
|
|
|
311 |
|
|
{\em S/R GAD\_C4\_ADV\_Y} ({\em gad\_c4\_adv\_y.F}) |
312 |
|
|
|
313 |
|
|
$F_y$: {\bf vT} (argument) |
314 |
|
|
|
315 |
|
|
$V$: {\bf vTrans} (argument) |
316 |
|
|
|
317 |
|
|
$\tau$: {\bf tracer} (argument) |
318 |
|
|
|
319 |
|
|
{\em S/R GAD\_C4\_ADV\_R} ({\em gad\_c4\_adv\_r.F}) |
320 |
|
|
|
321 |
|
|
$F_r$: {\bf wT} (argument) |
322 |
|
|
|
323 |
|
|
$W$: {\bf rTrans} (argument) |
324 |
|
|
|
325 |
|
|
$\tau$: {\bf tracer} (argument) |
326 |
|
|
|
327 |
|
|
\end{minipage} } |
328 |
|
|
|
329 |
|
|
|
330 |
adcroft |
1.3 |
\subsection{First order upwind advection} |
331 |
|
|
|
332 |
|
|
Although the upwind scheme is the underlying scheme for the robust or |
333 |
|
|
non-linear methods given later, we haven't actually supplied this |
334 |
|
|
method for general use. It would be very diffusive and it is unlikely |
335 |
|
|
that it could ever produce more useful results than the positive |
336 |
|
|
higher order schemes. |
337 |
|
|
|
338 |
|
|
Upwind bias is introduced into many schemes using the {\em abs} |
339 |
|
|
function and is allows the first order upwind flux to be written: |
340 |
|
|
\begin{eqnarray} |
341 |
|
|
F_x & = & U \overline{ \tau }^i - \frac{1}{2} |U| \delta_i \tau \\ |
342 |
|
|
F_y & = & V \overline{ \tau }^j - \frac{1}{2} |V| \delta_j \tau \\ |
343 |
|
|
F_r & = & W \overline{ \tau }^k - \frac{1}{2} |W| \delta_k \tau |
344 |
|
|
\end{eqnarray} |
345 |
|
|
|
346 |
|
|
If for some reason, the above method is required, then the second |
347 |
|
|
order flux limiter scheme described later reduces to the above scheme |
348 |
|
|
if the limiter is set to zero. |
349 |
|
|
|
350 |
|
|
|
351 |
|
|
\section{Non-linear advection schemes} |
352 |
|
|
|
353 |
|
|
Non-linear advection schemes invoke non-linear interpolation and are |
354 |
|
|
widely used in computational fluid dynamics (non-linear does not refer |
355 |
|
|
to the non-linearity of the advection operator). The flux limited |
356 |
|
|
advection schemes belong to the class of finite volume methods which |
357 |
|
|
neatly ties into the spatial discretization of the model. |
358 |
|
|
|
359 |
|
|
When employing the flux limited schemes, first order upwind or |
360 |
|
|
direct-space-time method the time-stepping is switched to forward in |
361 |
|
|
time. |
362 |
|
|
|
363 |
|
|
\subsection{Second order flux limiters} |
364 |
|
|
|
365 |
|
|
The second order flux limiter method can be cast in several ways but |
366 |
|
|
is generally expressed in terms of other flux approximations. For |
367 |
|
|
example, in terms of a first order upwind flux and second order |
368 |
|
|
Lax-Wendroff flux, the limited flux is given as: |
369 |
|
|
\begin{equation} |
370 |
|
|
F = F_1 + \psi(r) F_{LW} |
371 |
|
|
\end{equation} |
372 |
|
|
where $\psi(r)$ is the limiter function, |
373 |
|
|
\begin{equation} |
374 |
|
|
F_1 = u \overline{\tau}^i - \frac{1}{2} |u| \delta_i \tau |
375 |
|
|
\end{equation} |
376 |
|
|
is the upwind flux, |
377 |
|
|
\begin{equation} |
378 |
|
|
F_{LW} = F_1 + \frac{|u|}{2} (1-c) \delta_i \tau |
379 |
|
|
\end{equation} |
380 |
|
|
is the Lax-Wendroff flux and $c = \frac{u \Delta t}{\Delta x}$ is the |
381 |
|
|
Courant (CFL) number. |
382 |
|
|
|
383 |
|
|
The limiter function, $\psi(r)$, takes the slope ratio |
384 |
|
|
\begin{eqnarray} |
385 |
|
|
r = \frac{ \tau_{i-1} - \tau_{i-2} }{ \tau_{i} - \tau_{i-1} } & \forall & u > 0 |
386 |
|
|
\\ |
387 |
|
|
r = \frac{ \tau_{i+1} - \tau_{i} }{ \tau_{i} - \tau_{i-1} } & \forall & u < 0 |
388 |
|
|
\end{eqnarray} |
389 |
|
|
as it's argument. There are many choices of limiter function but we |
390 |
|
|
only provide the Superbee limiter \cite{Roe85}: |
391 |
|
|
\begin{equation} |
392 |
|
|
\psi(r) = \max[0,\min[1,2r],\min[2,r]] |
393 |
|
|
\end{equation} |
394 |
|
|
|
395 |
adcroft |
1.4 |
\fbox{ \begin{minipage}{4.75in} |
396 |
|
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_X} ({\em gad\_fluxlimit\_adv\_x.F}) |
397 |
|
|
|
398 |
|
|
$F_x$: {\bf uT} (argument) |
399 |
|
|
|
400 |
|
|
$U$: {\bf uTrans} (argument) |
401 |
|
|
|
402 |
|
|
$\tau$: {\bf tracer} (argument) |
403 |
|
|
|
404 |
|
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_Y} ({\em gad\_fluxlimit\_adv\_y.F}) |
405 |
|
|
|
406 |
|
|
$F_y$: {\bf vT} (argument) |
407 |
|
|
|
408 |
|
|
$V$: {\bf vTrans} (argument) |
409 |
|
|
|
410 |
|
|
$\tau$: {\bf tracer} (argument) |
411 |
|
|
|
412 |
|
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_R} ({\em gad\_fluxlimit\_adv\_r.F}) |
413 |
|
|
|
414 |
|
|
$F_r$: {\bf wT} (argument) |
415 |
|
|
|
416 |
|
|
$W$: {\bf rTrans} (argument) |
417 |
|
|
|
418 |
|
|
$\tau$: {\bf tracer} (argument) |
419 |
|
|
|
420 |
|
|
\end{minipage} } |
421 |
|
|
|
422 |
adcroft |
1.3 |
|
423 |
|
|
\subsection{Third order direct space time} |
424 |
|
|
|
425 |
|
|
The direct-space-time method deals with space and time discretization |
426 |
cnh |
1.8 |
together (other methods that treat space and time separately are known |
427 |
adcroft |
1.3 |
collectively as the ``Method of Lines''). The Lax-Wendroff scheme |
428 |
|
|
falls into this category; it adds sufficient diffusion to a second |
429 |
|
|
order flux that the forward-in-time method is stable. The upwind |
430 |
|
|
biased third order DST scheme is: |
431 |
|
|
\begin{eqnarray} |
432 |
|
|
F = u \left( \tau_{i-1} |
433 |
|
|
+ d_0 (\tau_{i}-\tau_{i-1}) + d_1 (\tau_{i-1}-\tau_{i-2}) \right) |
434 |
|
|
& \forall & u > 0 \\ |
435 |
|
|
F = u \left( \tau_{i} |
436 |
|
|
- d_0 (\tau_{i}-\tau_{i-1}) - d_1 (\tau_{i+1}-\tau_{i}) \right) |
437 |
|
|
& \forall & u < 0 |
438 |
|
|
\end{eqnarray} |
439 |
|
|
where |
440 |
|
|
\begin{eqnarray} |
441 |
|
|
d_1 & = & \frac{1}{6} ( 2 - |c| ) ( 1 - |c| ) \\ |
442 |
|
|
d_2 & = & \frac{1}{6} ( 1 - |c| ) ( 1 + |c| ) |
443 |
|
|
\end{eqnarray} |
444 |
cnh |
1.8 |
The coefficients $d_0$ and $d_1$ approach $1/3$ and $1/6$ respectively |
445 |
adcroft |
1.3 |
as the Courant number, $c$, vanishes. In this limit, the conventional |
446 |
|
|
third order upwind method is recovered. For finite Courant number, the |
447 |
|
|
deviations from the linear method are analogous to the diffusion added |
448 |
|
|
to centered second order advection in the Lax-Wendroff scheme. |
449 |
|
|
|
450 |
|
|
The DST3 method described above must be used in a forward-in-time |
451 |
|
|
manner and is stable for $0 \le |c| \le 1$. Although the scheme |
452 |
|
|
appears to be forward-in-time, it is in fact second order in time and |
453 |
|
|
the accuracy increases with the Courant number! For low Courant |
454 |
|
|
number, DST3 produces very similar results (indistinguishable in |
455 |
|
|
Fig.~\ref{fig:advect-1d-lo}) to the linear third order method but for |
456 |
|
|
large Courant number, where the linear upwind third order method is |
457 |
|
|
unstable, the scheme is extremely accurate |
458 |
|
|
(Fig.~\ref{fig:advect-1d-hi}) with only minor overshoots. |
459 |
|
|
|
460 |
adcroft |
1.4 |
\fbox{ \begin{minipage}{4.75in} |
461 |
|
|
{\em S/R GAD\_DST3\_ADV\_X} ({\em gad\_dst3\_adv\_x.F}) |
462 |
|
|
|
463 |
|
|
$F_x$: {\bf uT} (argument) |
464 |
|
|
|
465 |
|
|
$U$: {\bf uTrans} (argument) |
466 |
|
|
|
467 |
|
|
$\tau$: {\bf tracer} (argument) |
468 |
|
|
|
469 |
|
|
{\em S/R GAD\_DST3\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F}) |
470 |
|
|
|
471 |
|
|
$F_y$: {\bf vT} (argument) |
472 |
|
|
|
473 |
|
|
$V$: {\bf vTrans} (argument) |
474 |
|
|
|
475 |
|
|
$\tau$: {\bf tracer} (argument) |
476 |
|
|
|
477 |
|
|
{\em S/R GAD\_DST3\_ADV\_R} ({\em gad\_dst3\_adv\_r.F}) |
478 |
|
|
|
479 |
|
|
$F_r$: {\bf wT} (argument) |
480 |
|
|
|
481 |
|
|
$W$: {\bf rTrans} (argument) |
482 |
|
|
|
483 |
|
|
$\tau$: {\bf tracer} (argument) |
484 |
|
|
|
485 |
|
|
\end{minipage} } |
486 |
|
|
|
487 |
|
|
|
488 |
adcroft |
1.3 |
\subsection{Third order direct space time with flux limiting} |
489 |
|
|
|
490 |
|
|
The overshoots in the DST3 method can be controlled with a flux limiter. |
491 |
|
|
The limited flux is written: |
492 |
|
|
\begin{equation} |
493 |
|
|
F = |
494 |
|
|
\frac{1}{2}(u+|u|)\left( \tau_{i-1} + \psi(r^+)(\tau_{i} - \tau_{i-1} )\right) |
495 |
|
|
+ |
496 |
|
|
\frac{1}{2}(u-|u|)\left( \tau_{i-1} + \psi(r^-)(\tau_{i} - \tau_{i-1} )\right) |
497 |
|
|
\end{equation} |
498 |
|
|
where |
499 |
|
|
\begin{eqnarray} |
500 |
|
|
r^+ & = & \frac{\tau_{i-1} - \tau_{i-2}}{\tau_{i} - \tau_{i-1}} \\ |
501 |
|
|
r^- & = & \frac{\tau_{i+1} - \tau_{i}}{\tau_{i} - \tau_{i-1}} |
502 |
|
|
\end{eqnarray} |
503 |
|
|
and the limiter is the Sweby limiter: |
504 |
|
|
\begin{equation} |
505 |
|
|
\psi(r) = \max[0, \min[\min(1,d_0+d_1r],\frac{1-c}{c}r ]] |
506 |
|
|
\end{equation} |
507 |
adcroft |
1.1 |
|
508 |
adcroft |
1.4 |
\fbox{ \begin{minipage}{4.75in} |
509 |
|
|
{\em S/R GAD\_DST3FL\_ADV\_X} ({\em gad\_dst3\_adv\_x.F}) |
510 |
|
|
|
511 |
|
|
$F_x$: {\bf uT} (argument) |
512 |
|
|
|
513 |
|
|
$U$: {\bf uTrans} (argument) |
514 |
|
|
|
515 |
|
|
$\tau$: {\bf tracer} (argument) |
516 |
|
|
|
517 |
|
|
{\em S/R GAD\_DST3FL\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F}) |
518 |
|
|
|
519 |
|
|
$F_y$: {\bf vT} (argument) |
520 |
|
|
|
521 |
|
|
$V$: {\bf vTrans} (argument) |
522 |
|
|
|
523 |
|
|
$\tau$: {\bf tracer} (argument) |
524 |
|
|
|
525 |
|
|
{\em S/R GAD\_DST3FL\_ADV\_R} ({\em gad\_dst3\_adv\_r.F}) |
526 |
|
|
|
527 |
|
|
$F_r$: {\bf wT} (argument) |
528 |
|
|
|
529 |
|
|
$W$: {\bf rTrans} (argument) |
530 |
|
|
|
531 |
|
|
$\tau$: {\bf tracer} (argument) |
532 |
|
|
|
533 |
|
|
\end{minipage} } |
534 |
|
|
|
535 |
|
|
|
536 |
adcroft |
1.3 |
\subsection{Multi-dimensional advection} |
537 |
adcroft |
1.1 |
|
538 |
adcroft |
1.4 |
\begin{figure} |
539 |
|
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-lo-diag.eps}} |
540 |
|
|
\caption{ |
541 |
|
|
Comparison of advection schemes in two dimensions; diagonal advection |
542 |
cnh |
1.8 |
of a resolved Gaussian feature. Courant number is 0.01 with |
543 |
adcroft |
1.4 |
30$\times$30 points and solutions are shown for T=1/2. White lines |
544 |
|
|
indicate zero crossing (ie. the presence of false minima). The left |
545 |
|
|
column shows the second order schemes; top) centered second order with |
546 |
|
|
Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux |
547 |
|
|
limited. The middle column shows the third order schemes; top) upwind |
548 |
|
|
biased third order with Adams-Bashforth, middle) third order direct |
549 |
|
|
space-time method and bottom) the same with flux limiting. The top |
550 |
|
|
right panel shows the centered fourth order scheme with |
551 |
|
|
Adams-Bashforth and right middle panel shows a fourth order variant on |
552 |
|
|
the DST method. Bottom right panel shows the Superbee flux limiter |
553 |
cnh |
1.8 |
(second order) applied independently in each direction (method of |
554 |
adcroft |
1.4 |
lines). |
555 |
|
|
\label{fig:advect-2d-lo-diag} |
556 |
|
|
} |
557 |
|
|
\end{figure} |
558 |
|
|
|
559 |
|
|
\begin{figure} |
560 |
|
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-mid-diag.eps}} |
561 |
|
|
\caption{ |
562 |
|
|
Comparison of advection schemes in two dimensions; diagonal advection |
563 |
cnh |
1.8 |
of a resolved Gaussian feature. Courant number is 0.27 with |
564 |
adcroft |
1.4 |
30$\times$30 points and solutions are shown for T=1/2. White lines |
565 |
|
|
indicate zero crossing (ie. the presence of false minima). The left |
566 |
|
|
column shows the second order schemes; top) centered second order with |
567 |
|
|
Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux |
568 |
|
|
limited. The middle column shows the third order schemes; top) upwind |
569 |
|
|
biased third order with Adams-Bashforth, middle) third order direct |
570 |
|
|
space-time method and bottom) the same with flux limiting. The top |
571 |
|
|
right panel shows the centered fourth order scheme with |
572 |
|
|
Adams-Bashforth and right middle panel shows a fourth order variant on |
573 |
|
|
the DST method. Bottom right panel shows the Superbee flux limiter |
574 |
cnh |
1.8 |
(second order) applied independently in each direction (method of |
575 |
adcroft |
1.4 |
lines). |
576 |
|
|
\label{fig:advect-2d-mid-diag} |
577 |
|
|
} |
578 |
|
|
\end{figure} |
579 |
|
|
|
580 |
|
|
\begin{figure} |
581 |
|
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-hi-diag.eps}} |
582 |
|
|
\caption{ |
583 |
|
|
Comparison of advection schemes in two dimensions; diagonal advection |
584 |
cnh |
1.8 |
of a resolved Gaussian feature. Courant number is 0.47 with |
585 |
adcroft |
1.4 |
30$\times$30 points and solutions are shown for T=1/2. White lines |
586 |
|
|
indicate zero crossings and initial maximum values (ie. the presence |
587 |
|
|
of false extrema). The left column shows the second order schemes; |
588 |
|
|
top) centered second order with Adams-Bashforth, middle) Lax-Wendroff |
589 |
|
|
and bottom) Superbee flux limited. The middle column shows the third |
590 |
|
|
order schemes; top) upwind biased third order with Adams-Bashforth, |
591 |
|
|
middle) third order direct space-time method and bottom) the same with |
592 |
|
|
flux limiting. The top right panel shows the centered fourth order |
593 |
|
|
scheme with Adams-Bashforth and right middle panel shows a fourth |
594 |
|
|
order variant on the DST method. Bottom right panel shows the Superbee |
595 |
cnh |
1.8 |
flux limiter (second order) applied independently in each direction |
596 |
adcroft |
1.4 |
(method of lines). |
597 |
|
|
\label{fig:advect-2d-hi-diag} |
598 |
|
|
} |
599 |
|
|
\end{figure} |
600 |
|
|
|
601 |
|
|
|
602 |
|
|
|
603 |
cnh |
1.8 |
In many of the aforementioned advection schemes the behavior in |
604 |
adcroft |
1.3 |
multiple dimensions is not necessarily as good as the one dimensional |
605 |
cnh |
1.8 |
behavior. For instance, a shape preserving monotonic scheme in one |
606 |
adcroft |
1.3 |
dimension can have severe shape distortion in two dimensions if the |
607 |
|
|
two components of horizontal fluxes are treated independently. There |
608 |
|
|
is a large body of literature on the subject dealing with this problem |
609 |
|
|
and among the fixes are operator and flux splitting methods, corner |
610 |
|
|
flux methods and more. We have adopted a variant on the standard |
611 |
|
|
splitting methods that allows the flux calculations to be implemented |
612 |
|
|
as if in one dimension: |
613 |
|
|
\begin{eqnarray} |
614 |
|
|
\tau^{n+1/3} & = & \tau^{n} |
615 |
|
|
- \Delta t \left( \frac{1}{\Delta x} \delta_i F^x(\tau^{n}) |
616 |
|
|
+ \tau^{n} \frac{1}{\Delta x} \delta_i u \right) \\ |
617 |
|
|
\tau^{n+2/3} & = & \tau^{n} |
618 |
|
|
- \Delta t \left( \frac{1}{\Delta y} \delta_j F^y(\tau^{n+1/3}) |
619 |
|
|
+ \tau^{n} \frac{1}{\Delta y} \delta_i v \right) \\ |
620 |
|
|
\tau^{n+3/3} & = & \tau^{n} |
621 |
|
|
- \Delta t \left( \frac{1}{\Delta r} \delta_k F^x(\tau^{n+2/3}) |
622 |
|
|
+ \tau^{n} \frac{1}{\Delta r} \delta_i w \right) |
623 |
|
|
\end{eqnarray} |
624 |
adcroft |
1.1 |
|
625 |
adcroft |
1.3 |
In order to incorporate this method into the general model algorithm, |
626 |
cnh |
1.8 |
we compute the effective tendency rather than update the tracer so |
627 |
adcroft |
1.3 |
that other terms such as diffusion are using the $n$ time-level and |
628 |
|
|
not the updated $n+3/3$ quantities: |
629 |
|
|
\begin{equation} |
630 |
|
|
G^{n+1/2}_{adv} = \frac{1}{\Delta t} ( \tau^{n+3/3} - \tau^{n} ) |
631 |
|
|
\end{equation} |
632 |
|
|
So that the over all time-stepping looks likes: |
633 |
|
|
\begin{equation} |
634 |
|
|
\tau^{n+1} = \tau^{n} + \Delta t \left( G^{n+1/2}_{adv} + G_{diff}(\tau^{n}) + G^{n}_{forcing} \right) |
635 |
|
|
\end{equation} |
636 |
adcroft |
1.4 |
|
637 |
|
|
\fbox{ \begin{minipage}{4.75in} |
638 |
|
|
{\em S/R GAD\_ADVECTION} ({\em gad\_advection.F}) |
639 |
|
|
|
640 |
|
|
$\tau$: {\bf Tracer} (argument) |
641 |
|
|
|
642 |
|
|
$G^{n+1/2}_{adv}$: {\bf Gtracer} (argument) |
643 |
|
|
|
644 |
|
|
$F_x, F_y, F_r$: {\bf af} (local) |
645 |
|
|
|
646 |
|
|
$U$: {\bf uTrans} (local) |
647 |
|
|
|
648 |
|
|
$V$: {\bf vTrans} (local) |
649 |
|
|
|
650 |
|
|
$W$: {\bf rTrans} (local) |
651 |
|
|
|
652 |
|
|
\end{minipage} } |
653 |
|
|
|
654 |
|
|
|
655 |
|
|
\section{Comparison of advection schemes} |
656 |
|
|
|
657 |
|
|
Figs.~\ref{fig:advect-2d-lo-diag}, \ref{fig:advect-2d-mid-diag} and |
658 |
|
|
\ref{fig:advect-2d-hi-diag} show solutions to a simple diagonal |
659 |
|
|
advection problem using a selection of schemes for low, moderate and |
660 |
|
|
high Courant numbers, respectively. The top row shows the linear |
661 |
|
|
schemes, integrated with the Adams-Bashforth method. Theses schemes |
662 |
|
|
are clearly unstable for the high Courant number and weakly unstable |
663 |
|
|
for the moderate Courant number. The presence of false extrema is very |
664 |
|
|
apparent for all Courant numbers. The middle row shows solutions |
665 |
|
|
obtained with the unlimited but multi-dimensional schemes. These |
666 |
|
|
solutions also exhibit false extrema though the pattern now shows |
667 |
|
|
symmetry due to the multi-dimensional scheme. Also, the schemes are |
668 |
|
|
stable at high Courant number where the linear schemes weren't. The |
669 |
|
|
bottom row (left and middle) shows the limited schemes and most |
670 |
|
|
obvious is the absence of false extrema. The accuracy and stability of |
671 |
|
|
the unlimited non-linear schemes is retained at high Courant number |
672 |
cnh |
1.8 |
but at low Courant number the tendency is to loose amplitude in sharp |
673 |
adcroft |
1.4 |
peaks due to diffusion. The one dimensional tests shown in |
674 |
|
|
Figs.~\ref{fig:advect-1d-lo} and \ref{fig:advect-1d-hi} showed this |
675 |
cnh |
1.8 |
phenomenon. |
676 |
adcroft |
1.4 |
|
677 |
|
|
Finally, the bottom left and right panels use the same advection |
678 |
adcroft |
1.9 |
scheme but the right does not use the multi-dimensional method. At low |
679 |
adcroft |
1.4 |
Courant number this appears to not matter but for moderate Courant |
680 |
cnh |
1.8 |
number severe distortion of the feature is apparent. Moreover, the |
681 |
adcroft |
1.4 |
stability of the multi-dimensional scheme is determined by the maximum |
682 |
|
|
Courant number applied of each dimension while the stability of the |
683 |
|
|
method of lines is determined by the sum. Hence, in the high Courant |
684 |
|
|
number plot, the scheme is unstable. |
685 |
|
|
|
686 |
|
|
With many advection schemes implemented in the code two questions |
687 |
|
|
arise: ``Which scheme is best?'' and ``Why don't you just offer the |
688 |
|
|
best advection scheme?''. Unfortunately, no one advection scheme is |
689 |
|
|
``the best'' for all particular applications and for new applications |
690 |
|
|
it is often a matter of trial to determine which is most |
691 |
|
|
suitable. Here are some guidelines but these are not the rule; |
692 |
|
|
\begin{itemize} |
693 |
|
|
\item If you have a coarsely resolved model, using a |
694 |
|
|
positive or upwind biased scheme will introduce significant diffusion |
695 |
|
|
to the solution and using a centered higher order scheme will |
696 |
|
|
introduce more noise. In this case, simplest may be best. |
697 |
|
|
\item If you have a high resolution model, using a higher order |
698 |
|
|
scheme will give a more accurate solution but scale-selective |
699 |
|
|
diffusion might need to be employed. The flux limited methods |
700 |
|
|
offer similar accuracy in this regime. |
701 |
cnh |
1.8 |
\item If your solution has shocks or propagating fronts then a |
702 |
adcroft |
1.4 |
flux limited scheme is almost essential. |
703 |
|
|
\item If your time-step is limited by advection, the multi-dimensional |
704 |
cnh |
1.8 |
non-linear schemes have the most stability (up to Courant number 1). |
705 |
|
|
\item If you need to know how much diffusion/dissipation has occurred you |
706 |
adcroft |
1.4 |
will have a lot of trouble figuring it out with a non-linear method. |
707 |
adcroft |
1.9 |
\item The presence of false extrema is non-physical and this alone is the |
708 |
adcroft |
1.4 |
strongest argument for using a positive scheme. |
709 |
|
|
\end{itemize} |