## 1. Introduction

The conservative transfer of quantities from one mesh to another has been extensively studied in Lagrangian hydrodynamic applications in Cartesian geometry since the pioneering work of Dukowicz (1984). Perhaps its first application to atmospheric transport in Cartesian geometry was by RanÄiÄ (1992). Rezoning or remapping on the sphere has also received considerable attention in the atmospheric sciences because of its applications in the conservative coupling of components in global climate system models (Jones 1999; Lauritzen and Nair 2008; Ullrich et al. 2009) and conservative semi-Lagrangian tracer transport on global domains (e.g., Lauritzen et al. 2010). Mass conservation in rigorous remapping schemes is more stringent compared to flux-based discretizations (e.g., Lauritzen et al. 2011). In flux-form discretizations any flux, as long as the flux through a cell edge is the same with opposite sign for the neighboring cell sharing that edge, will lead to mass conservation. Mass conservation in high-order remap schemes relies on satisfying integral constraints for the reconstruction function over overlap areas that trivially hold in continuous space; however, in the high-order high-resolution parallel implementation of the Conservative Semi-Lagrangian Multitracer scheme (CSLAM; Lauritzen et al. 2010) on the cubed sphere (Erath et al. 2012) it was found that these constraints are not necessarily satisfied in discretized space mainly because of ill-conditioning of analytic line integrals on the sphere (involving differencing trigonometric functions of similar magnitude). Simply switching integration to more robust quadrature methods may lead to violation of mass conservation. This has motivated a rigorous analysis of mass conservation in remap schemes and the derivation of a generic consistency-enforcement method that ensures mass conservation regardless of numerical method chosen for the identification and integration of overlap areas. This allows for implementing remapping schemes, which are much more robust, against several approximation errors that may appear in the implementations of high-resolution high-order remapping algorithms on the sphere.

The content of this paper is organized as follows. Section 2 describes the remapping problem and provides a mass-conservation analysis. In section 3 we apply the theoretical results and introduce the mass consistency enforcement. Numerical examples confirm the robustness of our approach. Conclusions can be found in section 4.

## 2. The remapping problem and mass conservation

The discussion below focuses on the remap discretization of the transport equation; however, the derivations generalize to the more general remapping problem between two grids.

### a. High-order remapping

*Ļ*in cell

*k*can be written as

*Ļ*at time-level (

*n*+ 1) over cell

*A*with corresponding area |

_{k}*A*|. The definition of

_{k}*A*after one time step Ī

_{k}*t*is denoted

*a*, see Fig. 1a. The overlap area between upstream cell

_{k}*a*and Eulerian cell

_{k}*A*

_{ā}is denoted

*a*overlaps is denoted as

_{k}*A*(for a review see, e.g., Lauritzen et al. 2011). For simplicity, assume that a polynomial reconstruction on the form

_{k}*h*is the degree of the polynomial with

*p*,

*q*,

*h*ā ā

_{0}, and

*Ļ*(

_{k}*x*,

*y*) integrated over the Eulerian cell

*A*yields the cell-averaged mass

_{k}*A*. For fully two-dimensional polynomial reconstructions of degree 2 (

_{k}*h*= 2) choices of

*c*

^{(0,0)}are given in Ullrich et al. (2009, 2012).

### b. Conservation of mass in rigorous remapping schemes

*n*+ 1 and

*n*are equal, which simply reads

*k*ā has been swapped to ā

*k*: instead of summing over Eulerian indices that the upstream cell spans we sum over overlap areas that have nonempty overlap with Eulerian cell

*k*, see also Fig. 2b,

The condition in (8), on which the consistency enforcement method is based, states that the (a) integral of a moment over the Eulerian cell must equal the sum of integrals of that moment over (b) overlap areas that span the Eulerian cell (*A _{k}* =

*a*āŖ

_{ak}*a*āŖ

_{bk}*a*āŖ

_{ck}*a*āŖ

_{dk}*a*) to ensure mass conservation. Note that the different overlap areas belong to different upstream cells.

_{ek}Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The condition in (8), on which the consistency enforcement method is based, states that the (a) integral of a moment over the Eulerian cell must equal the sum of integrals of that moment over (b) overlap areas that span the Eulerian cell (*A _{k}* =

*a*āŖ

_{ak}*a*āŖ

_{bk}*a*āŖ

_{ck}*a*āŖ

_{dk}*a*) to ensure mass conservation. Note that the different overlap areas belong to different upstream cells.

