Coupling GEOS-Chem with RRTMG

From Geos-chem
Jump to: navigation, search

On this page we provide information about the coupling of GEOS-Chem with the RRTMG radiative transfer model (by AER, Inc.).


The GEOS-Chem model with online radiative transfer calculations (referred to as GCRT) was developed to allow GEOS-Chem users to produce gas and aerosol direct radiative effect (DRE) output for both the longwave and shortwave. This alternative to offline coupling allows better temporal resolution in the RT calculations and provides a consist platform for GEOS-Chem users with the widely used radiative transfer package RRTMG.

Most of the added code is 'transparent', therefore this version of the GEOS-Chem model can still be run with the radiation code switched off. The optical properties are calculated at multiple wavelengths so that the user is no longer restricted to 550nm as default, so there are associated changes regardless of whether the radiative code is invoked. However, these cause negligible slow down (the default model is actually slightly faster than the standard v9-01-03). Compiling with RRTMG=yes requires approximately double the amount of RAM (~15Gb for a 2x2.5 simulation) and takes between 40% and 100% longer depending on the settings used.

This wiki explains the key changes and requirements. If you want to dig deeper into the changes and assumptions made, or are looking for a quick-start guide to running the model, download the GCRT User Guide

GCRT User Groups

User Group Personnel Projects
Atmospheric Chemistry, Massachusetts Institute of Technology Colette Heald
David Ridley
Xuan Wang
  • GCRT Publication
  • Inter-annual variability and trends in African dust
  • Modeling black and brown carbon
Add yours here

Obtaining the source code

GCRT was originally added into GEOS-Chem v10-01i, which was tested with 1-month benchmark simulations approved on 30 April 2015 and a 1-year benchmark simulation approved on 01 May 2015. It is included in the GEOS-Chem v10-01 public release.

--Melissa Sulprizio (talk) 22:15, 16 June 2015 (UTC)

The following bug fix for GCRT will be added into GEOS-Chem v11-01a. Interested users should update to this version once it is ready. Contact the GEOS-Chem Support Team for more information.

--Bob Y. (talk) 16:11, 26 June 2015 (UTC)

Authors and collaborators

Questions regarding GCRT can be directed at David (e-mail linked above).

--David R. 18:00, 08 October 2013 (EST)

Key Changes

  1. A new menu for Radiation exists in input.geos (see below). This also includes a wavelength selection for optical depth output that is independent of whether RRTMG is switched on (up to three optical depths can be output in the ND21 (OD-MAP-$) diagnostic, but only the first is used for the timeseries diagnostics ND48, ND49, ND50, ND51, and ND51b).

  2. A new code folder, GeosRad/ is required for the RRTMG code. The module rrtmg_rad_transfer_mod.F is the driver code (found in GeosCore/) that interfaces with RRTMG.

  3. The optics look-up tables are updated, containing multiple wavelengths and separated into files for each species (soot.dat, so4.dat, org.dat, dust.dat, ssa.dat, ssc.dat) that are stored in the run directory. To prevent discrepancies jv_spec.dat no longer contains optical properties for aerosol, Fast-J uses aerosol optics from from the same speciated look-up tables. The new files mean that jv_spec_aod.dat is obsolete and has been removed.

  4. Several new input files are required. Surface albedo and emissivity climatologies have been generated and must be stored in modis_surf_201210/ within the root data directory (e.g. ExtData/CHEM_INPUTS/). Climatologies of gases (CH4, N2O, CFC-11, CFC-12, CFC-22 and CCl4) must be stored within the root data directory.

  5. A new set of diagnostics (ND72) are available providing the change in radiative flux (DRE) for gases and aerosol, LW/SW, top of atmosphere (TOA) and surface, and clear-sky and all-sky conditions. These also include AOD, SSA and asymmetry parameter for each aerosol species at the requested wavelengths.

netCDF inputs via HEMCO

This update was included in GEOS-Chem 12.1.0, which was released on 26 Nov 2018.

Several of the inputs to RRTMG have been stored in the binary punch (aka bpch) data format. These include:

  1. Diffuse surface albedoes in visible and near-IR
  2. Direct surface albedoes in visible and near-IR
  3. Surface emissivity in 16 different wavelength bands
  4. Concentrations of CCl4, CFC11, CFC12, CFC22, CH4, N2O from TES in ppb

