The terminator “ toy ” chemistry test : a simple tool to assess errors in transport schemes

This test extends the evaluation of transport schemes from prescribed advection of inert scalars to reactive species. The test consists of transporting two interacting chemical species in the Nair and Lauritzen 2-D idealized flow field. The sources and sinks for these two species are given by a simple, but non-linear, “toy” chemistry that represents combination (X+X→ X2) and dissociation (X2→ X+X). This chemistry mimics photolysis-driven conditions near the solar terminator, where strong gradients in the spatial distribution of the species develop near its edge. Despite the large spatial variations in each species, the weighted sum XT = X+ 2X2 should always be preserved at spatial scales at which molecular diffusion is excluded. The terminator test demonstrates how well the advection–transport scheme preserves linear correlations. Chemistry–transport (physics–dynamics) coupling can also be studied with this test. Examples of the consequences of this test are shown for illustration.


Introduction
Tracer transport is a basic component of any atmospheric dynamical core.Typically, transport accuracy is evaluated in ideal tests before being developed further or implemented in full models.Several tests for 2-D passive and inert transport exist in the literature (Williamson et al., 1992;Nair and Machenhauer, 2002;Nair and Jablonowski, 2008;Nair and Lauritzen, 2010).To facilitate the intercomparison of transport operators under challenging flow conditions, Lauritzen et al. (2012) proposed a standard suite of tests that was exercised by a number of state-of-the-art schemes in Lauritzen et al. (2014).These tests evaluate each advection scheme's ability to transport an inert tracer with respect to a wide range of diagnostics as well as the ability of each transport scheme to maintain non-linear tracer correlations between pairs of tracers (Lauritzen and Thuburn, 2012).While such evaluations provide useful information about the ability of each transport operator to advect inert scalars, these idealized tests do not shed light on how transport methods perform under forced conditions, e.g., how the method interacts with subgrid-scale processes.
Idealized chemical processes have readily available analytic expressions for the forcing terms.The implementation of these processes as sub-grid-scale forcing involves "only" solving forced continuity equations rather than the full Navier-Stokes, primitive or shallow water equations that add extra levels of complexity.Indeed, several simplified systems, where two species interact non-linearly, have been developed and studied quite extensively in the literature.For example, the Lotka and Voltera equations (also known as predator-prey equations) are a pair of first-order differential equations describing the dynamics of biological systems in which two species interact, one as a predator and the other as prey.For a dynamical systems analysis of the Lotka and Voltera equations, e.g., see Chapter 4 in Prigogine (1981).The equations are the same for simple chemistry systems where each chemical species is transformed to the others.A more complicated system, but also consisting of just two independent variables (and two variables held constant), is the Brusselator system (Prigogine and Lefever, 1968) that allows for a rich set of solutions (Prigogine, 1981).The real Belousov-Zhabotinsky reaction has similar transient complex oscillations as found in the Brusselator system.Pudykiewicz (2006)

