GEOS–Chem v9–01–02 Online User's Guide
Previous | Next | Printable View
(no frames)
![]()
![]()
7.1 Coding: Practice and Style
![]()
The GEOS–Chem source code is written in Fortran–90 and contains three different types of program units:
Traditional subroutines and functions (*.F). These are compiled individually. One subroutine or function is included per file.
Header files (*.h). These files are not compiled, but are inlined into other program units via the #include C-preprocessor statement. This is a consistent way of importing global parameters into several subroutines or functions at once. From version 8–02–03, all header files are in the Headers/ subdirectory of the code directory.
Note: In version 9–01–02, all header and common block files (*.h, CMN*) were replaced with Fortran-90 modules to allow for compatability with ESMF. For more information, see this wiki page.
Fortran-90 Modules (*_mod.F). The module construct allows you to bundle several global variables and routines into one logical package, which can then be used by other program units. Also, with modules you may define dynamically allocatable arrays, which are necessary to conserve memory. Much of the newer GEOS–Chem code has been written in module form.
Note: tpcore_fvdas_mod.F90 is the sole exception to the above-mentioned naming convention, since it ends with a *.F90 extension. This denotes that it is written in free-format Fortran-90 code. Module tpcore_fvdas_mod.F90 is third-party software from S-J Lin at GSFC.
The Makefiles
that are provided with GEOS–Chem determine the sequence in which
individual program units will be compiled. To allow the make
command to determine the order of compilation and to compile the code
on multi-processors, each routine is listed in the Makefiles with the
module referenced by it (see 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:
Routine header detailing original release date, most recent modification date, list of arguments as input/output, and modification history in ProTeX format.
References to other variables or routines contained within Fortran-90 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, it is good practice to block off the section that you are replacing with comments, and label that as Prior to MM/DD/YY. Then later on, when the upgraded code has been declared stable, you can remove the blocked-off section.
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 seen in Chapter 3, the GEOS–Chem distribution is
now ordered in different subdirectories. The aim is to separate core
routines for GEOS–Chem and 3rd party code. Here is a list of the
directories as of GEOS–Chem 9–01–02:
| Directory name | Description |
|---|---|
| Help |
|
| help | Contains information needed to provide help to compile GEOS–Chem. Type make help to access the help screen. |
| doc | After creating the documentation, contains PDF or PS files created from ProTeX headers. |
| Core directories |
|
| Headers | Contains all Header files used by GEOS–Chem. Header files in this directory can be referenced to by 3rd party code. |
| GeosUtil | Contains utility type of routines: read/write bpch format file, manage files logical units, etc. Modules in this directory can be referenced to by 3rd party code. |
| GeosCore | Contains core routines for GEOS–Chem. Modules in this directory can not be referenced to by 3rd party code. You have to use input/output argument list. |
| 3rd party codes |
|
| GTMM | Contains routines for the Global Terrestrial Mercury Model code. |
| GeosApm | Contains specific routines for APM aerosol microphysics and a copy of all routines from GeosCore that are modified by APM. |
| GeosTomas | Contains specific routines for TOMAS aerosol microphysics and a copy of all routines from GeosCore that are modified by TOMAS. |
| ISORROPIA | Contains routines for ISORROPIA II. |
| KPP | Contains routines created by KPP pre-processor to use an alternative chemistry solver in GEOS–Chem for different chemistry mechanisms. |
| bin | After compilation, contains the executable created by the compilation process. |
| lib | After compilation, contains archives containing the object files of the routines of GEOS–Chem. |
| mod | After compilation, contains the *.mod files. |
| obsolete | Contains subroutines or module files that became obsolete. |
The GEOS–Chem distribution currently contains approximately 40 Fortran-90 modules. As discussed above, modules can be used to include both variables and routines into a single convienient package. A list of the current modules and their dependencies follows.
| 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_ISOP_mod.F | Contains variables for the old GEIA biogenic emissions (isoprene). | CMN_SIZE_mod.F |
| CMN_MONOT_mod.F | Contains variables for the old GEIA biogenic emissions (monoterpenes). | CMN_SIZE_mod.F |
| 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_VEL_mod.F | Contains common blocks for calculating dry deposition velocities. | CMN_SIZE_mod.F |
| 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 |
| grid_mod.F | 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 |
| 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_MONOT_mod.F CMN_SIZE_mod.F bpch2_mod.F dao_mod.F diag_mod.F directory_mod.F error_mod.F grid_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 |
| 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 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 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 lai_mod.F 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 lai_mod.F logical_mod.F 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 lai_mod.F logical_mod.F 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 |
| 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 |
| 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 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 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. 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. | none |
| 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 |
| 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 |
| gwet_read_mod.F | Contains routines which unzip, open and read the GEOS–Chem GWET 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 |
| 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 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 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 upbdflx_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 |
| lai_mod.F | Reads and stores AVHRR LAI for calculating MEGAN biogenic VOC emissions. | CMN_SIZE_mod.F bpch2_mod.F directory_mod.F error_mod.F logical_mod.F regrid_1x1_mod.F time_mod.F transfer_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 lai_mod.F logical_mod.F 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 |
| 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 grid_mod.F julday_mod.F lai_mod.F logical_mod.F meganut_mod.F merra_a1_mod.F 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 lai_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 |
| 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 |
| 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 |
| 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_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 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 |
| 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 pbl_mix_mod.F 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_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 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_mod.F pressure_mod.F time_mod.F tpcore_bc_mod.F tpcore_fvdas_mod.F tpcore_geos5_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 |
| upbdflx_mod.F | Contains subroutines which impose stratospheric boundary conditions on O3 and NOy. | bpch2_mod.F dao_mod.F directory_mod.F error_mod.F linoz_mod.F logical_mod.F pressure_mod.F tagged_ox_mod.F time_mod.F tracerid_mod.F tracer_mod.F transfer_mod.F tropopause_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 |
| xtra_read_mod.F | Contains routines that unzip, open, and read the GEOS–Chem XTRA (avg 3-hour) met fields from disk. | 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 |
![]()
7.1.4
Compilation Sequence for GEOS–Chem
The different subdirectories of the Code directory are compiled in the following order:
KPP/ GeosUtil/ ISOROPIA/ GeosCore/
If you are compiling for a GEOS–Chem mercury simulation with the Global Terrestrial Mercury Model option, then the compilation will proceed in this order:
GeosUtil/ KPP/ GTMM/ ISOROPIA/ GeosCore/
In each subdirectory, there is a Makefile listing all files (functions, subroutines and modules) and the dependencies of each file.
For subroutines, functions or modules which do not refer to other modules, only the file itself is listed in the dependencies, e.g.
decomp.o : decomp.F
When there are references to other modules in the file (through USE statement), you need to list the file itself and all other modules from
the same directory it refers to. E.g: from the table in List of GEOS–Chem Modules, tropopause_mod.F refers to 9 other modules but only 3 are in GeosCore, so in the Makefile you write:
tropopause_mod.o : tropopause_mod.F \
comode_mod.o dao_mod.o \
logical_mod.o
The order of the list of files is not important. The make utility defines the order of compilation by itself. Thus we maintain an alphabetical order of the files.
![]()
7.1.5 OpenMP parallel loop directives
In the late 1990's, a new open standard for parallel computing named OpenMP was developed by several compiler vendors, including Sun, SGI, Compaq, and Microsoft. The resulting standard allows parallel processing source code (written in either Fortran or C) to be ported between different platforms with minimal effort. As of version 4.17, all GEOS–Chem parallel DO loops have been converted to the new OpenMP standard.
Here is an example DO loop written using OpenMP parallel directives:
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
You may also have noticed that the first column in each line of the !$OMP PARALLEL DO directives begin with a legal Fortran comment character (either C or !). This is by design. In order to invoke the parallel procesing commands, you must turn on a specific switch in your makefile (this is -mp for SGI; check your compiler manual for other platforms). If you do not specify multiprocessor compilation, then the parallel processing directives will be considered as Fortran comments, and the associated DO-loops will be executed on one processor only. Also, since GEOS–Chem uses the traditional "fixed-form" Fortran style, the !$OMP commands must begin at column 1. Otherwise a syntax error will result at compile time.
It should be noted that OpenMP commands are not the same as MPI (message passing interface). With OpenMP directives, you are able to split a job among several processors on the same machine. You are NOT able to split a job among several processors on different machines. Therefore, OpenMP is not suitable for Beowulf-style architectures. We are working on porting GEOS–Chem to distributed style architectures.
For more information about OpenMP, consult the web site OpenMP.org.
![]()
GEOS–Chem is an evolving model. New features and functionalities are constantly being added to it by a rapidly increasing group of users. As with any software project, mistakes are inevitable.
Most of the bugs you you will encounter when working on GEOS–Chem will 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 will make it difficult or impossible to extend the functionality of the model at some future time.
Bugs of the first category are, in general, easily rectified. The fixes to these bugs typically involve either correcting a misspelled word or updating an incorrect numerical value.
Bugs belonging to the second category can be rather pernicious. In almost all instances, you will find that the model is working fine -- that is, until you try to add in a new chemistry simulation, diagnostic, or third-party routine. Then you may find that a major modification to the structure of GEOS–Chem is necessary before the new code can be successfully interfaced.
GEOS–Chem is a combination of several different indivdual pieces: emissions, chemistry and deposition routines from Harvard, transport and convection routines from GSFC, photolysis from UC Irvine, etc. Therefore, the structure of GEOS–Chem was (and still is) largely defined by the structure of the individual pieces from which it was created. It is not always possible to deviate from this set structure without having to rewrite entire sections of source code.
![]()
Between each GEOS–Chem release, we strive to fix bugs as we find them.
For the most recent fixes, look at the Bugs and Fixes page on the GEOS–Chem wiki. It is the most up-to-date document for bugs. For each of them, you will find a description, how to fix it and which version of GEOS–Chem includes the fix.
If you are developing code for GEOS–Chem, then please view the following resources:
These pages may help you resolve some common issues.
![]()
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. This will cause debugging messages (via routine debug_msg contained in error_mod.F) to be written to the log file after operations such as transport, chemistry, emissions, dry deposition, etc. are called from the main program. In this way, you should be able to identify in which operation the error occurred.
NOTE: debug_msg will cause the text to be flushed to disk after it is printed. Most Unix systems feature buffered I/O; that is, the contents of a file or screen output are not updated until an internal buffer (usually 16K of memory) is filled up. If you don't flush the error message to disk, then the last output to the log file may not accurately indicate the location at which the error occurred. Therefore, we recommend using debug_msg instead of a standard Fortran WRITE or PRINT* statement.
2. It may also be necessary to include additional debug statements into main.F or other routines. This may be done by calling subroutine debug_msg as follows
CALL DEBUG_MSG( '### after routine X' )By adding several of these debug statements, you should be able to track down the particular place at which the error is occurring.
3. If you want to check for negative concentrations, NaN or Infinite values, you can add the following line of code:
CALL CHECK_STT('Where I think there is a problem')Make sure to add the following line at the beginning of the subroutine where you call CHECK_STT:
USE TRACER_MOD, ONLY: CHECK_STT
4. If you want to just print out the minimum and maximum value of an array variable that is not included in met_field_debug, then simply add the following line of code:
PRINT*, '### Min, Max: ', MINVAL( X ), MAXVAL( X )
CALL FLUSH( 6 )where X is the name of the variable.
If you want to print out the sum of X instead of the min and max, add this line of code:
PRINT*, '### Sum of X : ', SUM( X )
CALL FLUSH( 6 )Here we also have to call the Fortran routine FLUSH(6), which ensures that the output (in this case, to the screen, unit #6), will be immediately written to disk.
5. It is a good idea to periodically compile your code with array-out-of-bounds error checking. This will make sure that all of the arrays are being accessed with indices whose values fall within the specified array dimensions.
For example, if you have the following situation in your code:
REAL*8 :: A(10), B(10)
...
DO I = 1, 10
B(I) = A(I+1)
ENDDOthen the code will try to access the 11th element of the A array. But since A only has 10 elements, the code will try to access the next contiguous memory location, which may belong to a different variable altogether. Therefore, a "junk" value will be copied into the 10th element of the B array.
This may result in an error message such as:
forrtl: severe (174): SIGSEGV, segmentation fault occurredSometimes an array-out-of-bounds error will mask itself as a segmentation fault. The above error message is from the Intel Fortran Compiler; other compilers will give similar error messages.
To invoke array-out-of-bounds checking in your code, make clean, and then make sure you compile with the following Makefile options:
make realclean make -j4 BOUNDS=yesIntel Fortran Compiler users may also add the TRACEBACK=yes, which will print out a list of all routines that were being called at the time of the error.
Then recompile your code as usual. Any errors will be detected at runtime, and you should get error output 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 1The above error was generated with the Intel Fortran Compiler. Other compilers should give similar errors (although the error numbers may differ).
NOTE: Once you have located and fixed the offending array statement, you should recompile to make an executable without the array-out-of-bounds checking built in. The error checking is thorough, but it can cause your code to slow down noticeably. Therefore, it is only recommended to use array-out-of-bounds checking in debugging runs and not in production runs.
![]()
If you have access to a debugger, you should spend a little bit of time learning how to use it, at least the basic usage. Knowing how to:
will save you a lot of time when debugging a program.
To use a debugger, you typically need to compile your code with a flag that tells the compiler to generate symbolic debug information. This is usually done with -g. You also need to switch off any optimization flag, since they can "rewrite" your code and you may not be able to access all variables. For example, GEOS–Chem is compiled with the following flags on IFORT when using a debugger:
FFLAGS = -cpp -w -noalign -convert big_endian -g
instead of:
FFLAGS = -cpp -w -O2 -auto -noalign -convert big_endian
To switch to the debug options simply add DEBUG=yes (case sensitive) to the make command.
NOTE: Compiling with the debug option does not turn off the parallelization. Some debugger do not accept parallelized code, to turn off the parallelization, add OMP=no (case sensitive) to the make command.
![]()