Difference between revisions of "Downloading GEOS-Chem source code (12.9.3 and earlier versions)"

From Geos-chem
Jump to: navigation, search
(Download GEOS-Chem)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
'''''[[Downloading GEOS-Chem source code (13.0.0 and later versions)|Previous]] | [[Downloading GEOS-Chem data directories|Next]] | [[Getting Started with GEOS-Chem]]'''''
+
'''''[[Downloading GEOS-Chem source code (13.0.0 and later versions)|Previous]] | [[GEOS-Chem directory structure|Next]] | [[Getting Started with GEOS-Chem]]'''''
 
#[[Minimum system requirements for GEOS-Chem|Minimum system requirements]]
 
#[[Minimum system requirements for GEOS-Chem|Minimum system requirements]]
 
#[[Installing required software]]
 
#[[Installing required software]]
Line 7: Line 7:
 
#*[[Downloading GEOS-Chem source code (13.0.0 and later versions)|... for GEOS-Chem 13.0.0 and later versions]]
 
#*[[Downloading GEOS-Chem source code (13.0.0 and later versions)|... for GEOS-Chem 13.0.0 and later versions]]
 
#*<span style="color:blue">'''... for GEOS-Chem 12.9.3 and earlier versions'''</span>
 
#*<span style="color:blue">'''... for GEOS-Chem 12.9.3 and earlier versions'''</span>
 +
#*[[GEOS-Chem directory structure]]
 
#[[Downloading GEOS-Chem data directories|Downloading data directories]]
 
#[[Downloading GEOS-Chem data directories|Downloading data directories]]
 
#[[Creating GEOS-Chem run directories|Creating run directories]]
 
#[[Creating GEOS-Chem run directories|Creating run directories]]
Line 13: Line 14:
 
#[[Running GEOS-Chem|Running]]
 
#[[Running GEOS-Chem|Running]]
 
#[[GEOS-Chem output files|Output files]]
 
#[[GEOS-Chem output files|Output files]]
#[[Guide_to_visualization_and_analysis_tools_for_GEOS-Chem|Visualizing and processing output]]
+
#[[Python tools for use with GEOS-Chem]]
 
#[[GEOS-Chem_coding_and_debugging|Coding and debugging]]
 
#[[GEOS-Chem_coding_and_debugging|Coding and debugging]]
 
#[[GEOS-Chem_overview#Further_reading|Further reading]]
 
#[[GEOS-Chem_overview#Further_reading|Further reading]]
Line 35: Line 36:
 
   git clone https://github.com/geoschem/geos-chem Code.X.Y.Z
 
   git clone https://github.com/geoschem/geos-chem Code.X.Y.Z
  
This will create an exact copy (or clone) of the official GEOS-Chem repository to your local disk space in a directory named Code.X.Y.Z. You may name the code directory whatever you like, but we recommend using the [[GEOS-Chem_versions|version number]] (i.e. X.Y.Z) in the code directory name. For more information on the meaning of X.Y.Z, see our [[GEOS-Chem version numbering system]] page.
+
This will create an exact copy (or clone) of the official GEOS-Chem repository to your local disk space in a directory named Code.X.Y.Z. You may name the code directory whatever you like, but we recommend using the [[GEOS-Chem_versions|version number]] (i.e. X.Y.Z) in the code directory name. For more information on the meaning of X.Y.Z, see our [[GEOS-Chem version numbering system]] page. Note that although you've named your code directory Code.X.Y.Z, this code will be the latest stable version of GEOS-Chem by default (which may or may not be version X.Y.Z). If you want to change GEOS-Chem versions, see the instructions below.
  
 
===Note for advanced users===
 
===Note for advanced users===
Line 53: Line 54:
 
== Code directory structure ==
 
== Code directory structure ==
  
The table below lists the directory structure in [[GEOS-Chem 12]] along with descriptions of each subdirectory and its Makefile (if one is present).
+
You may now skip ahead to the [[GEOS-Chem directory structure]] chapter.
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|- bgcolor="#CCCCCC"
+
!width="200px"|Directory
+
!width="550px"|Description
+
!width="350px"|Is there a Makefile here?
+
 
+
|-valign="top"
+
|<tt>Code</tt>
+
|Main-level directory for GEOS-Chem
+
|Yes, there are two:
+
*<tt>Makefile</tt> is the main-level router makefile and it calls down to the makefile in <tt>GeosCore</tt>.
+
*<tt>Makefile_header.mk</tt> defines compilation and linking commands for the Fortran-90 compilers. These commands are common to the makefiles in all subdirectories.
+
 
+
|-valign="top"
+
|<tt>Code/GTMM</tt>
+
|Directory containing source code files for the [[Global_Terrestrial_Mercury_Model|Global Terrestrial Mercury Model (GTMM)]] simulation
+
|Yes, it compiles the code in <tt>GTMM</tt> and creates library file <tt>lib/libHg.a</tt>
+
 
