• Crutzen, P., , M. Lawrence, , and U. Pöschl, 1999: On the background photo chemistry of tropospheric ozone. Tellus, 51A , 123146.

  • Dunkerton, T., 1989: Body force circulations in a compressible atmosphere: Key concepts. Pure Appl. Geophys., 130 , 243262.

  • Durran, D., 1999: Numerical Methods for Wave Equations in Geophysical Fluid Dynamics. Springer, 465 pp.

  • Falcone, M., , and R. Ferreti, 1998: Convergence analysis for a class of high-order semi-Lagrangian advection schemes. SIAM J. Numer. Anal., 35 , 909940.

    • Search Google Scholar
    • Export Citation
  • Garcia, R., 1987: On the mean meridional circulation of the middle atmosphere. J. Atmos. Sci., 44 , 35993609.

  • Gregory, A., , and V. West, 2002: The sensitivity of a model's stratospheric tape recorder to the choice of advection scheme. Quart. J. Roy. Meteor. Soc., 128 , 18271846.

    • Search Google Scholar
    • Export Citation
  • Hall, T., , D. Waugh, , K. Boering, , and R. Plumb, 1999: Evaluation of transport in stratospheric models. J. Geophys. Res., 104 , 1881518839.

    • Search Google Scholar
    • Export Citation
  • Hill, J., 1976: Homogeneous turbulent mixing with chemical reaction. Rev. Fluid Mech., 8 , 135161.

  • Mesinger, F., , and A. Arakawa, 1976: Numerical methods used in atmospheric models. GARP Publ. Series, No. 17, WHO, 65 pp. [Available from World Meteorological organisation. Case postale No. 5 CH-1211 Geneva, Switzerland.].

    • Search Google Scholar
    • Export Citation
  • View in gallery

    Constant factor S = |Mωωg| of the ratio of the amplitude |M| of the forced part of the numerical solution [see (2.10)] to that of the analytic solution [see (1.8)] for the trapeze scheme as a function of m and mg. The quasi-resonant domain where mmg is excluded and marked by the dashed lines. The crosses mark the noninteger values of mg where the numerical solution is resonant given an integer value of m according to (2.14): γ = α = δ = β = 0.5

  • View in gallery

    Factor S = |Mωωg| of the ratio of the amplitude M of the forced part of the numerical solution [see (2.10)] to that of the analytic solution [see (1.8)] for the backward scheme as a function of m and mg. The dashed lines mark the quasi-resonant domain as in Fig. 1: α = 0, β = 1, γ = 0, δ = 1

  • View in gallery

    Factor S = |M1ωωg| of the ratio of the amplitude |M1| of the forced part of the physical mode of the leapfrog scheme [see (3.9)] and that of the analytic solution (solid). The dashed lines mark the quasi-resonant regime with mmg. Also given is the ratio |M2M1|−1 of the amplitudes of the numerical and physical mode (dashed). The crosses mark the noninteger values of mg for which the numerical mode is resonant given m according to (3.12). The dashed lines mark the quasi-resonant domain as in Fig. 1. The crosses mark the noninteger values of mg where the numerical solution is resonant given an integer value of m. Unstable situations with mg < 2π are excluded

All Time Past Year Past 30 Days
Abstract Views 0 0 0
Full Text Views 33 33 8
PDF Downloads 25 25 8

Advection Equation with Oscillating Forcing: Numerical Aspects

View More View Less
  • 1 Meteorologisches Institut, Universität München, Munich, Germany
© Get Permissions
Full access

Abstract

The numerical solution to the linear advection equation with oscillating forcing is derived in analytic form for two-level schemes and for the leapfrog scheme with an Asselin filter. The numerical solutions are compared to the analytic solution of the advection equation with emphasis on the forced part. A detailed analysis is presented for the trapeze, the backward, and the leapfrog scheme with Asselin filter. Large deviations are found in quasi-resonant situations where the period of forcing and advection are close. Damping schemes fail completely to capture the resonant case. As for amplitude errors, the backward scheme is generally better than the trapeze scheme outside the quasi-resonant domain. However, the backward scheme produces large phase errors while the trapeze solutions are free of such errors. The leapfrog scheme has a resonant solution but generates large-amplitude errors near resonance. On the other hand, phase errors are particularly small in that case. The amplitude of the numerical mode tends to be large if either the forcing period or the advective period are but coarsely resolved. Addition of the Asselin filter removes the numerical high-frequency oscillations but destroys the resonant solution.