coupled the Brusselator reactions
Published by Copernicus Publications on behalf of the European Geosciences Union.
to the advection-diffusion equations in a shallow water flow.The linearized system has analytic solutions (Turing, 1952) that can be used to assess the accuracy of the numerical solution to the differential equations.Pudykiewicz (2006Pudykiewicz ( , 2011) ) solved the full non-linear system, which is basically a forced advection-diffusion equation with flow prescribed from the shallow water solution, and examined the solutions qualitatively since the analytic solution is not known.Similar idealized systems for reactive species have been developed in the context of convective boundary layers (e.g., Kristensen et al., 2010).
The test we develop in this paper extends the Nair and Lauritzen (2010) test to two reactive species, adding one extra level of complexity while retaining the simplicity of analytic prescribed flow and known analytic solution.The inspiration for the idealized chemical reactions is photolysisdriven chemistry in which sunlight strongly influences the production and loss processes, creating very steep gradients in the individual tracer distributions near the terminator boundary (as observed for chlorine species and bromine in the stratosphere; see, e.g., Anderson et al., 1991;Salawitch et al., 2009;Brasseur and Solomon, 2005).Hence, these reaction coefficients lead to strong gradients coinciding with a "terminator-like" line (Lander and Hoskins, 1997).Another inspiration for this test is that the atomic concentration for each air parcel is conserved (up to the scales where molecular diffusion matters), while the molecular species react nonlinearly with each other, e.g., total organic and inorganic chlorine in the stratosphere (Edouard et al., 1996;Strahan et al., 2011;Prather and Jaffe, 1990).So, by choosing the initial condition for two tracers so that the total amount (i.e., the total weighted mass of a chemical constituent X) is a constant throughout the domain, then the atomic concentration should remain constant in space and time (as long as the chemistry exactly conserves the total of the constituents).This concept is used in this test case so that an analytic solution for the atomic concentration is readily available irrespective of the complexity of the flow and non-linearity of the chemical reactions.
The paper is organized as follows.In Sect.2, the idealized chemistry, referred to as "toy chemistry", is defined.An analysis in terms of steady-state solutions is presented.The transport operator is discussed in the context of linear tracer correlations in Sect.3. The combination of the "toy" chemistry forcing with advection prescribed by the Nair and Lauritzen (2010) wind field (see Appendix A) defines the terminator test.The discrete terminator test is defined in Sect. 4. Section 5 shows example solutions from the Community Atmosphere Model (CAM) Finite-Volume dynamical core (CAM-FV; Lin, 2004) and the CAM Spectral Elements dynamical core (CAM-SE; Dennis et al., 2012).In particular, we show that the terminator test exacerbates errors associated with the preservation of linear relations and limiters as well as highlights differences in chemistry-transport (physics-dynamics) coupling approaches.The summary and conclusions are in Sect.6.

Toy chemistry
In this section, we use the nomenclature X to describe the number density (the number of molecules of compound X divided by the number of molecules of dry air; see Andrews et al., 1987).A molecule composed of two atoms X is written as X 2 .The number density associated with the total number of atoms X (in X and X 2 ) is denoted by X T .
The non-linear toy chemistry equations for X 2 and X are where k 1 and k 2 are the reaction rates of the production pathways for X and X 2 , respectively.The reactions are designed to conserve the total number of X atoms The kinetic equations corresponding to the above system (Eqs. 2 and 1) are given by dX where d/dt is the material (or total) derivative d/dt = ∂/∂t + v • ∇ and v is the wind vector.It is easily verified that the weighted sum of X and X 2 is conserved along characteristics of the flow If the initial condition for X T is constant (as we assume here), X T is not a function of time and is therefore equal to its initial value.
and, hence, The reaction coefficient, k 1 , represents the photolytic breaking of molecule X 2 and can be represented as the cosine of the solar zenith angle for when the sun's zenith is at (λ c , θ c ) (see Fig. 1).The reaction coefficient, k 2 , represents the recombination and is assumed constant over the globe.and the mixing ratios are non-negative, From the kinetic equations (4) and (5) above, as well as the conservation equation (3) we can write Completing the square on the right-hand side leads to the expression The right-hand side can be factored, and the following partial fraction expansion can be constructed: Integration of each of these terms from time t = 0 to t, yields the expression where 190 For long times, Cl(t) and Cl 2 (t) converge to the steady state solutions, where n is the time-level index, ∆t tracer time-step for the transport operator, and H is the set of indices defining the stencil required by T to update φ n k .Note that the trans-210 port operator may not solve the prognostic equation for φ in advective form as used in (4) and (5).For example, it is common practice for finite-volume schemes to base the discretization on a flux-form formulation of the continuity equation (here written without forcing terms) where λ and θ are longitude and latitude, respectively, and (λ c , θ c ) are chosen as ( 20• N, 300 • E) to align with the flow field.The terminator is the continuous boundary between day and night regions.These reaction rates produce very steep gradients in the X species near the terminator.This setup is of direct application to the real atmosphere as the total chlorine in the stratosphere is conserved (except for molecular diffusion), while photolysis and chemical reactions partition the various components and lead to narrow gradients across the terminator.
An analytic steady-state solution of the chemical concentrations for the condition of no flow is derived in Appendix B. The initial condition is specified as being the steady-state solution under no flow (see Fig. 2).Reaction rates are quite rapid compared to the model time steps as shown in Appendix C.