+
|-valign="top"
+
|<tt>Code/GeosCore</tt>
+
|Directory containing most GEOS-Chem modules and routines
+
|Yes, this is the main makefile for GEOS-Chem. It calls down to the makefiles in the other subdirectories. It then compiles the code in the <tt>GeosCore</tt> directory and creates the <tt>geos</tt> executable.
+
 
+
|-valign="top"
+
|<tt>Code/GeosRad</tt>
+
|Directory containing source code files for the [[Coupling_GEOS-Chem_with_RRTMG|RRTMG radiative transfer model]]
+
|Yes, it compiles the code in <tt>GeosRad</tt> and creates library file <tt>lib/librad.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/GeosUtil</tt>
+
|Directory containing GEOS-Chem utility modules
+
|Yes, it compiles the code in <tt>GeosUtil</tt> and creates library file <tt>lib/libGeosUtil.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/HEMCO</tt>
+
|Main-level directory for [[HEMCO]]
+
|Yes, it calls down to the makefiles in the other HEMCO subdirectories.
+
 
+
|-valign="top"
+
|<tt>Code/HEMCO/Core</tt>
+
|Directory containing HEMCO modules and routines for reading, storing, and updating data used for calculating emissions
+
|Yes, it compiles the code in <tt>HEMCO/Core</tt> and creates library file <tt>lib/libHCO.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/HEMCO/Extensions</tt>
+
|Directory containing HEMCO modules and routines for calculating emissions that depend on meteorological input variables and/or non-linear parameterizations
+
|Yes, it compiles the code in <tt>HEMCO/Extensions</tt> and creates library file <tt>lib/libHCOX.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/HEMCO/Interfaces</tt>
+
|Directory containing HEMCO modules and routines that provide the link between HEMCO and the model environment
+
|Yes, it compiles the code in <tt>HEMCO/Interfaces</tt> and creates library file <tt>lib/libHCOI.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/Headers</tt>
+
|Directory containing module files with fixed parameters and derived-type definitions
+
*NOTE: In previous versions, these files were header files that were inlined via the <tt>#include</tt> statement.  These have since been converted to F90 modules in order to facilitate [[GEOS-Chem HP]] development.
+
|Yes, it compiles the code in <tt>Headers</tt> and creates library file <tt>lib/libHeaders.a</tt>
+
 
+
|-valign="top"
+
|<tt>Code/History</tt>
+
|Directory containing module files to archive diagnostics from GEOS-Chem "Classic" simulations to netCDF file format
+
|Yes, it compiles the code in <tt>History</tt> and creates library file <tt>lib/libHistory.a</tt>
+
 
+
|-valign="top"
+
|<tt>Code/ISORROPIA</tt>
+
|Directory containing the unmodified [[ISORROPIA_II|ISORROPIA II]] source code files from Thanos Nenes and Havala Pye:
+
* <tt>isoropiaII_main_mod.F</tt>
+
|Yes, it compiles the code in <tt>ISOROPIA</tt> and creates library file <tt>lib/libIsoropia.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/KPP</tt>
+
|Main-level directory for the [[KPP_solvers_FAQ|KPP chemical solver]]
+
|Yes, it calls down to the makefiles in the other KPP subdirectories.
+
 
+
|-valign="top"
+
|<tt>Code/KPP/Custom</tt>
+
|Directory containing KPP source code files for the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_for_GEOS-Chem_v11-02|Standard chemistry mechanism]]
+
|Yes, if you compile with <tt>CHEM=custom</tt>it compiles the code in <tt>KPP/Custom</tt> and creates library file <tt>lib/libKpp.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/KPP/int</tt>
+
|Directory containing the integrators (rosenbrock, runge-kutta, lsodes, etc.) for KPP
+
|No
+
 
+
|-valign="top"
+
|<tt>Code/KPP/Standard</tt>
+
|Directory containing KPP source code files for the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_for_GEOS-Chem_v11-02|Standard chemistry mechanism]]
+
|Yes, it compiles the code in <tt>KPP/Standard</tt> and creates library file <tt>lib/libKpp.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/KPP/Tropchem</tt>
+
|Directory containing KPP source code files for the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_for_GEOS-Chem_v11-02l|Troposphere-only mechanism]]
+
|Yes, it compiles the code in <tt>KPP/Tropchem</tt> and creates library file <tt>lib/libKpp.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/KPP/SOA_SVPOA</tt>
+
|Directory containing KPP source code files for the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_for_GEOS-Chem_v11-02|SOA or SOA_SVPOA chemistry mechanisms]].
+
|Yes, it compiles the code in <tt>KPP/SOA_SVPOA</tt> and creates library file <tt>lib/libKpp.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/NcdfUtil</tt>
+
|Directory containing source code files for netCDF I/O. This code is from Bob Yantosca's NcdfUtilities package
+
|Yes, it compiles the code in <tt>NcdfUtil</tt> and creates library file <tt>lib/libNcUtils.a</tt>.
+
 
