The major computational bottleneck in atmospheric chemistry models is the numerical integration of the stiff coupled system of kinetic equations describing the chemical evolution of the system as defined by the model chemical mechanism (typically over 100 coupled species). We present an adaptive method to greatly reduce the computational cost of that numerical integration in global 3-D models while maintaining high accuracy. Most of the atmosphere does not in fact require solving for the full chemical complexity of the mechanism, so considerable simplification is possible if one can recognize the dynamic continuum of chemical complexity required across the atmospheric domain. We do this by constructing a limited set of reduced chemical mechanisms (chemical regimes) to cover the range of atmospheric conditions and then pick locally and on the fly which mechanism to use for a given grid box and time step on the basis of computed production and loss rates for individual species. Application to the GEOS-Chem global 3-D model for oxidant–aerosol chemistry in the troposphere and stratosphere (full mechanism of 228 species) is presented. We show that 20 chemical regimes can largely encompass the range of conditions encountered in the model. Results from a 2-year GEOS-Chem simulation shows that our method can reduce the computational cost of chemical integration by 30 %–40 % while maintaining accuracy better than 1 % and with no error growth. Our method retains the full complexity of the original chemical mechanism where it is needed, provides the same model output diagnostics (species production and loss rates, reaction rates) as the full mechanism, and can accommodate changes in the chemical mechanism or in model resolution without having to reconstruct the chemical regimes.
Accurate representation of atmospheric chemistry is of central importance
for air quality and Earth system models (National Research Council, 2016), but it is computationally expensive. The complete Master Chemistry Mechanism
(MCM, version 3.3,
As the simplest example of an implicit scheme, consider the first-order
method which approximates Eq. (1) as
There are various ways to speed up the chemical operator, all involving some loss of accuracy or generality (Brasseur and Jacob, 2017). A general approach is to reduce the dimension of the coupled system of ODEs that needs to be solved implicitly. This can be done by simplifying the chemical mechanism to decrease the number of species (Brown-Steiner et al., 2018; Sportisse and Djouad, 2000) or by isolating long-lived species for which a fast explicit solution scheme is acceptable (Young and Boris, 1977). Jacobson (1995) used different subsets of their full mechanism to simulate the urban atmosphere, the troposphere, and the stratosphere. Machine learning algorithms have been developed to replace the role of the conventional chemical solver; but these methods have only been applied to simple scenarios and are subject to error growth as simulation time progresses (Keller and Evans, 2019).
Santillana et al. (2010) combined these ideas in an adaptive algorithm for
3-D models that determines locally at each time step (“on the fly”) which
species in the chemical mechanism need to be solved in the coupled implicit
system. This was done by computing the local production (
Here we draw from the approach introduced by Santillana et al. (2010) but use a set of pre-defined chemical regimes to take full advantage of the time savings from the adaptive reduction mechanism algorithm. We start with the objective identification of a limited number of chemical regimes that encompass the range of atmospheric conditions encountered in the model. These regimes are defined by the subset of fast species from the full mechanism that need to be considered in the coupled system, and we pre-code the Jacobian matrix and its inverse for each. The model then picks the appropriate chemical regime to be solved locally and on the fly. We show that this approach can achieve large computational savings without significantly compromising accuracy when implemented in GEOS-Chem. Our method can be adapted to any mechanism and model, retains the complexity of the full mechanism where it is needed, and preserves full diagnostic information on chemical evolution (such as reaction rates and production and loss of individual species).
We use the GEOS-Chem 12.0.0 global 3-D model for tropospheric and
stratospheric chemistry (
The key processes in the KPP chemical operator are as follows. The operator
first updates the reaction rate coefficients on the basis of temperature,
actinic flux, etc. It then passes these reaction rate coefficients together
with initial species concentrations to the Rosenbrock solver, which solves
for the temporal evolution of concentrations over the external time step
Our adaptive algorithm determines locally and on the fly what degree of complexity is needed in the chemical mechanism by diagnosing all species in the full chemical mechanism as either “fast” or “slow”, and choosing among pre-constructed chemical mechanism subsets (“chemical regimes”) which is most appropriate for the local conditions. Here we present (1) the definition of fast and slow species and the different treatments for each and (2) the approach used to pre-construct the chemical regimes.
Following Santillana et al. (2010), we separate atmospheric species as fast
or slow based on their production and loss rates in Eq. (1) relative to a
threshold
One issue with the solution for the slow species by Eq. (4) is that it does not strictly conserve mass, because the loss rate for a given species over the time step does not necessarily match the production rate of the product species. This is usually inconsequential, but we found in early testing that it resulted in the total mass of reactive halogen species growing slowly over time in the stratosphere. To avoid this effect, we treat all 37 reactive inorganic halogen species as fast above 10 km altitude. This increases the computation cost of chemical integration by only 4 % relative to letting the algorithm set them as either fast or slow.
Instead of building a local chemical mechanism subset at every time step as
in Santillana et al. (2010), we greatly improve the computational efficiency
by preselecting a limited number (
Construction of the chemical regimes can be done objectively by searching
for a minimum in the computational cost of the chemical operator over the
global domain. But some narrowing of the search is necessary. For the
228-species mechanism in GEOS-Chem, there are in principle 2
The partitioning of species into blocks can be optimized by minimizing
globally the number of fast species (and hence the computation cost) for a
given threshold
For each grid box
Once the blocks have been defined in the above manner, we define the
chemical regimes as different assemblages of blocks. This yields 2
The diagram for calculating the cost function
We tested a range of values from 5 to 20 for the number
Minimum of cost function
Table 1 lists the species of these 12 blocks. Oxidants such as OH,
Partitioning of GEOS-Chem chemical species into
This algorithm still has shortcomings. There are some unexpected groupings
(such as sulfur species and peroxyacetyl nitrate) and separations (such as
We tested different numbers of chemical regimes (
Speedup of the chemical computation as a function of the
number
Table 2 shows the composition of the 20 chemical regimes as defined by the blocks of Table 1. For 72 % of the grid boxes in the troposphere and stratosphere, we only need to solve for fewer than 50 % of the species as fast. Only 3.6 % of grid boxes need to use the full chemistry mechanism, as defined by the 20th regime.
Composition and frequency of the 20 chemical regimes in
the adaptive algorithm
Figure 4 shows the distribution of these 20 chemical regimes globally and
for different altitudes and the corresponding percentage of fast species
that needs to be included in the chemical solver. In continental surface air
where VOC emissions are concentrated, we find that over 80 % of species
generally need to be included. This percentage is reduced to 20 %–60 % over
the ocean and
Chemical mechanism complexity needed in different regions
of the atmosphere. The figure identifies the chemical regime from Table 2
needed to simulate a given GEOS-Chem grid box on 1 August 2013 at 00:00 and 12:00 GMT. The percentage of the 228 species treated as fast (requiring coupled
implicit solution) in that chemical regime is shown on the color bar and more
details are in Tables 1 and 2. Results are shown for different altitudes and
using a threshold
Here we quantify the errors in our adaptive reduced mechanism method by
comparison with a standard GEOS-Chem simulation for the troposphere and
stratosphere (version 12.0.0) including full chemistry (228 species). The
comparison is conducted for a 1-month simulation to examine the sensitivity
to the rate threshold
A critical parameter to select in the algorithm is the rate threshold
Performance and accuracy of the adaptive chemical
mechanism reduction method for different rate thresholds
Figure S5 further shows the distribution of RRMS errors over all species for
different rate thresholds
Figure 6 shows the time evolution over 2 years of simulation of the median
RRMS error for all species and also for the selected species OH, ozone,
sulfate, and
Accuracy of the adaptive reduced chemistry mechanism
algorithm over a 2-year GEOS-Chem simulation (see text). The accuracy is
measured by the 24 h mean RRMS error on the end day of each month
relative to a simulation including the full chemical mechanism. Rate
thresholds
Relative error from the adaptive mechanism reduction
method after 2 years of simulation in the GEOS-Chem global 3-D model for
tropospheric-stratospheric chemistry. The figure shows relative differences
of 24 h average OH, ozone, sulfate, and
We have presented an adaptive method to speed up the temporal integration of chemical mechanisms in global atmospheric chemistry models. This integration (“chemical operator”) involves the implicit solution of a stiff coupled system of ordinary differential equations (ODEs) representing the kinetic evolution of individual species in the mechanism. With typical mechanisms including over 100 coupled species, this chemical integration is the principal computational bottleneck in atmospheric chemistry models and hinders the adoption of detailed atmospheric chemistry in Earth system models.
Our method takes advantage of the fact that different regions of the atmosphere need different levels of detail in the chemical mechanism and that greatly reduced mechanisms can be used in most of the atmosphere. We do this reduction locally and on the fly by choosing from a portfolio of preselected reduced chemical mechanisms (chemical regimes) on the basis of species production and loss rates, distinguishing between “fast” species that need to be in the coupled mechanism and “slow” species that can be solved explicitly. Our method has six advantages over other methods proposed to speed up the chemical computation. (1) It does not sacrifice the complexity of the chemical mechanism where it is needed, while greatly simplifying it over much of the world where it is not. (2) It conserves all of the meaningful diagnostic information of the chemical system, such as production and loss rates of species and families, and individual reaction rates. (3) It can be tailored to achieve the level of simplification that one wishes. (4) It is robust against small mechanistic changes, as these may not alter the choice of chemical regimes or may be accommodated by minor tweaking of the regimes (new species may be assigned to their most appropriate groups on the basis of chemical logic). (5) It is robust against increases in model resolution, where source grid boxes (e.g., urban areas) may simply default to the full mechanism. (6) If an adjoint is available for the full chemical solver, then it can also be used in our method since the software code of the full chemical solver (e.g., KPP) is retained.
We applied the method to the GEOS-Chem global 3-D model for oxidant–aerosol
chemistry in the troposphere and stratosphere. The full chemical mechanism
in GEOS-Chem has 228 coupled species. We developed an objective numerical
method to preselect the reduced chemical regimes on the basis of time
slices of full-mechanism model results. We showed that 20 regimes could efficiently cover the range of atmospheric conditions encountered in the
model. We then pick appropriate regimes for the chemical operator on the fly
by comparing the local production and loss rates of individual model species
to a threshold
The performance tests presented here were for a single-node implementation of GEOS-Chem using 12 CPUs in a shared-memory Open Message Passing (Open-MP) parallel environment. High-performance GEOS-Chem (GCHP) simulations can also be conducted in massively parallel environments with Message Passing Interface (MPI) communication between nodes and domain decomposition across nodes by groups of columns (Eastham et al., 2018). In principle, the chemical operator scales perfectly across nodes because it does not need to exchange information between columns (Long et al., 2015). However, differences in computational costs between columns (due to differences in chemical regimes) could result in load imbalance between nodes, degrading performance. In the current implementation of GCHP, the MPI domain decomposition is by clustered geographical columns in order to minimize the exchange of information across nodes in the advection operator (Eastham et al., 2018). Such a decomposition would penalize our approach since different geographical domains may have different computational loads for chemistry (e.g., oceanic vs. continental regions). This could be corrected by using different MPI domain decompositions for different model operators, and tailoring the domain decomposition for the chemical operator to balance the number of fast species across nodes. Such an approach is used for example in the NCAR Community Earth System Model (CESM) where different domain decompositions are done for advection (clustered geographical regions) and for radiation (number of daytime columns).
Several improvements could be made to our method. (1) The blocks of species used to construct the reduced chemical mechanisms are optimized to minimize the number of fast species but are not always chemically logical, which could be improved by applying prior regularization constraints to the optimization. (2) Optimization in the definition of the reduced mechanisms could take into account not only the number of species but also their lifetimes that affect the stiffness of the system. (3) Separation between fast and slow species could take into account species lifetimes, because species with long lifetimes but high loss rates (such as methane or CO) can be solved explicitly. (4) Mass conservation in the explicit solution could be enforced to enable more species (in particular stratospheric halogens) to be treated explicitly when they play little role in the coupled system. (5) Besides removing the slow species from the implicit chemical operator, we could also remove unimportant reactions, which would reduce the cost in updating the production or loss rates and the Jacobian matrix. These improvements will be the target of future work.
The standard GEOS-Chem code is available through
All datasets used in this study are publicly
accessible at
The supplement related to this article is available online at:
LS and DJJ designed the experiments and LS carried them out. LS and DJJ prepared the paper with contributions from all co-authors.
The authors declare that they have no conflict of interest.
This work was funded by the NASA Modeling and Analysis Program (NASA-80NSSC17K0134) and by the US EPA Science to Achieve Results (STAR) Program (EPA-G2019-STAR-C1).
This research has been supported by the NASA Modeling and Analysis Program (NASA-80NSSC17K0134) and by the US EPA Science to Achieve Results (STAR) Program (EPA-G2019-STAR-C1).
This paper was edited by Christoph Knote and reviewed by Mathew Evans and one anonymous referee.