The Chemistry CATT-BRAMS model (CCATT-BRAMS 4.5): a regional atmospheric model system for integrated air quality and weather forecasting and research

. Coupled Chemistry Aerosol-Tracer Transport model to the Brazilian developments on the Regional Atmospheric Modeling System (CCATT-BRAMS, version 4.5) is an on-line regional chemical transport model designed for local and regional studies of atmospheric chemistry from the surface to the lower stratosphere suitable both for operational and research purposes. It includes gaseous/aqueous chemistry, photochemistry, scavenging and dry deposition. The CCATT-BRAMS model takes advantage of BRAMS-speciﬁc development for the tropics/subtropics as well as the recent availability of preprocessing tools for chemical mechanisms and fast codes for photolysis rates. BRAMS includes state-of-the-art physical parameterizations and dynamic formula-tions to simulate atmospheric circulations down to the meter. This on-line coupling of meteorology and chemistry allows the system to be used for simultaneous weather and chemical composition forecasts as well as potential feedback between the two. The entire system is made of three preprocessing software tools for user-deﬁned chemical mechanisms, aerosol and trace gas emissions ﬁelds and the interpolation of initial and boundary conditions for meteorology and chemistry. In this paper, the model description is provided along with the evaluations performed by using observational data obtained from ground-based stations, instruments aboard air-crafts and retrieval from space remote sensing. The evaluation accounts for model applications at different scales from megacities and the Amazon Basin up to the intercontinental region of the Southern Hemisphere.


