Skip to content

How to run AtChem2

R. Sommariva edited this page Mar 22, 2020 · 12 revisions

The atchem2 executable takes a number of arguments, which indicate the location of the configuration files, of the model constraints and of the model output. In AtChem2 v1.1.1 and previous versions, the arguments have to be provided to the executable in a precise order (positional arguments). From AtChem2 v1.2, a system of flags is used to pass the arguments to the executable (named arguments).

For more information, see the AtChem2 manual in the doc/ directory.

version 1.2

atchem2 has 9 named arguments:

  1. --model: path to the model directory - default: model/
  2. --output: path to the output directory - default: model/output/
  3. --configuration: path to the model configuration directory - default: model/configuration/
  4. --constraints: path to the constraints directory - default: model/constraints/
  5. --env_constraints: path to the environment constraints directory - default: model/constraints/environment/
  6. --photo_constraints: path to the photolysis constraints directory - default: model/constraints/photolysis/
  7. --spec_constraints: path to the chemical constraints directory - default: model/constraints/species/
  8. --mcm: path to the MCM data files directory - default: mcm/
  9. --shared_lib: path to the mechanism.so shared library - default: model/configuration/mechanism.so

In addition, the --help flag displays a help message.

The order of the flags does not matter. If a flag is not specified, AtChem2 assumes the default value for the corresponding argument, using the following hierarchical directory structure:

                                     +---------------+-------------------------+
                                     |               |                         |
                                   model/           mcm/        model/configuration/mechanism.so
                                     |
                                     | 
     +-------------------------------+-------------------------------+
     |                               |                               |
  output/                       constraints/                   configuration/
                                     |
                    +----------------+----------------+
                    |                |                |
               environment/      photolysis/       species/

For example:

  • ./atchem2 --model=model/ --shared_lib=model/configuration/mechanism.so
  • ./atchem2 --output=model/output/ --shared_lib=model/configuration/mechanism.so
  • ./atchem2 --configuration=model/configuration/ --output=model/output/
  • ./atchem2 --constraints=model/constraints/ --output=model/output/

version 1.1.*

atchem2 has 7 positional arguments:

  1. path to the output directory - default = model/output/
  2. path to the output reaction rates directory - default = model/output/reactionRates/
  3. path to the model configuration directory - default = model/configuration/
  4. path to the MCM data files directory - default = mcm/
  5. path to the chemical constraints directory - default = model/constraints/species/
  6. path to the environment constraints directory - default = model/constraints/environment/
  7. path to the photolysis constraints directory - default = model/constraints/photolysis/
./atchem2 ./model/output/ ./model/output/reactionRates/ ./model/configuration/ ./mcm/ ./model/constraints/species/ ./model/constraints/environment/ ./model/constraints/photolysis/

version 1.0 and earlier

atchem2 has 5 positional arguments:

  1. path to the output directory - default = modelOutput/
  2. path to the output reaction rates directory - default = instantaneousRates/
  3. path to the model configuration directory - default = modelConfiguration/
  4. path to the chemical constraints directory - default = speciesConstraints/
  5. path to the environment and photolysis constraints directory - default = environmentConstraints/
./atchem2 ./modelOutput/ ./instantaneousRates/ ./modelConfiguration/ ./speciesConstraints/ ./environmentConstraints/

Clone this wiki locally