Corresponding author address: Joseph Egger, Meteorologisches Institut der Universität München, Theresienstr. 37, 80333 München, Germany. Email: J.Egger@LRZ.uni-muenchen.de

Abstract

The numerical solution to the linear advection equation with oscillating forcing is derived in analytic form for two-level schemes and for the leapfrog scheme with an Asselin filter. The numerical solutions are compared to the analytic solution of the advection equation with emphasis on the forced part. A detailed analysis is presented for the trapeze, the backward, and the leapfrog scheme with Asselin filter. Large deviations are found in quasi-resonant situations where the period of forcing and advection are close. Damping schemes fail completely to capture the resonant case. As for amplitude errors, the backward scheme is generally better than the trapeze scheme outside the quasi-resonant domain. However, the backward scheme produces large phase errors while the trapeze solutions are free of such errors. The leapfrog scheme has a resonant solution but generates large-amplitude errors near resonance. On the other hand, phase errors are particularly small in that case. The amplitude of the numerical mode tends to be large if either the forcing period or the advective period are but coarsely resolved. Addition of the Asselin filter removes the numerical high-frequency oscillations but destroys the resonant solution.

Corresponding author address: Joseph Egger, Meteorologisches Institut der Universität München, Theresienstr. 37, 80333 München, Germany. Email: J.Egger@LRZ.uni-muenchen.de

1. Introduction

The linear advection equation
i1520-0493-131-5-984-e11
for the variable c is chosen and discussed as a standard equation for tests of numerical schemes in nearly all textbooks on numerical methods in fluid mechanics (e.g., Durran 1999). In (1.1) uo is a constant advection velocity, t is time, and x is the spatial coordinate. Given the central importance of advection in fluid dynamics, a numerical scheme must be able to cope with (1.1) before more elaborate systems of equations are considered.
It is an obvious extension of (1.1) to include a forcing term on the right so that
i1520-0493-131-5-984-e12
is the equation to be analyzed. Periodic boundary conditions are imposed for a domain of length L of periodicity. Such an exercise is certainly far from being academic. One may, for example, interpret f as a source or sink term for a trace substance c. Then (1.2) represents a basic situation found in air pollution modeling as well as in transport calculations for chemical reactants (e.g., Hill 1976; Crutzen et al. 1999). We may also interpret c as a meridional or vertical displacement of particles due to a prescribed meridional (vertical) wind f. Such equations must be solved in Lagrangian transport calculations. Despite these obvious applications, (1.2) has been met with relatively little interest. Falcone and Ferreti (1998) investigated the convergence of semi-Lagrangian schemes for a broad family of equations containing (1.2) except that f does not depend on time in their case. Durran (1999) discusses the situation where f = −rc (r constant). Here, we assume
fx,toikxiωt
where ω is a prescribed frequency with period T = 2π/ω and k = 2π/L is a wavenumber with integer m. Oscillatory forcing has been prescribed, for example, by Garcia (1987) and Dunkerton (1989) in idealized models of the stratospheric circulation. A further example is provided by the so-called tape recorder effect, that is, the upward transport of tracers in the Tropics with a tropospheric source that varies periodically in time (e.g., Hall et al. 1999). Quite recently, Gregory and West (2002) investigated the sensitivity of a climate model's transport to the choice of the numerical advection scheme. It must be stressed, however, that (1.2) and (1.3) are highly idealized equations. Nevertheless, progress toward more realistic cases is possible only if we understand the numerics related to (1.2), (1.3).
We are interested in solutions to (1.2), (1.3) for a set of standard numerical schemes. With c = ĉ(t) exp(ikx) follows:
i1520-0493-131-5-984-e14
where o will be absorbed into ĉ in the remainder. In a slightly more general context, (1.4) is also a discrete equation in space. Depending on the type of discretization, kuo in (1.4) may be replaced by a “numerical” frequency ωg with period Tg. For example,
ωguokDxDx,
for centered spatial differences with mesh size Dx. Thus, the equation to be analyzed is
i1520-0493-131-5-984-e16
With initial condition c = at t = 0 the solution to (1.6) is
i1520-0493-131-5-984-e17
In the remainder, we will concentrate on the simplest case = 0 because the first term on the right is the solution of the homogeneous unforced problem, which is discussed extensively in the literature. Thus we will consider the solution
ĉigtiωtωωg
which consists of a forced part ∼exp(−iωt) and a “free” part ∼exp(−gt) needed to satisfy the initial condition ĉ = 0. This solution becomes
ĉtiωt
in the resonant case with ω = ωg. There is a linear growth of the amplitude in this situation while
ĉωgωt1/2ωωg−1
oscillates in the nonresonant case.

