Difference between revisions of "Downloading GCHP"

From Geos-chem
Jump to: navigation, search
(Overview)
m
 
(46 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
----
 +
<span style="color:crimson;font-size:120%">'''The GCHP documentation has moved to https://gchp.readthedocs.io/.''' The GCHP documentation on http://wiki.seas.harvard.edu/ will stay online for several months, but it is outdated and no longer active!</span>
 +
----
 +
 
__FORCETOC__
 
__FORCETOC__
'''''[[GCHP_Hardware_and_Software_Requirements|Previous]] | [[Obtaining_a_GCHP_Run_Directory|Next]] | [[Getting_Started_With_GCHP|Getting Started with GCHP]]'''''
+
'''''[[Setting Up the GCHP Environment|Previous]] | [[Compiling_GCHP|Next]] | [[Getting Started with GCHP]] | [[GCHP Main Page]]'''''
 
#[[GCHP_Hardware_and_Software_Requirements|Hardware and Software Requirements]]
 
#[[GCHP_Hardware_and_Software_Requirements|Hardware and Software Requirements]]
#<span style="color:blue">'''Downloading Source Code'''</span>
 
#[[Obtaining_a_GCHP_Run_Directory|Obtaining a Run Directory]]
 
 
#[[Setting_Up_the_GCHP_Environment|Setting Up the GCHP Environment]]
 
#[[Setting_Up_the_GCHP_Environment|Setting Up the GCHP Environment]]
 +
#<span style="color:blue">'''Downloading Source Code and Data Directories'''</span>
 
#[[Compiling_GCHP|Compiling]]
 
#[[Compiling_GCHP|Compiling]]
#[[GCHP_Basic_Example_Run|Basic Example Run]]
+
#[[Obtaining_a_GCHP_Run_Directory|Obtaining a Run Directory]]
#[[GCHP_Run_Configuration_Files|Run Configuration Files]]
+
#[[Running_GCHP:_Basics|Running GCHP: Basics]]
#[[Running_GCHP|Advanced Run Examples]]
+
#[[Running_GCHP:_Configuration|Running GCHP: Configuration]]
#[[GEOS-Chem_HP_Output_Data|Output Data]]
+
#[[GCHP_Output_Data|Output Data]]
 
#[[Developing_GCHP|Developing GCHP]]
 
#[[Developing_GCHP|Developing GCHP]]
 +
#[[GCHP_Run_Configuration_Files|Run Configuration Files]]
 
<br>
 
<br>
  
== Overview ==
+
==Download GCHP==
  
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.
+
GCHP source code is downloadable from GitHub at [https://github.com/geoschem/gchpctm https://github.com/geoschem/gchpctm]. As with any repository on GitHub, you can fork the project to your own GitHub account and then clone your fork to your local machine, or you may clone directly from the GCHP GitHub page. Assuming you are doing the latter, clone GCHP with the following command:
  
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. <tt>Code.12.0.0_gchp</tt> and <tt>Code.12.0.0_gcclassic</tt>. This avoids confusion and extra work since each requires separate compilation. You also may want to develop and test them separately
+
git clone https://github.com/geoschem/gchpctm.git Code.GCHP
  
Please note that certain files in GEOS-Chem Classic source code will be present but ignored when running GCHP. Most notably this includes <tt>main.F</tt> in the <tt>GeosCore</tt> directory; much of the functionality of this file is done instead in the <tt>GCHP/gigc_chunk_mod.F90</tt>.
+
When cloning GCHP you will get the main branch by default.
  
==Step 1: Download GEOS-Chem==
+
==Fill git submodules==
  
Clone the GEOS-Chem repository on Github to a directory name of your choosing.
+
GCHP includes many subdirectories that are themselves separate repositories on GitHub with their own version histories. These are stored in GCHP as git submodules and all of the git submodule folders will be empty when you first clone GCHP. To populate them you must enter a git command to update all submodules recursively, as follows:
  
  git clone git@github.com:geoschem/geos-chem.git Code.gchp
+
cd Code.GCHP
 +
  git submodule update --init --recursive
  
Take note of the path where the code was downloaded. In this example let's say the source code is stored at <tt>/mypath/GCHP/Code.gchp</tt>.
+
This command accesses the submodule repository and commit information stored in GCHP and then populates the submodule directories by accessing GitHub. See file <tt>.gitmodules</tt> within the top-level GCHP directory for a list of git submodules within GCHP.
  
<b>Note for advanced git users:</b> 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.
+
Please note that each GCHP commit may point to a different collection of git submodule commits. If you change GCHP versions, therefore, you should always reapply the git submodule update command.
  
==Step 2: Download GCHP within GEOS-Chem==
+
==Download data directories==
  
Navigate to your GEOS-Chem code directory that you just downloaded and clone the GCHP repository on Github:
+
GCHP uses the same collection of input files as GEOS-Chem Classic. See the [[Downloading_GEOS-Chem_data_directories | downloading GEOS-Chem data directories wiki page]] for more information.
  
cd /mypath/GCHP/Code.gchp
+
Please be aware that new GEOS-Chem versions often require new input data as newer inventories become available. GEOS-Chem version wiki pages, e.g. [[GEOS-Chem_13.0.0|GEOS-Chem 13.0.0]], list new data directories in the version overview section at the top of the page. Pages for all versions can be accessed from the [[GEOS-Chem_versions|GEOS-Chem versions wiki page]].
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 [[GEOS-Chem_HP_v11-02|GCHP v11-02]] and the [[GEOS-Chem_v11-02|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 <tt>GEOS-Chem</tt> and <tt>GCHP</tt> 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, <tt>GEOS-Chem</tt> and <tt>GCHP</tt>, 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 [https://git-scm.com/docs/gitk 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|GEOS-Chem Support Team]] for help.  
+
  
 
--------------------------------------
 
--------------------------------------
  
'''''[[GCHP_Hardware_and_Software_Requirements|Previous]] | [[Obtaining_a_GCHP_Run_Directory|Next]] | [[GEOS-Chem_HP|GCHP Home]]'''''
+
'''''[[Setting Up the GCHP Environment|Previous]] | [[Compiling_GCHP|Next]] | [[Getting Started with GCHP]] | [[GCHP Main Page]]'''''
 
+
--[[User:Lizzie Lundgren|Lizzie Lundgren]] ([[User talk:Lizzie Lundgren|talk]]) 16:20, 7 March 2018 (UTC)
+

Latest revision as of 15:40, 8 December 2020


The GCHP documentation has moved to https://gchp.readthedocs.io/. The GCHP documentation on http://wiki.seas.harvard.edu/ will stay online for several months, but it is outdated and no longer active!



Previous | Next | Getting Started with GCHP | GCHP Main Page

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


Download GCHP

GCHP source code is downloadable from GitHub at https://github.com/geoschem/gchpctm. As with any repository on GitHub, you can fork the project to your own GitHub account and then clone your fork to your local machine, or you may clone directly from the GCHP GitHub page. Assuming you are doing the latter, clone GCHP with the following command:

git clone https://github.com/geoschem/gchpctm.git Code.GCHP

When cloning GCHP you will get the main branch by default.

Fill git submodules

GCHP includes many subdirectories that are themselves separate repositories on GitHub with their own version histories. These are stored in GCHP as git submodules and all of the git submodule folders will be empty when you first clone GCHP. To populate them you must enter a git command to update all submodules recursively, as follows:

cd Code.GCHP
git submodule update --init --recursive

This command accesses the submodule repository and commit information stored in GCHP and then populates the submodule directories by accessing GitHub. See file .gitmodules within the top-level GCHP directory for a list of git submodules within GCHP.

Please note that each GCHP commit may point to a different collection of git submodule commits. If you change GCHP versions, therefore, you should always reapply the git submodule update command.

Download data directories

GCHP uses the same collection of input files as GEOS-Chem Classic. See the downloading GEOS-Chem data directories wiki page for more information.

Please be aware that new GEOS-Chem versions often require new input data as newer inventories become available. GEOS-Chem version wiki pages, e.g. GEOS-Chem 13.0.0, list new data directories in the version overview section at the top of the page. Pages for all versions can be accessed from the GEOS-Chem versions wiki page.


Previous | Next | Getting Started with GCHP | GCHP Main Page