Introduction
The type of models most commonly used to study and forecast atmospheric chemistry is the Eulerian three-dimensional chemistry transport model (CTM). Global CTMs are used for tropospheric (e.g., Wild et al., 2004;Bousserez et al., 2007) and stratospheric research (e.g., Lefèvre et al., 1994;Chipperfield, 2006), in particular for monitoring stratospheric ozone depletion. Regional CTMs are generally designed to study air pollution (e.g., Zhang et al., 2006;Honoré et al., 2007). Some of these models are used for operational purposes. Transport is calculated within CTMs by using off-line wind fields provided by analyses or forecasts computed by a meteorological general circulation model (GCM). Fairly detailed chemical mechanisms can be used in CTMs because of the low computing cost of the transport component. However, in complex dynamic situations such as convective environments, the use of off-line dynamics can be a major weakness (Grell and Baklanov, 2011).
Thanks to rapid advances in computing resources over the past ten years, models with fully coupled dynamics and chemistry have been developed as follows: climate chemistry models (CCMs) for climate studies at the global scale (e.g., Zeng and Pyle, 2003;Eyring et al., 2006) and mesoscale (convection-permitting) meteorology-chemistry models for regional work (local studies) (Grell et al., 2000(Grell et al., , 2005Wang and Prinn, 2000;Mari et al., 2000;Zhang et al., 2003;Fast et al., 2006;Arteta et al., 2006;Marécal et al., 2006;Barth et al., 2007a). Both types of coupled models must compromise between the spatial resolution (and domain size for limited area models), the simulation length and the degree of complexity for the chemical mechanism. Simulations using fine resolutions, large domains and detailed chemistry over a long duration for both the aerosol and gas phase are still too computationally demanding. CCMs usually use coarse horizontal and vertical resolutions with reasonably detailed chemical mechanisms to run for long periods of time. Limited-area model simulations at the regional scale or at the cloud scale generally use a reduced number of chemical species and reactions because of their fine horizontal and vertical resolutions (see examples of models used in the intercomparison exercise as published by Barth et al., 2007b).
Here we present a new modeling tool devoted to local and regional studies of atmospheric chemistry from the surface to the lower stratosphere that is designed for both operational and research purposes. This new model represents an advancement in the limited-area model CATT-BRAMS (Coupled Aerosol-Tracer Transport model to the Brazilian developments on the Regional Atmospheric Modeling System, Freitas et al., 2009;Longo et al., 2010), which includes a chemical module for both gaseous and aqueous phases. It also takes advantage of the BRAMS-specific development for the tropics/subtropics , of the recent availability of pre-processing tools for addressing chemical mechanisms and of fast codes for photolysis rates. As with BRAMS, this model is conceived to run at horizontal resolutions ranging from a few meters to more than a hundred kilometers, depending on the scientific objective. The model computation is optimized to be used for operational purposes. This specificity allows for the use of chemical mechanisms with a large number of chemical compounds for research studies.
The full model description, including code optimization details, is given in Sect. 2. Two examples of model applications for both regional and urban scale conditions, including the description of the simulation setups and model results, are shown and discussed in Sect. 3. These two case studies illustrate the model's ability to simulate the tropospheric chemistry of the tropical region. Section 4 is devoted to final remarks.

Model system description
The Chemistry CATT-BRAMS (hereafter, CCATT-BRAMS) is an Eulerian atmospheric chemistry transport model coupled on-line with a limited-area atmospheric model. The atmospheric model is the BRAMS (Brazilian developments on the Regional Atmospheric Modeling System), which is based on the Regional Atmospheric Modeling System (RAMS, Walko et al., 2000) with additional specific developments for tropical and subtropical regions ). The Regional Atmospheric Modeling System is a multipurpose, numerical prediction model designed to simulate atmospheric circulations spanning from the hemispheric scale down to large eddy simulations of the planetary boundary layer. RAMS is a non-hydrostatic time-split compressible model (Tripoli and Cotton, 1982). It has a set of state-ofthe-art physical parameterizations for surface-air exchanges, turbulence, convection, radiation and cloud microphysics. It has a multiple grid-nesting scheme for simultaneously solving model equations on two-way interacting computational meshes of differing spatial resolutions. For real case studies, global meteorological analyses or forecasts are used to define the initial model state and for forcing boundaries during simulation.
The radiation scheme is based on a modified version of the Community Aerosol and Radiation Model for Atmosphere (CARMA, Toon et al., 1988). The original CARMA version simultaneously considered an aerosol microphysics scheme and two-stream radiative transfer module for both solar and terrestrial spectral regions (Toon et al., 1989). The major modification from the original version refers to the prescription of aerosol intensive optical properties, specifically the extinction efficiency, single scattering albedo and asymmetry parameter. These parameters are obtained from previous off-line Mie calculations. The prescription of smoke optical properties especially for the South American continent derives from the use of climatological size distribution and the complex refractive index from several measurements sites of the AErosol RObotic NETwork (AERONET, Holben et al., 1998) in the southern area of the Amazon Basin. These properties are used as input to an off-line Mie code to calculate the spectral optical properties required by CARMA (Procópio et al., 2003;Rosário et al., 2011Rosário et al., , 2013. CATT is an Eulerian transport model coupled to BRAMS and designed to study the transport processes associated with the emission of tracers and aerosols Longo et al., 2010). Tracer transport is consistently run online with the atmospheric state evolution using the BRAMS dynamic and physical parameterizations. The tracer massmixing ratio, which is a prognostic variable, includes the effects of sub-grid scale turbulence in the planetary boundary layer, convective transport by shallow and deep moist convection in addition to grid scale advection transport. The advective transport of scalars can employ the forward upstream of second order formulation (Tremback et al., 1987) wheres is the grid box mean tracer mixing ratio; the term adv represents the 3-D resolved transport (advection by the mean wind); and the terms PBL diff, deep conv and shallow conv stand for the sub-grid scale turbulence in the planetary boundary layer (PBL), and deep and shallow convection, respectively. In the original version of CATT-BRAMS, as described in , the chem term refers simply to the passive tracers' lifetime, the W is the term for wet removal applied only to aerosols, and R is the term for the dry deposition applied to both gases and aerosol particles. Finally, Q was the source term that already included the plume rise mechanism associated with vegetation fires . In addition, this model version already accounts for the interaction of aerosols with solar and long wave radiation and the feedback to the atmospheric model in terms of heating rates . However, the aerosols are treated as generic particles (with diameters smaller than 2.5 µm) from urban and biomass burning sources, without considering the evolution of its composition and size distribution, not accounting for interactions between aerosol and gas-phase chemistry. A detailed description and evaluation of the CATT-BRAMS can be found in Freitas et al. (2009 and Rosário et al. (2013). CATT-BRAMS has been used operationally by the Brazilian Center for Weather Prediction and Climate Studies (CPTEC, http://meioambiente. cptec.inpe.br) since 2003 and as a research tool by several groups around the world (e.g., Marécal et al., 2007Marécal et al., , 2010Longo et al., 2009;Landulfo et al., 2009;Arteta et al., 2009a, b;Liu et al., 2010;Ramos, 2006;Gevaerd, 2005;Herrmann, 2004;Gácita, 2011;Munchow, 2008;Hernández, 2010;Alonso, 2011), which demonstrates its good performance.
In the new CCATT-BRAMS, a gas phase chemical module is fully coupled to the meteorological/tracer transport model CATT-BRAMS to solve the chem term in Eq. (1), as follows: where ρ = {ρ 1 , ρ 2 , . . . , ρ N } are the number density of N reagent species considered, and P k and L k correspond to the net production and loss of species k. This equation uses the initial condition ρ(t 0 ) = {ρ 1 (t 0 ), ρ 2 (t 0 ), . . . , ρ N (t 0 )} in  its solution. The loss and production terms include photochemistry, gas phase and aqueous chemistry. Figure 1 illustrates the main sub-grid scale processes involved in the trace gas/aerosol distribution in the CCATT-BRAMS system, which will be described below.
The CCATT-BRAMS system was developed by using advanced numerical tools to come up with a flexible multipurpose model that can be run for both operational forecasts and research simulations. Moreover, the model system is a fully comprehensive code package designed to allow the user some flexibility in choosing the chemical species, the chemical mechanism, the emission types and databases. A schematic view of the model system, including its preprocessing tools, is given in Fig. 2. The packed system comprises three preprocessor tools for emissions databases (PREP CHEM SRC, Freitas et al., 2011), chemical mechanisms, and boundary and initial conditions as well as the CCATT-BRAMS code itself.
The first step for any simulation is the choice of gaseous species and of the gas phase and photochemistry reactions. To make the use of different chemistry mechanisms more straightforward within CCATT-BRAMS, a modified version of the preprocessor tool SPACK (Simplified Preprocessor for Atmospheric Chemical Kinetics) as developed by Djouad et al. (2002) following Damian et al. (1995), was used. The modified SPACK (hereafter called M-SPACK) basically allows the passage of a list of species and chemical reactions from symbolic notation (text file) to a mathematical one using ordinary differential equations (ODEs), automatically preprocesses chemical species aggregation and creates Fortran90 routine files directly compatible for compilation within the main CCATT-BRAMS code.
The M-SPACK output code also feeds the emissions preprocessor tool (PREP-CHEM-SRC) to ensure consistency between the emissions database to be used in CCATT-BRAMS and the list of species treated by the chemical mechanism. The PREP-CHEM-SRC provides the emissions from different sources (see Sect. 2.2 for details), which are interpolated onto the chosen simulation grid and then used as inputs for the CCATT-BRAMS. This model basically links the species that are in the emissions databases to those in the chemical mechanism. When the species are the same, this is straightforward. However, there are often problems in which the species names represent a group of species. In this case, the PREP-CHEM-SRC converts the species from the database into the model species. For volatile organic compounds (VOCs), when only the total emissions per source are reported, the disaggregation follows the OxComp (tropospheric Oxidant model Comparison, Derwent et al., 2001) specification for the hydrocarbon mixture, as reported in the Third Assessment Report of the IPCC (Prather et al., 2001). The resulting disaggregated VOCs are subsequently reassembled into lumped species via compatibility files specific for the chosen chemical mechanism.
The M-SPACK output code also feeds the BC-PREP code that generates the initial and boundary fields for the chemical species to be used in the CCATT-BRAMS simulation.

