## 1. Introduction

In atmospheric modeling, many properties of a numerical scheme contribute to its overall performance. Local accuracy of the operators, numerical stability, phase speed of characteristic waves and conservation laws for mass, momentum, and energy- and vorticity-based quantities have long been a matter of interest (see, e.g., Arakawa 1966; Vichnevetsky and Bowles 1982; Salmon 1983; Zeitlin 1991; Salmon 2005; Sommer and Névir 2009). In related efforts, new classes of numerical schemes have been developed for classical mechanics (Leimkuhler and Reich 2004; Hairer et al. 2006). Of particular interest in this field are conservation laws for energy, symmetry-induced conservation laws, and preservation of the symplectic (i.e., intrinsic geometric) structure. These methods, primarily designed for finite-dimensional systems of ordinary differential equations, are now commonly referred to as geometric integration. Extension of geometric integration to Hamiltonian partial differential equations (Morrison 1998; Shepherd 1990; Salmon 1999) is still an active area of research (Bridges and Reich 2006). See Frank and Reich (2004) for a particular application to atmospheric fluid dynamics.

In this paper, we focus on a particular aspect of geometric integration methods; namely, conservation of volume and time reversibility (Arnold 1989). Considering inviscid atmospheric dynamics as a continuum limit of classical mechanics, time reversibility and volume should be conserved under the ideal fluids contribution to dynamics.

There are practical applications where phase space volume behavior of a given dynamical system can be of relevance. When computing ensemble forecasts, a spurious phase space contraction or expansion could have severe effects on the implied ensemble spread and the dimension of the chaotic attractor (Ehrendorfer 1994a,b). Another application concerns sequential data assimilation via ensemble Kalman filters, where again a correct ensemble spread is crucial for the stability of the filter (Evensen 2006).

The aim of this article is to investigate the impact of common spatial and temporal discretization schemes of a state-of-the-art atmospheric forecast model on phase space volume and its relation to time-reversible discretization methods (Leimkuhler and Reich 2004; Hairer et al. 2006). This topic has been previously addressed in Egger (1996). Dubinkina and Frank (2007) showed that the Arakawa scheme (Arakawa 1966) for two-dimensional incompressible flow is volume conserving. Here we show results of a more general physical and numerical setting.

Section 2 gives a definition of phase space volume conservation for numerical schemes in terms of the Liouville equation and introduces the concept of time reversibility. In section 3, three different spatial discretization schemes of the shallow-water equations on the sphere are compared regarding their phase space volume conservation properties. In section 4, different time integration schemes are compared.

## 2. Volume conservation under numerical discretizations

For this analysis, the discretization process is understood as split into two parts, namely *spatial* (e.g., finite differences) and *temporal* (e.g., implicit midpoint, leapfrog) discretization. This carries a partial differential equation (PDE) over to an ordinary differential equation (ODE) and to an algebraic equation.

### a. Volume conservation and time reversibility under spatial discretization

**z**∈ ℝ

*denotes the complete set of discretization variables of our model. In an abstract notation, we denote the induced solution operator (or flow map) by which provides the state*

^{N}**z**(

*t*) of our model at time

*t*given an initial state

**z**(0) at time

*t*= 0. In many instances a better understanding of our model (1) can be achieved by looking at an ensemble of solutions with probability density function (pdf)

*ρ*(

**z**,

*t*) (Ehrendorfer 1994a,b). The pdf is known to fulfill Liouville’s equation: Here

**∇**·

*X*denotes the standard divergence operator of a vector field

*X*(

**z**) with respect to the state variable

**z**. The divergence operator acts on phase space in a Cartesian way related to the Euclidean scalar product. This is a specific choice for phase space volume measure and other choices are also possible. The one used here is directly related to the physical variables velocity and height. It is also equivalent to any Cartesian volume form accessible by a linear transformation, such as a change to vorticity and divergence variables.

*p*of finding a system in a given comoving volume

*V*(

*t*): Here ∫

_{V}d**z**

*f*(

**z**) denotes the standard volume integral of a function

*f*(

**z**) over

*V*⊂ ℝ

*. If we make*

^{N}*V*(

*t*) infinitesimally small, then

*p*=

*ρδV*and the comoving infinitesimal phase space volume element

*δV*(

*t*) is antiproportional to the comoving pdf

*ρ*(

*t*). In the following when speaking about phase space volume, what is meant is simply the inverse of the pdf. Hence, conservation of volume is equivalent to which, by (2), is equivalent to

