Creating or modifying mechanisms in CMAQ requires the use of the CMAQ chemical mechanism compiler (Chemmech) to produce the required Fortran include files. Chemmech translates an ASCII mechanism listing to the include files required by CMAQ. Like all of the CMAQ processor, Chemmech is a Fortran program that must be compiled by the user prior to use. Distributed with a Makefile for compilation and run scripts for execution, Chemmech reads a mechanism definition (mech.def) file and outputs the mechanism include files.
To modify an existing mechanism, copy the mech.def file that is contained in one of the mechanism include file directories to a new directory and modify the mechanism accordingly. Provide this modified mechanism definition file to Chemmech as input to produce the mechanism include files needed to compile CMAQ. Put these mechanism include files in a new directory under the $M3MODEL/include/release directory. To invoke this new mechanism set the “Mechanism” variable in the CMAQ build scripts to the name of the new mechanism directory and compile new executables.
To create a new mechanism for CMAQ, follow a similar procedure as above for modifying mechanisms. Use an existing mech.def file as a template to format the new mechanism for inclusion in CMAQ. After formatting the mechanism in the form of the mech.def file, provide this file as an input to Chemmech to create the required include files for CMAQ. Move the resulting include files to a new directory under $M3MODEL/include release. To invoke this new mechanism set the “Mechanism” variable in the CMAQ build scripts to the name of the new mechanism directory and compile new executables.