_{ek}Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The condition in (8), on which the consistency enforcement method is based, states that the (a) integral of a moment over the Eulerian cell must equal the sum of integrals of that moment over (b) overlap areas that span the Eulerian cell (*A _{k}* =

*a*āŖ

_{ak}*a*āŖ

_{bk}*a*āŖ

_{ck}*a*āŖ

_{dk}*a*) to ensure mass conservation. Note that the different overlap areas belong to different upstream cells.

_{ek}Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

*p*=

*q*= 0 that is

*A*sum up to the area of the Eulerian cell

_{k}*k*(a graphical illustration is given in Fig. 2). Similar arguments hold for the higher-order moments (

*p*+

*q*> 0).

## 3. Numerical implementation issues

Inexact integration (in particular on the sphere where polynomial reconstruction functions lead to integration of nonpolynomials due to metric terms), such as quadrature or ill-conditioned analytic expressions for the integrals. While high-order quadrature will accurately approximate the weights, the errors may still be above machine precession and lead to a slow accumulation of errors that may result in above machine round-off violation of mass conservation in long simulations.

Inaccuracies in the search algorithm that identifies overlap areas (crossings between a Lagrangian cell side and a coordinate line may be computed twice by neighboring Lagrangian cells and may differ slightly).

Parallel implementation errors where it is common practice to compute the same quantities (in continuous space) on different cores to reduce the number of communications to a minimum. In case of a cubed-sphere grid they might be computed on different projections, such as departure location for points shared by two cubed-sphere edges.

*k*sum to the integral of the same moment over the same Eulerian cell

*k*but computed as one integral.

^{1}We refer to this method as consistency enforcement rather than a āfixerā as it is based on fulfilling integral properties that hold in continuous space and thus spring from physical constraints and not from ad hoc mass-restoration ideas. We stress that this enforcement is local and therefore also suitable for parallel codes without having an extra expensive communication. Also, the scaling of the weights must only be performed once for all fields that are being remapped and it is therefore multitracer efficient.

### a. An example

We illustrate the consistency problem and consistency enforcement method with CSLAM. The weights over ^{2} in (2). Unfortunately, these analytical expressions can become ill conditioned in particular the higher-order moments at high resolution [see Eqs. (32) and (33) in Lauritzen et al. (2010)]. A similar analytical expression can be found in Erath et al. (2009), which becomes numerical unstable for high-resolution meshes. As proposed in Erath et al. (2009) one can replace the analytical integral by quadrature to get a robust approximation. As discussed above, in spherical geometry, this can lead to mass-conservation errors unless the general consistency enforcement method in (10) is used. We illustrate this in the next section.

### b. Numerical experiments

For the following tests we use the third-order accurate CSLAM implementation in the High Order Method Modeling Environment (HOMME; Dennis et al. 2005, 2012), which is documented in Erath et al. (2012). HOMME is a dynamical core in the National Center for Atmospheric Research (NCAR) Community Atmosphere Model (CAM). The tests are performed on the sphere with an analytical wind field and Gaussian surfaces as initial fields [see the wind field case 3 in Nair and Lauritzen (2010)]. We chose a time step of 800 s at resolution 1.12Ā° resulting in a maximum Courant number of 0.8. The Gaussian surfaces are infinitely smooth and leads to the optimal convergence rate of 3 with CSLAM when no shape-preserving filter is applied [Fig. 4 in Lauritzen et al. (2012)]. All tests are run on an equidistant gnomonic grid and air mass and tracer mass are coupled as described in appendix B of Nair and Lauritzen (2010). We stress that our consistency enforcement does not affect the coupling since the weights are reused for both, the air mass and tracer mass. No differences (up to machine precision) can be observed. Consequently a constant mixing ratio is also preserved with consistency enforcement. A constant air mass, however, is not completely preserved for both variants, the version with analytical line integrals and the version with consistency enforcement (e.g., the changes for the scheme with our consistency enforcement and two Gaussian points compared to the version with analytical line integrals are of order 10^{ā6}, which decreases with resolution).

