Getting started
This page outlines requirements and installation steps for the code. Currently, GNU/Linux and MacOS (including ARM) are supported.
Requirements
- gfortran
- NetCDF library for FORTRAN
- make
- curl
Do not install Julia using your system package manager. Install only from julialang.org
Installation
Follow the steps below in order to setup the code.
- Install Julia:
curl -fsSL https://install.julialang.org | sh
- Download AGNI:
git clone https://github.com/nichollsh/AGNI.git
- Change directory:
cd AGNI
- Setup SOCRATES by doing either ONE of the following...
- Follow the instructions on the SOCRATES GitHub page
- Run
source src/get_socrates.sh
bash src/get_agni.sh
AGNI is now installed as a package into a Julia environment in the AGNI directory. This will also have downloaded some basic input data, and have run the tests.
The get_socrates.sh
script automatically adds the radiation code to your environment with the variable RAD_DIR
, which points to the SOCRATES installation. This variable must be set whenever AGNI is being used.
Testing
If you want to run the tests manually, simply use the script in the test/
folder...
julia test/runtests.jl
This will print information on whether tests passed or failed.
Updating
It's important that you keep AGNI up to date, especially if you are using as part of the PROTEUS framework. Use this script to automatically pull changes from GitHub and download any required data files.
bash src/get_agni.sh
Using the code
See Running the model for information on using the code. See Troubleshooting for troubleshooting advice.
Coupling with FastChem
This can be enabled using the configuration file parameter composition.chem_type
. Of course, it is first necessary to setup FastChem, which can be done by running source src/get_fastchem.sh
and then setting the FC_DIR
environment variable.