/[MITgcm]/manual/s_algorithm/text/tracer.tex
ViewVC logotype

Diff of /manual/s_algorithm/text/tracer.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by adcroft, Tue Sep 25 20:13:42 2001 UTC revision 1.17 by jmc, Thu Oct 14 19:53:04 2004 UTC
# Line 2  Line 2 
2  % $Name$  % $Name$
3    
4  \section{Tracer equations}  \section{Tracer equations}
5    \label{sect:tracer_equations}
6    
7  The basic discretization used for the tracer equations is the second  The basic discretization used for the tracer equations is the second
8  order piece-wise constant finite volume form of the forced  order piece-wise constant finite volume form of the forced
9  advection-diussion equations. There are many alternatives to second  advection-diffusion equations. There are many alternatives to second
10  order method for advection and alternative parameterizations for the  order method for advection and alternative parameterizations for the
11  sub-grid scale processes. The Gent-McWilliams eddy parameterization,  sub-grid scale processes. The Gent-McWilliams eddy parameterization,
12  KPP mixing scheme and PV flux parameterization are all dealt with in  KPP mixing scheme and PV flux parameterization are all dealt with in
# Line 14  part of the tracer equations and the var Line 15  part of the tracer equations and the var
15  described here.  described here.
16    
17  \subsection{Time-stepping of tracers: ABII}  \subsection{Time-stepping of tracers: ABII}
18    \label{sect:tracer_equations_abII}
19    
20  The default advection scheme is the centered second order method which  The default advection scheme is the centered second order method which
21  requires a second order or quasi-second order time-stepping scheme to  requires a second order or quasi-second order time-stepping scheme to
# Line 41  only affects the surface layer since the Line 43  only affects the surface layer since the
43  everywhere else. This term is therefore referred to as the surface  everywhere else. This term is therefore referred to as the surface
44  correction term. Global conservation is not possible using the  correction term. Global conservation is not possible using the
45  flux-form (as here) and a linearized free-surface  flux-form (as here) and a linearized free-surface
46  (\cite{Griffies00,Campin02}).  (\cite{griffies:00,campin:02}).
47    
48  The continuity equation can be recovered by setting  The continuity equation can be recovered by setting
49  $G_{diff}=G_{forc}=0$ and $\tau=1$.  $G_{diff}=G_{forc}=0$ and $\tau=1$.
50    
51  The driver routine that calls the routines to calculate tendancies are  The driver routine that calls the routines to calculate tendencies are
52  {\em S/R CALC\_GT} and {\em S/R CALC\_GS} for temperature and salt  {\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  (moisture), respectively. These in turn call a generic advection
54  diffusion routine {\em S/R GAD\_CALC\_RHS} that is called with the  diffusion routine {\em S/R GAD\_CALC\_RHS} that is called with the
55  flow field and relevent tracer as arguments and returns the collective  flow field and relevant tracer as arguments and returns the collective
56  tendancy due to advection and diffusion. Forcing is add subsequently  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 tendancy  in {\em S/R CALC\_GT} or {\em S/R CALC\_GS} to the same tendency
58  array.  array.
59    
60  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
# Line 66  $F_r$: {\bf fVerT} (argument) Line 68  $F_r$: {\bf fVerT} (argument)
68    
69  \end{minipage} }  \end{minipage} }
70    
71    The space and time discretization are treated separately (method of
72  The space and time discretizations are treated seperately (method of  lines). Tendencies are calculated at time levels $n$ and $n-1$ and
73  lines). The Adams-Bashforth time discretization reads:  extrapolated to $n+1/2$ using the Adams-Bashforth method:
74  \marginpar{$\epsilon$: {\bf AB\_eps}}  \marginpar{$\epsilon$: {\bf AB\_eps}}
 \marginpar{$\Delta t$: {\bf deltaTtracer}}  
75  \begin{equation}  \begin{equation}
76  \tau^{(n+1)} = \tau^{(n)} + \Delta t \left(  G^{(n+1/2)} =
77  (\frac{3}{2} + \epsilon) G^{(n)} - (\frac{1}{2} + \epsilon) G^{(n-1)}  (\frac{3}{2} + \epsilon) G^{(n)} - (\frac{1}{2} + \epsilon) G^{(n-1)}
 \right)  