In this note, the performance of various numerical schemes with respect to (1.6) will be tested by comparing the related numerical solutions to (1.8) and (1.9).

2. Two-level schemes

a. Exact solution

Following Mesinger and Arakawa (1976) a class of two-level schemes is considered. The corresponding discrete form of (1.6) is
i1520-0493-131-5-984-e21
where Dt is the time step, t = nDt and α + β = 1. It is reasonable to split the forcing the same way between time levels as ĉ so that γ = α, δ = β, but one may consider as well other coefficients: γ, δ with γ + δ = 1. The eigenvalue λ for (2.1) as defined by ĉn+1 = λĉn is
λiαωgDtiβωgDt−1
for the unforced problem. Given λ it is straightforward to construct a solution to (2.1). Assume ĉν = 0 and let the forcing act just at the moment t = νDt. Then we have
ĉν+1DtFνiβωgDt−1
where the right side of (2.1) is denoted by DtFν and thus
ĉnλnν−1ĉν+1λnν−1DtFνiβωgDt−1
at t = nDt for nν + 1. Forcing at all times 0 ≤ νn − 1 induces the response
i1520-0493-131-5-984-e25
With
xλiωDt−1
follows
i1520-0493-131-5-984-e27
Invoking
i1520-0493-131-5-984-e28
we obtain
i1520-0493-131-5-984-e29
With (2.6) after simple manipulations follows
ĉnλniωnDtM,
where
i1520-0493-131-5-984-e211
does not depend on n. The second term ∼exp(−iωnDt) in (2.10) represents the forced part of (1.7) while the first term ∼λn stands for the impact of the initial state. The apparent singularity of M for λ = exp(−iωDt) will be discussed below.

b. Discussion

In what follows, unstable schemes with |λ| > 1 will be excluded. We consider the trapeze scheme with α = β = 1/2, γ = δ = 1/2 and the backward scheme with α = γ = 0, β = δ = 1. The trapeze scheme is the only two-level scheme with |λ| = 1 (e.g., Durran 1999). The first term in (2.10) will be important in that case even for large n. The damped backward scheme with |λ| < 1 tends toward
ĉniωnDtM
for large n. The internal frequency ωg is wiped out by the damping and the forced part is left.

The factor −i(−ω + ωg)−1 of the forced part of the analytic solution (1.7) is purely imaginary. This part of the response is out of phase with the forcing. The numerical solution (2.10) captures this situation if the real part Mr of M vanishes. Simple manipulations show that Mr = 0 for the trapeze scheme if γ = δ as chosen here. The backward scheme generates a phase error.