Since the analytic evaluation of the line integrals is ill conditioned, which is manifested through simulation instability under certain flow conditions and resolutions, we replace the analytic integrals used in the original CSLAM with two or four point Gaussian quadrature and run the model with and without consistency enforcement. Figure 3 shows the relative mass error as a function of time step index. As expected mass errors with two quadrature points are significant: ^{ā6}) after 12 days of simulation (Fig. 3a). Increasing the number of quadrature points to four (thereby increasing computational cost) reduces the relative mass errors significantly to ^{ā11}) (Fig. 3b); but still above machine round-off and the error could potentially accumulate over a typical climate-scale simulation on the order of 10 years and more. When using the consistency enforcement algorithm the relative mass errors are around machine round-off: ^{ā13}) at day 12 of the simulation.

The relative mass error for CSLAM in HOMME using line integral approximation with (a) two and (b) four Gaussian points for a 1.12Ā° mesh with and without enforcement of consistency (EOC).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The relative mass error for CSLAM in HOMME using line integral approximation with (a) two and (b) four Gaussian points for a 1.12Ā° mesh with and without enforcement of consistency (EOC).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The relative mass error for CSLAM in HOMME using line integral approximation with (a) two and (b) four Gaussian points for a 1.12Ā° mesh with and without enforcement of consistency (EOC).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

To investigate if the consistency enforcement algorithm affects accuracy we compute *L*^{1}, *L*^{2}, and *L*^{ā} error norms at day 12 at resolutions ranging from 2.25Ā° to 0.07Ā° keeping the Courant number with 0.8 fixed (Fig. 4). The rates of convergence remain third order without a shape-preserving filter, and (almost) third order (*L*^{1}), second order (*L*^{2}), and *L*^{ā}) with a shape-preserving filter as for the original (and less robust) CSLAM implementation using analytic line integrals. Shape preservation and the absolute *L*^{1}, *L*^{2}, and *L*^{ā} errors (up to machine precision) are unaffected by the consistency enforcement algorithm (not shown).

The plot shows the convergence order of different error norms for our test example using line integral approximation with two Gaussian points and manipulation of the weights, consistency enforcement in (10). In particular, the rates of convergence remain third order without a shape-preserving filter, and (almost) third order (*L*^{1}), second order (*L*^{2}), and *L*^{ā}) with a shape-preserving filter as for the original (and less robust) CSLAM implementation using analytic line integrals (not shown).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The plot shows the convergence order of different error norms for our test example using line integral approximation with two Gaussian points and manipulation of the weights, consistency enforcement in (10). In particular, the rates of convergence remain third order without a shape-preserving filter, and (almost) third order (*L*^{1}), second order (*L*^{2}), and *L*^{ā}) with a shape-preserving filter as for the original (and less robust) CSLAM implementation using analytic line integrals (not shown).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

The plot shows the convergence order of different error norms for our test example using line integral approximation with two Gaussian points and manipulation of the weights, consistency enforcement in (10). In particular, the rates of convergence remain third order without a shape-preserving filter, and (almost) third order (*L*^{1}), second order (*L*^{2}), and *L*^{ā}) with a shape-preserving filter as for the original (and less robust) CSLAM implementation using analytic line integrals (not shown).

Citation: Monthly Weather Review 141, 6; 10.1175/MWR-D-13-00002.1

Note that in the original formulation of CSLAM, mass conservation relied on the analytical integration along line segments coinciding with grid lines, which was possible on the gnomonic cubed-sphere grid (Ullrich et al. 2009). This limited the application of CSLAM to a special class of grids. The consistency enforcement algorithm integration over overlap areas can be replaced with quadrature and thereby allow for CSLAM to be implemented on any spherical grid and still be inherently mass conserving. Higher-order edge approximations introduced in the context of simplified flux-form CSLAM (Ullrich et al. 2012) may also be applied in Lagrangian CSLAM using the consistency enforcement method for mass conservation.

## 4. Conclusions

Based on a rigorous analysis of mass conservation in remapping schemes we have derived a mandatory condition to achieve mass conservation based on integral constraints valid in continuous space. Our proposed consistency enforcement is generic and applicable in any remapping algorithm. The integration over overlap areas can be performed with inexact quadrature while still retaining inherent mass conservation. The consistency enforcement is completely local making it also attractive for parallel codes, and shape-preserving filters are not affected by the consistency enforcement algorithm. Idealized transport tests using CSLAM in HOMME illustrate how conservation of mass is violated when replacing analytical line integrals (that are ill conditioned under certain flow conditions and resolutions) with quadrature and that the consistency enforcement algorithm restores inherent mass conservation without degrading simulation accuracy.