**∇**·

*X*= 0 (i.e., the ODE is divergence free).

Since the reversible part of atmospheric fluid dynamics is derived from a continuum version of classical mechanics, conservation of volume holds for the PDE model. Of course, this like any other conservation property of the PDE model need not be preserved under the spatial discretization process. This has been discussed, for example, by Egger (1996). However, conservation of volume is desirable since the ODE model (1) can otherwise possess lower dimensional attractors, which reduce the effective resolution of the numerical model. Known volume conservation spatial discretizations include Zeitlin’s (Zeitlin 1991) and Arakawa’s discretization for the 2D incompressible Euler equations (Dubinkina and Frank 2007).

A concept closely related to volume conservation is that of time reversibility. Time reversibility means that the fluid equations are invariant under a reversal of momenta and time. Mathematically speaking our ODE model (1) is then called time reversible, if there is a linear transformation of variables 𝗦 (the momentum/velocity reversal) such that 𝗦 = 𝗦^{−1} and *X*(𝗦**z**) = −𝗦*X*(**z**). Time reversibility of a PDE is relatively easy to maintain under spatial discretizations except for the advection terms (Egger 1996). In this paper, we consider only spatial discretizations which lead to reversible ODEs (1), see section 3. However, it should be noted that time reversibility does not imply conservation of volume, in general (Lamb 1996; Posch and Hoover 2004), and we will demonstrate this fact numerically in section 3.

### b. Volume conservation and time reversibility under temporal discretization

_{Δt}that maps the prognostic variables

**z**

*=*

_{i}**z**(

*t*) from time step

_{i}*t*to

_{i}*t*

_{i+1}=

*t*+ Δ

_{i}*t*: To fulfill discrete probability conservation in a comoving control volume [corresponding to (3)] the pdf

*ρ*must satisfy The left-hand side of (7) complies with the transformation formula: so that Here, the abbreviation

*ρ*≔

_{i}*ρ*(

**z**

*,*

_{i}*t*) has been used. As expected, conservation of volume is encoded in the conditions that the numerical scheme satisfies det(𝗠

_{i}_{Δt}) = 1. In general it is not known how to devise numerical methods that satisfy this condition for given traceless matrices 𝗔 in (5), see Hairer et al. (2006). Instead the following general result can be shown. Let 𝗠

_{Δt}have numerical accuracy of order

*s*≥ 1: Now (8) can be written as a discrete Liouville equation: A comparison of this to the corresponding equation with the exact solution

*ρ̂*

_{i+1}(in the meaning of an exact time integration of the spatially discretized ODE), shows that the accuracy order of volume conservation is also

*s*.

We now demonstrate that conservation of volume can be achieved for linear systems (5) that are time reversible.

*λ*of 𝗔 come in pairs with opposite signs since Also, since 𝗔 is similar to −𝗔 under the similarity transformation 𝗦, 𝗔 is a traceless matrix. Therefore in the linear case, time reversibility and volume conservation are equivalent. If a numerical method (6) satisfies then it also satisfies which implies det(𝗠

_{Δt}) = 1 and volume is conserved. The condition (13) is satisfied for symmetric Runge–Kutta methods such as the implicit midpoint/trapezoidal rule. It does not hold for nonsymmetric methods such as explicit and implicit Euler and the popular explicit fourth-order Runge–Kutta methods (Leimkuhler and Reich 2004; Hairer et al. 2006). For example, consider the

*θ*method:

*θ*∈ [0, 1]. Then as well as and one easily verifies that (13) holds if and only if

*θ*= ½, which is the implicit midpoint/trapezoidal rule.

*not*imply conservation of volume for nonlinear ODEs, the same applies to numerical methods. We will explore this issue further in the subsequent section and section 4. Note that the modified ODE depends on the step size Δ

*t*and

*t*→ 0.

### c. Volume conservation in terms of Lyapunov exponents

*λ*

_{1}, … ,

*λ*of an

_{N}*N*-dimensional dynamical system (1) are defined as where

*σ*

_{1}, … ,

*σ*are the singular values of the Jacobi matrix of the flow map

_{N}*ϕ*(

_{t}**z**).

**z**

_{i+1}=

*ψ*

_{Δt}(

**z**

*) this becomes for the numerically computed Lyapunov exponents*

_{i}*λ̂*. Here

_{j}*Dψ*

_{Δt}(

**z**) denotes the Jacobian of