We are planning on removing all bpch data from GEOS-Chem. As such we have ported these bpch inuts to netCDF so that they can be read in via HEMCO. The HEMCO_Config.rc file that ships with the GEOS-Chem Unit Tester will now have these additional lines.

# --- Inputs for the RRTMG radiative transfer model ---
# These fields will only be read if the +RRTMG+ toggle is activated.
# +RRTMG+ can be set explicitly above as a setting of the base extension 
# (--> +RRTMG+: true/false). If not defined, it will be set automatically 
# based on the RRTMG toggle in input.geos (recommended).
# NOTE: The 2 x 2.5 albedo fields and emissivity fields will produce 
# differences at the level of numerical noise when comparing output to
# simulations from prior versions (esp. when running at 4 x 5 resolution).
# You might see larger differences w/r/t prior verisons for a few grid boxes
# along the coastline of Antarctica, where the difference in resolution
# and regridding will be more apparent in the sharp transition from ice to 
# ocean.  If this is a problem, you can use the data files at 4x5 resolution
# for 4x5 RRTMG simulations.
# ALSO NOTE: The algorithm that HEMCO uses to select each time slice is 
# likely different than what was implemented when reading the old bpch
# data from disk.  This can also cause differences when comparing to
# prior versions.
* MODIS_ALBDFNIR      $ROOT/RRTMG/v2018-11/     ALBDFNIR        2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_ALBDFVIS      $ROOT/RRTMG/v2018-11/     ALBDFVIS        2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_ALBDRNIR      $ROOT/RRTMG/v2018-11/     ALBDRNIR        2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_ALBDRVIS      $ROOT/RRTMG/v2018-11/     ALBDRVIS        2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_01 $ROOT/RRTMG/v2018-11/      RTEMISS_band01  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_02 $ROOT/RRTMG/v2018-11/      RTEMISS_band02  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_03 $ROOT/RRTMG/v2018-11/      RTEMISS_band03  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_04 $ROOT/RRTMG/v2018-11/      RTEMISS_band04  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_05 $ROOT/RRTMG/v2018-11/      RTEMISS_band05  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_06 $ROOT/RRTMG/v2018-11/      RTEMISS_band06  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_07 $ROOT/RRTMG/v2018-11/      RTEMISS_band07  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_08 $ROOT/RRTMG/v2018-11/      RTEMISS_band08  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_09 $ROOT/RRTMG/v2018-11/      RTEMISS_band09  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_10 $ROOT/RRTMG/v2018-11/      RTEMISS_band10  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_11 $ROOT/RRTMG/v2018-11/      RTEMISS_band11  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_12 $ROOT/RRTMG/v2018-11/      RTEMISS_band12  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_13 $ROOT/RRTMG/v2018-11/      RTEMISS_band13  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_14 $ROOT/RRTMG/v2018-11/      RTEMISS_band14  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_15 $ROOT/RRTMG/v2018-11/      RTEMISS_band15  2002/1-12/1-31/0 C xy  1    * - 1 1
* MODIS_EMISSIVITY_16 $ROOT/RRTMG/v2018-11/      RTEMISS_band16  2002/1-12/1-31/0 C xy  1    * - 1 1
* TES_CLIM_CCL4       $ROOT/RRTMG/v2018-11/ CCl4            2000/1/1/0       C xyz ppbv * - 1 1
* TES_CLIM_CFC11      $ROOT/RRTMG/v2018-11/ CFC11           2000/1/1/0       C xyz ppbv * - 1 1
* TES_CLIM_CFC12      $ROOT/RRTMG/v2018-11/ CFC12           2000/1/1/0       C xyz ppbv * - 1 1
* TES_CLIM_CFC22      $ROOT/RRTMG/v2018-11/ CFC22           2000/1/1/0       C xyz ppbv * - 1 1
* TES_CLIM_CH4        $ROOT/RRTMG/v2018-11/ CH4             2000/1/1/0       C xyz ppbv * - 1 1
* TES_CLIM_N2O        $ROOT/RRTMG/v2018-11/ N2O             2000/1/1/0       C xyz ppbv * - 1 1

Therefore you will need to obtain the netCDF files in the HEMCO/RRTMG/v2018-11 data directory. For more information, please see our HEMCO data directories wiki page.

--Bob Yantosca (talk) 16:14, 26 November 2018 (UTC)

Running GCRT

