Compiling GEOS-Chem

From Geos-chem
Revision as of 17:46, 23 September 2009 by Bmy (Talk | contribs) (New page: == Overview == Starting with GEOS-Chem v8-02-03, we have modified the directory structure of GEOS-Chem. Rather than keeping all source code files in a single directory, we now have p...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Starting with GEOS-Chem v8-02-03, we have modified the directory structure of GEOS-Chem. Rather than keeping all source code files in a single directory, we now have partitioned source code files into several subdirectories. This was done in order to facilitate the eventual installation of 3rd-party software packages such as

  • KPP chemical solver
  • Aerosol microphysics codes (e.g. TOMAS, APM)
  • ISORROPIA II
  • Land surface models

into GEOS-Chem. Our guiding principle is that all 3rd-party software packages should be cleanly separatable from the main-line GEOS-Chem code. This will allow the 3rd-party software packages to be updated without having an impact on the rest of the GEOS-Chem source code files.

Another reason for updating the directory structure is simply that it's easier to keep track of the various source code files this way. Otherwise, then we would have hundreds of files in the same directory and it would be impossible to keep track of them all.

Directory Structure

The directory structure in GEOS-Chem v8-02-03 (and higher versions) is now:

Code  
Main level GEOS-Chem directory
Headers  
Directory containing *.h and *CMN include files
GeosCore  
Directory containing regular *.f and *.f90 source code files
KPP  
Main-level directory for KPP solver
KPP/43t  
KPP source code files for 43 tracer simulation (without secondary organic aerosols)
KPP/54t  
KPP source code files for 54 tracer simulation (with secondary organic aerosols)
KPP/int  
KPP integrator files (i.e. rosenbrock, radau, runge-kutta, lsodes)
doc  
Directory where automatic documentation is built
lib  
Directory where library (*.a) files will be created
mod  
Directory where module (*.mod) files will be sent
bin  
Directory where executable (geos) files will be sent
help  
Directory containing GEOS-Chem help screen

Makefiles

The previous GEOS-Chem Makefiles:

  • Makefile.compaq
  • Makefile.ifort
  • Makefile.sgi
  • Makefile.ibm
  • Makefile.pgi
  • Makefile.sparc

are now obsolete and have been removed. They have been replaced by the Makefiles in the following subdirectories:

Code/Makefile  
Main-level "router" makefile; calls down to makefiles in other subdirectories
Code/Makefile_header.mk 
Defines compilation and linking commands for the IFORT, PGI, Sun/Studio, and XLF compilers
GeosCore/Makefile  
Makefile to build the GEOS-Chem code. Also calls down to makefiles in subdirctories to build 3rd-party codes.
KPP/Makefile  
Main-level "router" directory for KPP solver
KPP/43t/Makefile  
Makefile to build KPP for GEOS-Chem 43 tracer simulation
KPP/54t/Makefile  
Makefile to build KPP for GEOS-Chem 54 tracer simulation
doc/Makefile  
Makefile to build the GEOS-Chem documentation files with LaTeX
help/Makefile  
Makefile to display the GEOS-Chem help screen

Please read our GEOS-Chem Makefile Reference Document for a full description of each of these files.