5.4.2. Files, configuration, and environment variables

5.4.2.1. CHEMMECH input files
5.4.2.2. CHEMMECH compilation options
5.4.2.3. CHEMMECH compilation
5.4.2.4. CHEMMECH execution options
5.4.2.5. CHEMMECH output files

Figure 5.3. CHEMMECH input and output files

CHEMMECH input and output files

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.

5.4.2.1. CHEMMECH input files

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

5.4.2.2. CHEMMECH compilation options

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.

  • FC:[default: pgf90]

    Fortran compiler path and name

  • FFLAGS:

    Fortran compilation flags

  • CC:[default: cc]

    C compiler path and name

  • C_FLAGS:

    C compilation flags

  • BASE: [default: $cwd]

    Working directory for compiling CHEMMECH

  • SRC: [default: ../]

    Location of CHEMMECH source code

5.4.2.3. CHEMMECH compilation

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.

5.4.2.4. CHEMMECH execution options

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.

  • BASE: [default: $cwd]

    Working directory path

  • Xpath: [default: $BASE]

    Executable directory path

  • Mpath: [default: ../mech]

    Directory path to the MECH.DEF file

  • Opath: [default: ../exts]

    Output file directory path

  • APPL:

    Simulation identifier

  • EXEC: [default: CHEMMECH]

    Executable name

  • MCFL: [default: mech.def.saprc99]

    Mechanism definition file name

  • EXSPCS: [default: $Opath/SPECIES.ext]

    Output file name when CHEMMECH is run in SP mode

  • EXRXDT: [default: $Opath/RXDT.EXT]

    Name of output mechanism data include file

  • EXRXCM: [default: $Opath/RXCM.EXT]

    Name of output mechanism common include file

5.4.2.5. CHEMMECH output files

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.