Coupling GEOS-Chem with RRTMG: Difference between revisions

From Geos-chem
Jump to navigation Jump to search
Line 108: Line 108:


== Previous issues that are now resolved ==
== Previous issues that are now resolved ==
=== Fix bug in rrtmg_rad_transfer_mod.F ===
'''''This fix will be included in [[GEOS-Chem v11-01 benchmark history#v11-01a|GEOS-Chem v11-01b]].'''''
'''''[[User:David_Ridley|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 <tt>GeosCore/rrtmg_rad_transfer_mod.F</tt>, around line 1011 change the following lines in <span style="color:red">red</span> to the lines in <span style="color:green">green</span>:
              IF (ASMAERDIAG(IJLOOP,L,IB_SW).GT.0.999d0) THEN
<span style="color:red"><b>              ASMAER(IJLOOP,L,IB_SW) = 0.999d0</b></span>
<span style="color:green"><b>              ASMAERDIAG(IJLOOP,L,IB_SW) = 0.999d0</b></span>
              ENDIF
!              IF (ASMAERDIAG(IJLOOP,L,IB_SW).LT.0.001d0) THEN
<span style="color:red"><b>!              ASMAER(IJLOOP,L,IB_SW) = 0.001</b></span>
<span style="color:green"><b>!              ASMAERDIAG(IJLOOP,L,IB_SW) = 0.001</b></span>
!              ENDIF
              IF ((SSAAERDIAG(IJLOOP,L,IB_SW).LT.0.001d0).OR.
      &            (SSAAERDIAG(IJLOOP,L,IB_SW).GT.1.0d0)) THEN
<span style="color:red"><b>              SSAAER(IJLOOP,L,IB_SW) = 0.99</b></span>
<span style="color:green"><b>              SSAAERDIAG(IJLOOP,L,IB_SW) = 0.99</b></span>
              ENDIF
              IF (TAUAERDIAG(IJLOOP,L,IB_SW).GT.1.0) THEN
<span style="color:red"><b>              TAUAER_SW(IJLOOP,L,IB_SW) = 1.0</b></span>
<span style="color:green"><b>              TAUAERDIAG(IJLOOP,L,IB_SW) = 1.0</b></span>
              ENDIF
In the same routine around line 1370, change the following line from:
<span style="color:red"><b>            p_SSAAER    = TAUAER_LW (  IL,:,:)</b></span>
to:
<span style="color:green"><b>            p_SSAAER    = SSAAER    ( IL,:,:)</b></span>
--[[User:Melissa Payer|Melissa Sulprizio]] ([[User talk:Melissa Payer|talk]]) 22:14, 21 July 2015 (UTC)


=== Fix bug that prevents storage of O3 and CH4 RFs ===
=== Fix bug that prevents storage of O3 and CH4 RFs ===

Revision as of 22:14, 21 July 2015

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

Overview

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_INPUTE/). 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.

Running GCRT

As with the latest version of GEOS-Chem, NetCDF libraries must be installed (see Installing libraries for GEOS-Chem). The code should be compiled using the compile switch RRTMG, i.e. make RRTMG=yes. A fresh compilation after a make realclean will take 15-20 min (subsequent compiles are much faster).

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

%%% RADIATION MENU %%%  :
AOD Wavelength (nm)     : 550 440 532 
Turn on RRTMG?          : T
Calculate LW fluxes?    : T
Calculate SW fluxes?    : T
Clear-sky flux?         : T
All-sky flux?           : T
Radiation Timestep [min]: 180
Species fluxes          : 0 0 1 0 0 0 0 0 0 1
[O3,ME,SU,NI,AM,BC,OA,SS,DU,PM]

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.

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

Abbreviation Species
O3
ME
SU
NI
AM
BC
OA
SS
DU
PM
ST
BA
Ozone
Methane
Sulfate
Nitrate
Ammonium
Black carbon
Organic aerosol
Sea salt
Mineral dust
All particulate matter
Stratospheric aerosol (UCX simulation only)
Baseline flux

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.

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

Once all the auxiliary files are in place (new optics data files, surface albedo climatologies, trace gas profile climatologies) and the input.geos set up, the model can be run in the usual way.

For more information please consult the GCRT User Guide.

Example Output

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

Previous issues that are now resolved

Fix bug in rrtmg_rad_transfer_mod.F

This fix will be included in GEOS-Chem v11-01b.

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
              ENDIF
!              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
              ENDIF
              IF (TAUAERDIAG(IJLOOP,L,IB_SW).GT.1.0) THEN
               TAUAER_SW(IJLOOP,L,IB_SW) = 1.0
               TAUAERDIAG(IJLOOP,L,IB_SW) = 1.0
              ENDIF

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

            p_SSAAER     = TAUAER_LW (  IL,:,:)

to:

            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 included in GEOS-Chem 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
 NXTRA=NASPECRAD-16                                                
When it should read
 NXTRA=NSPECRAD-16                              
(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

These fixes will be validated with the 1-month benchmark simulation v11-01b.

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)

References

  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)