Transport operator and correlations
Let T be the discrete transport operator that advances, in time, the numerical solution to the passive and inert continuity equation for species X and X 2 : at grid point or grid cell i (in this equation, X refers to the volume mixing ratio of X (Andrews et al., 1987), which is related to the number density of X through scaling by the fixed ratio of the atomic weight of X to the molecular weight of dry air): where n is the time-level index, t tracer the time step for the transport operator, and H is the set of indices defining the stencil required by T to update φ n i .Note that the transport operator may not solve the prognostic equation for φ in advective form as used in Eqs. ( 4) and (5).For example, it is common practice for finite-volume schemes to base the discretization on a flux-form formulation of the continuity equation (here written without forcing terms): where ρ is air density.To deduce the mixing ratio from Eq. ( 13), one needs to solve the continuity equation for air.
For a non-divergent wind field and an initial condition of ρ that is constant, the exact solution for ρ is that it remains constant in time and space.For the terminator test, in which we use a non-divergent flow field and constant initial condition for ρ (if applicable), it has been found to be crucial to solve for ρ rather than to prescribe the analytic solution for ρ.Usually, a transport scheme using ρ φ as a prognostic variable will not preserve a ρ φ = constant initial condition, whereas it will preserve a constant mixing ratio.So, if ρ is analytically prescribed, φ will not be preserved in areas where it would otherwise be constant.Such errors can be exacerbated by the terminator chemistry.For a fuller discussion of tracer-air coupling, see, e.g., Lauritzen et al. (2011) and Nair and Lauritzen (2010).
For the theoretical discussion, it is convenient to define the property "semi-linear": a transport operator T is semi-linear if it satisfies for any constants a and b (Lin and Rood, 1996;Thuburn and McIntyre, 1997).A semi-linear transport operator preserves linear correlation between two trace species.Note that the semi-linear property subsumes that the transport operator preserves a constant mixing ratio Since X T is simply the weighted sum of just two species, X T will be conserved in the numerical model if T is semilinear.The semi-linear property, however, does not imply that a weighted (linear) sum of more than two species is conserved (Lauritzen and Thuburn, 2012).The chemical reactions (Eqs. 1 and 2), even in discrete form, will preserve the sum of species.Consequently, a semi-linear transport operator combined with the terminator chemistry will produce no error in X T .
Several transport operators T in the literature are semilinear when limiters/filters are not applied.For example,  Lin and Rood (1996) show that their scheme, based on the widely used piecewise parabolic method (PPM; Colella and Woodward, 1984) for reconstructing sub-grid-scale tracer fields, preserves linear correlations.The CSLAM scheme (Lauritzen et al., 2010), also based on polynomials, preserves linear correlations (see the proof in Appendix A of Harris et al., 2010).An example of a scheme that is not semi-linear is the transport operator based on rational functions described in Xiao et al. (2002), due to the non-linearity of the reconstruction function.
Typically, transport operators are not applied in their unlimited versions in full models.Shape-preserving filters are applied to ensure physically realizable solutions such as the prevention of negative mixing ratios or unphysical oscillations in the numerical solutions (e.g., Durran, 2010).The filter method/algorithm depends on the advection scheme formulation and discretization.Finitevolume discretizations that are based on cell-average prognostic variables (ρφ) usually make use of either sub-gridcell reconstruction function filters, e.g., van Leer type 1-D limiters (Lin et al., 1994), or flux-limiting methods such as flux-corrected transport (Zalesak, 1979).The reconstruction filter can be applied for schemes that are based on Lagrangian or Eulerian finite-volume discretizations, where the integration is based on swept areas (in either dimensionally split 1-D operators such as Lin and Rood, 1996, or fully 2-D) that span the domain without gaps or overlaps.Examples of reconstruction function filters are Colella and Woodward (1984) and Lin and Rood (1996).Limiting through flux correction, where low-order shape-preserving fluxes are optimally blended with higher-order fluxes, can only be applied in flux-form schemes.For discretizations based on a non-conservative form (advective form), where the prognostic variables are mixing ratio φ rather than ρφ, tracer mass conservation is not inherent, and is usually restored a posteriori with ad hoc methods (e.g., Priestley, 1993;Gravel and Staniforth, 1994).Since the mass-restoration algorithm may alter φ, the mass-fixer and shape-preservation algorithms are intrinsically related.Usually, this problem is solved using optimization/variational methods (e.g., White and Dongarra, 2011).For methods where the prognostic variables are represented by series expansions (e.g., Galerkin methods), shape preservation can also be enforced with optimization methods (e.g., Guba et al., 2014).
Shape-preserving filters may render an otherwise semilinear transport operator non-semi-linear.Some limiters, however, are semi-linear.For example, van Leer type 1-D limiters (Lin et al., 1994) preserve linear correlations (Lin and Rood, 1996).Flux-corrected transport limiters with and without selective limiting preserve linear correlations (Blossey and Durran, 2008;Harris et al., 2010).The limiter by Barth and Jespersen (1989) that scales the reconstruction functions, so that it is within the range of the surrounding cell average values, preserves linear correlations (Harris et al., 2010).Positive definite limiters that insure positivitypreservation and "clipping" algorithms that simply remove negative values (see, e.g., Skamarock and Weisman, 2009, for applications in a weather forecast model) are certain to violate linear correlations as the filter only affects the species that is about to become negative, and not the other species.Note that "clipping" may occur in the physical parameterization package.A posteriori filters (e.g., optimization-based shape-preserving filters) may or may not be semi-linear, and the details of the implementation can affect the semi-linearity (e.g., iteration thresholds, logic in the code).
We note that, instead of advecting each species separately by solving the advection equations in Eqs. ( 11) or ( 13) with φ = X, X 2 , one may also choose to advect the sum X T and one of the species, e.g., X, and then diagnose the remaining species, X 2 , from Eq. ( 8).If the transport operator conserves a constant, which many transport operators do, then the constant sum X T is trivially conserved if chosen as a prognostic variable.This approach is commonly used in chemistry transport models for some families of species; e.g., Douglass et al. (2004) advected the sum of total inorganic chlorine and bromine to avoid spurious maxima and minima in their dis-Geosci.Model Dev., 8, 1299-1313, 2015 www.geosci-model-dev.net/8/1299/2015/tributions in the stratosphere.For idealized tests to evaluate how well families of species that add up to a constant are preserved, see, e.g., Lauritzen and Thuburn (2012).