The species available for output from the flux calculations are as follows:

# Abbreviation Species
0 BA Baseline calculation
1 O3 Ozone
2 ME Methane
3 SU Sulfate
4 NI Nitrate
5 AM Ammonium
6 BC Black carbon
7 OA Organic aerosol
8 SS Sea salt
9 DU Mineral dust
10 PM All particulate matter
11 ST Stratospheric aerosol (UCX simulation only)

Please note:

  • The radiative impacts of gases (ozone and methane) are relatively untested at this stage and should be interpreted with caution.
  • If you are using the UCX chemistry mechanism, then you will need to add an extra entry (0 or 1) at the end of the species fluxes line for stratospheric aerosols for a total of 11 possible species.
  • For more information please consult the GCRT User Guide (NOTE: Several items in this document may be now obsolete.)

Prior to GEOS-Chem 12.3.0

Once the code is compiled the input.geos file will need configuring:

AOD Wavelength (nm)     : 550
Turn on RRTMG?          : T
Calculate LW fluxes?    : T
Calculate SW fluxes?    : T
Clear-sky flux?         : T
All-sky flux?           : F
Radiation Timestep [sec]: 10800
Species fluxes          : 0 0 1 0 0 0 0 0 0 1 0

The species for which DRE output is currently available are listed with two-letter identifiers. In the example the DRE is calculated for sulfate (SU) and all particulate matter (PM) - see the table below for all identifier descriptions. The recommended radiation time step is 180 min but can be set for any multiple of the chemistry time step. The baseline (BA) flux is always output by default and is the flux (W/m^2) with all aerosol and species included.

In this set up all timeseries diagnostics (ND48, ND49, ND50, ND51, ND51b) produce optical depth output at 550nm, but the main ND21 diagnostic output contains three copies of the optical depths (and SSA and asymmetry parameters if requested). The output variables have the wavelength appended to the variable name e.g. OPBC550.

Finally, the ND72 bpch diagnostic must be set to 1 if RRTMG is switched on.

In GEOS-Chem 12.3.0 and later versions

In 12.3.0 and higher we changed how the RRTMG fluxes are specified.

In the input.geos file, the RADIATION MENU has two less lines:

AOD Wavelength (nm)     : 550
Turn on RRTMG?          : T
Calculate LW fluxes?    : T
Calculate SW fluxes?    : T
Clear-sky flux?         : T
All-sky flux?           : F
Radiation Timestep [sec]: 10800

This is because the the flux output is now specified in the RRTMG collection of the HISTORY.rc file:

# Flux outputs for different species from the RRTMG radiative transfer model:
# (See
#    0=BA (Baseline    )  1=O3 (Ozone          )   2=ME (Methane   )   
#    3=SU (Sulfate     )  4=NI (Nitrate        )   5=AM (Ammonium  )
#    6=BC (Black carbon)  7=OA (Organic aerosol)   8=SS (Sea Salt  )
#    9=DU (Mineral dust) 10=PM (All part. matter) 12=ST (Strat aer.)
# (1) You must always list the BASELINE (BA) flux output first!
# (2) RRTMG is called for each type of flux output.  Therefore,
#     it is a good idea to only request those fluxes that you need instead 
#     of all possible flux outputs.  This will reduce the overall run time.
  RRTMG.template:             '%y4%m2%d2_%h2%n2z.nc4',
  RRTMG.format:               'CFIO',
  RRTMG.frequency:            {FREQUENCY}
  RRTMG.duration:             {DURATION}
  RRTMG.mode:                 'time-averaged'
  RRTMG.fields:               'RadClrSkyLWSurf_BA            ', 'GIGCchem',
                              'RadClrSkyLWTOA_BA             ', 'GIGCchem',
                              'RadClrSkySWSurf_BA            ', 'GIGCchem',
                              'RadClrSkySWTOA_BA             ', 'GIGCchem',
                              'RadClrSkyLWSurf_PM            ', 'GIGCchem',
                              'RadClrSkyLWTOA_PM             ', 'GIGCchem',
                              'RadClrSkySWSurf_PM            ', 'GIGCchem',
                              'RadClrSkySWTOA_PM             ', 'GIGCchem',

Even if you are still using the ND72 bpch diagnostic output (which is recommended for the time being), you will need to make sure that you have the settings for whichever flux values you want defined in HISTORY.rc. GEOS-Chem will parse the list to see which of the flux options are specified and then it will only call RRTMG for those. The baseline flux always has to be listed first.