*ψ*

_{Δt}at

**z**and the sum is taken along a numerical trajectory

*Dψ*

_{Δt}(

**z**

*)] < 0] takes place, which is reasonably the case here, since any meaningful discretization will satisfy*

_{i}*ρ*/

_{i}*ρ*

_{i+1}≈ 1 for sufficiently small Δ

*t*.

For conservative systems, phase space volume is conserved and therefore the sum of all Lyapunov exponents is equal to zero. A numerical method, which does not conserve volume, may shift the sum of the numerical Lyapunov exponents *λ̂ _{j}* to a negative or positive value. In case of a positive shift, the scheme will be unstable and in the other case, the scheme will possess a lower-dimensional attractor. A third alternative is provided by time-reversible systems for which the sum of the Lyapunov exponents is zero generically.

^{1}Consequently (19) states that, as long as reversibility is ensured, phase space volume is conserved in a long-term average even if locally the vector fields are not divergence free. The same applies to time-reversible time stepping via the modified equation argument (18). In other words, a symmetric time integration scheme with a reversible space discretization can be expected to average out local fluctuations in volume over long-time simulations.

## 3. Experiments with spatial discretization schemes

In this section, three different spatial discretization schemes of the shallow-water equations on a staggered inhomogeneous triangular grid (the ICON grid) will be compared. One is the ICON shallow-water prototype (ICOSWP), a finite-volume scheme with wind and height as prognostic quantities. The second (Helmholtz) is also a finite-volume scheme but with prognostic quantities vorticity, divergence, and height. The third (Nambu) predicts also vorticity, divergence, and height and has additionally algebraic exact conservation properties for total energy and potential enstrophy. A detailed description of these schemes can be found in Sommer and Névir (2009).

For the Nambu discretization scheme (Sommer and Névir 2009), the divergence of the prediction vector field in phase space is the difference of a product of a mean and the mean of a product. This spatial semidiscretization is thus not exactly divergence free and even a perfectly volume-preserving time integration method would not preserve phase space volume. However, the divergence vanishes in the continuum limit and is very small for practical choices of resolution as shown below together with the results of the two other discretization schemes. The divergence of the compressible part of the system is due to grid staggering and inhomogeneity. From the antisymmetric way of constructing the Nambu discretization scheme (Sommer and Névir 2009), it follows that the incompressible part of the vorticity equation is exactly volume preserving. This corresponds to the fact, that the Arakawa Jacobian is divergence free as demonstrated by Dubinkina and Frank (2007).

*N*, the pdf is normalized: The inverse of this quantity can be interpreted as a typical length of a control volume or as the geometric mean ensemble variation. The relation to the Lyapunov exponents is according to (23). It must be stressed though, that even with conserved total volume, the variation may be very different in the distinct dimensions as the volume deforms. To determine variation along the different dimensions, an ensemble forecast would be the appropriate method.

*N*)

**∇**·

*X*(

**z**) against spatial resolution is depicted in Fig. 1 for three different spatial discretization schemes on the ICON grid. The divergence is approximated numerically by disturbing the current state

**z**in a specific phase space dimension with unit vector

**e**

*by Δ*

_{l}*z*

**e**

*for sufficiently small Δ*

_{l}*z*> 0, then computing the change of the tendency in this dimension and summing this up for all phase space dimensions: The values displayed were calculated as a mean along a 3-h trajectory with a shear flow (Galewsky et al. 2004) as an initial condition. Because of the complexity of the problem, only the results for three different values of the resolution (corresponding to 802, 3202, and 12 802 data points, respectively) were computed. With more data available, the order of spatial accuracy

*r*could be determined. However, for the comparison between the different spatial and temporal schemes, we focus on the absolute values. Obviously all three schemes are not divergence free, in contrast to the results for the tendency of potential enstrophy. For that quantity it has been shown in Sommer and Névir (2009) that the tendency of the Nambu scheme vanishes algebraically. Still, all schemes considered here converge and, as will be shown below, volume nonconservation is still rather small compared to that caused by asymmetric time integration schemes.

## 4. Experiments with temporal discretization schemes

In this section, different time integration rules are compared concerning their volume-conservation properties. The spatial resolution for these tests was set at 762 km, corresponding to the lowest resolution in the previous section.

*ψ*

_{Δt}is determined by computing the (nonlinear) change under small variations Δ

*z*: Again, volume conservation is equivalent to det

