Comiling CHEMMECH

Hi CMAQ users:
I am trying to compile and run CHEMMECH to modify the chemical mechanism. While it failed. Is there anything I missed?
Best
Huan

fang63@brown-fe01:/scratch/brown/fang63/cmaq/5.2.1/UTIL/chemmech/scripts $ ./bldit_chemmech.csh intel
\rm -f *.o *.mod
pgf90 -Mfixed -Mextend -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -traceback -Ktrap=fp -O3 -I . -g -c MECHANISM_PARMS.f
make: execvp: pgf90: Permission denied
make: *** [MECHANISM_PARMS.o] Error 127
failed to compile …/src/CHEMMECH

In addition, I am curious how the output of CHEMMECH be used in CCTM runs. I looked through the script “run_cctm.csh” (EPA’s open source code: https://github.com/USEPA/CMAQ/blob/5.2.1/CCTM/scripts/run_cctm.csh). It seems that only species lists (GC_$MECH.nml, AE_$MECH.nml, NR_$MECH.nml) and photolysis (CSQY_DATA_$MECH) are included in the script, while the output of CHEMMECH (RXNS_DATA_MODULE.F90 and RXN_FUNC_MODULE.F90) are not included.
Does CCTM actually include the chemical mechanism or only considering photolysis?

As mentioned in comment 739, https://forum.cmascenter.org/session/email-login/dafe747ca68182af24a59287067de42e, the chemical mechanism is a build time option (not runtime option). The mechanism is compiled into the executable.

CHEMMECH is a utility that creates RXNS*F90 files (if you want to update the mechanism) which must be compiled in the executable. The default versions reside in the CMAQ/CCTM/src/MECHS folder.

If you want to change a mechanism, you should:

  1. Modify the mech*.def and GC/AE/NR*.nml as appropriate for your update. mech*.def is not actually used in creating the executable, but is an intermediate file from which information is extracted for fortran code.
  2. Run CHEMMECH to translate the mech*.def information into the two RXNS*.F90 files
  3. If you want to run the ebi solver within CMAQ, propagate the RXNS*.F90 information to hr*.F files (which normally reside in CMAQ/CCTM/src/gas/ebi*) via create_ebi

chemmech and create_ebi reside in the UTIL folder: https://github.com/USEPA/CMAQ/tree/5.3.b2/UTIL

I’m not sure of your specific problem. Do you have access to pgf90?

The pgf90 compiler appears not have executable permissions. Talk to your system administrator about fixing the problem. You can also try a different compiler listed in the build script.

1 Like

Thank you for help!!
Chemmech was successfully run. While, when I was trying to use the chemmech output to run create_ebi, it keeps showing

ifort -fixed -132 -O3 -override-limits -fno-alias -mp1 -I. -g -CB -CU -traceback -c /scratch/brown/fang63/cmaq/CMAQ-5.2.1/UTIL/create_ebi/src_RXNSU/module_envvar.F
ifort: command line remark #10411: option ‘-override-limits’ is deprecated and will be removed in a future release. Please use the replacement option ‘-qoverride-limits’
create_ebi.txt (12.6 KB)

I also attach the running log here.
any idea about it?

Best
Huan

Compiler remark #10411 is a just warning that a used option no longer exists. The warning gives a solution but the over-limits option is not needed. You can remove the option by editing Makefile.v50xx in the UTIL/create_ebi
directory.

Based on the sent log file, the error occur because create_ebi was compiled using a racm2 mechanism but was run with settings for a cb6 mechanism. Read the run script for the correct setting. The build and run scripts
should be merged to prevent the error. They were merged in create_ebi versions 5.2beta and earlier.

I’m a little confused now, I am sure I set RACM in bldrun script, and I search in the running log for “CB6”, there is no result.

Huan

The settings refer to the lines that set the environment variable for the mechanism processed.

In the run script, comments give guidance on their values but errors exist,
too many people editing the file. In racm2 mechanisms, ACO3 represents the

peroxy acetyl radical and HO represent the hydroxyl radical.

In saprc07t mechanisms, O1D represent excited oxygen atoms not O1D2.

For a racm2 mechanism, the setting should be as given below.

1 Like

It works now, thank you for help~