It is clear that damping schemes cannot capture the singular case (1.8) because |λn| → 0 in (2.10). On the other hand, a resonant solution exists for the trapeze scheme where we may write λ = exp(−)Dt. In the limit θω, the solution (2.10) becomes
i1520-0493-131-5-984-e213
that is, the solution has the same form as (1.8) and approaches (1.8) for Dt → 0. Note, however, that this resonant solution (2.13) does not occur for ω = ωg if the trapeze scheme is used with a finite time step. Instead (2.2) yields the relation
ωgωDtDtωDt
between ωg and ω, which must be satisfied for (2.13) to be the numerical solution. However, (2.14) gives ωgω for Dt → 0.
The ratio |ĉn|/|c(nDt)| = RnS of the amplitude of the numerical and that of the analytic solution contains a time-dependent part Rn and a constant part S = |Mωωg|, where
i1520-0493-131-5-984-e215
for the trapeze scheme. One finds R → 1/2{1 − cos[(ωωg)nDt]}−1 for n → ∞ for damping schemes in the nonresonant case. Obviously, Rn is periodic and does not contain a permanent bias. We will, therefore, concentrate on S in the remainder. In case of resonance such a splitting is not helpful. We have RnS → 0 for n → ∞ and ω = ωg while RnS → ∞ for θ = ω [see (2.13)]. In the same way, the phase error contains a time-dependent part that depends on time and that is not as interesting as the permanent phase error introduced by the fact that M is complex. Thus the quantity d = Mr/Mi provides a reasonable measure of this phase error. As has been mentioned d = 0 for the trapeze scheme.

The intercomparison will be conducted in terms of numerical resolution as represented by the numbers m = T/Dt, mg = Tg/Dt per period. The ratio S is displayed in Fig. 1 as a function of m and mg for the trapeze scheme. This ratio is not a good indicator of the numerical quality along the line m = mg, where S = 0 by definition. It is not reasonable to look only at the second term in (1.7), (2.10) in the case of resonance. The dashed lines restrict the area of the presentation of S. Table 1 gives the ratio of the amplitude of the numerical solution to that of the analytic solution for the resonant case ω = ωg after 100 time steps. A separation of Rn and S does not make sense in this case. A reasonably good approximation is found for mg ≥ 12.

It is seen that S > 1 for m > mg and S < 1 for m < mg. The amplitude error is small with 1 ≤ S ≤ 1.1 for m > mg + 2. Amplitude errors are hardly acceptable for m ≤ 4. The trapeze scheme cannot cope with such high-frequency forcing. Given mg > m > 4, S decreases first with increasing m but increases when the quasi-resonant domain is approached. The errors appear to be tolerable for, say, m > 8, mg > 12. The agreement of both solutions for m = mg, n = 100 is quite good for, say, m > 12. It is clear, however, that the numerical solution will deviate substantially from the analytic one for large n in the case of resonance. After all, |ĉ| = t in (1.8) while |ĉ| < 2 |M| in (2.10). The crosses mark the noninteger values of mg for which the numerical solution is “resonant” for integer values of m [see (2.14)]. Clearly, these points are approaching the line m = mg for increasing m. Even so, Fig. 1 suggests avoiding the quasi-resonant domain. This can be achieved by reducing the time step. If, for example, T = Tg + δTg(|δTg| ≪ Tg, constant), then m = mg + δT/Dt. Thus, a decrease of Dt leads to an increase in the difference of m and mg. There always exists a time step such that the point (m, mg) is no longer within the quasi-resonant domain, except if m = mg exactly. In practice, such reductions of Dt are not always possible nor is it clear a priori if resonance will be encountered. As has been mentioned, there is no phase error for the forced part.

The results for the backward scheme are presented in Fig. 2. By and large, the performance of the backward scheme is better than that of the trapeze scheme except near the domain of resonance where S < 0.5. It is surprising that reasonable values of S result even if m = 2, at least if mg > 5. Of course, the backward scheme fails completely for m = mg. It does not make sense to insert there values of S. The phase errors are larger than 45° (|d| > 1) for mg > m, but are quite small (≤5°) for mmg + 5.

3. Leapfrog scheme

a. Solution

Let us analyze the leapfrog scheme as an example of a widely used three-level scheme. The discrete form of (1.6) is
ĉn+1ĉn−1DtiωgĉnDtiωnDt
in that case. As is well known, this scheme has two eigenvalues:
λ1,2gDtω2gDt21/2
where the lower sign belongs to the numerical mode. In what follows, the stability condition |Dtωg| < 1 is imposed. Assuming as before ĉν = 0 and a forcing at t = νDt it follows that
ĉν+1DtFν
where Fν = exp(−iωνDt) is now the forcing at t = νDt in (3.1). The corresponding general solution is
ĉnnν1nν2
for nν, where
i1520-0493-131-5-984-e35
so that
i1520-0493-131-5-984-e36
Performing the same steps as above we obtain the solution
i1520-0493-131-5-984-e37
for forcing at all times 0 ≤ νn − 1, where
xiλiiωDt−1
We find in analogy to (2.10)
i1520-0493-131-5-984-e39
where
MiDtλ1λ2−1xi−1