78  \end{equation}  \end{equation}
79  where $G^{(n)} = G_{adv}^\tau + G_{diff}^\tau + G_{src}^\tau$ at time  where $G^{(n)} = G_{adv}^\tau + G_{diff}^\tau + G_{src}^\tau$ at time
80  step $n$.  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    
83  Strictly speaking the ABII scheme should be applied only to the  \fbox{ \begin{minipage}{4.75in}
84  advection terms. However, this scheme is only used in conjuction with  {\em S/R ADAMS\_BASHFORTH2} ({\em model/src/adams\_bashforth2.F})
85  the standard second, third and fourth order advection  
86  schemes. Selection of any other advection scheme disables  $G^{(n+1/2)}$: {\bf gTracer} (argument on exit)
87  Adams-Bashforth for tracers so that explicit diffusion and forcing use  
88  the forward method.  $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    The tracers are stepped forward in time using the extrapolated tendency:
97    \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}  \fbox{ \begin{minipage}{4.75in}
103  {\em S/R TIMESTEP\_TRACER} ({\em model/src/timestep\_tracer.F})  {\em S/R TIMESTEP\_TRACER} ({\em model/src/timestep\_tracer.F})
104    
105  $\tau$: {\bf tracer} (argument)  $\tau^{(n+1)}$: {\bf gTracer} (argument on exit)
106    
107  $G^{(n)}$: {\bf gTracer} (argument)  $\tau^{(n)}$: {\bf tracer} (argument on entry)
108    
109  $G^{(n-1)}$: {\bf gTrNm1} (argument)  $G^{(n+1/2)}$: {\bf gTracer} (argument)
110    
111  $\Delta t$: {\bf deltaTtracer} (PARAMS.h)  $\Delta t$: {\bf deltaTtracer} (PARAMS.h)
112    
113  \end{minipage} }  \end{minipage} }
114    
115    Strictly speaking the ABII scheme should be applied only to the
116    advection terms. However, this scheme is only used in conjunction with
117    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    \section{Linear advection schemes}
126    \label{sect:tracer-advection}
127    \begin{rawhtml}
128    <!-- CMIREDIR:linear_advection_schemes: -->
129    \end{rawhtml}
130    
131  \begin{figure}  \begin{figure}
132  \resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-lo.eps}}  \resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-lo.eps}}
133  \caption{  \caption{
# Line 136  $\mu=c/(1-c)$. Line 165  $\mu=c/(1-c)$.
165  }  }
166  \end{figure}  \end{figure}
167    
 \section{Linear advection schemes}  
   