If you generate a geosfp_4x5_RRTMG or merra2_4x5_RRTMG run directory from the 12.3.0 unit tester, then the RRTMG collection will be included by default in the HISTORY.rc file that gets placed in the run directory.

NOTE: The RRTMG netCDF diagnostics have not yet been validated against the bpch diagnostics (as of August 2019).

--Bob Yantosca (talk) 20:04, 19 August 2019 (UTC)

Example Output

ND72 diagnostic in binary punch format

NOTE: The binary punch (aka bpch) file format will be discontinued in a future GEOS-Chem version. For the time being, GEOS-Chem 12 will allow you to save diagnostics in either bpch or netCDF file formats.

Below, example output fluxes and direct radiative effect (DRE) from GCRT are displayed for March 2013. The top row show the total flux with all aerosol and gases included, subsequent rows show the DRE for all particulate matter, black carbon, and sulfate. The left column shows top of atmosphere (TOA) and the right column shows surface DRE. All results are for all-sky conditions (i.e. including clouds). The identifier for each figure is |F|SW|PM|T|A| (F - denotes a flux output, SW/LW - shortwave or longwave, PM - species identifier, T/S - TOA or surface, A/C - All-sky or clear sky)

Example DRE figures.jpg

netCDF diagnostic output


Previous issues that are now resolved

Replace nonstandard DLOG function with LOG

This fix was included in v11-01j and approved on 03 Dec 2016

In routine GeosRad/rrtmg_lw_setcoef.F, the GNU Fortran compiler detected an error using the specific REAL*8 DLOG function. We have now converted this to the standard LOG function.

We commented out the code in RED and added the code in GREEN:

! Prior to 10/14/16: 
! Use the F90 standard LOG function instead of ALOG or DLOG.  (bmy, 10/14/16)
!!         plog = alog(pavel(lay))
!         plog = dlog(pavel(lay))
         plog = LOG(pavel(lay))

--Bob Yantosca (talk) 19:38, 17 October 2016 (UTC)

Bug fixes in rrtmg_rad_transfer_mod.F

These fixes were validated with 1-month benchmark simulation v11-01b and 1-year benchmark simulation v11-01b-Run0. This version was approved on 19 Aug 2015.

David Ridley wrote:

Seb has kindly found and fixed a couple of bugs in the RRTMG code that have crept in recently. These do mess up the results and so will need implementing in the model as soon as possible. I’ll let anyone that I know currently using RRTMG to re-download the code once it has been fixed.

In GeosCore/rrtmg_rad_transfer_mod.F, around line 1011 change the following lines in red to the lines in green:

              IF (ASMAERDIAG(IJLOOP,L,IB_SW).GT.0.999d0) THEN
               ASMAER(IJLOOP,L,IB_SW) = 0.999d0
               ASMAERDIAG(IJLOOP,L,IB_SW) = 0.999d0
!              IF (ASMAERDIAG(IJLOOP,L,IB_SW).LT.0.001d0) THEN
!               ASMAER(IJLOOP,L,IB_SW) = 0.001
!               ASMAERDIAG(IJLOOP,L,IB_SW) = 0.001
!              ENDIF
              IF ((SSAAERDIAG(IJLOOP,L,IB_SW).LT.0.001d0).OR.
     &            (SSAAERDIAG(IJLOOP,L,IB_SW).GT.1.0d0)) THEN
               SSAAER(IJLOOP,L,IB_SW) = 0.99
               SSAAERDIAG(IJLOOP,L,IB_SW) = 0.99
               TAUAER_SW(IJLOOP,L,IB_SW) = 1.0
               TAUAERDIAG(IJLOOP,L,IB_SW) = 1.0

In the same routine around line 1370, change the following line from:

            p_SSAAER     = TAUAER_LW (  IL,:,:)


            p_SSAAER     = SSAAER    ( IL,:,:)

--Melissa Sulprizio (talk) 22:14, 21 July 2015 (UTC)

Fix bug that prevents storage of O3 and CH4 RFs

This fix was validated in the 1-month benchmark simulation v11-01a, which was approved on 07 Jul 2015.

Sebastian Eastham wrote:

(GEOS-Chem v10-01 contains) an issue in the RRTMG interface where there is a single-character typo in SET_SPECMASK. This typo results in dust, ozone and methane RFs being incorrectly stored - in fact it prevents O3 and CH4 RFs from being stored at all, instead storing dust RFs in their place (which in turn miss the last two dust bins and instead use either sea salt or stratospheric aerosol). This is because line 1609 in rrtmg_rad_transfer_mod reads
When it should read
(note second character). This bug affects both the tropospheric and UCX version of the code. Since NXTRA is the offset used to account for whether or not stratospheric aerosols are inserted mid-way through the indexing, and NASPECRAD is always 2 smaller than NSPECRAD, everything index above 7 is set to a value 2 smaller than it should be in the mask.
This bug occurs with or without UCX. The offset is always incorrectly calculated, so dust, ozone and methane are never output correctly. The easiest test is to check the ozone or methane output (they will both look like large-diameter dust RF). Dust will look *almost* right, but will actually include stratospheric aerosols (if UCX=yes) or sea-salt (if UCX is not on).

--Melissa Sulprizio (talk) 20:27, 25 June 2015 (UTC)

Bug in RRTMG array sizes

This fix was validated with 1-month benchmark simulation v11-01b and 1-year benchmark simulation v11-01b-Run0. This version was approved on 19 Aug 2015.

Sebastian Eastham wrote:

I came across a bug in the RRTMG code, which looks like it originated with AER. In GeosRad/mcica_subcol_gen_lw.F90 and GeosRad/rrtmg_lw_rad.F90, a few arrays are incorrectly declared to be size (nbndlw,ncol,nlay) when they should instead by (ngptlw,ncol,nlay), or vice versa. This results in NaNs sometimes creeping into the arrays when OpenMP is turned on, or just outright failure.
The comments show that the arrays should have been declared differently in the first place, so I’ll be getting in touch with AER shortly to make sure they’re aware of the issue.

In GeosRad/mcica_subcol_gen_lw.F90, change the following code (in bold) to:

     real(kind=rb), intent(in) :: tauc(nbndlw,ncol,nlay)        ! in-cloud optical depth
                                                  !    Dimensions: (nbndlw,ncol,nlay)

In GeosRad/rrtmg_lw_rad.F90, change the following code (in bold) to:

     real(kind=rb), intent(in) :: cldfmcl(ngptlw,ncol,nlay)     ! Cloud fraction
                                                     !    Dimensions: (ngptlw,ncol,nlay)
     real(kind=rb), intent(in) :: ciwpmcl(ngptlw,ncol,nlay)     ! In-cloud ice water path (g/m2)
                                                     !    Dimensions: (ngptlw,ncol,nlay)
     real(kind=rb), intent(in) :: clwpmcl(ngptlw,ncol,nlay)     ! In-cloud liquid water path (g/m2)
                                                     !    Dimensions: (ngptlw,ncol,nlay)
     real(kind=rb), intent(in) :: taucmcl(ngptlw,ncol,nlay)     ! In-cloud optical depth
                                                     !    Dimensions: (ngptlw,ncol,nlay)

--Melissa Sulprizio (talk) 14:39, 6 July 2015 (UTC)

Known issues

Bug fixes for RRTMG in v11-02

This fix was included in GEOS-Chem 12.0.0.

Christopher Holmes wrote:

The RRTMG calculations have a bug in v11-01. The problem was probably introduced with the unit changes in v11-01. O3 and CH4 concentrations are specified incorrectly, so their radiative effects are badly wrong. Aerosol radiative effects are also affected due to spectral overlap with gases (whose concentrations are wrong), but the aerosol error is modest. Xinyi Dong (U Tennessee) tested my fix and found that the error in BC radiative effect is <1% in the global mean for a 1 month average, but locally up to 5%. Other aerosols likely have similar magnitude errors.

--Bob Yantosca (talk) 19:28, 14 May 2018 (UTC)

RRTMG does not compile with GNU Fortran

For details about this issue and any ensuing conversation or fix, please view the issue on Github:


  1. Heald, C.L., D.A. Ridley, J.H. Kroll, S.R.H. Barrett, K.E. Cady-Pereira, M.J. Alvarado, C.D. Holmes, Beyond Direct Radiative Forcing: The Case for Characterizing the Direct Radiative Effect of Aerosols, Atmos. Chem. Phys., 14, 5513-5527, doi:10.5194/acp-14-5513-2014, 2014. (Article)