b. Discussion

The first (second) expression on the right of (3.9) represents the contribution of the physical (numerical) mode to the solution. Because |λi| = 1, the impact of the initial state is felt at all times. A satisfactory solution results if M1i/(−ω + ωg), |M1| ≫ |M2| and if the phase error is small: λn1i exp(−ωgnDt). However, it is obvious that M1 is not purely imaginary so that the contribution by the physical mode contains a phase error.

As before, a quasi-resonant solution of the type (2.13) exists where amplitudes grow in time. Assuming λ1 = exp(−iωDt), we find
i1520-0493-131-5-984-e311
The first term on the right of (3.11) corresponds with (2.13) while the relative importance of the numerical mode as represented by the second term decreases as time proceeds. The relation (2.14) must be replaced by
ωgωDtDt.
The solid lines in Fig. 3 are isolines of S outside the quasi-resonant domain. The dashed lines are isolines of |M2|/|M1|, that is, of the ratio of the amplitude of the numerical term and that of the physical term. In general, S > 1 except for a small region close to the quasi-resonant domain. Errors can be quite large near the quasi-resonant domain even if m > 12, say. The isoline S = 2, for example, does not enter the quasi-resonant area in Fig. 3. After 100 time steps, a reasonably satisfactory solution is obtained for m ≥ 12, m = mg (Table 1). The crosses denote those solutions where the numerical solution is resonant in the same way as in Fig. 1. Again, the crosses approximate the line m = mg for increasing m. The numerical mode is quite large for m ≤ 5 and/or for mg ≤ 7. The relative importance of this mode is reduced near the quasi-resonant domain. All in all, we have to conclude that amplitude errors may be quite large near resonance even for resolutions as good as m = 15. Off resonance, it is preferable to have mg > 15, m > 6 or mg ≥ 9, m ≥ 12. The phase errors of the physical mode are less than 45° nearly throughout Fig. 3 except for m ≤ 3. They are quite small near the quasi-resonant domain. For example, the phase error is 14° for m = 10, mg = 7 and decreases to 0.6° for m = 10, mg = 11, to increase to 6° for m = 10, mg = 15.
The numerical mode of the leapfrog scheme can be controlled by introducing an Asselin filter (e.g., Durran 1999). This filter couples the solutions at three time levels via
i1520-0493-131-5-984-e313
Incorporation of (3.13) in (3.1) yields
λ1,2gDt2ω2gDt21/2
Of course, (3.9) is valid for this choice of λ1,2 as well. The results are fairly similar to Fig. 3 for a standard choice of ε = 0.06. There is, however, the important difference that |λi|n → 0 for n → ∞. Thus
ĉniωnDtM2M1
for large n. The high-frequency “noise” due to the numerical mode no longer exists. On the other hand, (3.15) is essentially useless near resonance.

4. Conclusions

In the foregoing, the advection equation (1.6) with periodic forcing has been solved numerically using two two-level schemes and the leapfrog scheme with an Asselin filter. The numerical solution has been presented in analytic form so that a rather general intercomparison of the numerical solutions to the analytic solution of (1.6) is possible. The intercomparison has been conducted in the (m, mg) plane. It is found that numerical errors tend to be large near the quasi-resonant domain where mmg. Damping schemes like the backward scheme or the leapfrog scheme with an Asselin filter fail to approach the resonant solution. Reversible, undamped schemes like the trapeze and leapfrog scheme generate a resonant solution that approaches the correct one for increasing resolution in time. Off the quasi-resonant domain it is advisable to resolve both the forced and the advective oscillation reasonably well, although both the trapeze and the backward scheme produce small amplitude errors even if mg is as small as 2–3. However, the related phase errors of the backward scheme are quite large. By and large, the phase errors of the leapfrog scheme are small. The Asselin filter wipes out the high-frequency oscillations but distorts the quasi-resonant solutions.