168  The advection schemes known as centered second order, centered fourth  The advection schemes known as centered second order, centered fourth
169  order, first order upwind and upwind biased third order are known as  order, first order upwind and upwind biased third order are known as
170  linear advection schemes because the coefficient for interpolation of  linear advection schemes because the coefficient for interpolation of
# Line 148  commonly used in the field and most fami Line 175  commonly used in the field and most fami
175  \subsection{Centered second order advection-diffusion}  \subsection{Centered second order advection-diffusion}
176    
177  The basic discretization, centered second order, is the default. It is  The basic discretization, centered second order, is the default. It is
178  designed to be consistant with the continuity equation to facilitate  designed to be consistent with the continuity equation to facilitate
179  conservation properties analogous to the continuum. However, centered  conservation properties analogous to the continuum. However, centered
180  second order advection is notoriously noisey and must be used in  second order advection is notoriously noisy and must be used in
181  conjuction with some finite amount of diffusion to produce a sensible  conjunction with some finite amount of diffusion to produce a sensible
182  solution.  solution.
183    
184  The advection operator is discretized:  The advection operator is discretized:
# Line 177  W & = & {\cal A}_c w Line 204  W & = & {\cal A}_c w
204    
205  For non-divergent flow, this discretization can be shown to conserve  For non-divergent flow, this discretization can be shown to conserve
206  the tracer both locally and globally and to globally conserve tracer  the tracer both locally and globally and to globally conserve tracer
207  variance, $\tau^2$. The proof is given in \cite{Adcroft95,Adcroft97}.  variance, $\tau^2$. The proof is given in \cite{adcroft:95,adcroft:97}.
208    
209  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
210  {\em S/R GAD\_C2\_ADV\_X} ({\em gad\_c2\_adv\_x.F})  {\em S/R GAD\_C2\_ADV\_X} ({\em gad\_c2\_adv\_x.F})
# Line 225  F_r & = & W \overline{\tau - \frac{1}{6} Line 252  F_r & = & W \overline{\tau - \frac{1}{6}
252  \end{eqnarray}  \end{eqnarray}
253    
254  At boundaries, $\delta_{\hat{n}} \tau$ is set to zero allowing  At boundaries, $\delta_{\hat{n}} \tau$ is set to zero allowing
255  $\delta_{nn}$ to be evaluated. We are currently examing the accuracy  $\delta_{nn}$ to be evaluated. We are currently examine the accuracy
256  of this boundary condition and the effect on the solution.  of this boundary condition and the effect on the solution.
257    
258    \fbox{ \begin{minipage}{4.75in}
259    {\em S/R GAD\_U3\_ADV\_X} ({\em gad\_u3\_adv\_x.F})
260    
261    $F_x$: {\bf uT} (argument)
262    
263    $U$: {\bf uTrans} (argument)
264    
265    $\tau$: {\bf tracer} (argument)
266    
267    {\em S/R GAD\_U3\_ADV\_Y} ({\em gad\_u3\_adv\_y.F})
268    
269    $F_y$: {\bf vT} (argument)
270    
271    $V$: {\bf vTrans} (argument)
272    
273    $\tau$: {\bf tracer} (argument)
274    
275    {\em S/R GAD\_U3\_ADV\_R} ({\em gad\_u3\_adv\_r.F})
276    
277    $F_r$: {\bf wT} (argument)
278    
279    $W$: {\bf rTrans} (argument)
280    
281    $\tau$: {\bf tracer} (argument)
282    
283    \end{minipage} }
284    
285  \subsection{Centered fourth order advection}  \subsection{Centered fourth order advection}
286    
287  Centered fourth order advection is formally the most accurate scheme  Centered fourth order advection is formally the most accurate scheme
288  we have implemented and can be used to great effect in high resolution  we have implemented and can be used to great effect in high resolution
289  simultation where dynamical scales are well resolved. However, the  simulation where dynamical scales are well resolved. However, the
290  scheme is noisey like the centered second order method and so must be  scheme is noisy like the centered second order method and so must be
291  used with some finite amount of diffusion. Bi-harmonic is recommended  used with some finite amount of diffusion. Bi-harmonic is recommended
292  since it is more scale selective and less likely to diffuse away the  since it is more scale selective and less likely to diffuse away the
293  well resolved gradient the fourth order scheme worked so hard to  well resolved gradient the fourth order scheme worked so hard to
# Line 248  F_r & = & W \overline{\tau - \frac{1}{6} Line 301  F_r & = & W \overline{\tau - \frac{1}{6}
301  \end{eqnarray}  \end{eqnarray}
302    
303  As for the third order scheme, the best discretization near boundaries  As for the third order scheme, the best discretization near boundaries
304  is under investigation but currenlty $\delta_i \tau=0$ on a boundary.  is under investigation but currently $\delta_i \tau=0$ on a boundary.
305    
306    \fbox{ \begin{minipage}{4.75in}
307    {\em S/R GAD\_C4\_ADV\_X} ({\em gad\_c4\_adv\_x.F})
308    
309    $F_x$: {\bf uT} (argument)
310    
311    $U$: {\bf uTrans} (argument)
312    
313    $\tau$: {\bf tracer} (argument)
314    
315    {\em S/R GAD\_C4\_ADV\_Y} ({\em gad\_c4\_adv\_y.F})
316    
317    $F_y$: {\bf vT} (argument)
318    
319    $V$: {\bf vTrans} (argument)
320    
321    $\tau$: {\bf tracer} (argument)
322    
323    {\em S/R GAD\_C4\_ADV\_R} ({\em gad\_c4\_adv\_r.F})
324    
325    $F_r$: {\bf wT} (argument)
326    
327    $W$: {\bf rTrans} (argument)
328    
329    $\tau$: {\bf tracer} (argument)
330    
331    \end{minipage} }
332    
333    
334  \subsection{First order upwind advection}  \subsection{First order upwind advection}
335    
# Line 272  if the limiter is set to zero. Line 353  if the limiter is set to zero.
353    
354    
355  \section{Non-linear advection schemes}  \section{Non-linear advection schemes}
356    \begin{rawhtml}
357    <!-- CMIREDIR:non-linear_advection_schemes: -->
358    \end{rawhtml}
359    
360  Non-linear advection schemes invoke non-linear interpolation and are  Non-linear advection schemes invoke non-linear interpolation and are
361  widely used in computational fluid dynamics (non-linear does not refer  widely used in computational fluid dynamics (non-linear does not refer
# Line 310  r = \frac{ \tau_{i-1} - \tau_{i-2} }{ \t Line 394  r = \frac{ \tau_{i-1} - \tau_{i-2} }{ \t
394  r = \frac{ \tau_{i+1} - \tau_{i} }{ \tau_{i} - \tau_{i-1} } & \forall & u < 0  r = \frac{ \tau_{i+1} - \tau_{i} }{ \tau_{i} - \tau_{i-1} } & \forall & u < 0
395  \end{eqnarray}  \end{eqnarray}
396  as it's argument. There are many choices of limiter function but we  as it's argument. There are many choices of limiter function but we
397  only provide the Superbee limiter \cite{Roe85}:  only provide the Superbee limiter \cite{roe:85}:
398  \begin{equation}  \begin{equation}
399  \psi(r) = \max[0,\min[1,2r],\min[2,r]]  \psi(r) = \max[0,\min[1,2r],\min[2,r]]
400  \end{equation}  \end{equation}
401    
402    \fbox{ \begin{minipage}{4.75in}
403    {\em S/R GAD\_FLUXLIMIT\_ADV\_X} ({\em gad\_fluxlimit\_adv\_x.F})
404    
405    $F_x$: {\bf uT} (argument)
406    
407    $U$: {\bf uTrans} (argument)
408    
409    $\tau$: {\bf tracer} (argument)
410    
411    {\em S/R GAD\_FLUXLIMIT\_ADV\_Y} ({\em gad\_fluxlimit\_adv\_y.F})
412    
413    $F_y$: {\bf vT} (argument)
414    
415    $V$: {\bf vTrans} (argument)
416    
417    $\tau$: {\bf tracer} (argument)
418    
419    {\em S/R GAD\_FLUXLIMIT\_ADV\_R} ({\em gad\_fluxlimit\_adv\_r.F})
420    
421    $F_r$: {\bf wT} (argument)
422    
423    $W$: {\bf rTrans} (argument)
424    
425    $\tau$: {\bf tracer} (argument)
426    
427    \end{minipage} }
428    
429    
430  \subsection{Third order direct space time}  \subsection{Third order direct space time}
431    
432  The direct-space-time method deals with space and time discretization  The direct-space-time method deals with space and time discretization
433  together (other methods that treat space and time seperately are known  together (other methods that treat space and time separately are known
434  collectively as the ``Method of Lines''). The Lax-Wendroff scheme  collectively as the ``Method of Lines''). The Lax-Wendroff scheme
435  falls into this category; it adds sufficient diffusion to a second  falls into this category; it adds sufficient diffusion to a second
436  order flux that the forward-in-time method is stable. The upwind  order flux that the forward-in-time method is stable. The upwind
# Line 337  where Line 448  where
448  d_1 & = & \frac{1}{6} ( 2 - |c| ) ( 1 - |c| ) \\  d_1 & = & \frac{1}{6} ( 2 - |c| ) ( 1 - |c| ) \\
449  d_2 & = & \frac{1}{6} ( 1 - |c| ) ( 1 + |c| )  d_2 & = & \frac{1}{6} ( 1 - |c| ) ( 1 + |c| )
450  \end{eqnarray}  \end{eqnarray}
451  The coefficients $d_0$ and $d_1$ approach $1/3$ and $1/6$ repectively  The coefficients $d_0$ and $d_1$ approach $1/3$ and $1/6$ respectively
452  as the Courant number, $c$, vanishes. In this limit, the conventional  as the Courant number, $c$, vanishes. In this limit, the conventional
453  third order upwind method is recovered. For finite Courant number, the  third order upwind method is recovered. For finite Courant number, the
454  deviations from the linear method are analogous to the diffusion added  deviations from the linear method are analogous to the diffusion added
# Line 345  to centered second order advection in th Line 456  to centered second order advection in th
456    
457  The DST3 method described above must be used in a forward-in-time  The DST3 method described above must be used in a forward-in-time
458  manner and is stable for $0 \le |c| \le 1$. Although the scheme  manner and is stable for $0 \le |c| \le 1$. Although the scheme
459  appears to be forward-in-time, it is in fact second order in time and  appears to be forward-in-time, it is in fact third order in time and
460  the accuracy increases with the Courant number! For low Courant  the accuracy increases with the Courant number! For low Courant
461  number, DST3 produces very similar results (indistinguishable in  number, DST3 produces very similar results (indistinguishable in
462  Fig.~\ref{fig:advect-1d-lo}) to the linear third order method but for  Fig.~\ref{fig:advect-1d-lo}) to the linear third order method but for
# Line 353  large Courant number, where the linear u Line 464  large Courant number, where the linear u
464  unstable, the scheme is extremely accurate  unstable, the scheme is extremely accurate
465  (Fig.~\ref{fig:advect-1d-hi}) with only minor overshoots.  (Fig.~\ref{fig:advect-1d-hi}) with only minor overshoots.
466    
467    \fbox{ \begin{minipage}{4.75in}
468    {\em S/R GAD\_DST3\_ADV\_X} ({\em gad\_dst3\_adv\_x.F})
469    
470    $F_x$: {\bf uT} (argument)
471    
472    $U$: {\bf uTrans} (argument)
473    
474    $\tau$: {\bf tracer} (argument)
475    
476    {\em S/R GAD\_DST3\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F})
477    
478    $F_y$: {\bf vT} (argument)
479    
480    $V$: {\bf vTrans} (argument)
481    
482    $\tau$: {\bf tracer} (argument)
483    
484    {\em S/R GAD\_DST3\_ADV\_R} ({\em gad\_dst3\_adv\_r.F})
485    
486    $F_r$: {\bf wT} (argument)
487    
488    $W$: {\bf rTrans} (argument)
489    
490    $\tau$: {\bf tracer} (argument)
491    
492    \end{minipage} }
493    
494    
495  \subsection{Third order direct space time with flux limiting}  \subsection{Third order direct space time with flux limiting}
496    
497  The overshoots in the DST3 method can be controlled with a flux limiter.  The overshoots in the DST3 method can be controlled with a flux limiter.
# Line 373  and the limiter is the Sweby limiter: Line 512  and the limiter is the Sweby limiter:
512  \psi(r) = \max[0, \min[\min(1,d_0+d_1r],\frac{1-c}{c}r ]]  \psi(r) = \max[0, \min[\min(1,d_0+d_1r],\frac{1-c}{c}r ]]
513  \end{equation}  \end{equation}
514    
515    \fbox{ \begin{minipage}{4.75in}
516    {\em S/R GAD\_DST3FL\_ADV\_X} ({\em gad\_dst3\_adv\_x.F})
517    
518    $F_x$: {\bf uT} (argument)
519    
520    $U$: {\bf uTrans} (argument)
521    
522    $\tau$: {\bf tracer} (argument)
523    
524    {\em S/R GAD\_DST3FL\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F})
525    
526    $F_y$: {\bf vT} (argument)
527    
528    $V$: {\bf vTrans} (argument)
529    
530    $\tau$: {\bf tracer} (argument)
531    
532    {\em S/R GAD\_DST3FL\_ADV\_R} ({\em gad\_dst3\_adv\_r.F})
533    
534    $F_r$: {\bf wT} (argument)
535    
536    $W$: {\bf rTrans} (argument)
537    
538    $\tau$: {\bf tracer} (argument)
539    
540    \end{minipage} }
541    
542    
543  \subsection{Multi-dimensional advection}  \subsection{Multi-dimensional advection}
544    
545  In many of the aforementioned advection schemes the behaviour in  \begin{figure}
546    \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-lo-diag.eps}}
547    \caption{
548    Comparison of advection schemes in two dimensions; diagonal advection
549    of a resolved Gaussian feature. Courant number is 0.01 with
550    30$\times$30 points and solutions are shown for T=1/2. White lines
551    indicate zero crossing (ie. the presence of false minima).  The left
552    column shows the second order schemes; top) centered second order with
553    Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux
554    limited. The middle column shows the third order schemes; top) upwind
555    biased third order with Adams-Bashforth, middle) third order direct
556    space-time method and bottom) the same with flux limiting. The top
557    right panel shows the centered fourth order scheme with
558    Adams-Bashforth and right middle panel shows a fourth order variant on
559    the DST method. Bottom right panel shows the Superbee flux limiter
560    (second order) applied independently in each direction (method of
561    lines).
562    \label{fig:advect-2d-lo-diag}
563    }
564    \end{figure}
565    
566    \begin{figure}
567    \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-mid-diag.eps}}
568    \caption{
569    Comparison of advection schemes in two dimensions; diagonal advection
570    of a resolved Gaussian feature. Courant number is 0.27 with
571    30$\times$30 points and solutions are shown for T=1/2. White lines
572    indicate zero crossing (ie. the presence of false minima).  The left
573    column shows the second order schemes; top) centered second order with
574    Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux
575    limited. The middle column shows the third order schemes; top) upwind
576    biased third order with Adams-Bashforth, middle) third order direct
577    space-time method and bottom) the same with flux limiting. The top
578    right panel shows the centered fourth order scheme with
579    Adams-Bashforth and right middle panel shows a fourth order variant on
580    the DST method. Bottom right panel shows the Superbee flux limiter
581    (second order) applied independently in each direction (method of
582    lines).
583    \label{fig:advect-2d-mid-diag}
584    }
585    \end{figure}
586    
587    \begin{figure}
588    \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-hi-diag.eps}}
589    \caption{
590    Comparison of advection schemes in two dimensions; diagonal advection
591    of a resolved Gaussian feature. Courant number is 0.47 with
592    30$\times$30 points and solutions are shown for T=1/2. White lines
593    indicate zero crossings and initial maximum values (ie. the presence
594    of false extrema).  The left column shows the second order schemes;
595    top) centered second order with Adams-Bashforth, middle) Lax-Wendroff
596    and bottom) Superbee flux limited. The middle column shows the third
597    order schemes; top) upwind biased third order with Adams-Bashforth,
598    middle) third order direct space-time method and bottom) the same with
599    flux limiting. The top right panel shows the centered fourth order
600    scheme with Adams-Bashforth and right middle panel shows a fourth
601    order variant on the DST method. Bottom right panel shows the Superbee
602    flux limiter (second order) applied independently in each direction
603    (method of lines).
604    \label{fig:advect-2d-hi-diag}
605    }
606    \end{figure}
607    
608    
609    
610    In many of the aforementioned advection schemes the behavior in
611  multiple dimensions is not necessarily as good as the one dimensional  multiple dimensions is not necessarily as good as the one dimensional
612  behaviour. For instance, a shape preserving monotonic scheme in one  behavior. For instance, a shape preserving monotonic scheme in one
613  dimension can have severe shape distortion in two dimensions if the  dimension can have severe shape distortion in two dimensions if the
614  two components of horizontal fluxes are treated independently. There  two components of horizontal fluxes are treated independently. There
615  is a large body of literature on the subject dealing with this problem  is a large body of literature on the subject dealing with this problem
# Line 398  as if in one dimension: Line 630  as if in one dimension:
630  \end{eqnarray}  \end{eqnarray}
631    
632  In order to incorporate this method into the general model algorithm,  In order to incorporate this method into the general model algorithm,
633  we compute the effective tendancy rather than update the tracer so  we compute the effective tendency rather than update the tracer so
634  that other terms such as diffusion are using the $n$ time-level and  that other terms such as diffusion are using the $n$ time-level and
635  not the updated $n+3/3$ quantities:  not the updated $n+3/3$ quantities:
636  \begin{equation}  \begin{equation}
# Line 408  So that the over all time-stepping looks Line 640  So that the over all time-stepping looks
640  \begin{equation}  \begin{equation}
641  \tau^{n+1} = \tau^{n} + \Delta t \left( G^{n+1/2}_{adv} + G_{diff}(\tau^{n}) + G^{n}_{forcing} \right)  \tau^{n+1} = \tau^{n} + \Delta t \left( G^{n+1/2}_{adv} + G_{diff}(\tau^{n}) + G^{n}_{forcing} \right)
642  \end{equation}  \end{equation}
643    
644    \fbox{ \begin{minipage}{4.75in}
645    {\em S/R GAD\_ADVECTION} ({\em gad\_advection.F})
646    
647    $\tau$: {\bf Tracer} (argument)
648    
649    $G^{n+1/2}_{adv}$: {\bf Gtracer} (argument)
650    
651    $F_x, F_y, F_r$: {\bf af} (local)
652    
653    $U$: {\bf uTrans} (local)
654    
655    $V$: {\bf vTrans} (local)
656    
657    $W$: {\bf rTrans} (local)
658    
659    \end{minipage} }
660    
661    
662    \section{Comparison of advection schemes}
663    
664    \begin{table}[htb]
665    \centering
666     \begin{tabular}[htb]{|l|c|c|c|c|l|}
667       \hline
668       Advection Scheme & code & use  & use Multi- & Stencil & comments \\
669                        &      & A.B. & dimension & (1 dim) & \\
670       \hline \hline
671       centered $2^{nd}$order & 2 &  Yes & No & 3 pts & linear \\
672       \hline
673       $3^{rd}$order upwind   & 3 &  Yes & No & 5 pts & linear/tracer\\
674       \hline
675       centered $4^{th}$order & 4 &  Yes & No & 5 pts & linear \\
676       \hline \hline
677    %  Lax-Wendroff       & 10 &  No & Yes & 3 pts & linear/tracer, non-linear/flow\\
678    %  \hline
679       $3^{rd}$order DST & 30 &  No & Yes & 5 pts & linear/tracer, non-linear/flow\\
680       \hline \hline
681       $2^{nd}$order Flux Limiters & 77 &  No & Yes & 5 pts & non-linear \\
682       \hline
683       $3^{nd}$order DST Flux limiter & 33 &  No & Yes & 5 pts & non-linear \\
684       \hline
685     \end{tabular}
686     \caption{Summary of the different advection schemes available in MITgcm.
687              ``A.B.'' stands for Adams-Bashforth and ``DST'' for direct space time.
688              The code corresponds to the number used to select the corresponding
689              advection scheme in the parameter file (e.g., {\em tempAdvScheme=3} in
690              file {\em data} selects the $3^{rd}$ order upwind advection scheme
691              for temperature).
692       }
693     \label{tab:advectionShemes_summary}
694    \end{table}
695    
696    
697    Figs.~\ref{fig:advect-2d-lo-diag}, \ref{fig:advect-2d-mid-diag} and
698    \ref{fig:advect-2d-hi-diag} show solutions to a simple diagonal
699    advection problem using a selection of schemes for low, moderate and
700    high Courant numbers, respectively. The top row shows the linear
701    schemes, integrated with the Adams-Bashforth method. Theses schemes
702    are clearly unstable for the high Courant number and weakly unstable
703    for the moderate Courant number. The presence of false extrema is very
704    apparent for all Courant numbers. The middle row shows solutions
705    obtained with the unlimited but multi-dimensional schemes. These
706    solutions also exhibit false extrema though the pattern now shows
707    symmetry due to the multi-dimensional scheme. Also, the schemes are
708    stable at high Courant number where the linear schemes weren't. The
709    bottom row (left and middle) shows the limited schemes and most
710    obvious is the absence of false extrema. The accuracy and stability of
711    the unlimited non-linear schemes is retained at high Courant number
712    but at low Courant number the tendency is to loose amplitude in sharp
713    peaks due to diffusion. The one dimensional tests shown in
714    Figs.~\ref{fig:advect-1d-lo} and \ref{fig:advect-1d-hi} showed this
715    phenomenon.
716    
717    Finally, the bottom left and right panels use the same advection
718    scheme but the right does not use the multi-dimensional method. At low
719    Courant number this appears to not matter but for moderate Courant
720    number severe distortion of the feature is apparent. Moreover, the
721    stability of the multi-dimensional scheme is determined by the maximum
722    Courant number applied of each dimension while the stability of the
723    method of lines is determined by the sum. Hence, in the high Courant
724    number plot, the scheme is unstable.
725    
726    With many advection schemes implemented in the code two questions
727    arise: ``Which scheme is best?'' and ``Why don't you just offer the
728    best advection scheme?''. Unfortunately, no one advection scheme is
729    ``the best'' for all particular applications and for new applications
730    it is often a matter of trial to determine which is most
731    suitable. Here are some guidelines but these are not the rule;
732    \begin{itemize}
733    \item If you have a coarsely resolved model, using a
734    positive or upwind biased scheme will introduce significant diffusion
735    to the solution and using a centered higher order scheme will
736    introduce more noise. In this case, simplest may be best.
737    \item If you have a high resolution model, using a higher order
738    scheme will give a more accurate solution but scale-selective
739    diffusion might need to be employed. The flux limited methods
740    offer similar accuracy in this regime.
741    \item If your solution has shocks or propagating fronts then a
742    flux limited scheme is almost essential.
743    \item If your time-step is limited by advection, the multi-dimensional
744    non-linear schemes have the most stability (up to Courant number 1).
745    \item If you need to know how much diffusion/dissipation has occurred you
746    will have a lot of trouble figuring it out with a non-linear method.
747    \item The presence of false extrema is non-physical and this alone is the
748    strongest argument for using a positive scheme.
749    \end{itemize}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.22