Discrete terminator test
Coupling the chemistry parameterization with advection can be done in multiple ways.A common approach in weather/climate modeling is to update the species evolution in time incrementally by first updating the mixing ratios with respect to sub-grid-scale forcings (chemistry) and then to apply the transport operator based on the chemistryupdated state (or in reverse order).Since the computation of the sub-grid-scale tendencies in full models is computationally costly, the dynamical core (in this case, the transport scheme) is usually subcycled with respect to chemistry.For fast chemistry, this may be reversed.A model will operate with a chemistry (physics) time step t chem , a tracer time step t tracer and a chemistrytransport (physics-dynamics) coupling time step t cpl .For example, in the default CAM-SE setup, t tracer = 300 s, t chem = 1800 s and t cpl = 600 s.Hence, the chemistry tendencies, F X and F X 2 , are computed every 30 min, and the species are updated every 600 s with the chemistry tendencies.A detailed description of the CAM-SE implementation of physics-dynamics coupling in terms of its namelist variables is given in Appendix E.
It is, of course, up to the model developer to choose which coupling method and time step to use.To facilitate comparison, the model developer is encouraged to use the analytically computed forcing terms F X and F X 2 given in Appendix F, and to use a chemistry (physics) time step of t chem = 1800 s.The initial conditions are given by the steady-state asymptotic solutions Eqs.(B14) and (B15) with a mixing ratio of X T = 4 × 10 −6 (Fortran code for the initial conditions is given in Appendix G and in the Supplement).
For simplicity, the velocity field for the transport operator T is prescribed.We use the deformational flow of Nair and Lauritzen (Case 2; 2010) that was also used in the standard test case suite of Lauritzen et al. (2012Lauritzen et al. ( , 2014)).For completeness, the components of the non-divergent velocity vector V (λ, θ, t) and the stream function are repeated in Appendix A. The test is run for 12 days (or 5 nondimensional time units) exactly as prescribed in Nair and Lauritzen (2010).Note that the test case methodology can be applied in any velocity field, including a full 3-D dynamical core.

