Downloading GCHP

From Geos-chem
Jump to: navigation, search

Previous | Next | User Manual Home | GCHP Main Page

  1. Hardware and Software Requirements
  2. Downloading Source Code and Data Directories
  3. Obtaining a Run Directory
  4. Setting Up the GCHP Environment
  5. Compiling
  6. Running GCHP: Basics
  7. Running GCHP: Configuration
  8. Output Data
  9. Developing GCHP
  10. Run Configuration Files


GCHP is built to wrap around a standard GEOS-Chem Classic installation. The first step to obtaining GCHP is therefore to clone the standard GEOS-Chem source code repository. Enabling GCHP functionality simply involves the added step of cloning the GCHP source code repository to store as a subdirectory within GEOS-Chem.

Acquiring the GCHP subdirectory does not change anything in the standard GEOS-Chem code; you can use the same source code to run regular non-GCHP GEOS-Chem simulations. However, we recommend that you keep separate GEOS-Chem source code directories for use with GCHP and GEOS-Chem Classic, e.g. Code.12.0.0_gchp and Code.12.0.0_gcclassic. This avoids confusion and extra work since each requires separate compilation. Using git you can exchange GEOS-Chem code between the two geoschem repository clones even when the GCHP clone is in one and not the other.

Please note that certain files in GEOS-Chem Classic source code will be present but ignored when running GCHP. Most notably this includes main.F in the GeosCore directory; much of the functionality of this file is done instead in the GCHP/Chem_GridCompMod.F90 and GCHP/gigc_chunk_mod.F90. Other GEOS-Chem components ignored by GCHP are GEOS-Chem advection and History, which is the component that handles diagnostics.

Step 1: Download GEOS-Chem

Clone the GEOS-Chem repository on Github to a directory name of your choosing.

git clone Code.GCHP

Take note of the path where the code was downloaded. In this example let's say the source code is stored at /mypath/GCHP/Code.GCHP.

Note for advanced git users: If you plan on developing GEOS-Chem updates to submit for inclusion in the model we recommend that you fork the repository on Github and clone it from your own account. You can then make pull requests when you are ready to submit updates to the GEOS-Chem Support Team. See these instructions for more information or contact the GEOS-Chem Support Team for guidance.

Step 2: Download GCHP within GEOS-Chem

Navigate to your GEOS-Chem code directory that you just downloaded and clone the GCHP repository from Github:

cd /mypath/GCHP/Code.GCHP
git clone GCHP

Step 3: Choose version

When you clone GEOS-Chem and GCHP you will always get the master branch. This is always the current stable version of GEOS-Chem. You can determine the version label by typing "git log" within each repository and looking at the git tag string printed for the top-most commit. Always be sure that the versions you have in the two repositories are compatible.

Example output of git log. Notice tag name at top indicating what version this is.

If you would like an earlier version you can checkout the version tag for that specific version in both the GEOS-Chem and GCHP repositories. To see a list of available tags for a repository type "git tag". To checkout a tagged version type "git checkout tags/tagname".

When you checkout a tag beware that you will be in what is called a detached HEAD status. This means you are not officially on a git branch. Committing in this state risks losing your changes since they are not associated with an actual git branch. If you plan on developing code in the version you checkout you should therefore create a branch to work in: "git checkout -b mybranch". However, we request that new updates always be built off of the master branch that is current at the time you begin work. We further recommend that you pull in future version updates as they are released.

If you are in doubt about how to use git with GEOS-Chem please contact the GEOS-Chem Support Team for help.

Step 4: Download Shared Data Directories

Steps for downloading data directories used in GCHP are the same as for GEOS-Chem Classic. Please see the GEOS-Chem User Manual Chapter 4 for instructions and resources. See also the GEOS-Chem version information on the wiki for a list of new data directories required per version. For example, new data directories added for GEOS-Chem 12.2.0 are located here.

Beyond downloading the data directories you would typically use for GEOS-Chem Classic, GCHP requires that you also download directory ExtData/GCHP/TileFiles. This contains files for mapping between lat-lon and cubed sphere grids and is available from the Harvard ftp server ( at gcgrid/geos-chem/data/ExtData/GCHP/TileFiles. Please note that the need for tile files will be retired in an upcoming version when we update the version of MAPL, likely GEOS-Chem 12.5.0. At that time all regridding weights will be generated by ESMF at run-time.

Previous | Next | User Manual Home | GCHP Main Page