How the modified compilation process works?

For the modified chemistry mechanism compilation, the fortran source files are at $CASEROOTE/Buildconf/camconf/chem_proc/source. The Filepath file under exe/atm/obj includes both  $CASEROOTE/Buildconf/camconf/chem_proc/source and ../models/atm/cam/src/chemistry/pp_waccm_mozart two directories which have the same name fortran source files as chem_mods.F90 etc. Looking at the build log file atm.bldlog. file, why only the $CASEROOTE/Buildconf/camconf/chem_proc/source/chem_mods.F90 get compiled rather than the ../models/atm/cam/src/chemistry/pp_waccm_mozart/chem_mods.F90? thanks,
 

mmills

CSEG and Liaisons
Staff member
The general practice when modifying code is not to make modifications in the source code directory, which on some machines is write-protected. Hence the SourceMods directories in your case directory for modified versions of source files copied from the source directory.When you specify a usr_mech_infile, the chemistry pre-processor creates new chemistry modules based on the mechanism you specify in that file. These are put in $CASEROOT/Buildconf/camconf/chem_proc/source, and take precedence over the files with the same name in the source directory.You should not have to modify the files created by the pre-processor. If you do want to, for example, add print statements, you could copy the files created by the pre-processor from $CASEROOT/Buildconf/camconf/chem_proc/source into $CASEROOT/SourceMods/src.cam. I believe any modifications you make there will take precedence.
 
Back
Top