Results
It is the purpose of this section to show exploratory terminator test results.An in-depth analysis of why the limiters do not preserve linear relations (and the derivation of possible remedies) is up to the scheme developers.

Model setup
Terminator test results are shown for two dynamical cores (transport schemes) available in the CAM: CAM-FV (Lin, 2004) and CAM-SE (Dennis et al., 2012), which are documented within the framework of CAM in Neale et al. (2010).The transport scheme in CAM-FV is the widely used finitevolume scheme of Lin and Rood (1996).CAM-SE performs tracer transport using the spectral element method based on degree 3 polynomials.Further details on CAM-SE are given in Appendix H.
As discussed in detail in Nair and Lauritzen (2010) and briefly in Sect.3, care must be taken in the handling of the tracer mixing ratio and tracer mass coupling for schemes that prognose tracer mass.In general, the transport scheme will not preserve a constant tracer density field (ρφ = constant), since the discrete divergence operator is non-zero despite the analytical wind field being non-divergent (zero divergence).However, the scheme will preserve a constant mixing ratio if φ is recovered from ρφ by dividing the tracer density by the prognosed air density ρ.If one does not prognose ρ and simply specifies the analytic solution (ρ = constant), a constant mixing ratio will not be preserved.
For all simulations, the chemistry (physics) time step is t chem = 1800 s.The horizontal resolution is approximately 1 • : for CAM-FV, that is the 0.9 × 1.25 configuration (192 latitudes and 288 longitudes) and, for CAM-SE, it is the NE30NP4 configuration in which there are 30 × 30 elements on each cubed-sphere panel and 4×4 Gauss-Lobatto-Legendre (GLL) quadrature points in each element.The tracer time step t tracer is 900 s for CAM-FV and 300 s for CAM-SE.During the tracer transport scheme time step, the analytic winds of Nair and Lauritzen (2010) are held constant following the CAM-Chem setup (Lamarque et al., 2012).Unless explicitly stated otherwise, the coupling time step for CAM-SE is t cpl = 600 and t cpl = 1800 for CAM-FV.For details on CAM chemistry-transport coupling, see Appendix E.
The sample results shown next are divided into four sections: first of all, baseline results for CAM-FV and CAM-SE using their default configurations.Next, results from experiments varying the limiter in CAM-SE are presented.Then, the consequences of using different chemistry-transport (physics-dynamics) coupling methods (in CAM-SE) are discussed.Lastly, the results are quantified.

