Skip to content

bsn502/AtChem2

 
 

Repository files navigation

AtChem2 Build Status codecov

AtChem2 is an atmospheric chemistry box-model, primarily designed for use with the Master Chemical Mechanism (MCM), a near-explicit chemical mechanism which describes the gas-phase oxidation of volatile organic compounds (VOC) in the lower atmosphere. The MCM can be found at http://mcm.york.ac.uk/ (previously at http://mcm.leeds.ac.uk/). The latest stable release of AtChem2 can be downloaded here.

AtChem2 is open source, under the MIT license.

Please see CITATION.md for information on how to cite the model in publications.

Directory structure

  • build/ contains the Python and shell scripts used to compile AtChem2.
  • doc/ contains the AtChem2 manual, with the LaTeX source files, and the poster presented at the ACM 2018 conference.
  • mcm/ contains data files related to specific versions of the MCM and an example chemical mechanism.
  • model/ contains the the chemical mechanism, and the model configuration, constraints and output.
  • obj/ contains the files generated by the Fortran compiler.contains Python and shell scripts to install and compile AtChem2
  • src/ contains the Fortran source files.
  • tools/ contains shell scripts to install AtChem2 and its dependencies, plotting scripts in various languages, and other utilities.
  • travis/ contains the test suite scripts and files.

Installation, Setup and Execution

AtChem2 requires a Fortran compiler (GNU gfortran or Intel ifort), the CVODE library (part of the SUNDIALS suite), openlibm and Python. Compilation of CVODE also requires cmake, and the Fortran libraries BLAS and LAPACK. Optionally, numdiff, FRUIT, and Ruby are required to run the test suite.

AtChem2 compiles and runs on Unix/Linux and macOS systems. From the main directory, copy and rename the file tools/install/Makefile.skel to ./Makefile. Edit ./Makefile to set the variables CVODELIB, OPENLIBMDIR and FRUITDIR to the paths of CVODE, openlibm and (if installed) FRUIT. A working knowledge of the unix shell is required to install and use AtChem2.

From the main directory, execute:

./build/build_atchem2.sh mcm/mechanism_test.fac model/configuration/ mcm/

to compile AtChem2 using the example chemical mechanism (in FACSIMILE format) and a default model configuration. The build script converts the chemical mechanism from the FACSIMILE format (.fac) to a Fortran compatible format and generates the shared library mechanism.so and other related files in the model/configuration/ directory. At completion of the build process an executable file called atchem2 is created in the main directory.

Set the initial conditions, the required outputs and the other model parameters by editing the files in the model/configuration/ directory. If required, copy the constraints files into the relevant directory in model/constraints/. To run the model, execute: ./atchem2

The build script and the atchem2 executable accept several command line arguments to customize the location of the configuration, input and output directories, and of the shared library. More information on AtChem2, and detailed instructions on its installation, configuration and use can be found in the manual (doc/AtChem2-Manual.pdf). A summary of the main commands and additional information is available on the AtChem2 wiki.

About

Atmospheric chemistry box-model for the MCM

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Fortran 62.5%
  • Python 17.1%
  • Roff 10.4%
  • Shell 7.6%
  • Gnuplot 0.7%
  • MATLAB 0.7%
  • Other 1.0%