/[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.5 by cnh, Wed Oct 24 14:19:34 2001 UTC revision 1.11 by adcroft, Tue Nov 13 19:01:42 2001 UTC
# Line 2  Line 2 
2  % $Name$  % $Name$
3    
4  \section{Tracer equations}  \section{Tracer equations}
5  \label{sec:tracer_eqautions}  \label{sec: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 15  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{sec: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 42  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 67  $F_r$: {\bf fVerT} (argument) Line 68  $F_r$: {\bf fVerT} (argument)
68    
69  \end{minipage} }  \end{minipage} }
70    
71  The space and time discretizations are treated seperately (method of  The space and time discretization are treated separately (method of
72  lines). Tendancies are calculated at time levels $n$ and $n-1$ and  lines). Tendencies are calculated at time levels $n$ and $n-1$ and
73  extrapolated to $n+1/2$ using the Adams-Bashforth method:  extrapolated to $n+1/2$ using the Adams-Bashforth method:
74  \marginpar{$\epsilon$: {\bf AB\_eps}}  \marginpar{$\epsilon$: {\bf AB\_eps}}
75  \begin{equation}  \begin{equation}
# Line 76  G^{(n+1/2)} = Line 77  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)}
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$. The tendancy at $n-1$ is not re-calculated but rather the  step $n$. The tendency at $n-1$ is not re-calculated but rather the
81  tendancy at $n$ is stored in a global array for later re-use.  tendency at $n$ is stored in a global array for later re-use.
82    
83  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
84  {\em S/R ADAMS\_BASHFORTH2} ({\em model/src/adams\_bashforth2.F})  {\em S/R ADAMS\_BASHFORTH2} ({\em model/src/adams\_bashforth2.F})
# Line 92  $\epsilon$: {\bf ABeps} (PARAMS.h) Line 93  $\epsilon$: {\bf ABeps} (PARAMS.h)
93    
94  \end{minipage} }  \end{minipage} }
95    
96  The tracers are stepped forward in time using the extrapolated tendancy:  The tracers are stepped forward in time using the extrapolated tendency:
97  \begin{equation}  \begin{equation}
98  \tau^{(n+1)} = \tau^{(n)} + \Delta t G^{(n+1/2)}  \tau^{(n+1)} = \tau^{(n)} + \Delta t G^{(n+1/2)}
99  \end{equation}  \end{equation}
# Line 112  $\Delta t$: {\bf deltaTtracer} (PARAMS.h Line 113  $\Delta t$: {\bf deltaTtracer} (PARAMS.h
113  \end{minipage} }  \end{minipage} }
114    
115  Strictly speaking the ABII scheme should be applied only to the  Strictly speaking the ABII scheme should be applied only to the
116  advection terms. However, this scheme is only used in conjuction with  advection terms. However, this scheme is only used in conjunction with
117  the standard second, third and fourth order advection  the standard second, third and fourth order advection
118  schemes. Selection of any other advection scheme disables  schemes. Selection of any other advection scheme disables
119  Adams-Bashforth for tracers so that explicit diffusion and forcing use  Adams-Bashforth for tracers so that explicit diffusion and forcing use
# Line 170  commonly used in the field and most fami Line 171  commonly used in the field and most fami
171  \subsection{Centered second order advection-diffusion}  \subsection{Centered second order advection-diffusion}
172    
173  The basic discretization, centered second order, is the default. It is  The basic discretization, centered second order, is the default. It is
174  designed to be consistant with the continuity equation to facilitate  designed to be consistent with the continuity equation to facilitate
175  conservation properties analogous to the continuum. However, centered  conservation properties analogous to the continuum. However, centered
176  second order advection is notoriously noisey and must be used in  second order advection is notoriously noisy and must be used in
177  conjuction with some finite amount of diffusion to produce a sensible  conjunction with some finite amount of diffusion to produce a sensible
178  solution.  solution.
179    
180  The advection operator is discretized:  The advection operator is discretized:
# Line 199  W & = & {\cal A}_c w Line 200  W & = & {\cal A}_c w
200    
201  For non-divergent flow, this discretization can be shown to conserve  For non-divergent flow, this discretization can be shown to conserve
202  the tracer both locally and globally and to globally conserve tracer  the tracer both locally and globally and to globally conserve tracer
203  variance, $\tau^2$. The proof is given in \cite{Adcroft95,Adcroft97}.  variance, $\tau^2$. The proof is given in \cite{adcroft:95,adcroft:97}.
204    
205  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
206  {\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 247  F_r & = & W \overline{\tau - \frac{1}{6} Line 248  F_r & = & W \overline{\tau - \frac{1}{6}
248  \end{eqnarray}  \end{eqnarray}
249    
250  At boundaries, $\delta_{\hat{n}} \tau$ is set to zero allowing  At boundaries, $\delta_{\hat{n}} \tau$ is set to zero allowing
251  $\delta_{nn}$ to be evaluated. We are currently examing the accuracy  $\delta_{nn}$ to be evaluated. We are currently examine the accuracy
252  of this boundary condition and the effect on the solution.  of this boundary condition and the effect on the solution.
253    
254  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
# Line 281  $\tau$: {\bf tracer} (argument) Line 282  $\tau$: {\bf tracer} (argument)
282    
283  Centered fourth order advection is formally the most accurate scheme  Centered fourth order advection is formally the most accurate scheme
284  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
285  simultation where dynamical scales are well resolved. However, the  simulation where dynamical scales are well resolved. However, the
286  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
287  used with some finite amount of diffusion. Bi-harmonic is recommended  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  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  well resolved gradient the fourth order scheme worked so hard to
# Line 296  F_r & = & W \overline{\tau - \frac{1}{6} Line 297  F_r & = & W \overline{\tau - \frac{1}{6}
297  \end{eqnarray}  \end{eqnarray}
298    
299  As for the third order scheme, the best discretization near boundaries  As for the third order scheme, the best discretization near boundaries
300  is under investigation but currenlty $\delta_i \tau=0$ on a boundary.  is under investigation but currently $\delta_i \tau=0$ on a boundary.
301    
302  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
303  {\em S/R GAD\_C4\_ADV\_X} ({\em gad\_c4\_adv\_x.F})  {\em S/R GAD\_C4\_ADV\_X} ({\em gad\_c4\_adv\_x.F})
# Line 386  r = \frac{ \tau_{i-1} - \tau_{i-2} }{ \t Line 387  r = \frac{ \tau_{i-1} - \tau_{i-2} }{ \t
387  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
388  \end{eqnarray}  \end{eqnarray}
389  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
390  only provide the Superbee limiter \cite{Roe85}:  only provide the Superbee limiter \cite{roe:85}:
391  \begin{equation}  \begin{equation}
392  \psi(r) = \max[0,\min[1,2r],\min[2,r]]  \psi(r) = \max[0,\min[1,2r],\min[2,r]]
393  \end{equation}  \end{equation}
# Line 422  $\tau$: {\bf tracer} (argument) Line 423  $\tau$: {\bf tracer} (argument)
423  \subsection{Third order direct space time}  \subsection{Third order direct space time}
424    
425  The direct-space-time method deals with space and time discretization  The direct-space-time method deals with space and time discretization
426  together (other methods that treat space and time seperately are known  together (other methods that treat space and time separately are known
427  collectively as the ``Method of Lines''). The Lax-Wendroff scheme  collectively as the ``Method of Lines''). The Lax-Wendroff scheme
428  falls into this category; it adds sufficient diffusion to a second  falls into this category; it adds sufficient diffusion to a second
429  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 440  where Line 441  where
441  d_1 & = & \frac{1}{6} ( 2 - |c| ) ( 1 - |c| ) \\  d_1 & = & \frac{1}{6} ( 2 - |c| ) ( 1 - |c| ) \\
442  d_2 & = & \frac{1}{6} ( 1 - |c| ) ( 1 + |c| )  d_2 & = & \frac{1}{6} ( 1 - |c| ) ( 1 + |c| )
443  \end{eqnarray}  \end{eqnarray}
444  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
445  as the Courant number, $c$, vanishes. In this limit, the conventional  as the Courant number, $c$, vanishes. In this limit, the conventional
446  third order upwind method is recovered. For finite Courant number, the  third order upwind method is recovered. For finite Courant number, the
447  deviations from the linear method are analogous to the diffusion added  deviations from the linear method are analogous to the diffusion added
# Line 538  $\tau$: {\bf tracer} (argument) Line 539  $\tau$: {\bf tracer} (argument)
539  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-lo-diag.eps}}  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-lo-diag.eps}}
540  \caption{  \caption{
541  Comparison of advection schemes in two dimensions; diagonal advection  Comparison of advection schemes in two dimensions; diagonal advection
542  of a resolved Guassian feature. Courant number is 0.01 with  of a resolved Gaussian feature. Courant number is 0.01 with
543  30$\times$30 points and solutions are shown for T=1/2. White lines  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  indicate zero crossing (ie. the presence of false minima).  The left
545  column shows the second order schemes; top) centered second order with  column shows the second order schemes; top) centered second order with
# Line 549  space-time method and bottom) the same w Line 550  space-time method and bottom) the same w
550  right panel shows the centered fourth order scheme with  right panel shows the centered fourth order scheme with
551  Adams-Bashforth and right middle panel shows a fourth order variant on  Adams-Bashforth and right middle panel shows a fourth order variant on
552  the DST method. Bottom right panel shows the Superbee flux limiter  the DST method. Bottom right panel shows the Superbee flux limiter
553  (second order) applied independantly in each direction (method of  (second order) applied independently in each direction (method of
554  lines).  lines).
555  \label{fig:advect-2d-lo-diag}  \label{fig:advect-2d-lo-diag}
556  }  }
# Line 559  lines). Line 560  lines).
560  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-mid-diag.eps}}  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-mid-diag.eps}}
561  \caption{  \caption{
562  Comparison of advection schemes in two dimensions; diagonal advection  Comparison of advection schemes in two dimensions; diagonal advection
563  of a resolved Guassian feature. Courant number is 0.27 with  of a resolved Gaussian feature. Courant number is 0.27 with
564  30$\times$30 points and solutions are shown for T=1/2. White lines  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  indicate zero crossing (ie. the presence of false minima).  The left
566  column shows the second order schemes; top) centered second order with  column shows the second order schemes; top) centered second order with
# Line 570  space-time method and bottom) the same w Line 571  space-time method and bottom) the same w
571  right panel shows the centered fourth order scheme with  right panel shows the centered fourth order scheme with
572  Adams-Bashforth and right middle panel shows a fourth order variant on  Adams-Bashforth and right middle panel shows a fourth order variant on
573  the DST method. Bottom right panel shows the Superbee flux limiter  the DST method. Bottom right panel shows the Superbee flux limiter
574  (second order) applied independantly in each direction (method of  (second order) applied independently in each direction (method of
575  lines).  lines).
576  \label{fig:advect-2d-mid-diag}  \label{fig:advect-2d-mid-diag}
577  }  }
# Line 580  lines). Line 581  lines).
581  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-hi-diag.eps}}  \resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-hi-diag.eps}}
582  \caption{  \caption{
583  Comparison of advection schemes in two dimensions; diagonal advection  Comparison of advection schemes in two dimensions; diagonal advection
584  of a resolved Guassian feature. Courant number is 0.47 with  of a resolved Gaussian feature. Courant number is 0.47 with
585  30$\times$30 points and solutions are shown for T=1/2. White lines  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  indicate zero crossings and initial maximum values (ie. the presence
587  of false extrema).  The left column shows the second order schemes;  of false extrema).  The left column shows the second order schemes;
# Line 591  middle) third order direct space-time me Line 592  middle) third order direct space-time me
592  flux limiting. The top right panel shows the centered fourth order  flux limiting. The top right panel shows the centered fourth order
593  scheme with Adams-Bashforth and right middle panel shows a fourth  scheme with Adams-Bashforth and right middle panel shows a fourth
594  order variant on the DST method. Bottom right panel shows the Superbee  order variant on the DST method. Bottom right panel shows the Superbee
595  flux limiter (second order) applied independantly in each direction  flux limiter (second order) applied independently in each direction
596  (method of lines).  (method of lines).
597  \label{fig:advect-2d-hi-diag}  \label{fig:advect-2d-hi-diag}
598  }  }
# Line 599  flux limiter (second order) applied inde Line 600  flux limiter (second order) applied inde
600    
601    
602    
603  In many of the aforementioned advection schemes the behaviour in  In many of the aforementioned advection schemes the behavior in
604  multiple dimensions is not necessarily as good as the one dimensional  multiple dimensions is not necessarily as good as the one dimensional
605  behaviour. For instance, a shape preserving monotonic scheme in one  behavior. For instance, a shape preserving monotonic scheme in one
606  dimension can have severe shape distortion in two dimensions if the  dimension can have severe shape distortion in two dimensions if the
607  two components of horizontal fluxes are treated independently. There  two components of horizontal fluxes are treated independently. There
608  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 622  as if in one dimension: Line 623  as if in one dimension:
623  \end{eqnarray}  \end{eqnarray}
624    
625  In order to incorporate this method into the general model algorithm,  In order to incorporate this method into the general model algorithm,
626  we compute the effective tendancy rather than update the tracer so  we compute the effective tendency rather than update the tracer so
627  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
628  not the updated $n+3/3$ quantities:  not the updated $n+3/3$ quantities:
629  \begin{equation}  \begin{equation}
# Line 668  stable at high Courant number where the Line 669  stable at high Courant number where the
669  bottom row (left and middle) shows the limited schemes and most  bottom row (left and middle) shows the limited schemes and most
670  obvious is the absence of false extrema. The accuracy and stability of  obvious is the absence of false extrema. The accuracy and stability of
671  the unlimited non-linear schemes is retained at high Courant number  the unlimited non-linear schemes is retained at high Courant number
672  but at low Courant number the tendancy is to loose amplitude in sharp  but at low Courant number the tendency is to loose amplitude in sharp
673  peaks due to diffusion. The one dimensional tests shown in  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  Figs.~\ref{fig:advect-1d-lo} and \ref{fig:advect-1d-hi} showed this
675  phenomenum.  phenomenon.
676    
677  Finally, the bottom left and right panels use the same advection  Finally, the bottom left and right panels use the same advection
678  scheme but the right does not use the mutli-dimensional method. At low  scheme but the right does not use the multi-dimensional method. At low
679  Courant number this appears to not matter but for moderate Courant  Courant number this appears to not matter but for moderate Courant
680  number severe distortion of the feature is apparent. Moreoever, the  number severe distortion of the feature is apparent. Moreover, the
681  stability of the multi-dimensional scheme is determined by the maximum  stability of the multi-dimensional scheme is determined by the maximum
682  Courant number applied of each dimension while the stability of the  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  method of lines is determined by the sum. Hence, in the high Courant
# Line 697  introduce more noise. In this case, simp Line 698  introduce more noise. In this case, simp
698  scheme will give a more accurate solution but scale-selective  scheme will give a more accurate solution but scale-selective
699  diffusion might need to be employed. The flux limited methods  diffusion might need to be employed. The flux limited methods
700  offer similar accuracy in this regime.  offer similar accuracy in this regime.
701  \item If your solution has shocks or propagatin fronts then a  \item If your solution has shocks or propagating fronts then a
702  flux limited scheme is almost essential.  flux limited scheme is almost essential.
703  \item If your time-step is limited by advection, the multi-dimensional  \item If your time-step is limited by advection, the multi-dimensional
704  non-linear schemes have the most stablility (upto Courant number 1).  non-linear schemes have the most stability (up to Courant number 1).
705  \item If you need to know how much diffusion/dissipation has occured you  \item If you need to know how much diffusion/dissipation has occurred you
706  will have a lot of trouble figuring it out with a non-linear method.  will have a lot of trouble figuring it out with a non-linear method.
707  \item The presence of false extrema is unphysical and this alone is the  \item The presence of false extrema is non-physical and this alone is the
708  strongest argument for using a positive scheme.  strongest argument for using a positive scheme.
709  \end{itemize}  \end{itemize}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22