Default CAM-FV and default CAM-SE results
Figure 3 shows the distributions X T after 1 and 6 simulated days for CAM-FV and CAM-SE.Ideally, X T should be conserved.Both CAM-FV and CAM-SE show deviations from constancy in X T (note that the color scale in the figures is not linear).The errors in X T are produced at the terminator when the limiter is most challenged.After the errors are introduced, they propagate away from the terminator following  Lagrangian trajectories of the prescribed flow.This is most visible for CAM-SE at day 6 (see Fig. 3 and/or the animations in the Supplement).CAM-FV transport is based on the dimensionally split Lin and Rood (1996) scheme.The scheme produces errors in X T since the limiter used in CAM-FV (described in Appendix B of Lin, 2004) does not strictly conserve linear relations.The errors appear to be largest when the flow is aligned with the terminator at a 45 • angle (see the animation in the Supplement).In that situation, the dimensionally split approach is most challenged; the shape-preserving limiter is not strictly shape-preserving in the cross direction since the one-dimensional limiters are only applied in the coordinate directions (Lauritzen, 2007).
CAM-SE does not preserve linear relations either and the errors in X T are about an order of magnitude larger than CAM-FV.The CAM-SE limiter is optimization based (using least squares) and guarantees no under-or over-shoots at the element level while maintaining mass conservation at the element level (Guba et al., 2014).While the optimizationbased limiter preserves linear relations with exact arithmetic, its present implementation in CAM-SE does not lead to such preservation (most likely due to iteration thresholds, ifstatements, etc., that can be non-linear).
To further understand this behavior, we have performed some tests (not shown) turning the chemistry off and advecting linearly correlated cosine hills and linearly correlated step functions.The cosine hills are C 0 continuous (the function is continuous but its derivatives are not) and the limiter exactly preserves the linear relationship.

CAM-SE: Physics-dynamics coupling experiments
As explained in section 4 the dynamics (tracer transport) 470 and physical parameterizations (terminator chemistry) can be coupled in various ways.Here we discuss results based on two coupling methods available in CAM-SE referred to as f type = 1 and f type = 0.In f type = 1 the tendencies from physics are added to the atmospheric state at the beginning of  trace down exactly where in the implementation this error is introduced and to find a remedy.The terminator test is designed to enable scheme developers to test their scheme in setups that are directly relevant to some of the issues seen in chemistry application.In this particular case, the terminator test clearly exacerbates small errors in correlation preservation that may be easily overlooked in inert transport testing (such as the tests in Lauritzen et al., 2012).

CAM-SE: limiter experiments
In addition to the quasi-monotone mass-conservative limiter used by default in CAM-SE, the model has options for performing tracer advection without any limiter and with a positive definite limiter.Results for terminator test runs using those configurations are shown in Fig. 4. As expected, the unlimited version of the CAM-SE transport exactly preserves linear relations; i.e., X T is conserved to machine precision.By looking at cross sections of the individual distributions of X and X 2 in Fig. 5, it is immediately apparent (and expected) that the Gibbs phenomenon manifests itself near the terminator when no limiter is used.The stability analysis discussed in Appendix D and illustrated in Figs.D1 and D2 indicates that the terminator chemistry will make a negative mixing ratio even more negative.From the experiments, however, the amplitude of the spurious oscillations near the terminator remains nearly constant in time.In other words, the instability associated with negative mixing ratios in the terminator chemistry is weak in our present setup.

P. H. Lauritzen et al.: Terminator test
When using a positive definite limiter, Gibbs phenomena are eliminated near the base of the terminator, but not near the maximum.This obviously violates linear relations and produces large errors in X T .Similar results are expected from mass-filling algorithms in which negative values are simply set to 0. This emphasizes the importance of using carefully designed limiters in transport schemes for applications in which preservation of linear pre-existing relations is important, e.g., chemistry applications (for a fuller discussion, see, e.g., Lauritzen and Thuburn, 2012).

