GEOS–Chem v9–01–03 Online User's Guide
Previous | Next
| Printable View (no frames)
7.1 Coding: Practice and Style
We provide below some guidelines for writing GEOS–Chem source code routines.
We have written GEOS–Chem in Fortran–90. Three different program units comprise the GEOS–Chem source code:
Traditional subroutines and functions (*.F) contain one subroutine or function per file. Most of these traditional subroutines and functions come from third-party packages (e.g. FAST–J, SMVGEAR, etc.)
Fortran–90 Modules (*_mod.F, *_mod.F90) bundle global variables, subroutines, and functions into a coherent package that can be shared by other program units. Modules contain dynamically allocatable arrays, which are more memory-efficient than the older Fortran–77 COMMON blocks. We have written most GEOS–Chem source code files as modules.
Note: The *.F90 extension denotes free-format Fortran–90 layout, as opposed to the 72-character fixed format.
Header files (*.h) are inlined into subroutines and functions by means of an #include statement. Most of GEOS–Chem's header files came from legacy code and contained obsolete Fortran–77 style COMMON blocks. We have replaced all header files (except define.h) with Fortran–90 modules in GEOS–Chem v9–01–02 and higher versions . These are stored in the Headers/ subdirectory.
GEOS–Chem's Makefiles
determine how to compile individual program unit. Each routine (and the modules
that it references) are listed in makefiles. This lets the GNU
Make utility determine the order of compilation. Refer to Chapter
7.1.3 for more information.
7.1.2 Fortran Programming Style
We have attempted to create a clear and consistent programming style for GEOS–Chem subroutines and modules. Some of our style points include:
A routine header list of arguments and modification history (in ProTeX format)
References to other variables or routines contained within modules
Use of IMPLICIT NONE to force explicit declaration of all variables
Header files in-lined via the C-preprocessor #include facility
Comments aligned with mode -- major sections denoted by !=====
Copious use of white space to enhance readability
Indentation of IF-THEN-ELSE and DO-ENDDO blocks
OpenMP parallel DO-loops
When making upgrades to the code, block off the section that you are replacing with comments, and label that with Prior to MM/DD/YY. You can remove the blocked off section once your modified code has been declared stable.
For more information, please be sure to read Appendix 7: GEOS–Chem Style Guide, as well as the floating point and math issues page on the GEOS–Chem wiki.
7.1.3 List of GEOS–Chem Modules
As described in Chapter 3, we have separated the GEOS–Chem source code files into various subdirectories. We sought to separate core GEOS–Chem routines from 3rd-party code.
Here we list GEOS–Chem 9–01–03's directory structure:
Directory name | Description |
---|---|
Help |
|
help | Contains the GEOS–Chem help screen. Type make help to view. |
doc | Contains reference documentation (*.pdf, *.ps) generated from ProTeX headers. Type make doc to create this documentation. |
Core
directories |
|
Headers | Contains all Header files (define.h and modules)
used by GEOS–Chem. 3rd-party codes may reference files in this directory. |
GeosUtil | Contains modules with utility routines: file I/O, horizontal
grid, vertical grid, regridding tools, etc. 3rd-party codes may reference files in this directory. |
GeosCore | Contains core modules, subroutines, and functions for GEOS–Chem. 3rd-party codes may NOT reference files in this directory. You must pass data to/from these routines as arguments. |
3rd
party codes |
|
ESMF | Contains Grid-Independent GEOS–Chem files for compatibility with the Earth System Model Framework. You can ignore these for the time being. |
GTMM | Contains routines for the Global Terrestrial Mercury Model code. |
GeosApm |
Contains specific routines for APM aerosol microphysics and copies of all GeosCore routines modified by APM. |
GeosTomas | Contains specific routines for TOMAS aerosol microphysics and copies of all GeosCore routines modified by TOMAS. |
ISORROPIA | Contains routines for ISORROPIA II. |
KPP | Contains chemistry solver routines created by the KPP pre-processor. You can use KPP as an alternative to SMVGEAR. |
NcdfUtil | Contains routines for netCDF file I/O, taken from Bob Yantosca's NcdfUtilities package. |
Outputs |
|
bin | Contains the executable created by the compilation process. |
lib | Contains archives of the object files (stored in files with the *.a extension) from each GEOS–Chem subdirectory. |
mod | Contains the *.mod files generated by the compiler (one per Fortran–90 module) |
obsolete | Contains obsolete subroutines and module files. We keep these here for future reference. |
The GEOS–Chem distribution currently contains over 150 module files. As discussed above, we employ modules to package both variables, subroutines, and functions into a single logical program unit. We list all of the modules and their dependencies below:
Module Name | Purpose | Other Modules Referenced |
---|---|---|
Headers directory | ||
CMN_DEP_mod.F | Contains common blocks for dry deposition. | CMN_SIZE_mod.F |
CMN_DIAG_mod.F | Contains size parameters and global variables for the GEOS–Chem diagnostic arrays. | CMN_SIZE_mod.F |
CMN_GCTM_mod.F | Contains GEOS–Chem specific physical constraints and derived quantities. | none |
CMN_NOX_mod.F | Contains NOx from soils. | CMN_SIZE_mod.F |
CMN_O3_mod.F | Contains common blocks for anthropogenic emissions via SMVGEAR. | CMN_SIZE_mod.F |
CMN_SIZE_mod.F | Contains size parameters for GEOS–Chem arrays. | none |
CMN_mod.F | Contains global variables (remnant of header file CMN). | CMN_SIZE_mod.F |
cmn_fj_mod.F | Contains parameters and global variables used to interface between Harvard chemistry and UC-Irvine FAST-J photolysis programs. | CMN_SIZE_mod.F |
commsoil_mod.F | Contains global variables for the soil NOx emissions routines. | CMN_SIZE_mod.F |
comode_loop_mod.F | Contains common blocks and variables for SMVGEAR II. | CMN_SIZE_mod.F |
jv_cmn_mod.F | Contains global variables for the FAST-J code. | CMN_SIZE_mod.F cmn_fj_mod.F |
jv_mie_mod.F | Contains physical constants for the GEOS–Chem column chemistry code. | none |
smv_dimension_mod.F | Contains various placeholder parameters that are required to replace references to GEOS–Chem grid parameters. | none |
smv_errcode_mod.F | Contains various success or failure parameters for the GEOS–Chem column chemistry code. | none |
smv_physconst_mod.F | Contains physical constants for the GEOS–Chem column chemistry code. | none |
GeosUtil
directory |
||
bpch2_mod.F | Contains the routines used to read data from and write data to binary punch file format (v. 2.0). | CMN_SIZE_mod.F error_mod.F file_mod.F julday_mod.F |
charpak_mod.F | Contains selected routines from the CHARPAK package for string manipulation. | none |
directory_mod.F | Contains the directory path variables used by GEOS–Chem. |
none |
error_mod.F | Contains error checking subroutines. |
ieee_arithmetic.F |
file_mod.F | Contains file unit numbers and I/O error trapping routines. | error_mod.F |
global_grid_mod.F90 | Contains variables and routines for computing grid box longitudes, latitudes, and surface areas on a global grid. | CMN_GCTM_mod.F CMN_SIZE_mod.F error_mod.F |
grid_mod.F90 | Contains variables and routines for computing grid box longitudes, latitudes, and surface areas. | CMN_GCTM_mod.F CMN_SIZE_mod.F error_mod.F |
hdf_mod.F |
Contains routines to write data to HDF5 files. |
CMN_SIZE_mod.F grid_mod.F error_mod.F |
julday_mod.F | Contains routines for converting YYYYMMDD and HHMMSS to/from astronomical Julian date. (This allows GEOS–Chem to handle transitions such as end-of-month, end-of-year, and end-of-century in a consistent fashion.) | none |
pressure_mod.F | Contains variables and routines which specify the grid box pressures for both hybrid or pure-sigma models. This is necessary for running GEOS–Chem with the fvDAS meteorology. | CMN_SIZE_mod.F error_mod.F |
regrid_1x1_mod.F | Does online regridding of data on the GEOS–Chem 1° x 1° grid to 1° x 1°, 2° x 2.5°, or 4° x 5° GEOS or GCAP grids. | CMN_GCTM_mod.F CMN_SIZE_mod.F charpak_mod.F error_mod.F grid_mod.F |
regrid_a2a_mod.F | Does online regridding of data from one horiziontal resolution to another using the MAP_A2A regridding algorithm. | CMN_GCTM_mod.F CMN_SIZE_mod.F grid_mod.F file_mod.F |
time_mod.F | Contains routines for computing date & time variables. | CMN_DIAG_mod.F CMN_SIZE_mod.F charpak_mod.F error_mod.F grid_mod.F julday_mod.F |
transfer_mod.F | Contains routines to copy data from REAL*4 to REAL*8 precision, and also to regrid GEOS–3 data from 48 vertical levels to 30 vertical levels. | CMN_SIZE_mod.F error_mod.F |
unix_cmds_mod.F | Contains Unix command strings which are used for unzipping of meteorological data files. | none |
GeosCore
directory |
||
RnPbBe_mod.F | Contains variables and routines used for the 222Rn-210Pb-7Be-10Be simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F dao_mod.F diag_mod.F directory_mod.F file_mod.F grid_mod.F logical_mod.F pressure_mod.F time_mod.F tracer_mod.F tropopause_mod.F |
a3_read_mod.F | Contains routines which unzip, open and read the GEOS–Chem A-3 fields from disk. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F logical_mod.F time_mod.F transfer_mod.F unix_cmds_mod.F |
a6_read_mod.F | Contains routines which unzip, open and read the GEOS–Chem A-6 fields from disk. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F logical_mod.F time_mod.F transfer_mod.F unix_cmds_mod.F |
acetone_mod.F | Contains subroutines to emit the biogenic flux of acetone into the full chemistry simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F grid_mod.F megan_mod.F time_mod.F transfer_mod.F |
aerosol_mod.F | Contains routines which compute aerosol concentrations (kg/m3) and optical depths. | CMN_DIAG_mod.F cmn_fj_mod.F CMN_SIZE_mod.F bpch2_mod.F comode_loop_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F jv_cmn_mod.F logical_mod.F time_mod.F tracer_mod.F tracerid_mod.F transfer_mod.F tropopause_mod.F |
aircraft_nox_mod.F | Contains arrays and routines to compute aircraft NOx, emissions for the full chemistry simulation. | CMN_DIAG_mod.F CMN_SIZE_mod.F CMN_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F pressure_mod.F time_mod.F |
arctas_ship_emiss_mod.F | Contains variables and routines to read the Arctas Ship emissions. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F tracerid_mod.F tracer_mod.F |
benchmark_mod.F | Contains routines to save out tracer masses in kg for the 1-month fullchem and Rn-Pb-Be benchmark simulations. | CMN_SIZE_mod.F bpch2_mod.F file_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
biofuel_mod.F | Contains arrays and routines to compute monthly biofuel burning emissions for NOx, CO, ALK4, ACET, MEK, ALD2, PRPE, C3H8, CH2O, C2H6 CH4, and CH3I. | CMN_DIAG_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F epa_nei_mod.F error_mod.F future_emissions_mod.F logical_mod.F streets_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
biomass_mod.F | Contains arrays and routines to compute monthly biomass burning emissions for NOx, CO, ALK4, ACET, MEK, ALD2, PRPE, C3H8, CH2O, C2H6 CH4, and CH3I. | CMN_DIAG_mod.F CMN_SIZE_mod.F diag_mod.F error_mod.F gc_biomass_mod.F gfed2_biomass_mod.F gfed3_biomass_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
bravo_mod.F | Contains variables and routines to read the BRAVO mexican anthropogenic emission inventory. | CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F transfer_mod.F |
bromocarb_mod.F | Contains variables and routines for bromine emissions. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F comode_loop_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F grid_mod.F logical_mod.F pbl_mix_mod.F time_mod.F tracer_mod.F |
c2h6_mod.F | Contains the variables and routines used to perform a standalone simulation for ethane. | CMN_DIAG_mod.F CMN_O3_mod.F CMN_SIZE_mod.F CMN_mod.F biofuel_mod.F biomass_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F geia_mod.F global_oh_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
cac_anthro_mod.F | Contains variables and routines to read the Criteria Air Contaminant Canadian anthropogenic emissions. | CMN_)3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
carbon_mod.F | Contains variables and routines for carbon aerosol emissions and chemistry. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F CMN_mod.F biomass_mod.F bpch2_mod.F comode_loop_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F drydep_mod.F error_mod.F future_emissions_mod.F gfed2_biomass_mod.F gfed3_biomass_mod.F global_no3_mod.F global_o3_mod.F global_oh_mod.F grid_mod.F logical_mod.F meganut_mod.F megan_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F vdiff_pre_mod.F |
ch3i_mod.F | Contains the variables and routines used to perform a standalone simulation for methyl iodide. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F biofuel_mod.F biomass_mod.F bpch2_mod.F comode_loop_mod.F dao_mod.F diag_mod.F diag_pl_mod.F directory_mod.F error_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F uvalbedo_mod.F |
chemistry_mod.F | Contains a driver program which selects the proper chemistry routine for the various GEOS–Chem simulation types. | CMN_DIAG_mod.F CMN_SIZE_mod.F acetone_mod.F aerosol_mod.F c2h6_mod.F carbon_mod.F ch3i_mod.F comode_loop_mod.F comode_mod.F dao_mod.F drydep_mod.F dust_mod.F error_mod.F gckpp_comode_mod.F gckpp_function.F gckpp_global.F gckpp_initialize.F gckpp_integrator.F gckpp_model.F gckpp_monitor.F gckpp_rates.F gckpp_util.F global_ch4_mod.F h2_hd_mod.F hcn_ch3cn_mod.F isoropiaii_mod.F logical_mod.F mercury_mod.F optdepth_mod.F rpmares_mod.F rnpbbe_mod.F seasalt_mod.F strat_chem_mod.o sulfate_mod.F tagged_co_mod.F tagged_ox_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
co2_mod.F | Contains variables and routines used for the CO2 simulation. | CMN_SIZE_mod.F biomass_mod.F bpch2_mod.F dao_mod.F diag04_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
comode_mod.F | Contains allocatable arrays for SMVGEAR that were previously contained in common blocks in header file comode.h. | CMN_SIZE_mod.F comode_loop_mod.F error_mod.F tracer_mod.F |
convection_mod.F | Contains routines which select the proper convection code for GEOS–1, GEOS–STRAT, GEOS–3 or GEOS–4 met data sets. | CMN_DIAG_mod.F CMN_SIZE_mod.F dao_mod.F depo_mercury_mod.F diag_mod.F error_mod.F fvdas_convect_mod.F gcap_convect_mod.F gc_type_mod.F grid_mod.F logical_mod.F mercury_mod.F pressure_mod.F smv_errcode_mod.F smv_physconst_mod.F time_mod.F tracerid_mod.F tracer_mod.F wetscav_mod.F |
dao_mod.F | Contains arrays that hold DAO met fields, as well as subroutines that compute, interpolate, or otherwise process DAO met field data. | CMN_GCTM_mod.F CMN_SIZE_mod.F error_mod.F gc_type_mod.F grid_mod.F logical_mod.F pressure_mod.F time_mod.F tracer_mod.F |
depo_mercury_mod.F | Contains routines to handle deposition fluxes for mercury. | CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
diag03_mod.F | Contains arrays and routines for archiving the ND03 diagnostic -- Hg emissions, mass, and production. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F error_mod.F file_mod.F grid_mod.F time_mod.F tracerid_mod.F |
diag04_mod.F | Contains arrays and routines for archiving the ND04 diagnostic -- CO2 emissions and fluxes. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F error_mod.F file_mod.F grid_mod.F time_mod.F |
diag41_mod.F | Contains arrays and routines for archiving the ND41diagnostic -- Afternoon PBL heights. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F error_mod.F file_mod.F grid_mod.F pbl_mix_mod.F time_mod.F |
diag42_mod.F | Contains arrays and routines for archiving the ND42 diagnostic -- secondary organic aerosols (μg/m3). | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
diag48_mod.F | Contains variables and routines to save timeseries data at particular lat/lon locations. | CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F cmn_fj_mod.F error_mod.F file_mod.F grid_mod.F jv_cmn_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
diag49_mod.F | Contains variables and routines to save instantaneous timeseries data to disk for a 3-D subset of the globe. | CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F cmn_fj_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F jv_cmn_mod.F modis_lai_mod.F90 pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
diag50_mod.F | Contains variables and routines to generate 24-hour average timeseries data for a 3-D subset of the globe. | CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F cmn_fj_mod.F comode_loop_mod.F comode_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F hdf5.F hdf_mod.F jv_cmn_mod.F logical_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
diag51_mod.F | Contains variables and routines to save timeseries data over the United States where the local time is between two user-defined limits. This is useful for comparing with sun-synchronous satellites such as GOME. | CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F cmn_fj_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F hdf5.F hdf_mod.F jv_cmn_mod.F logical_mod.F modis_lai_mod.F90 pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
diag51b_mod.F | Contains similar variables and routines as diag51_mod.F
to allow to follow two satellite tracks at a time. |
CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F cmn_fj_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F hdf5.F hdf_mod.F jv_cmn_mod.F logical_mod.F modis_lai_mod.F90 pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
diag56_mod.F | Contains arrays and routines for archiving the ND56 diagnostic -- lightning flash rates. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F error_mod.F file_mod.F grid_mod.F time_mod.F |
diag63_mod.F | Contains variables and routines to generate timeseries data for PARANOX ship emissions. | CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F cmn_fj_mod.F bpch2_mod.F dao_mod.F diag_mod.F error_mod.F file_mod.F grid_mod.F jv_cmn_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracer_mod.F tracerid_mod.F |
diag_mod.F | Contains declarations for allocatable arrays for use with GEOS–Chem diagnostics and other routines. | none |
diag_oh_mod.F | Contains routines to compute the mean OH diagnostic for a full chemistry simulation. | CMN_SIZE_mod.F comode_loop_mod.F comode_mod.F error_mod.F logical_mod.F tracerid_mod.F tracer_mod.F |
diag_pl_mod.F | Contains routines to compute chemical production for tracers. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F charpak_mod.F comode_loop_mod.F comode_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
drydep_mod.F | Contains variables and routines to compute dry deposition velocities and frequencies. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F CMN_VEL_mod.F commsoil_mod.F comode_loop_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F meganut_mod.F pbl_mix_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
dust_dead_mod.F | Contains routines and variables from Charlie Zender's DEAD dust mobilization model. Most routines are from Charlie Zender, but have been modified and/or cleaned up for inclusion into GEOS–Chem. | CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F time_mod.F transfer_mod.F |
dust_mod.F | Contains routines for computing dust aerosol emissions, chemistry, and optical depths. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F cmn_fj_mod.F comode_loop_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F drydep_mod.F dust_dead_mod.F error_mod.F file_mod.F grid_mod.F jv_cmn_mod.F logical_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
edgar_mod.F | Contains variables and routines to read the EDGAR global anthropogenic emission inventory. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F |
emep_mod.F | Contains variables and routines to read the EMEP European anthropogenic emission inventory for CO, NOz, and some NMVOCs. The EMEP files come from Marion Auvray and Isabelle Bey at EPFL. | CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
emissions_mod.F | Contains a driver program which selects the proper emissions subroutine for the various GEOS–Chem simulation types. | CMN_O3_mod.F CMN_SIZE_mod.F arctas_ship_emiss_mod.F biomass_mod.F bravo_mod.F c2h6_mod.F cac_anthro_mod.F carbon_mod.F ch3i_mod.F co2_mod.F dust_mod.F edgar_mod.F emep_mod.F epa_nei_mod.F error_mod.F global_ch4_mod.F h2_hd_mod.F hcn_ch3cn_mod.F icoads_ship_mod.F logical_mod.F mercury_mod.F nei2005_anthro_mod.F paranox_mod.F retro_mod.F rnpbbe_mod.F seasalt_mod.F streets_anthro_mod.F sulfate_mod.F tagged_co_mod.F time_mod.F tracer_mod.F vistas_anthro_mod.F |
epa_nei_mod.F | Contains variables and routines to read the weekday/weekend emissions from the EPA/NEI emissions inventory. | CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F future_emissions_mod.F grid_mod.F logical_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
fjx_acet_mod.F | Contains functions for pressure dependency for Acetone photolysis from FAST–JX. | CMN_FJ_mod.F jv_cmn_mod.F |
future_emissions_mod.F | Contains variables and routines for returning scale factors for IPCC A1 & B1 emissions scenarios for future years such as 2030, 2050, etc. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F transfer_mod.F |
fvdas_convect_mod.F |
Contains routines (originally from NCAR) which perform shallow and deep convection for the GEOS–4 met fields. These routines account for shallow and deep convection, updrafts, and downdrafts. |
CMN_DIAG_mod.F CMN_SIZE_mod.F dao_mod.F depo_mercury_mod.F diag_mod.F grid_mod.F logical_mod.F pressure_mod.F tracerid_mod.F tracer_mod.F |
gamap_mod.F | Contains routines to create GAMAP tracerinfo.dat and diaginfo.dat files which are customized to each particular GEOS–Chem simulation. | CMN_DIAG_mod.F CMN_SIZE_mod.F diag03_mod.F diag04_mod.F diag41_mod.F diag42_mod.F diag48_mod.F diag49_mod.F diag50_mod.F diag51_mod.F diag51b_mod.F diag56_mod.F diag63_mod.F diag_pl_mod.F drydep_mod.F error_mod.F file_mod.F hdf_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F wetscav_mod.F |
gc_biomass_mod.F | Contains arrays and routines to compute monthly biomass burning emissions for NOx, CO, ALK4, ACET, MEK, ALD2, PRPE, C3H8, CH2O, C2H6, CH4, and CH3I. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
gc_type_mod.F | Contains derived type definitions for GEOS–Chem that will represent the "socket" within external modules. This is used in the grid-independent GEOS-Chem code. | none |
gc_type2_mod.F90 | Contains derived type definitions for GEOS–Chem. These definitions are used to create objects for: ID flags for advected tracers, coeffifients and arrays that link species and tracers, logical flags that turn various options on/off, etc. | CMN_SIZE_mod.F comode_loop_mod.F tracer_mod.F |
gc_environment_mod.F90 | Contains routines to establish the runtime environment for GEOS–Chem. It is designed to receive model parameter and geophysical environment information and allocate memory based upon it. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_NOx_mod.F CMN_O3_mod.F CMN_SIZE_mod.F CMN_mod.F cmn_fj_mod.F commsoil_mod.F comode_loop_mod.F error_mod.F gc_type_mod.F gc_type2_mod.F90 jv_cmn_mod.F pressure_mod.F vdiff_pre_mod.F |
gcap_convect_mod.F | Contains routines (originally from GISS) which perform shallow and deep convection for the GCAP met fields. | CMN_DIAG_mod.F CMN_SIZE_mod.F dao_mod.F diag_mod.F grid_mod.F pressure_mod.F |
gcap_read_mod.F | Contains subroutines that unzip, open, and read the GCAP PHIS and LWI_GISS fields from disk. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F logical_mod.F time_mod.F transfer_mod.F unix_cmds_mod.F |
geia_mod.F | Contains routines used to read and scale the GEIA/Piccot fossil fuel emissions for NOx, CO, and hydrocarbons. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F file_mod.F grid_mod.F time_mod.F |
geos57_read_mod.F90 | Contains routines used to open and read the GEOS–5.7.2 fields from disk. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F time_mod.F transfer_mod.F |
gfed2_biomass_mod.F | Contains variables and routines to compute the GFED2 biomass burning emissions. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F future_emissions_mod.F grid_mod.F julday_mod.F logical_mod.F regrid_1x1_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
gfed3_biomass_mod.F | Contains variables and routines to compute the GFED3 biomass burning emissions. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F future_emissions_mod.F grid_mod.F julday_mod.F logical_mod.F regrid_1x1_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
global_br_mod.F | Contains variables and routines for reading the global monthly Bromine concentration from disk. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F tropopause_mod.F |
global_ch4_mod.F | Contains variables and routines for simulating CH4 chemistry in the troposphere. | CMN_DIAG_mod.F CMN_SIZE_mod.F CMN_mod.F bpch2_mod.F dao_mod.F diag_mod.F diag_oh_mod.F directory_mod.F error_mod.F file_mod.F global_oh_mod.F grid_mod.F logical_mod.F pressure_mod.F regrid_1x1_mod.F time_mod.F tracer_mod.F transfer_mod.F vdiff_pre_mod.F |
global_hno3_mod.F | Contains variables and routines for reading in monthly mean HNO3 concentrations for the offline sulfate simulation. | CMN_SIZE_mod.F bpch2_mod.F dao_mod.F directory_mod.F error_mod.F tracer_mod.F transfer_mod.F |
global_no3_mod.F | Contains variables and routines for reading in global monthly mean NO3 concentrations (used for the offline sulfate simulation). | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F |
global_nox_mod.F | Contains variables and routines for reading the global monthly mean NOx concentration from disk (used for the offline sulfate simulation). | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F unix_cmds_mod.F |
global_o1d_mod.F | Contains variables and routines for reading the global monthly mean O1D stratospheric concentration from disk. This is used in the H2/HD simulation. The O1D fields were obtained from Gabriele Curci GEOS–Chem simulation in the stratosphere (v5.03). | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F |
global_o3_mod.F | Contains variables and routines for reading the global monthly mean O3 concentration from disk. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F |
global_oh_mod.F | Contains variables and routines for reading the global monthly mean OH concentration from disk. | CMN_SIZE_mod.F bpch2_mod.F dao_mod.F directory_mod.F error_mod.F transfer_mod.F |
h2_hd_mod.F | Contains variables and routines used for the H2-HD simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_O3_mod.F CMN_SIZE_mod.F biofuel_mod.F biomass_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F drydep_mod.F error_mod.F geia_mod.F global_nox_mod.F global_o1d_mod.F global_oh_mod.F grid_mod.F logical_mod.F meganut_mod.F pressure_mod.F scale_anthro_mod.F tagged_co_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F |
hcn_ch3cn_mod.F | Contains variables and routines that are used for the geographically tagged HCN/CH3CN simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F biomass_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F geia_mod.F global_oh_mod.F grid_mod.F logical_mod.F pbl_mix_mod.F time_mod.F tracerid_mod.F transfer_mod.F |
i6_read_mod.F | Contains routines which unzip, open and read the GEOS–Chem I-6 fields from disk. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F logical_mod.F time_mod.F transfer_mod.F unix_cmds_mod.F |
icoads_ship_mod.F | Contains variables and routines to read the International
Comprehensive Ocean-Atmosphere Data Set (ICOADS) ship emissions. Base year
is 2002. |
CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
input_mod.F |
Contains routines which read information from the input.geos file and pass it to the various initialization routines of GEOS–Chem modules. NOTE: This module needs to be compiled last, as it references many other modules. |
CMN_DIAG_mod.F CMN_O3_mod.F CMN_SIZE_mod.F apm_init_mod.F apm_wets_mod.F benchmark_mod.F biofuel_mod.F biomass_mod.F bpch2_mod.F bromocarb_mod.F charpak_mod.F depo_mercury_mod.F diag03_mod.F diag04_mod.F diag41_mod.F diag42_mod.F diag48_mod.F diag49_mod.F diag50_mod.F diag51_mod.F diag51b_mod.F diag56_mod.F diag63_mod.F diag_oh_mod.F diag_pl_mod.F directory_mod.F drydep_mod.F emissions_mod.F error_mod.F file_mod.F future_emissions_mod.F gamap_mod.F grid_mod.F julday_mod.F land_mercury_mod.F logical_mod.F mercury_mod.F ocean_mercury_mod.F planeflight_mod.F restart_mod.F time_mod.F tpcore_bc_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F transport_mod.F unix_cmds_mod.F wetscav_mod.F |
isoropiaII_mod.F | Contains the routines from the ISORROPIAII package, which performs aerosol thermodynamical equilibrium. | CMN_SIZE_mod.F apm_init_mod.F dao_mod.F error_mod.F global_hno3_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
land_mercury_mod.F | Contains variables and routines for the land emissions for the GEOS–Chem mercury simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_SIZE_mod.F biomass_mod.F bpch2_mod.F dao_mod.F depo_mercury_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F modis_lai_mod.F90 time_mod.F tracerid_mod.F transfer_mod.F |
lightning_nox_mod.F | Contains variables and routines for emitting NOx from lightning into the atmosphere. Cleaned up for inclusion into GEOS–Chem v9–01–01 by Lee Murray. | CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag56_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F pressure_mod.F time_mod.F transfer_mod.F |
linoz_mod.F | Contains routines to perform the Linoz stratospheric ozone
chemistry. |
CMN_SIZE_mod.F CMN_mod.F dao_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
logical_mod.F | Contains all of the logical switches used by GEOS–Chem. | none |
mapping_mod.F90 | Contains a derived-type object to compute the mapping weight and areal mapping.. | CMN_SIZE_mod.F error_mod.F logical_mod.F |
megan_mod.F | Contains variables and routines specifying the algorithms that control the MEGAN inventory of biogenic emissions. | CMN_GCTM_mod.F CMN_SIZE_mod.F a3_read_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F geos57_read_mod.F90 grid_mod.F julday_mod.F logical_mod.F meganut_mod.F merra_a1_mod.F modis_lai_mod.F90 regrid_1x1_mod.F time_mod.F |
meganut_mod.F | Contains functions used by MEGAN and other routines. |
CMN_SIZE_mod.F dao_mod.F |
mercury_mod.F | Contains variables and routines for the GEOS–Chem mercury simulation. | CMN_DEP_mod.F CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F depo_mercury_mod.F diag03_mod.F diag_mod.F directory_mod.F drydep_mod.F error_mod.F file_mod.F global_br_mod.F global_o3_mod.F global_oh_mod.F grid_mod.F land_mercury_mod.F logical_mod.F ocean_mercury_mod.F pbl_mix_mod.F pressure_mod.F regrid_1x1_mod.F rnpbbe_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F vdiff_pre_mod.F |
merra_a1_mod.F | Contains subroutines for reading the 1-hour time averaged (aka "A1") fields from the MERRA data archive. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F time_mod.F transfer_mod.F |
merra_a3_mod.F | Contains subroutines for reading the 3-hour time averaged (aka "A3") fields from the MERRA data archive. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F time_mod.F transfer_mod.F |
merra_cn_mod.F | Contains subroutines for reading the constant (aka "CN") fields from the MERRA data archive. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F file_mod.F time_mod.F transfer_mod.F |
merra_i6_mod.F | Contains subroutines for reading the 6-hour instantaneous (aka "I6") fields from the MERRA data archive. | CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F directory_mod.F error_mod.F file_mod.F time_mod.F transfer_mod.F |
modis_lai_mod.F90 | Reads MODIS LAI data at the native grid and rebins to the proper GEOS–Chem LAI arrays. | CMN_DEP_mod.F CMN_SIZE_mod.F directory_mod.F error_mod.F logical_mod.F mapping_mod.F90 time_mod.F |
nei2005_anthro_mod.F | Contains variables and routines to read the NEI2005 anthropogenic
emissions. |
CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
ocean_mercury_mod.F | Contains variables and routines needed to compute the oceanic flux of mercury. Original code by Sarah Strode at UWA/Seattle. | CMN_DEP_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F depo_mercury_mod.F diag03_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F |
olson_land_map.F90 | Contains routines to read the Olson land map and compute the IREG, ILAND, and IUSE arrays. | CMN_DEP_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F directory_mod.F error_mod.F grid_mod.F logical_mod.F mapping_mod.F90 |
optdepth_mod.F | Contains routines to compute optical depths for GEOS–1, GEOS–STRAT, GEOS–2, and GEOS–3 met data sets. | CMN_DIAG_mod.F CMN_SIZE_mod.F diag_mod.F |
paranox_mod.F | Contains routines to reading and interpolating look up tables that are necessary for the PARANOX ship plume model. | CMN_O3_mod.F cmn_fj_mod.F dao_mod.F directory_mod.F error_mod.F file_mod.F time_mod.F tracer_mod.F tracerid_mod.F |
pbl_mix_mod.F | Contains routines and variables used to compute the planetary boundary layer (PBL) height and to mix tracers underneath the PBL top. | CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F dao_mod.F diag_mod.F error_mod.F grid_mod.F logical_mod.F pressure_mod.F time_mod.F tracer_mod.F |
pjc_pfix_geos5_window_mod.F | Contains routines which implements the Philip Cameron-Smith pressure fixer. Specially modified for the GEOS–5 nested grid simulation. | CMN_GCTM_mod.F CMN_SIZE_mod.F CMN_mod.F error_mod.F grid_mod.F pressure_mod.F |
pjc_pfix_geos57_window_mod.F | Contains routines which implements the Philip Cameron-Smith pressure fixer. Specially modified for the GEOS–5.7.2 nested grid simulation. | CMN_GCTM_mod.F CMN_SIZE_mod.F CMN_mod.F error_mod.F grid_mod.F pressure_mod.F |
pjc_pfix_mod.F | Contains variables and routines which implement the Philip Cameron-Smith pressure fixer for the GEOS–4/TPCORE transport code (contained in tpcore_fvdas_mod.F90). | CMN_GCTM_mod.F CMN_SIZE_mod.F CMN_mod.F error_mod.F grid_mod.F pressure_mod.F |
planeflight_mod.F | Contains variables and routines which are used to "fly" a plane through the GEOS–Chem model simulation. This is useful for comparing model results with aircraft observations. | CMN_DIAG_mod.F CMN_FJ_mod.F CMN_SIZE_mod.F bpch2_mod.F comode_loop_mod.F comode_mod.F dao_mod.F error_mod.F file_mod.F jv_cmn_mod.F pressure_mod.F time_mod.F tracer_mod.F tropopause_mod.F |
restart_mod.F | Contains variables and routines which are used to read and write GEOS–Chem restart files, which contain tracer concentrations in [v/v] mixing ratio. | CMN_SIZE_mod.F CMN_mod.F bpch2_mod.F charpak_mod.F comode_loop_mod.F comode_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracer_mod.F |
retro_mod.F | Contains the routines used to read emissions data from the RETRO anthropogenic VOC emissions inventory. | CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F file_mod.F future_emissions_mod.F grid_mod.F directory_mod.F logical_mod.F scale_anthro_mod.F time_mod.F tracer_mod.F tracerid_mod.F transfer_mod.F |
rpmares_mod.F | Contains variables and routines to compute aerosol thermodynamic equilibrium. | APM_INIT_mod.F CMN_SIZE_mod.F dao_mod.F error_mod.F global_hno3_mod.F time_mod.F tracerid_mod.F tracer_mod.F tropopause_mod.F |
scale_anthro_mod.F | Contains routines to scale anthropogenic emissions from a base year to a simulation year. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F regrid_1x1_mod.F |
seasalt_mod.F | Contains arrays and routines for performing either a coupled
chemistry/aerosol run or an offline seasalt aerosol simulation. The original
code taken from Mian Chin's GOCART model and was modified accordingly for
GEOS–Chem. |
CMN_DIAG_mod.F CMN_GCTM_mod.F CMN_SIZE_mod.F dao_mod.F diag_mod.F drydep_mod.F error_mod.F grid_mod.F logical_mod.F pbl_mix_mod.F pressure_mod.F ssa_bromine_mod.F time_mod.F tracerid_mod.F tracer_mod.F vdiff_pre_mod.F |
soaprod_mod.F | Contains variables and routines which are used to read and
write APROD and GPROD restart files for SOA simulations. |
CMN_DIAG_mod.F CMN_SIZE_mod.F bpch2_mod.F carbon_mod.F dao_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracer_mod.F |
ssa_bromine_mod.F | Contains variables and routines for emissions of Br2. | CMN_DIAG_mod.F CMN_O3_mod.F CMN_SIZE_mod.F bromocarb_mod.F comode_loop_mod.F diag_mod.F grid_mod.F logical_mod.F time_mod.F tracerid_mod.F |
strat_chem_mod.F90 | Contains variables and routines for performing a simple linearized
chemistry scheme in the stratosphere. |
CMN_GCTM_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F directory_mod.F error_mod.F grid_mod.F logical_mod.F linoz_mod.F pressure_mod.F tagged_ox_mod.F time_mod.F tracer_mod.F tracerid_mod.F transfer_mod.F tropopause_mod.F |
streets_anthro_mod.F | Contains variables and routines to read the David Streets et al. Asian anthropogenic emissions. | CMN_O3_mod.F CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
sulfate_mod.F | Contains the sulfate chemistry routines from Mian Chin's GOCART model and updated routines. | CMN_DIAG_mod.F CMN_FJ_mod.F CMN_GCTM_mod.F CMN_O3_mod.F CMN_SIZE_mod.F arctas_ship_emiss_mod.F biomass_mod.F bpch2_mod.F bravo_mod.F cac_anthro_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F drydep_mod.F edgar_mod.F emep_mod.F epa_nei_mod.F error_mod.F file_mod.F future_emissions_mod.F gfed2_biomass_mod.F gfed3_biomass_mod.F global_hno3_mod.F global_no3_mod.F global_oh_mod.F grid_mod.F icoads_ship_mod.F logical_mod.F nei2005_anthro_mod.F pbl_mix_mod.F pressure_mod.F regrid_1x1_mod.F scale_anthro_mod.F seasalt_mod.F streets_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F uvalbedo_mod.F vdiff_pre_mod.F wetscav_mod.F |
tagged_co_mod.F | Contains variables and routines used for the geographically tagged CO simulation. | biofuel_mod.F biomass_mod.F bpch2_mod.F dao_mod.F diag_mod.F diag_pl_mod.F directory_mod.F error_mod.F global_nox_mod.F global_oh_mod.F grid_mod.F logical_mod.F meganut_mod.F megan_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F |
tagged_ox_mod.F | Contains variables and routines to perform a tagged Ox simulation. P(Ox) and L(Ox) rates need to be archived from a full chemistry simulation before you can run w/ Tagged Ox. | bpch2_mod.F charpak_mod.F dao_mod.F diag_mod.F diag_pl_mod.F directory_mod.F drydep_mod.F error_mod.F grid_mod.F julday_mod.F logical_mod.F meganut_mod.F pbl_mix_mod.F strat_chem_mod.F90 time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_mod.F |
toms_mod.F | Contains variables and routines for reading the EP-TOMS O3 column data from disk (for use w/ the FAST–J photolysis routines). | bpch2_mod.F directory_mod.F error_mod.F time_mod.F transfer_mod.F |
tpcore_bc_mod.F | Contains variables and routines to read and write boundary conditions from a global simulation. These are needed for TPCORE transport for nested grid 1° x 1° simulations. | bpch2_mod.F directory_mod.F error_mod.F file_mod.F grid_mod.F logical_mod.F time_mod.F tracer_mod.F |
tpcore_fvdas_mod.F90 | Contains routines for the TPCORE transport scheme, as implemented in the GMI model, based on Lin Rood 1995. | none |
tpcore_geos5_window_mod.F90 |
Contains routines for the GEOS–4/fvDAS transport scheme. Original code from S-J Lin and Kevin Yeh. | none |
tpcore_geos57_window_mod.F90 |
Contains routines for the GEOS–4/fvDAS transport scheme. Original code from S-J Lin and Kevin Yeh. | none |
tpcore_mod.F | Contains the TPCORE transport subroutine package by S-J Lin, version 7.1. Also contains the pressure fixer routines for TPCORE from M. Prather (in versions 4.21 and higher). | dao_mod.F diag_mod.F global_ch4_mod.F grid_mod.F pressure_mod.F time_mod.F tracer_mod.F |
tpcore_window_mod.F | Contains the TPCORE transport subroutine package by S-J Lin, version 7.1, modified for nested-grid simulations by Yuxuan Wang. | dao_mod.F diag_mod.F global_ch4_mod.F grid_mod.F pressure_mod.F time_mod.F tracer_mod.F |
tracer_mod.F | Contains the GEOS–Chem tracer array STT plus various other related quantities. TRACER_MOD also contains inquiry functions that can be used to determine the type of GEOS–Chem simulation. | error_mod.F |
tracerid_mod.F | Contains variables and routines used to identify tracers, emission species, biomass burning species, and biofuel burning species. | charpak_mod.F error_mod.F gc_environment_mod.F90 gc_type2_mod.F90 logical_mod.F tracer_mod.F |
transport_mod.F | Contains routines which select the proper transport routines for GEOS–Chem global and window simulations. | dao_mod.F diag_mod.F error_mod.F grid_mod.F logical_mod.F pjc_pfix_geos5_window_mod.F pjc_pfix_geos57_window_mod.F pjc_pfix_mod.F pressure_mod.F time_mod.F tpcore_bc_mod.F tpcore_fvdas_mod.F tpcore_geos5_window_mod.F tpcore_geos57_window_mod.F tpcore_mod.F tpcore_window_mod.F tracer_mod.F |
tropopause_mod.F | Contains routines and variables for reading and returning the value of the annual mean tropopause. | bpch2_mod.F comode_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F logical_mod.F pressure_mod.F transfer_mod.F |
uvalbedo_mod.F | Contains variables and routines for reading the UV Albedo data from disk (for use w/ the FAST–J photolysis routines). | bpch2_mod.F directory_mod.F error_mod.F transfer_mod.F |
vdiff_mod.F | Contains all routines for the non-local PBL mixing scheme. |
comode_mod.F dao_mod.F depo_mercury_mod.F diag_mod.F drydep_mod.F error_mod.F grid_mod.F logical_mod.F ocean_mercury_mod.F pbl_mix_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F vdiff_pre_mod.F |
vdiff_pre_mod.F | Contains variables used in vdiff_mod.F. | tracer_mod.F |
vistas_anthro_mod.F | Contains variables and routines to read the VISTAS anthropogenic emissions. | bpch2_mod.F directory_mod.F epa_nei_mod.F error_mod.F future_emissions_mod.F grid_mod.F logical_mod.F regrid_1x1_mod.F scale_anthro_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
wetscav_mod.F | Contains arrays used in the wet scavenging of tracers in cloud updrafts, rainout, and washout. | dao_mod.F depo_mercury_mod.F diag_mod.F error_mod.F h2o2.F ito.F logical_mod.F ocean_mercury_mod.F pressure_mod.F time_mod.F tracerid_mod.F tracer_mod.F |
7.1.4 Compilation Sequence for GEOS–Chem
GEOS–Chem's makefiles compile source code files in the following order:
If you select the GEOS–Chem mercury simulation with the Global Terrestrial Mercury Model option, then the makefiles will compile files in this order::
Each directory has its own makefile. The makefile contains a list of all of the source code files in the subdirectory, plus dependent routines (a.k.a. the "dependencies" list). Source code files that do not refer to any modules have a dependencies listsuch as:
decomp.o : decomp.F
Whereas a source code file that refers to several modules (in
this case, GeosCore/tropopause_mod.F) has a dependencies list like
this:
tropopause_mod.o : tropopause_mod.F \ comode_mod.o dao_mod.o \ diag_mod.o logical_mod.o
Looking at the List of GEOS–Chem Modules, you will see that GeosCore/tropopause_mod.F refers to 9 other modules. But 5 of those modules are found in different directories (such as Headers/ and GeosUtil/), which are compiled prior to GeosCore/. Therefore you can ignore these when creating the dependencies listing. In the example above, we have only specified the 4 modules that are located in the same directory as tropopause_mod.F.
The order of modules in the dependencies list does not matter. The GNU Make utility will define the order of compilation from the list of files (and their dependencies) that you have specified in each Makefile. You will not have to worry about this unless you add new source code files. If you have questions about how to add dependency lists to makefiles, please let us know.
7.1.5 OpenMP parallel loop directives
In the late 1990's, several compiler vendors defined a new open standard for parallel computing, aptly named OpenMP. Most modern Fortran and C compilers include support for OpenMP, which facilitates porting parallel source code to different platforms. GEOS–Chem has used OpenMP parallel computing since version 4.17.
Here is a sample OpenMP parallel DO loop:
Column 1 2 3 4 1234567890123456789012345678901234567890 !$OMP PARALLEL DO !$OMP+SHARED( A ) !$OMP+PRIVATE( I, J ) !$OMP+SCHEDULE( DYNAMIC ) DO J = 1, JJPAR DO I = 1, IIPAR A(I,J) = A(I,J) * 2.0 ENDDO ENDDO !$OMP END PARALLEL DO
Notice that the first column of each !$OMP directive has a Fortran comment character (!). This is by design. In order to invoke OpenMP's parallel directives, you must toggle a specific switch in your makefile (usually -mp or -openmp, depending on your compiler). Otherwise, the compiler will interpret the OpenMP parallel directives as Fortran comments. This would cause all OpenMP parallel DO-loops revert to regular Fortran DO loops, executing on a single CPU.
Because the above example uses the traditional fixed-format (Fortran–77) style, the !$OMP directives must begin at column 1. Otherwise a syntax error will result at compile time. If you are using the free-format (Fortran–90) style, then you may indent the !OMP directives.
OpenMP parallelization is not equivalent to MPI (message passing interface) parallelization. With OpenMP, you can execute parallel code across CPUs of the same machine or cluster node. You CANNOT use CPUs from physically separated machines. Therefore, OpenMP is incompatible with distributed architectures (e.g. Beowulf, grid computing, cloud computing). Our grid-independent GEOS–Chem project seeks to remove this bottleneck by making make GEOS–Chem compatible with MPI parallelization.
For more information about OpenMP, consult the web site OpenMP.org.
The GEOS–Chem model evovles constantly. Our rapidly-increasing user base frequently submits updates and new features for inclusion into the standard GEOS–Chem repository. As with any software project, mistakes are inevitable.
The bugs you will encounter when working on GEOS–Chem fall into one of two categories:
True bugs: typos, omissions, reading the wrong file, or other outright mistakes.
Design limitation bugs: that is, writing code in such a way that precludes future expansion.
You can easily rectify the bugs of the first category. Fixing these usually means correcting a misspelled word, updating an incorrect numerical value, reading from the proper file, etc.
You may struggle to correct the bugs of the second category. You'll find that your simulation works perfectly—until you try to add in a new species, reaction, offline chemistry simulation, diagnostic, or third-party code package. You may have to invest significant time and effort in modifying GEOS–Chem before it finally does what you want..
Remember that GEOS–Chem includes several disparate software elements: emissions, chemistry and deposition routines from Harvard, transport and convection routines from GSFC, photolysis from UC Irvine, etc. The structure of these codes have largely dicated the overall structure of GEOSChem. At present, we are working to rectify many of these legacy-code issues (a.k.a. "historical baggage.)
We strive to fix bugs in GEOS–Chem as soon as we find them. Please see our Bugs and Fixes page on the GEOS–Chem wiki. On this page, you will find a list of bugs by GEOSChem version. Clicking on a link will take you to a wiki post which explains the bug (and how it was fixed) in detail.
When your GEOS–Chem simulation dies with an error, first refer to our Common GEOS–Chem Error Messages wiki page. You may find a solution there.
We invite you to peruse these useful resources:
Here are some steps you can take to try to diagnose a particular GEOS–Chem error.
1. Turn on diagnostic ND70 in the file input.geos. ND70 tells GEOS–Chem to call subroutine DEBUG_MSG from various locations in the code (after advection, chemistry, emissions, dry deposition, etc). DEBUG_MSG writes a short message to the screen and immediately flushes the output to the log file. This will help you be able to pin down where the error occurred.
NOTE: DEBUG_MSG prints and then immediately flushes the error message to disk. Keep in mind that most Unix systems feature buffered I/O—the screen does not refresh until an internal buffer (usually some multiple of 16KB) fills up with text. If you don't flush an error message to disk, then the last log file output may not reflect the location of the error.
2. Add more calls to DEBUG_MSG as necessary:
CALL DEBUG_MSG( '### after routine X' ) CALL DEBUG_MSG( '### after function Y' )
3. Check for negative concentrations, NaN or Infinite values, call routine CHECK_STT:
! Put this at the top of the subroutine where you are calling CHECK_STT USE TRACER_MOD, ONLY: CHECK_STT . . . ! Check for NaN, infinity, negatives: CALL CHECK_STT( 'Where I think there is a problem' )
4. Check the minimum and maximum values of an array with the MINVAL and MAXVAL intrinsic functions:
PRINT*, '### Min, Max: ', MINVAL( ARRAY ), MAXVAL( ARRAY )
CALL FLUSH( 6 )Check the sum of an array with the SUM intrinsic function:
PRINT*, '### Sum of X : ', SUM( ARRAY )
CALL FLUSH( 6 )Don't forget to add a CALL FLUSH(6)to flush the output to the screen or log file.
5. Compile your code with array-out-of-bounds error checking. This makes sure that you are not accessing an array with an invalid index. Consider this example:
REAL*8 :: A(10), B(10) ... DO I = 1, 10 B(I) = A(I+1) ENDDOThe code will try access the 11th element of the A array. But since A only has 10 elements, the code will access the next contiguous memory location, which belongs to a different variable altogether. This will copy a "junk" value into the 10th element of the B array.
Out-of-bounds errors may also manifest themselves as a segmentation fault:
forrtl: severe (174): SIGSEGV, segmentation fault occurredTo invoke array-out-of-bounds checking in your code, issue these commands:
make realclean make -j4 BOUNDS=yes(If you use the Intel Fortran Compiler, you can also add the TRACEBACK=yes, which will print out a list of all routines that were being called at the time of the error.)
The compiler will trap out-of-bounds errors at runtime. You may get an error message such as:
forrtl: severe (408): fort: (3): Subscript #1 of the array PBL_THICK has value -1 which is less than the lower bound of 1NOTE: Once you have located and fixed the offending array statement, you should recompile without the array-out-of-bounds checking built in. The error checking causes your code to slow down noticeably. Check for array-out-of-errors in your debugging runs but not in your production runs.
If you have access to a debugger (IDB, DBX, Totalview), then learn how to use at least the basic commands, such as:
This will save you a lot of time and hassle.
When you use a debugger, you must compile your code with a flag that tells the compiler to generate symbolic debug information. On most compilers, this flag is named -g. You also need to switch off any compiler optimizations (which can modify the sequence in which individual instructions occur) by specifying the -O0 flag.
Add DEBUG=yes (case sensitive) to the make command to apply these options:
make -j4 DEBUG=yes OMP=no # Without parallelization make -j4 DEBUG=yes # With parallelization