The GCHP source code is hosted at https://github.com/geoschem/GCHP. Clone the repository:
gcuser:~$ git clone https://github.com/geoschem/GCHP.git Code.GCHP
The GCHP repository has submodules (other repositories that are nested inside the GCHP repository) that aren’t automatically retrieved when you do git clone. To finish retrieving the GCHP source code, initialize and update the submodules:
gcuser:~$ cd Code.GCHP gcuser:~/Code.GCHP$ git submodule update --init --recursive
By default, the source code will be on the
main branch. Checking out
an official release is recommended because they are scientifically-validated versions of the
code, and it records the version for your future reference. You can find the list
of GCHP releases here.
Checkout the version that you want to work with, and update the submodules:
gcuser:~/Code.GCHP$ git checkout 13.0.0-beta.1 gcuser:~/Code.GCHP$ git submodule update --init --recursive
Version 13 is not officially released yet. Until then, the most recent
main is the most stable version of GCHP. Therefore,
we recommend you checkout
main, rather than a version
13.0.0-beta.1, until 13.0.0 is officially released. E.g.:
$ git checkout main # recommended until version 13 is officially released
Once version 13 is released, we will resume recommending users checkout a specific version.
Before continuing, it is worth checking that the source code was retrieved correctly. Run git status to check that there are no differences:
gcuser:~/Code.GCHP$ git status HEAD detached at 13.0.0-beta.1 nothing to commit, working tree clean gcuser:~/Code.GCHP$
The output of git status should say that you are at the right version and that there are no modifications (nothing to commit, and a clean working tree).