Gas phase and photochemistry
In principle, CCATT-BRAMS can employ any chemical mechanism provided by the user. In practice, the available computing resources limit the number of species and reactions. To date, three widely used tropospheric chemistry mechanisms have been tested, that is, the Regional Atmospheric Chemistry Mechanism (RACM, Stockwell et al., 1997) with 77 species, Carbon Bond (CB, Yarwood et al., 2005) with 36 species, and the Regional Lumped Atmospheric Chemical Scheme (RELACS, Crassier et al., 2000) with 37 species. The RACM mechanism is preferentially used for research purposes because it is more complete than Carbon Bond and RELACS. Because RACM and RELACS were used in the simulations presented in this paper, more details will be given on these mechanisms. RACM is based on the lumped molecule approach, in which the species are grouped according to their chemical nature, also using the magnitude of the emission rates and reactivity with respect to OH in the lumping from the included species. This model was originally designed to simulate troposphere chemistry from urban to remote conditions, and it includes 17 stable inorganic species, 4 inorganic intermediates, 32 stable organic species and 24 organic intermediates for a total of 237 reactions, including 23 photolytic reactions. RELACS is a reduction of RACM, which follows the reactivity lumped molecular approach, but modified so that the RACM organic species are grouped into new species according to their chemical nature and the reactivity is relative not only to OH but also to other oxidants. The result is a reduction to 37 species and 128 reactions. RELACS is currently used for operational air quality prediction at CPTEC because of its reduced mechanism leading to affordable computing times. For real-time forecasting, RELACS reproduces the RACM response fairly well (Gácita, 2011).
Most atmospheric chemistry models have used look-up tables of pre-calculated photolysis rates because their on-line determination by radiative code is time consuming. Nevertheless, this approach does not account for the presence of aerosols and clouds, which are frequent features in meteorological simulations, in particular in the tropics. The development of fast radiative codes such as Fast-J Brian and Prather, 2002) and Fast-TUV (Tie et al., 2003) provides the opportunity to couple the photolysis processes calculations with a meteorological model on-line to improve the photolysis rates estimations in aerosol polluted and cloudy environments. The Fast-TUV code chosen and introduced to the CCATT-BRAMS is based on the well-known TUV model (Madronich, 1989). It uses a reduced number of spectral bands (17) leading to 8 times more rapid code than the original TUV with differences generally lower than 5 %.