## Acknowledgments

The first author is funded by DOE BER Program DE-SC0006959. The authors thank Ramachandran D. Nair (National Center for Atmospheric Research) and Mark A. Taylor (Sandia National Laboratories) for many fruitful discussions. The authors gratefully acknowledge the three anonymous reviewers for their helpful comments.

## REFERENCES

Dennis, J. M., A. Fournier, W. F. Spotz, A. St-Cyr, M. A. Taylor, S. J. Thomas, J. Stephen, and H. Tufo, 2005: High-resolution mesh convergence properties and parallel efficiency of a spectral element atmospheric dynamical core.

,*Int. J. High Perform. Comput. Appl.***19**(3), 225ā235.Dennis, J. M., and Coauthors, 2012: CAM-SE: A scalable spectral element dynamical core for the Community Atmosphere Model.

,*Int. J. High Perform. Comput. Appl.***26**(1), 74ā89.Dukowicz, J. K., 1984: Conservative rezoning (remapping) for general quadrilateral meshes.

,*J. Comput. Phys.***54**(3), 411ā424.Erath, C., S. Ferraz-Leite, S. A. Funken, and D. Praetorius, 2009: Energy norm based a posteriori error estimation for boundary element methods in two dimensions.

,*Appl. Numer. Math.***59**(11), 2713ā2734.Erath, C., P. H. Lauritzen, J. H. Garcia, and H. M. Tufo, 2012: Integrating a scalable and efficient semi-Lagrangian multi-tracer transport scheme in HOMME.

,*Proc. Comput. Sci.***9**, 994ā1003.Jones, P. W., 1999: First- and second-order conservative remapping schemes for grids in spherical coordinates.

,*Mon. Wea. Rev.***127**, 2204ā2210.Lauritzen, P. H., and R. D. Nair, 2008: Monotone and conservative Cascade Remapping between Spherical grids (CaRS): Regular latitudeālongitude and cubed-sphere grids.

,*Mon. Wea. Rev.***136**, 1416ā1432.Lauritzen, P. H., R. D. Nair, and P. A. Ullrich, 2010: A conservative semi-Lagrangian multi-tracer transport scheme (CSLAM) on the cubed-sphere grid.

,*J. Comput. Phys.***229**, 1401ā1424.Lauritzen, P. H., P. A. Ullrich, and R. D. Nair, 2011: Atmospheric transport schemes: Desirable properties and a semi-Lagrangian view on finite-volume discretizations.

*Numerical Techniques for Global Atmospheric Models,*P. H. Lauritzen et al. Eds., Vol. 80,*Lecture Notes in Computational Science and Engineering,*Springer, 187ā254.Lauritzen, P. H., W. C. Skamarock, M. J. Prather, and M. A. Taylor, 2012: A standard test case suite for two-dimensional linear transport on the sphere.

,*Geosci. Model Dev.***5**, 887ā901.Nair, R. D., and P. H. Lauritzen, 2010: A class of deformational flow test cases for linear transport problems on the sphere.

,*J. Comput. Phys.***229**, 8868ā8887.RanÄiÄ, M., 1992: Semi-Lagrangian piecewise biparabolic scheme for two-dimensional horizontal advection of a passive scalar.

,*Mon. Wea. Rev.***120**, 1394ā1405.Ullrich, P. A., P. H. Lauritzen, and C. Jablonowski, 2009: Geometrically exact conservative remapping (GECoRe): Regular latitudeālongitude and cubed-sphere grids.

,*Mon. Wea. Rev.***137**, 1721ā1741.Ullrich, P. A., P. H. Lauritzen, and C. Jablonowski, 2012: Some considerations for high-order āincremental remapā-based transport schemes: Edges, reconstructions and area integration.

,*Int. J. Numer. Methods Fluids***71**, 1131ā1151, doi:10.1002/fld.3703.

^{1}

In HOMME-CSLAM the weights for the latter integral are precomputed as they, contrary to the overlap areas, are not flow dependent.

^{2}

Note that line integrals not overlapping grid lines cancel between neighboring Lagrangian cell sides since the line integrals are computed in both directions (and are hence equal with opposite sign) and added.