Figure 3 shows the input and output files and configuration options for CHEMMECH. The full set of mechanism include files required by the CMAQ programs are generated in two steps. In the first step, the program CHEMMECH is run with the mechanism definition file, MECH.DEF provided as input. The resulting RXDM.EXT and RXCM.EXT include files are then input to the Python script, include_generator.py, along with the Species_Table.csv file to create the full set of include files needed to compile CMAQ with a new chemical mechanism configuration. The Species_Table.csv file defines the atmospheric processes that each species undergoes in the model and is generated by the Excel spreadsheet Species_Table.xls that is distributed with CHEMMECH.
To implement a new mechanism in CMAQ edit a MECH.DEF file that is associated with a base mechanism and provide this new MECH.DEF files as input to CHEMMECH. Edit the default run script MP.saprc99.csh to point to the new MECH.DEF file. This script will call both the CHEMMECH executable and the include_generator.py script to create the full set of mechanism include files required by the CMAQ programs. There are no horizontal grid, vertical layer, or temporal settings for CHEMMECH.
Table 5.5. CHEMMECH input files
| File Name | Format | Description |
|---|---|---|
| MCFL (MECH.DEF) | ASCII | CMAQ mechanism definition file; photochemical mechanism listing with both mechanistic and kinetic information about all reactions that compose a chemical mechanism |
| SPST | ASCII/CSV | Species table; comma delimited file generated from an Excel spreadsheet that lists the atmospheric processes that affect each model species |
The configuration options listed here are set during compilation of the CHEMMECH executable. The compiler-specific options, such as the compiler names and flags, are set in the make.reader script distributed with the program. The directory paths of the CHEMMECH source code and working directory are set in the makeit script.
Fortran compiler path and name
Fortran compilation flags
C compiler path and name
C compilation flags
Working directory for compiling CHEMMECH
Location of CHEMMECH source code
To compile the CHEMMECH program run the following command in the directory that contains the scripts:
./makeit MP
For the compilation to be successful you must have the Portland Group Fortran and Gnu C compilers added to your path. To port CHEMMECH to other compilers, change the compiler names, locations, and flags in the make.reader script.
The environment variables listed here are invoked during execution of the program and are set in the CHEMMECH run script. The default run script is called MP.saprc99.csh.
Working directory path
Executable directory path
Directory path to the MECH.DEF file
Output file directory path
Simulation identifier
Executable name
Mechanism definition file name
Output file name when CHEMMECH is run in SP mode
Name of output mechanism data include file
Name of output mechanism common include file
Table 5.6. CHEMMECH output files
| File Name | Format | Description |
|---|---|---|
| RXCM.EXT | ASCII | Mechanism common include file; lists all of the chemical mechanism variables and parameters |
| RXDT.EXT | ASCII | Mechanism data include file; chemical mechanism definition formatted as DATA blocks to be read in as CMAQ source code |
| GC_ADV.EXT | ASCII | File listing the gas-phase model species that are transported by advection |
| GC_CONC.EXT | ASCII | File listing the gas-phase model species to write to the CCTM output CONC file |
| GC_DDEP.EXT | ASCII | File listing the gas-phase model species that dry deposit |
| GC_DEPV.EXT | ASCII | File listing the gas-phase model species for which to calculate deposition velocities |
| GC_DIFF.EXT | ASCII | File listing the gas-phase model species that are transported by diffusion |
| GC_EMIS.EXT | ASCII | File listing the gas-phase model species that are emitted into the model |
| GC_G2AE.EXT | ASCII | File listing the gas-phase model species that react to form aerosols |
| GC_ICBC.EXT | ASCII | File listing the gas-phase model species that require initial and boundary conditions |
| GC_SCAV.EXT | ASCII | |
| GC_SPC.EXT | ASCII | File listing the gas-phase model species |
| GC_WDEP.EXT | ASCII | File listing the gas-phase model species that wet deposit |
The default location of the CHEMMECH output files is the exts directory, controlled by the Opath variable in the run script. To compile a version of the CMAQ programs that use the include files created by CHEMMECH, these output include files need to be moved to a new directory under the $M3MODEL/include/release directory. Point the CMAQ build scripts to this new directory through the “Mechanism” variable.