+
|-valign="top"
+
|<tt>Code/NcdfUtil/perl</tt>
+
|Directory containing perl scripts from the NcdfUtilities package that can be used to generate Fortran code for defining, writing, and reading a netCDF file
+
|No
+
 
+
|-valign="top"
+
|<tt>Code/ObsPack</tt>
+
|Directory containing the [[ObsPack diagnostic]] code.
+
*Introduced in [[GEOS-Chem 12#12.2.0|GEOS-Chem 12.2.0]]
+
|Yes, it compiles the code in <tt>ObsPack</tt> and creates the library file <tt>libObsPack.a</tt>
+
 
+
|-valign="top"
+
|<tt>Code/bin</tt>
+
|Directory where executable (<tt>geos</tt>, <tt>geostomas</tt>) files will be sent
+
|No
+
 
+
|-valign="top"
+
|<tt>Code/doc</tt>
+
|Directory where automatic documentation is built
+
|Yes, it calls the ProTeX script to create reference manuals (in PS and PDF formats) from the comments in GEOS-Chem module and routine headers.
+
 
+
|-valign="top"
+
|<tt>Code/help</tt>
+
|Directory containing GEOS-Chem help screen
+
|Yes, it prints the GEOS-Chem help screen to stdout
+
 
+
|-valign="top"
+
|<tt>Code/lib</tt>
+
|Directory where library (<tt>*.a</tt>) files will be created
+
|No
+
 
+
|-valign="top"
+
|<tt>Code/mod</tt>
+
|Directory where module (<tt>*.mod</tt>) files will be sent
+
|No
+
 
+
|}
+
  
 
== Further reading ==
 
== Further reading ==
Line 205: Line 63:
  
 
----
 
----
'''''[[Downloading GEOS-Chem source code (13.0.0 and later versions)|Previous]] | [[Downloading GEOS-Chem data directories|Next]] | [[Getting Started with GEOS-Chem]]'''''
+
'''''[[Downloading GEOS-Chem source code (13.0.0 and later versions)|Previous]] | [[GEOS-Chem directory structure|Next]] | [[Getting Started with GEOS-Chem]]'''''

Latest revision as of 14:56, 3 February 2021

Previous | Next | Getting Started with GEOS-Chem

  1. Minimum system requirements
  2. Installing required software
  3. Configuring your computational environment
  4. Downloading source code
  5. Downloading data directories
  6. Creating run directories
  7. Configuring runs
  8. Compiling
  9. Running
  10. Output files
  11. Python tools for use with GEOS-Chem
  12. Coding and debugging
  13. Further reading


Overview

The GEOS-Chem source code is maintained on Github.com at https://github.com/geoschem/geos-chem. All official GEOS-Chem releases shall originate from that Git repository.

We also recommend that you view this video tutorial, which is posted at our GEOS_Chem Youtube channel: youtube.geos-chem.org:

Getting Started with GC Thumbnail.png
Click HERE to view!

Download GEOS-Chem

You can download the latest stable version of GEOS-Chem by typing the following at the command line:

 git clone https://github.com/geoschem/geos-chem Code.X.Y.Z

This will create an exact copy (or clone) of the official GEOS-Chem repository to your local disk space in a directory named Code.X.Y.Z. You may name the code directory whatever you like, but we recommend using the version number (i.e. X.Y.Z) in the code directory name. For more information on the meaning of X.Y.Z, see our GEOS-Chem version numbering system page. Note that although you've named your code directory Code.X.Y.Z, this code will be the latest stable version of GEOS-Chem by default (which may or may not be version X.Y.Z). If you want to change GEOS-Chem versions, see the instructions below.

Note for advanced users

If you plan on developing GEOS-Chem updates to submit for inclusion in the standard model we recommend that you fork the repository on Github and clone it from your own account. You can then make a pull request when you are ready to submit updates to the GEOS-Chem Support Team. See these instructions for more information.

Choosing a different version

When you clone GEOS-Chem you will always get the master branch. This is the current stable version of GEOS-Chem. You can determine the version label by typing git log --decorate within each repository and looking at the git tag string printed for the top-most commit.

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. To see a list of available tags for a repository type git tag. To checkout a tagged version type git checkout -b NewBranch tags/tagname, where NewBranch can be a name of your choosing.

You can download as many copies of the GEOS-Chem source code as you wish. For example, you might want to keep a clean source code directory and then have one or more source code directories that you use for development or debugging. Alternatively, you may use Git version control to keep all of your work in different branches of a single clone of the repository.

Code directory structure

You may now skip ahead to the GEOS-Chem directory structure chapter.

Further reading



Previous | Next | Getting Started with GEOS-Chem