Downloading GCHP

From Geos-chem
Revision as of 20:33, 2 August 2018 by Lizzie Lundgren (Talk | contribs)

Jump to: navigation, search

Previous | Next | Getting Started with GCHP

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


Overview

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 your GEOS-Chem Classic and GEOS-Chem HP source code directories separate, e.g. Code.v11-02_gcc and Code.v11-02_gchp, for easy reuse and to avoid confusion since each requires separate compilation.

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 which is superceded by source code in the GCHP subdirectory.

Step 1: Download GEOS-Chem

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

git clone git@github.com:geoschem/geos-chem.git 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. If you have no idea what this means do not worry about it.

Step 2: Download GCHP within GEOS-Chem

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

cd /mypath/GCHP/Code.gchp
git clone git@github.com:geoschem/gchp.git GCHP

Step 3: Know Your Version

GCHP is functional in all benchmarked versions of GEOS-Chem starting with v11-02b. When you clone the master branch of GEOS-Chem you always get the last benchmarked version. See the GCHP v11-02 and the primary GEOS-Chem v11-02 wiki pages for information on available versions and what updates they include. 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:

git tag

To checkout a tagged version:

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

Since GCHP includes two different repositories, GEOS-Chem and GCHP, be sure to do this in both of your repositories. Also always be sure that the versions you have in the two repositories are compatible. One way to quickly check if your versions are where you think they are is to use gitk, a graphical repository browser which shows tags on top of the version history. Beware that you must have X11 forwarding enabled if using ssh.

If you are still in doubt about what version you are using or if your two repository versions are compatible, please contact the GEOS-Chem Support Team for help.


Previous | Next | GCHP Home

--Lizzie Lundgren (talk) 16:20, 7 March 2018 (UTC)