_{l}*Dψ*

_{Δt}(

**z**

*) = 1 or the vanishing tendency of the normalized pdf.*

_{i}### a. Implicit midpoint rule

Normalized pdf tendency against time step size is plotted in Fig. 2 for different spatial discretization schemes. It can be seen that the nonconservation of volume is dominated by the spatial truncation error.

### b. Leapfrog method

*γ*is the Asselin parameter and

*N*the number of grid points. This yields a discrete Liouville equation of the following form: For typical choices of time step and Asselin parameter values (0.02 has been chosen here), the pdf tendency is positive and the phase space volume is therefore distinctively contracted, see Fig. 3. This is a consequence of the strong damping of the computational mode and it is unclear, what impact this contraction has on the physically relevant dimensions. The spatial scheme chosen here is the ICOSWP scheme, but the other two schemes (Helmholtz and Nambu) give very similar results.

### c. Fourth-order Runge–Kutta scheme

While for the linearized equations, volume conservation under this scheme is of fourth-order accuracy, the results of an experiment (Fig. 3) with the nonlinear equations suggests a very different behavior. Comparing this to the results of the experiments with the symmetric implicit midpoint scheme, the fourth-order explicit Runge–Kutta scheme shows strong volume contraction even for reasonably small time step sizes. To give an impression of the scale of this phenomenon, the result of the same experiment with added viscosity of the form *ν*∇^{2}**v** (*ν* = 10 km^{2} s^{−1}, corresponding to an *e*-folding time of the smallest wavenumbers representable on the grid of half a day) is also displayed in Fig. 3. As expected, the dissipation leads to an additional volume contraction; here about 5% in 3 h. Here 0.1% of energy is dissipated over the same period. While volume contraction due to this viscosity is much stronger than the effect of spatial discretization on volume, it is small compared to the effect of the temporal discretization scheme. This shows clearly, that volume nonconservation by numerical schemes can be comparable or even larger than the effect of the physical processes involved. To give a quantitative argument, the mean length ratio per day Λ_{0}/Λ_{1day(Δt)−1} is estimated from the normalized pdf tendency (Λ_{i+1} − Λ* _{i}*)/Δ

*t*and displayed in Table 1.

## 5. Conclusions

Focusing on the divergence-free example of the shallow-water equations, phase space volume behavior for different discretization schemes has been analyzed. For the spatial discretization, it was found that none of the three schemes tested is a divergence-free approximation, which is due to the variable staggering and the inhomogeneity of the grid.

*ρ̃*that is invariant under (2), that is, implying that there is a modified volume form

*ρ̃d*

**z**that is conserved under the implicit midpoint rule. All other schemes showed significant spurious volume contraction, dominating the effects of space discretization and even that of viscosity (see Table 1). While phase space volume (non)conservation is an abstract property of any dynamical system, the degree of its numerical realization can obviously have an important impact on results of the ensemble forecasting method. The above-mentioned shortcomings will eventually cause a systematic error in ensemble spread and effectively reduce the resolution of the model.

The implicit midpoint/trapezoidal rule shows a desirable behavior with regard to conservation of volume; but it is very expensive to implement. While computationally efficient, standard implementations of semi-implicit variants (Durran 1998) are no longer symmetric. A framework for time-symmetric semi-implicit methods has recently been proposed (Staniforth et al. 2006; Reich 2006; Hundertmark and Reich 2007). These methods should display the same desirable behavior with regard to time-averaged volume conservation as the implicit midpoint/trapezoidal rule.

## Acknowledgments

We thank the three reviewers for their comments, which helped to improve the manuscript. This work has been funded by Deutsche Forschungsgemeinschaft (DFG) as project “Structure Preserving Numerics” and by the Austrian Science Fund (FWF) as Project P21335.

## REFERENCES

Arakawa, A., 1966: Computational design for long-term numerical integration of the equations of fluid motion: Two-dimensional incompressible flow. Part I.

,*J. Comput. Phys.***1****,**119–143.Arnold, V., 1989:

*Mathematical Methods of Classical Mechanics*. 2nd ed. Springer-Verlag, 509 pp.Bridges, T. J., , and S. Reich, 2006: Numerical methods for Hamiltonian PDEs.

,*J. Phys. Math. Gen.***39**(19) 5287–5320.Dubinkina, S., , and J. Frank, 2007: Statistical mechanics of Arakawa’s discretizations.

,*J. Comput. Phys.***227****,**1286–1305.Durran, D., 1998:

*Numerical Methods for Wave Equations in Geophysical Fluid Dynamics*. Springer-Verlag, 482 pp.Egger, J., 1996: Volume conservation in phase space: A fresh look at numerical integration schemes.

,*Mon. Wea. Rev.***124****,**1955–1964.Ehrendorfer, M., 1994a: The Liouville equation and its potential usefulness for the prediction of forecast skill. Part I: Theory.

,*Mon. Wea. Rev.***122****,**703–713.Ehrendorfer, M., 1994b: The Liouville equation and its potential usefulness for the prediction of forecast skill. Part II: Applications.

,*Mon. Wea. Rev.***122****,**714–728.Evensen, G., 2006:

*Data Assimilation: The Ensemble Kalman Filter*. Springer-Verlag, 280 pp.Frank, J., , and S. Reich, 2004: The Hamiltonian particle-mesh method for the spherical shallow water equations.

,*Atmos. Sci. Lett.***5****,**89–95.Galewsky, J., , R. Scott, , and L. Polvani, 2004: An initial-value problem for testing numerical models of the global shallow-water equations.

,*Tellus***56A****,**429–440.Hairer, E., , C. Lubich, , and G. Wanner, 2006:

*Geometric Numerical Integration*. 2nd ed. Springer, 515 pp.Hundertmark, T., , and S. Reich, 2007: A regularization approach for a vertical-slice model and semi-Lagrangian Störmer-Verlet time stepping.

,*Quart. J. Roy. Meteor. Soc.***133****,**1575–1587.Lamb, J. S. W., 1996: Area-preserving dynamics that is not reversible.

,*Physica A: Stat. Mech. Appl.***228****,**(1–4). 344–365.Leimkuhler, B., , and S. Reich, 2004:

*Simulating Hamiltonian Dynamics*. Cambridge University Press, 379 pp.Morrison, P., 1998: Hamiltonian description of the ideal fluid.

,*Rev. Mod. Phys.***70****,**467–521.Posch, H., , and W. Hoover, 2004: Large-system phase space dimensionality loss in stationary heat flows.

,*Physica D***187****,**281–293.Reich, S., 1999: Backward error analysis for numerical integrators.

,*SIAM J. Numer. Anal.***36****,**475–491.Reich, S., 2006: Linearly implicit time stepping methods for numerical weather prediction.

,*BIT Numer. Math.***46****,**607–616.Salmon, R., 1983: Practical use of Hamilton’s principle.

,*J. Fluid Mech.***132****,**431–444.Salmon, R., 1999:

*Lectures on Geophysical Fluid Dynamics*. Oxford University Press, 400 pp.Salmon, R., 2005: A general method for conserving quantities related to potential vorticity in numerical models.

,*Nonlinearity***18****,**R1–R16.Shepherd, T., 1990: Symmetries, conservation laws, and Hamiltonian structure in geophysical fluid dynamics.

*Advances in Geophysics,*Vol. 32, Academic Press, 287–338.Sommer, M., , and P. Névir, 2009: A conservative scheme for the shallow-water system on a staggered geodesic grid based on a Nambu representation.

,*Quart. J. Roy. Meteor. Soc.***135****,**485–494.Staniforth, A., , N. Wood, , and S. Reich, 2006: A time-staggered semi-Lagrangian discretization of the rotating shallow-water equations.

,*Quart. J. Roy. Meteor. Soc.***132****,**3107–3116.Vichnevetsky, R., , and J. Bowles, 1982:

*Fourier Analysis of Numerical Approximations of Hyperbolic Equations*. SIAM, 152 pp.Williamson, D. L., , J. B. Drake, , J. J. Hack, , R. Jakob, , and P. N. Swarztrauber, 1992: A standard test set for numerical approximations to the shallow water equations in spherical geometry.

,*J. Comput. Phys.***102****,**211–224.Zeitlin, V., 1991: Finite-mode analogs of 2D ideal hydrodynamcis: Coadjoint orbits and local canonical structure.

,*Physica D***49****,**353–362.

Mean length ratio of a parallelepiped in phase space during 24 h. Initial condition: Rossby wave; Δ*x* = 762 km, Δ*t* = 2000 s.

^{1}

A nonzero sum of Lyapunov exponents for time-reversible systems is possible for systems with a strong local violation of volume conservation and leads to the existence of low-dimensional attractors and repellors (Posch and Hoover 2004).