Emissions
The PREP-CHEM-SRC tool provides emission fields interpolated onto the transport model grid. The preprocessor is coded using Fortran90 and C and is driven by a namelist allowing the user to choose the type of emissions, databases and chemical species specification file from the M-SPACK. The emissions under consideration are from the most recent databases of urban/industrial, biogenic, biomass burning, volcanic, biofuel use and burning from agricultural waste sources. The current version includes anthropogenic emission inventories provided by "REanalysis of the TROpospheric chemical composition over the past 40 yr" (RETRO,  Olivier et al., 1996Olivier et al., , 1999. This version includes most direct greenhouse gases, 4 ozone precursor species and 3 acidifying gases, primary aerosol particles and stratospheric ozone depleting species. It also includes urban/industrial information specifically for the South American continent based on local inventories (Alonso et al., 2010). Currently, all urban/industrial emissions are released in the lowest model layer. However, if emissions from point sources (e.g., stacks) are available, information on stack heights can be easily included. For biomass burning, the PREP-CHEM-SRC includes emissions provided by the Global Fire Emissions Database (GFEDv2) based on Giglio et al. (2006) and , or emissions can also be estimated directly from satellite remote sensing fire detections using the Brazilian Biomass Burning Emission Model (3BEM, Longo et al., 2010) as included in the tool. In both cases, fire emissions are available for 107 different species. The biomass burning emission estimate is divided into two contributions, namely smoldering, which releases material in the lowest model layer, and flaming, which makes use of an embedded on-line 1-D cloud model in each column of the 3-D transport model to determine the vertical injection layer. In this case, the cloud model is integrated using current environmental conditions (temperature, water vapor mixing ratio and horizontal wind) provided by the host model . Biogenic emissions are also considered via the Global Emissions Inventory Activity of the Atmospheric Composition Change: the European Network (GEIA/ACCENT, http://www.aero.jussieu.fr/ projet/ACCENT/description.php) for 12 species and derived by the Model of Emissions of Gases and Aerosols from Nature (MEGAN, Guenther et al., 2006) for 15 species. Other emissions include volcanic ashes (Mastin et al., 2009), volcanic degassing (Diehl, 2009;Diehl et al., 2012), biofuel use and agricultural waste burning inventories developed by Yevich and Logan (2003). The PREP CHEM SRC code is a comprehensive userfriendly tool and a regular user should be able to incorporate new emissions databases. A detailed description of the PREP CHEM SRC code and its functionalities can be found in Freitas et al. (2011).

Transfer to aqueous phase and aqueous chemistry
In the presence of liquid clouds or rain, soluble species are partly transferred from the gas phase to the liquid phase. In the microphysical scheme, the mass transfer calculations between the phases follow Barth et al. (2001). At each time step, it is determined either by Henry's law equilibrium or by mass transfer limitation calculations if equilibrium is not attained within the time step. The cloud and rain droplets transport the species in the liquid phase. They can be released to the gas phase if droplets evaporate or wash out by rain sedimentation.
In the convection scheme, the species can be washed out by rain sedimentation. The loss of gas species is proportional to the gas species concentration, to the effective Henry's constant of the species, to the mixing ratio of liquid cloud and rain and to the rain rates, following the work of Berge (1993).
The chemical transformations in the aqueous phase are resolved following the scheme proposed by Strader et al. (1999), which include 28 species in the aqueous phase, as related to 18 species in the gaseous phase, as described in Sartelet et al. (2007) and Mallet et al. (2007).

Dry deposition
Dry deposition of gas species at the surface is taken into account in the CCATT-BRAMS. The deposition flux follows the resistance formulation and accounts for the aerodynamic, quasi-laminar layer and canopy resistances (Wesely, 1989;Seinfeld and Pandis, 1998) with updates from Weseley and Hicks (2000) and Zhang et al. (2003). Additionally, it is fully coupled to the surface parameterization, including the subgrid land type patches within the parameterization.

Carbon cycle
The soil/vegetation model "Joint UK Land Environment Simulator" (JULES, Best et al., 2011;Clark et al., 2011) was also fully coupled to the CCATT-BRAMS model, providing surface fluxes of momentum, latent and sensible heat, and radiative as well as CO 2 and other trace gases. A detailed description of the coupling and applications to numerical weather forecasting and the CO 2 budget in South America is given in Moreira et al. (2013).

Time integration of the chemical mechanism
The system of Eq. (2) is a stiff one because the chemical reactions rates occurring in the atmosphere vary by several orders of magnitude, requiring implicit methods for non-prohibitive numerical solutions. Furthermore, the typical chemical mechanisms suitable for the troposphere on a regional scale include a large number of species, for example, RACM has 77 species reacting via 230 kinetic and photolysis reactions (Stockwell et al., 1997). This implies a high computational cost involved in the solution of Eq. (2), which is by far the most expensive term for the solution of the continuity Eq. (1).
The numerical integrator of the chemical mechanism in this numerical modeling system is an efficient, implicit and multi-stage solver based on Rosenbrock's method (Hairer and Wanner, 1991;Verwer et al., 1999). This method makes possible the change of solution in a nonlinear differential equation system (Eq. 2) to a linear algebraic increment in terms of K i , and the solution is given as follows: where s is the total number of stages, b i is numerical constants depending on s, and τ is the time step. The increments K i are obtained sequentially throughout the solution of the linear algebraic system given by the following: where i = 1, s, α ij and γ ij are constants that depend on s, ρ i is an intermediate solution used to recalculate the net production on stage i given by the term F (ρ i ), and J is the Jacobian matrix of the net production at time t 0 . The majority of the computational effort involves finding the solution for this linear system, which has the following basic form: where A is an N × N matrix (N is the number of species), x is the vector solution and b is the vector of the independent terms. Fortunately, two properties of this system of equations can be used to speed up the process. The first one is the fact that the Jacobian matrix in Eq. (4) is extremely sparse; typically only approximately 10 % of its elements are non-zeros. The second relevant aspect is that the matrix structure is invariant in time and space, which allows the prior recognition and mapping of non-zero elements on which the operations should be performed. The solution for the system of Eq. (5) follows the method proposed by Kundert (1986) and Kundert and Sangiovanni-Vincentelli (1988). In this method, with reference to fixed positions where the chemical reactions occur, one performs the LU factorization and solves the matrix system by working with memory pointers. The method works on three matrices originating from the matrix that must be solved, that is, a diagonal matrix (D), a lower triangular (L) and another upper triangular (U): The solution given by the following expression: where (k = 1, 2, . . .). The elements of the array are dynamically allocated only once and unnecessary iterations are eliminated. An index of pointers was previously created to relate the sequence of positions allocated in the memory with its original position in the array. The factorization order of the rows and columns of a matrix is of utmost importance and directly affects the timeliness and accuracy of the result. The method solves the array in two parts, with decomposition (or factorization) and with the integrator that uses the substitution forward-backward method. Currently, ROS 2 (2nd order, 2 stages) and RODAS 3 (3rd order, 4 stages) Rosenbrock's methods are implemented. The time integration may use a manual, splitting or dynamic time step for the chemistry. The operator splitting used to solve the mass continuity equation may be defined as parallel (as originally used by the BRAMS model to integrate the dynamic), sequential and sequential symmetric (Yanenko, 1971;McRae et al., 1982;Lanser and Verwer, 1998). The sequential splitting solution is known to be more accurate than parallel and therefore should be preferred. However, we also implemented and tested the sequential symmetric splitting, performing the chemistry integration at each 2 or more time steps of the dynamic, using time steps 2, 4 and 6 times higher than the dynamic time step. These tests indicated that the numerical solutions using different choices of splitting are only slightly different, typically less than 5 %, even for ozone nearby its precursors emission sources. After all, the best compromise between accuracy and computing time was achieved using RODAS 3 and symmetric splitting with a chemistry time step 4 times larger than the time step of the dynamic. This setting is used operationally at CPTEC.

Model data structure
The BRAMS original data structure uses Fortran90/2003derived data types to store related model fields. Each derived data type encapsulates the set of history carrying variables required by one model component. For example, the derived data type radiation contains radiation-specific fields that are used and updated at each invocation of the radiation module. Prognostic fields are stored in a derived data type named basic, as referenced by every module that requires prognostic field values. As a general BRAMS design and coding rule, derived data types are used by every model component that requires their values, but is modified only by its own model component.
This data structure simplifies the introduction of new model parameterizations by encapsulating all historycarrying variables required by the new parameterization at a derived data type.
BRAMS multiple grids are implemented by arrays of these derived data types and are indexed by grid number. As an example, assuming that variable ngrid contains the current grid number, assuming that basic g is the array of the derived type basic that stores the prognostic fields of all grids and assuming that u is the component of basic that stores the x component of the wind velocity at all grid points, then basic g(ngrid)%u stores the x component of the wind velocity of the current grid, and basic g(ngrid)%u (z,x,y) addresses the variable at grid point (z, x, y).
The CCATT-BRAMS data structure extends the original BRAMS data structure in a natural way. Derived data type chem contains variables related to one chemical species such as current mass concentration, its tendency, its decrease in relation to dry and wet deposition, etc. Let sc p be one of these fields. Multiple grids are represented by an array of chem type. However, because each species requires its set of variables at each grid, the chem array has to be indexed by species number and grid number. Consequently, chem g(nspecie,ngrid)%sc p(z,x,y) stores field sc p at grid point (z, x, y) of species nspecie at grid ngrid.
The (z, x, y) memory organization eases code development. Modelers can develop new code components for a single atmospheric column (the z direction) dealing with rank one arrays. Then, a wrapper is written to connect the new code component to the existing code. The wrapper loops over columns, invoking the code component with one column at a time. Unfortunately, most code components have vertical dependencies, preventing vectorization and increasing execution time. To reduce execution time by increasing the vectorization ratio, selected components are rewritten to collapse the x and y dimension in just one dimension (xy) and to transpose the (z, x, y) organization into (xy, z), following the work of Fazenda et al. (2006). The wrapper transposes the (z, x, y) memory organization into the (xy, z) and back, isolating the execution time optimization.
Chemistry is a grid point computation (that is, computation at one grid point is fully independent of any other grid point). Thus, the chemistry module could have been written on scalar variables, dealing with a single grid point at a time, but in a way that would prevent vectorization. To increase the vectorization ratio, the chemistry module operates over a set of grid points at a time, as represented by vectors of rank one. The driver breaks the (z, x, y) field organization into vectors of a convenient size, invokes the module and stores back the results.

Initial and boundary conditions
The initial and boundary conditions for the chemical species are treated in a similar way as for the meteorological variables. The RAMS/ISAN (ISentropic ANalysis package, Tremback, 1990) tool, originally developed to create initial and boundary conditions for the meteorological fields, was extended to include chemical fields from global chemistry models. This model allows the boundary condition data to be applied by varying in time using a Newtonian relaxation (nudging) technique.

Examples of applications
The performance of the CCATT-BRAMS system is explored throughout two case studies from the regional to local scale and from biogenic and fire emissions to urban emission impacts.

Regional scale: Amazonian case study
During the LBA/BARCA (Large-Scale Biosphere Atmosphere Experiment in the Amazon Basin/Balanço Atmosférico Regional de Carbono na Amazônia, Andreae et al., 2012;Beck et al., 2012;Bela et al., 2013) field experiment, measurements of several trace gases, including O 3 (ozone), CO (carbon monoxide), CH 4 (methane), CO 2 (carbon dioxide) and aerosols, were made aboard the INPE "Bandeirante" aircraft. Flights from Manaus transected the Amazon Basin from the tropical Atlantic Ocean shore to the northwestern part of the Amazon Basin, passing over a variety of ecosystems from the surface to approximately 4.5 km in altitude (Fig. 3). BARCA Phase A occurred in November 2008, during the transition between the dry and wet seasons, with rainfall to the west and south of Manaus but much drier conditions and widespread vegetation fires in eastern and northern Amazonia. During this period, the Inter-tropical Convergence Zone (ITCZ) was north of the studied region, which therefore received predominantly Southern Hemisphere air masses, with a strong contribution of smoke pollutants from the African continent. Phase B occurred in May 2009 during the opposite seasonal transition, from the wet to dry season, when the ITCZ was located over the Equator, abnormally south of its climatological position, favoring events of Northern Hemisphere inflow to Amazonia. The precipitation was above average and scattered fires occurred mainly in the far south.
Here we explore the O 3 data measured during BARCA. For the model CO evaluation we refer to Andreae et al. (2012), in which BARCA A CO measurements were previously compared with results from several different models, namely the Stochastic Time Inverted Lagrangian Transport (STILT, Lin et al., 2003), a combination of the Weather Research and Forecasting model with Chemistry (WRF-CHEM, Grell et al., 2005) and the Green House Gas module (GHG, Beck et al., 2011), the HYbrid Single-Particle Lagrangian Integrated Trajectory program (HYS-PLIT4, Draxler and Rolph, 2003), and WRF-CHEM and CCATT-BRAMS with 3BEM fire emission sources . Overall, all the limited area models, including CCATT-BRAMS with 3BEM fire emissions, captured at least some of the features of the observed mixing ratios, including the general levels of CO enhancement and regional variations. The dominant sources were fire activities in the eastern and southern part of the Amazon, which were well captured by 3BEM with an estimated accuracy of approximately 20 %. This model comparison indicated that the use of 3BEM emissions in high resolution models, including CCATT-BRAMS, yielded results consistent with observations, versus those from GFED with a large underestimation for GFEDv2 and GFEDv3 emissions with factors of four and seven, respectively. Vertical transport was a less consistent aspect of the modeling because of its strong dependence on the ability of the model to simulate convection over tropical   2010) and Rosário et al. (2013). In this work, BARCA O 3 data were disaggregated following a similar procedure to that adopted by  for CO. Vertical average profiles within four regions were considered: E and W of Manaus -within 4 • of the Equator, and N and S of Manaus -roughly on the 60 • W meridian.
We also compared model results with mean tropospheric O 3 retrieved from the Aura Ozone Monitoring Instrument and the Microwave Limb Sounder measurements (OMI/MLS), which are available globally on a 1 • × 1.25 • (latitude by longitude) grid size (Chandra et al., 2003(Chandra et al., , 2004. For model comparison, the tropopause was calculated according to the WMO (World Meteorological Organization) 2 K km −1 lapse rate definition by the National Center for Environmental Prediction (NCEP) Climate Diagnostics Center.

Model configuration
For this regional scale case study, the model was run from 1 October to 31 November 2008 and 1 May to 30 June 2009, with two nested grids. The external one had a 140 km resolution including both the South American and African continents and the internal one had a 35 km resolution including only South America. This configuration attempts to improve the description of long-range pollutant transport from Africa to South America by providing better boundary conditions of chemical fields to the nested grid domain. However, it must be said that there is an unavoidable inconsistency between the fire data sets used for emissions estimations in Africa and South America. While in South America there are multi-sensor fire data available (for details, see Longo et al., 2010), only the Moderate Resolution Imaging Spectroradiometer (MODIS) fire count was available for Africa. In Fig. 4, the model grid domains for this case study are presented with the total emissions for carbon monoxide obtained from PREP-CHEM-SRC (Freitas et al., 2011), using 3BEM  fire emissions as well as all the others described in Sect. 2.2.
The model parameterizations chosen for the simulations described in this section are detailed as follows. The surface scheme was the Land Ecosystem-Atmosphere Feedback model (LEAF v.3, Walko et al., 2000) tuned for tropical areas. The RAMS parameterization for the unresolved turbulence in the PBL used in this simulation was based on the Mellor and Yamada (1982) formulation, which predicts turbulent kinetic energy (TKE). All radiative calculations were performed using CARMA (Toon et al., 1989) with aerosol optical properties prescribed accordingly to Rosario et al. (2013). For the microphysics, we used the single-moment bulk microphysics parameterization, which includes cloud water, rain, pristine ice, snow, aggregates, graupel and hail (Walko et al., 1995). It includes prognostic equations for the mixing ratios of rain and each ice category of total water and the concentration of pristine ice. Water vapor and cloud liquid mixing ratios are diagnosed from the prognostic variables using the saturation mixing ratio with respect to liquid water. The shallow and deep cumulus scheme is based on the mass-flux approach (Grell and Dévényi, 2002). The RACM mechanism was used for the chemical integration.
The CPTEC/INPE global model T213 analysis provided initial and boundary conditions for the meteorological integration, and the MOCAGE (Modélisation de la Chimie Atmosphérique Grande Echelle) global chemistry forecast (Josse et al., 2004;Bousserez et al., 2007) provided boundary conditions for chemistry fields. Initial soil moisture was taken from the Gevaerd and Freitas (2006) estimation technique and the soil temperature was initialized assuming a vertically homogeneous field defined by the air temperature closest to the surface from the atmospheric initial data.

Results
The monthly mean tropospheric O 3 comparison for the outer domain between the model results and Aura OMI/MLS retrievals for both BARCA periods suggest that the model successfully captured the general pattern of O 3 distribution over the South Atlantic region, though it underestimated O 3 (see Fig. 5). In both cases, the reader must disregard noise in the OMI/MLS retrieval over higher latitudes (Jing et al., 2006;Waters et al., 2006).
For the BARCA A period, in November 2008, the model results indicate the predominance of the inflow of southwest Atlantic air masses into the Amazon Basin, which can also be seen in OMI/MLS data ( Fig. 5a and b). This inflow brings enriched air masses with biomass burning products from South Africa. The east-west gradients of the O 3 mixing ratio inside the Amazon Basin are similar for both model and OMI/MLS data, though there is a bias of approximately 30 %. The mean O 3 mixing ratio from the model ranged from approximately 30 ppbv in the central part of the Amazon Basin to approximately 50 ppbv on the eastern border of the basin. On the other hand, OMI/MLS data varied between approximately 45 and 65 ppbv. However, the underestimation over the basin seems to be associated with an underestimation of O 3 in the air masses inflow from the South Atlantic by 20 ppbv. The three SHADOZ (Southern Hemisphere ADditional OZonesondes, Thompson et al., 2007) O 3 profiles (not shown) obtained during this period (7, 19, and 28 November 2008) at the Natal (Brazil) site (5.4 • S, 35.4 • W) also indicate an inflow of enriched O 3 air masses above 700 hPa, with a typical vertical gradient going from approximately 25 ppbv below this level to 80 ppbv above on average but reaching 100 ppbv. Although the Natal SHADOZ profiles cannot be compared directly with the BARCA measurements, they do give an indication of the inflow air masses from the South Atlantic. These O 3 -rich air masses were not intercepted by BARCA flights, which were mainly below 700 hPa (Fig. 6).
In Fig. 6, the typical O 3 values observed below 4.5 km were captured by the model when compared to BARCA measurements.
The underestimation of O 3 in the mid-troposphere over the South Atlantic region is likely related to an underestimation of ozone precursors, CO in particular. According to Andreae et al. (2012), BARCA CO measurement comparisons with CCATT-BRAMS and the Weather Research and Forecasting model coupled with Chemistry (WRF-CHEM) results, both using 3BEM fire emissions, indicate that fire activities in the eastern and southern part of the Amazon were well captured by 3BEM with an estimated accuracy of approximately 20 %. However, a much larger underestimation of 3BEM emissions is expected for Africa compared to South America and is associated with the differences/inconsistency between the fire remote sensing data sets used. Based on the fire data input used by 3BEM for Africa, one should expect it to be more comparable with GFED, which, according Andreae et al. (2012), yields a large underestimation of a factor of four and seven for GFEDv2 and GFEDv3, respectively.
For the BARCA B period, in May 2009, the air mass inflow events from the Northern Hemisphere were mostly captured on a case-by-case basis, but smoothed out in the monthly mean for both the model and Aura data ( Fig. 5c  and d). During this period, ozone was measured primarily in the northern and eastern regions (not shown). The model also typically captured the general vertical structure in both regions.
A more detailed discussion of BARCA CO and O 3 measurements and comparison with CCATT-BRAMS and WRF-CHEM results is given in Andreae et al. (2012) and Bela et al. (2013), respectively. The two models used the same emission sets as performed with similar accuracy for this case study.

Local scale: urban conditions
This case study was conceived to test a configuration for a planned air quality forecasting procedure for the major urbanized region in Brazil, which includes the metropolitan areas of São Paulo and Rio de Janeiro, as well as the highly urbanized and industrial areas connecting the two.
This configuration was evaluated throughout a comparison of air quality measurement data from several stations operated by the Environmental Agency of the state of São Paulo (CETESB, Companhia de Tecnologia de Saneamento do Estado de São Paulo), which continuously operates 42 ground stations in the state of São Paulo, several inside the São Paulo metropolitan area (CETESB, 2012). All of them measure O 3 and NO x (nitrogen oxides) and most of the stations in the metropolitan area of São Paulo also measure CO.

Model configuration
The model was run with a 3 km horizontal resolution from 20 July to 30 August 2011, with an 11-day period from 20-31 July used for a spin-up. The model domain covers a large part of São Paulo and Rio de Janeiro states and the southern part of Minas Gerais. It was conceived with two purposes, that is, to include the Rio de Janeiro metropolitan area and its influence on the air quality of the state of São Paulo and to provide air quality forecasting for the majority of the important cities in the state of São Paulo, considering the compromise in the increased computational requirements, as necessary for operational forecasting. In Fig. 7, the model domain is presented with the urban emissions for carbon monoxide following Alonso et al. (2010), as obtained from PREP-CHEM-SRC (Freitas et al., 2011). The location of the metropolitan areas of São Paulo, Rio de Janeiro, Campinas and Ribeirão Preto are also indicated in the same figure.  The same model parameterizations as in the previous case study were chosen, except for the deep convective parameterization that was not used and for the RELACS chemical mechanism instead of RACM. For the simulations presented in this section, boundary conditions for both meteorological and chemistry fields are provided by CPTEC/INPE CCATT-BRAMS operational forecast data currently with a 25 km horizontal resolution (CPTEC/INPE, 2012) by using the oneway nesting approach.

Results
The monthly average carbon monoxide mixing ratios at the first peak hour (09:00 LT) are presented in Fig. 8. The model results indicate high mixing ratios, ranging from 1000 to 2000 ppbv, in the city of São Paulo; and moderately high ones, ranging from 500 to 750 ppbv, in Rio de Janeiro, Campinas, and other major cities in the state of São Paulo. A similar behavior is observed at 18:00 LT, though less intense and more concentrated around the cities. In São Paulo a second peak is observed at approximately 21:00 LT, and mixing ratios stay elevated even at night. Nitrogen oxide mixing ratios follow a similar diurnal cycle and are also more elevated Geosci. Model Dev., 6, 1389-1405, 2013 www.geosci-model-dev.net/6/1389/2013/ Fig. 8. Monthly average spatial distribution of CO mixing ratio (ppbv) at 09:00 LT from the model. at these hours: monthly averages at 09:00 LT are presented in Fig. 9. NO x typically peaked above 150 ppbv in the city of São Paulo and approximately 100 ppbv in the smaller towns. Ozone mixing ratios peaked approximately 15:00 LT, and the monthly averages for this time are presented in Fig. 10. Figure 11 presents monthly average diurnal cycle for carbon monoxide mixing ratios at two stations, namely Parque Dom Pedro II and Pinheiros, both in the downtown area of the city of São Paulo. The model tends to underestimate the nocturnal observed values of carbon monoxide mixing ratios at these São Paulo stations. This underestimation is related to the specified diurnal cycle, which is not capable of reproducing the emissions cycles of São Paulo, where the traffic at night is less intense than during the day, but still not negligible. A known difficulty also evident from the results is that this cycle is not the same throughout the city, and the proportion of light/heavy vehicles and the traffic driving patterns are not constant as well, modifying the emissions. The model results tend to overestimate the CO for stations located inside large vegetated areas where observations typically indicate values lower than the average, especially at peak hours. Nevertheless, the model represents the diurnal cycle during daytime hours for all 10 stations evaluated inside the São Paulo metropolitan area, and adequately estimates the order of magnitude in most cases with model values within the standard deviation of the monthly mean.
The monthly average nitrogen oxides and ozone mixing ratios for the Parque Dom Pedro II stations are presented in Fig. 12. It should be noted that the model overestimates the NO x mixing ratios at peak hours. The reasons for this overestimation are very similar to those for carbon monoxide. Additionally, the emission inventories are most likely not accurate enough, and their spatial distribution in the city, according to the number of vehicles registered for each region, also has uncertainties when the locations are considered together. Additionally, only the emissions for NO x and CO are available (Alonso et al. 2010); volatile organic compounds (VOC) emissions were updated from local inventories keeping the   RETRO ratio. As a secondary pollutant, ozone higher values are expected far from the sources of its precursors (nitrogen oxides and non-methane volatile organic compounds -NMVOC). For all cities, a VOC : NO x ratio below 4 was observed at peak emissions hour, as in the VOC-sensitive regime, where the ozone levels were controlled by the VOC levels and a decrease in NO x mixing ratios resulting in higher ozone levels. This trend was indeed reproduced by the model, which showed higher ozone levels in the countryside around São Paulo, corresponding to lower NO x emissions. Modeled O 3 and NO x mixing ratios are both much closer in magnitude to observed values for the stations within the countryside. Figure 13 illustrates the O 3 and NO x diurnal cycles for Sorocaba. This finding is similar to all stations in the countryside as evaluated, including Ribeirão Preto, which is a larger city compared to the others with more the 600 000 inhabitants.

Conclusions
In this paper, we have described the functionalities of the new Chemistry-CATT-BRAMS modeling system, which has been developed by using advanced numerical tools to create a flexible multipurpose model that can be run for both operational forecasts and research purposes. The code package includes preprocessor tools for emissions databases, chemical mechanisms, and boundary and initial conditions and the CCATT-BRAMS code itself. The model has been developed by focusing with special attention (but not only) on tropical and subtropical regions. The model performance was explored μ Fig. 13. Monthly (a) NO x mixing ratio (ppbv) and (b) O 3 (ppbv) from a CETESB ground station in a small city in the countryside in the state of São Paulo (Sorocaba) and from the model. throughout two different applications for regional and local scales and different emission source influences. For the regional scale, a period when BARCA airborne measurements were undertaken over the Amazonia was simulated with CCATT-BRAMS. In spite of fire emission underestimations for Africa, which biased the pollution burden over the South Atlantic region, the model was able to capture the O 3 distribution and transport patterns.
For the urban case, NO x and O 3 mixing ratios are overand underestimated, respectively, but in all cases, they fell within the standard deviations. Even the nighttime O 3 mixing ratios, which usually represent a greater challenge for modelers, were accurately assessed. However, air quality forecasting for South American cities is still challenging due to the lack of reliable urban emission inventories. Nevertheless, the model did reproduce the VOC-sensitive regime, with VOC : NO x ratios typically below 4 the hour of peak emissions. The model results also shows higher ozone levels in the countryside from the state of São Paulo, corresponding to lower NO x emissions. The CCATT-BRAMS currently runs for daily operational air quality forecasts at CPTEC/INPE, supporting its robustness. It has already been used for research to study atmospheric chemistry by Marécal et al. (2012), Iacono-Marzano et al. (2012) and Krysztofiak et al. (2012). These studies were based on other chemistry schemes and then discussed in the present paper by using the CCATT-BRAMS capability to easily change the chemistry scheme.
The CCATT-BRAMS models system represents a set of numerical tools comprising state-of-the-art emission information as well as physical and chemical parameterizations Geosci. Model Dev., 6, 1389-1405, 2013 www.geosci-model-dev.net/6/1389/2013/ coupled to a reliable dynamic core, which can cover scales from meters to hundreds of kilometers. Moreover, the system is coded with updated Fortran90. Additionally, its data structure is compact and has good readability, which makes the code easily understandable and lower maintenance. The CCATT-BRAMS code package is available upon request by email at gmai@cptec.inpe.br.