Skip to content

Multi-phase chemistry treatment for atmospheric models

License

Notifications You must be signed in to change notification settings

open-atmos/camp

Repository files navigation

CAMP

CAMP: Chemistry Across Multiple Phases

Latest version CI Status License

http:https://open-atmos.org/camp/

The full CAMP documentation, including the BootCAMP tutorial is available here.

References:

Copyright (C) 2017–2021 Barcelona Supercomputing Center and the University of Illinois at Urbana–Champaign

Running CAMP with Docker

This is the fastest way to get running.

docker run -it --rm ghcr.io/open-atmos/camp:main bash -c 'cd /build; make test'

Dependencies

Required dependencies:

Optional dependencies:

Installation

  1. Install cmake, json-fortran, SuiteSparse, and CVODE (see above).

  2. Unpack CAMP:

     tar xzvf camp-1.0.0.tar.gz
    
  3. Change into the main CAMP directory (where this README file is located):

     cd camp-1.0.0
    
  4. Make a directory called build and change into it:

     mkdir build
     cd build
    
  5. If desired, set environment variables to indicate the install locations of supporting libraries. If running echo $SHELL indicates that you are running bash, then you can do something like:

     export JSON_FORTRAN_HOME=${HOME}/opt
     export SUITE_SPARSE_HOME=${HOME}/opt
     export SUNDIALS_HOME=${HOME}/opt
     export GSL_HOME=${HOME}/opt
    

    Of course the exact directories will depend on where the libraries are installed. You only need to set variables for libraries installed in non-default locations, and only for those libraries you want to use.

    If echo $SHELL instead is tcsh or similar, then the environment variables can be set like setenv NETCDF_HOME / and similarly.

  6. Run cmake with the main CAMP directory as an argument (note the double-c):

     ccmake ..
    
  7. Inside ccmake press c to configure, edit the values as needed, press c again, then g to generate. Optional libraries can be activated by setting the ENABLE variable to ON. For a parallel build, toggle advanced mode with t and set the CMAKE_Fortran_COMPILER to mpif90, then reconfigure.

  8. Optionally, enable compiler warnings by pressing t inside ccmake to enable advanced options and then setting CMAKE_Fortran_FLAGS to:

     -O2 -g -fimplicit-none -W -Wall -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check
    
  9. Compile CAMP and test it as follows. Some tests may fail due to bad random initial conditions, so re-run the tests a few times to see if failures persist.

     make
     make test