CAM-SE: chemistry-tracer (physics-dynamics) coupling experiments
As explained in Sect.4, the tracer transport (dynamics) and chemistry (physics) can be coupled in various ways.Here, we discuss results based on different coupling time steps, t cpl , in CAM-SE.In Fig. 6, X T is shown using t cpl = 1800 s, t cpl = 600 s, and t cpl = 300 s, respectively1 .In all experiments, the tracer time step nd chemistry time step are held fixed: t tracer = 300 s and t chem = 1800 s, respectively.The experiments evaluate the sensitivity to coupling time-step size, in other words, how often the species are adjusted with chemistry tendencies.
Near the western edge of the terminator (located at approximately 130 • W in Fig. 5) where the gradients are steepest, the errors in X T are largest for t cpl = 1800 s.The chemistry adjustments that steepen the gradients are largest at the western edge and consequently produce states that challenge the limiters more.When the chemistry tendency is added gradually throughout the tracer transport, the errors are reduced as t cpl is decreased.
At the eastern edge of the terminator (located at approximately 30 • E in Fig. 5), the gradients are less steep compared to the western edge.In fact, the location of the gradient near the eastern edge propagates (see animation in Supplement), whereas the gradients at the western edge of the terminator are static in space.The chemistry tendencies in this area are not stationary in space and are weaker, so the transport signal is larger.This means that, for any given point in the eastern area, the state used for computing the chemistry tendencies changes during the tracer subcycling.As a result, the gradients will have propagated during the transport step, but the chemistry tendencies will steepen gradients in the "old" location.This "inconsistency" is present with t cpl = t chem .For t cpl = 1800 s, the chemistry update is based on the "correct" in time state.The temporal inconsistency in the state used for computing chemistry tendencies for t cpl = 600 s and t cpl = 300 s produces an increase in errors near the eastern edge of the terminator compared to t cpl = 1800 s. t cpl = 300 s, respectively.In all simulations, the tracer and chemistry time step is constant: t tracer = 300 s and t chem = 1800 s, respectively.
Physical parameterization packages may contain code that sets negative mixing ratios to 0. Or, similarly, there may be code that prevents tendencies from being added to the state if it is 0 or negative.The terminator test may be a useful tool to diagnose such alternations in large complicated codes.

Quantification of X T errors
To quantify the errors introduced in the terminator test, we suggest computing standard error norms for X T .The global normalized error norms used are 2 (t) and ∞ (t) (e.g., Williamson et al., 1992): where X T (0) = 4 × 10 −6 is the globally uniform initial condition and the global integral I is defined as follows: Geosci The toy chemistry, by design, does not disrupt pre-existing linear relations between the species.So, the only source of error is from the transport scheme and/or the chemistrytransport (physics-dynamics) coupling.The terminator test is set up so that X T is a constant, so any deviation from constancy is an error in the preservation of linear correlations.Many transport schemes preserve linear relations when no shape-preserving limiter/filter is applied and are therefore not challenged with respect to conserving X T .However, many shape-preserving limiters/filters render the transport scheme non-conserving with respect to X T .While preservation of linear correlations can indeed be verified in inert advection setups, the terminator chemistry exacerbates the non-conservation problem through the constant forcing that creates very steep gradients.It is demonstrated in this paper that the terminator test is useful for challenging the limiters with strong grid-scale forcing.In particular, it is shown that positive definite limiters severely disrupt linear correlations near the terminator.
In addition, the terminator test assesses the accuracy of chemistry-tracer (physics-dynamics) coupling methods in an idealized setup.Different coupling methods (such as those available in CAM-SE) lead to different distributions of X T .Also, a chemistry-transport (physics-dynamics) coupling layer or the physical parameterization package may contain code that sets negative mixing ratios to 0 and/or contain ifstatements that prevent tendencies being added to the state if it is 0 or negative.The terminator test may be a useful tool to diagnose such alternations in large complicated codes.The terminator test is easily accessible to advection scheme developers from an implementation perspective since the software engineering associated with extensive parameterization packages is avoided.The test forces the model developer to consider how their scheme is coupled to sub-gridscale parameterizations and, if solving the continuity equation in flux form, forces the developer to consider tracerair mass coupling.Also, the idealized forcing proposed here has an analytic formulation, and the continuous set of forced transport equations has, contrary to the Brusselator forcing, an analytic solution for the weighted sum of the correlated species, irrespective of the flow field.
We encourage dynamical core developers to implement the toy chemistry in their test suite as it has the potential to identify tracer transport issues that standard tests (with unreactive/inert tracers) would not generate.step ( t chem ) or the coupling/adjustment time step ( t cpl = t chem /nsplit), so it must be subcycled with respect to the chemistry adjustments.The number of iterations of the tracer transport subcycling loop is rsplit.Note that, since the nsplit and rsplit loops are nested, the tracer time step is t tracer = t chem (nsplit×rsplit) .
We distinguish between the nsplit = 1 and nsplit > 1 configurations and refer to them as ftype = 1 and ftype = 0, respectively, based on CAM-SE namelist terminology (ftype refers to forcing type)2 .In the CAM code, if ftype = 1, the state is updated with chemistry (physics) tendencies in the physics code, whereas for ftype = 0, the adjustments take place in the dynamical core.CAM-FV uses an ftype = 1 configuration (with the caveat that the chemistry tendencies are added after the transport is complete) and CAM-SE supports both ftype = 0 and ftype = 1.The current default CAM-SE uses ftype = 0, where the tendencies are split into nsplit equal-sized adjustments.
In full model runs, if the physics time step is large, the ftype = 1 coupling method may produce large physics tendencies that drive the state much out of balance.When the dynamical core is given the physics updated state that is strongly (and locally) out of balance, the dynamical core may produce excessive gravity waves.To alleviate this, one may choose to update the state with respect to physics tendencies throughout the tracer subcycling.This approach of adding the physics tendencies as several equal-sized adjustments is the ftype = 0 configuration that was explained above.
For the 1 • setup (NE30NP4), we use the standard/recommended configuration with rsplit = 3 and nsplit = 2 (see the pseudo-code in Algorithm 1), so that for every third tracer time step, half of the chemistry tendencies are added to the state.In terms of tracer, chemistry and coupling time steps, this configuration corresponds to t tracer = 300 s, t chem = 1800 s and t cpl = 600 s.CAM-FV uses ftype = 1 configuration where the chemistry tendencies are added once3 .For CAM-FV, t tracer = 900 s, t chem = 1800 s and t cpl = 1800 s.

