NOTE: PhotochemPy is no longer maintained and persists on Github for archival purposes only. My most up to date photochemical code is instead called photochem: https://github.com/Nicholaswogan/photochem . Please used photochem instead of PhotochemPy.
PhotochemPy is a photochemical model of planet's atmospheres. Given inputs, like the stellar UV flux, the atmospheric temperature structure, etc., this code will find the steady-state chemical composition of an atmosphere, or evolve atmospheres through time.
PhotochemPy is a Python wrapper to Fortran source code. This makes the code very speedy, but also user-friendly.
You need a Fortran compiler (gfortran>=9.30, install instructions here) and C compiler (e.g. install with conda install -c conda-forge clang). Also you must use MacOS or Linux OS. Windows does not work.
Create a conda environment with all dependencies
conda create -n photochempy -c conda-forge python numpy=1.21 scipy scikit-buildClone or download the github repository. Navigate to the root directory with a terminal, activate your new conda environment, then install with setup.py:
conda activate photochempy
python setup.py installFortran library only: If you prefer to use the code exclusively in Fortran, that is OK too. You can build libphotochem with CMake. Download or clone this respository, then from the root directory of the repository run
mkdir build
cd build
cmake ..
cmake --build . -jSee the examples directory. Also check out this tutorial
PhotochemPy is a distant fork of the Atmos photochemical model, originally developed by Jim Kasting and Kevin Zahnle and further developed by many of their students and colleges.
If you have questions email me: wogan@uw.edu
Also, if you plan on using PhotochemPy for a publication please email me before you submit anything to a journal, just so we can confirm your planned application of the model is reasonable.