The solutions presented above include all possibilities for two-level schemes and can be easily modified to cover other three-level schemes where the forcing is assumed to act not only at time step n as in the leapfrog scheme.

Acknowledgments

The comments by the referees helped to clarify several points and to improve the presentation.

REFERENCES

  • Crutzen, P., , M. Lawrence, , and U. Pöschl, 1999: On the background photo chemistry of tropospheric ozone. Tellus, 51A , 123146.

  • Dunkerton, T., 1989: Body force circulations in a compressible atmosphere: Key concepts. Pure Appl. Geophys., 130 , 243262.

  • Durran, D., 1999: Numerical Methods for Wave Equations in Geophysical Fluid Dynamics. Springer, 465 pp.

  • Falcone, M., , and R. Ferreti, 1998: Convergence analysis for a class of high-order semi-Lagrangian advection schemes. SIAM J. Numer. Anal., 35 , 909940.

    • Search Google Scholar
    • Export Citation
  • Garcia, R., 1987: On the mean meridional circulation of the middle atmosphere. J. Atmos. Sci., 44 , 35993609.

  • Gregory, A., , and V. West, 2002: The sensitivity of a model's stratospheric tape recorder to the choice of advection scheme. Quart. J. Roy. Meteor. Soc., 128 , 18271846.

    • Search Google Scholar
    • Export Citation
  • Hall, T., , D. Waugh, , K. Boering, , and R. Plumb, 1999: Evaluation of transport in stratospheric models. J. Geophys. Res., 104 , 1881518839.

    • Search Google Scholar
    • Export Citation
  • Hill, J., 1976: Homogeneous turbulent mixing with chemical reaction. Rev. Fluid Mech., 8 , 135161.

  • Mesinger, F., , and A. Arakawa, 1976: Numerical methods used in atmospheric models. GARP Publ. Series, No. 17, WHO, 65 pp. [Available from World Meteorological organisation. Case postale No. 5 CH-1211 Geneva, Switzerland.].

    • Search Google Scholar
    • Export Citation

Fig. 1.
Fig. 1.

Constant factor S = |Mωωg| of the ratio of the amplitude |M| of the forced part of the numerical solution [see (2.10)] to that of the analytic solution [see (1.8)] for the trapeze scheme as a function of m and mg. The quasi-resonant domain where mmg is excluded and marked by the dashed lines. The crosses mark the noninteger values of mg where the numerical solution is resonant given an integer value of m according to (2.14): γ = α = δ = β = 0.5

Citation: Monthly Weather Review 131, 5; 10.1175/1520-0493(2003)131<0984:AEWOFN>2.0.CO;2

Fig. 2.
Fig. 2.

Factor S = |Mωωg| of the ratio of the amplitude M of the forced part of the numerical solution [see (2.10)] to that of the analytic solution [see (1.8)] for the backward scheme as a function of m and mg. The dashed lines mark the quasi-resonant domain as in Fig. 1: α = 0, β = 1, γ = 0, δ = 1

Citation: Monthly Weather Review 131, 5; 10.1175/1520-0493(2003)131<0984:AEWOFN>2.0.CO;2

Fig. 3.
Fig. 3.

Factor S = |M1ωωg| of the ratio of the amplitude |M1| of the forced part of the physical mode of the leapfrog scheme [see (3.9)] and that of the analytic solution (solid). The dashed lines mark the quasi-resonant regime with mmg. Also given is the ratio |M2M1|−1 of the amplitudes of the numerical and physical mode (dashed). The crosses mark the noninteger values of mg for which the numerical mode is resonant given m according to (3.12). The dashed lines mark the quasi-resonant domain as in Fig. 1. The crosses mark the noninteger values of mg where the numerical solution is resonant given an integer value of m. Unstable situations with mg < 2π are excluded

Citation: Monthly Weather Review 131, 5; 10.1175/1520-0493(2003)131<0984:AEWOFN>2.0.CO;2

Table 1.

Ratio of the amplitude of the numerical solution to that of the analytic one after 100 time steps for the resonant case with ω = ωg for the trapeze and leapfrog schemes

Table 1.
Save