Figure 3 .
Figure 3. Contour plots of X T for (left column) CAM-FV and for (right column) CAM-SE in ftype = 0 configuration at day 1 (upper row) and day 6 (lower row), respectively.Solid black line is the location of the terminator line.Note that the contour levels are not linear.
Figure 3. Contour plots of Cl y for (left column) CAM-FV and for (right column and day 6 (lower row), respectively.Solid black line is the location of the termin

Figure 4 .
Figure 4. Contour plot of Cl y at day 1 using CAM-SE in f type = 1 configuration where (upper) no limiter, (middle) positive definite limiter, and the default CAM-SE limiter is applied, respectively.The solid black line depicts the location of the terminator line.Note that the contour levels are not linear.

Figure 4 .Figure 5 .
Figure 4. Contour plot of X T at day 1 using CAM-SE in ftype = 1 configuration where (upper) no limiter, (middle) a positive definite limiter, and the default CAM-SE limiter are applied, respectively.The solid black line depicts the location of the terminator line.Note that the contour levels are not linear.

Figure 6 .
Figure 6.Contour plots of X T at day 1 using CAM-SE based on (upper) t cpl = 1800 s, (middle) t cpl = 900 s, and (lower)t cpl = 300 s, respectively.In all simulations, the tracer and chemistry time step is constant: t tracer = 300 s and t chem = 1800 s, respectively.
, we show the time evolution of 2 (t) and ∞ (t) for CAM-FV and CAM-SE in Fig.7.6 ConclusionsA simple idealized toy chemistry test case is defined.It consists of advecting two reactive species (X and X 2 ) in the Nair and Lauritzen (2010) flow field.The simplified non-linear chemistry creates strong gradients in the species similar to what is observed for photolysis-driven species in the stratosphere.The forcing terms for the continuity equations for X and X 2 are computed analytically over one time step (assuming no advection) and Fortran codes for computing the forcing terms are provided in the Supplement.Hence, model developers who have already set up the standard test case suite ofLauritzen et al. (2012)  can, with modest effort, set up the terminator test by adding the forcing terms to their codes.As in the test case ofNair and Lauritzen (2010), this forced advection problem has an analytic solution.

Figure 7 .
Figure 7. Time evolution of standard error norms 2 and ∞ for X T using the CAM-FV and CAM-SE dynamical cores.Note that the y axis is logarithmic. )