Adding tracers to GEOS-Chem

From Geos-chem
Jump to: navigation, search

Obsolete.jpg

NOTE: The information on this page is relevant for v10-01 and prior versions. The implementation of both FlexChem and the GEOS-Chem species database into v11-01 and higher versions has rendered this page information on this page obsolete. We shall preserve this page for reference. For instructions on how to add new species into v11-01 and higher versions, please follow this link.

On this page, we provide instructions for adding new advected tracers and chemical species into GEOS-Chem. We also describe how to create a restart file for new tracers.

Instructions for adding tracers to a restart file

By Melissa Payer

To create a “fake” restart file from scratch, you will need to follow these steps:

1. Determine the tracer order from input.geos and modify the GEOS-Chem tracers [ppbv] section of tracerinfo.dat to include additional tracers. Make sure the order of the tracer numbers is the same in both files.
NOTE: Do not use tabs to fill out the columns when adding new tracers to tracerinfo.dat. Use spaces instead. Geos-Chem will not parse tab-delineated columns correctly, and the resultant run will return apparently nonsense errors. --Jared Brewer 17:40, 26 March 2015 (EDT)
a) Load the new tracerinfo.dat in IDL.
          IDL> ctm_tracerinfo, file= 'tracerinfo.dat', /force       ; Uses input from updated tracerinfo.dat
          IDL> ctm_cleanup                                          ; Clears memory
          IDL> gamap, file='restart.YYYYMMDDhh'                     ; Loads selected restart file & lists tracers
          >> q                                                      ; Quits GAMAP
          IDL> ctm_cleanup
2. Edit and run make_restart.pro.
a) View the contents of make_restart.pro.
         cd ~/IDL/gamap2/file_io 
         more make_restart.pro
b) Copy example section to a text file and modify as needed.
         MAKE_RESTART,  OUTMODELNAME='GEOS5_47L',           $
                        OUTRESOLUTION=4,                    $
                        OUTFILENAME='new.restart.YYMMDDhh', $ 
                        TAU0=NYMD2TAU( 20050701L ),         $
                        DATAVALUE=1e-20,                    $
                        TRACERLIST=[44,45,46,etc.],         $
                        UNIT='v/v',                         $
                        DIAGN='IJ-AVG-$'
NOTES:
1. Do not specify levels in OUTMODELNAME if using 72 levels. Instead use 'GEOSFP' or 'GEOS5'.
2. Assign tracers a very low number for DATAVALUE and spin up a new restart file to get more realistic values.
3: If there is a large range of data values to input, rather than typing each value, use:
         TRACERLIST=indgen(NUM)+1
where NUM is the last number in the range. For example, indgen(77)+1 outputs 1 2 3… 77.
c) Copy and paste the changes to the IDL prompt. This will make new restart file with specified tracers only.
3. Combine new restart file with existing restart file.
         IDL> gamap, file='restart.YYYYMMDDhh'              ; Loads original restart file & lists tracers
         >> q                                               ; Quits GAMAP (saves tracers)
         IDL> gamap, file='new.restart.YYYYMMDDhh'          ; Loads new restart file & lists tracers
         >> q                                               ; Quits GAMAP (saves old & new tracers)
         IDL> gamap, /nofile                                ; Loads tracers that are saved in memory
         >> s#-#                                            ; Type tracer #s to save 

         You will then be prompted with a dialog box.  
         Type the name for the new restart file and press the SAVE button.
 
         IDL> ctm_cleanup			             ; Clears memory
Note: In order to use the new restart file for simulations, it is recommended to run the GEOS-Chem for at least one year and use the new restart file to initialize the simulation.

--Bob Y. 11:15, 14 December 2012 (EST)

Instructions for adding advected tracers to GEOS-Chem

NOTE: in GEOS-Chem v10-01 and higher versions, all emissions are handled by the HEMCO emissions component. All of the IDBF*, IDB*, and IDE* variables in GeosCore/tracerid_mod.F were made obsolete by HEMCO and have been removed. For a complete list of variables and modules removed, see our Removal of obsolete modules from GEOS-Chem wiki page.

By Melissa Payer

These instructions describe how to add advected tracers to GEOS-Chem. Advected tracers are carried in the STT array (which is declared in GeosCore/tracer_mod.F), and are transported by the winds. Some advected tracers are also chemical species, which comprise GEOS-Chem's NOx-Ox-hydrocarbon-aerosol chemistry mechanism.

  1. Add tracers to the input file input.geos under the TRACER MENU

    1. Increase “Number of tracers” accordingly

    2. Add tracer number, name, molecular weight, and emitted species to end of tracer list

  2. Add tracer(s) to restart file – see separate instructions

  3. Modify the following source code routines:

    1. Headers/CMN_SIZE_mod.F:

      1. Increase NNPAR by number of tracers being added

      2. If the species have anthropogenic emissions, increase NEMPARA accordingly (GEOS-Chem v9-02 and earlier versions only)

      3. If the species have biogenic emissions, increase NEMPARB accordingly (GEOS-Chem v9-02 and earlier versions only)

      4. If the species have biomass burning emissions, increase NBIOMAX accordingly (GEOS-Chem v9-02 and earlier versions only)

    2. Headers/species_database_mod.F90:

      1. Add CASE statement to define physical properties for the new species (GEOS-Chem v11-01d and later versions only)

    3. GeosCore/tracerid_mod.F:

      1. Increase NNNTRID by the number of tracers being added NOTE: NNNTRID must be equal to NNPAR in CMN_SIZE_mod.F

      2. Define tracer IDs as needed:

        1. IDxxxx – ID for SMVGEAR species

        2. IDTxxxx – GEOS-Chem tracer ID

        3. IDExxxx – GEOS-Chem emission ID (GEOS-Chem v9-02 and earlier versions only)

        4. IDBFxxxx – GEOS-Chem biofuel ID (GEOS-Chem v9-02 and earlier versions only)

        5. IDBxxxx – GEOS-Chem biomass ID (GEOS-Chem v9-02 and earlier versions only)

      3. Update emission IDs in subroutine TRACERID (GEOS-Chem v9-02 and earlier versions only):

        1. Under “Assign tracer, biomass, biofuel, and anthro emission ID’s,” add case for added tracers to initialize IDTxxxx, IDBFxxxx, IDBxxxx

        2. Under “Initialize the IDExxx flags,” add IF statement for added tracer IDs and initialize IDExxxx

        3. Under “Fill IDEMS with appropriate tracer ID #’s,” add IF statement for added tracers

        4. Under “Print additional information,” add WRITE statements for added tracers

      4. In subroutine SETTRACE:
        (NOTE: Only do the following if species is included in SMVGEAR chemical mechanism)

        1. Add IF statement, to initialize IDxxxx

        2. In subroutine INIT_TRACERID:

        3. Zero all IDs added (IDxxxx, IDTxxxx, IDExxxx, etc.)

    4. Other modules that may need to be updated include:

      1. wetscav_mod.F

      2. drydep_mod.F

      3. emissions_mod.F (GEOS-Chem v9-02 and earlier versions only)

      4. biomass_mod.F (GEOS-Chem v9-02 and earlier versions only)

      5. biofuel_mod.F (GEOS-Chem v9-02 and earlier versions only)

      6. etc.

--Bob Y. 11:05, 14 December 2012 (EST)

Instructions for adding chemical species to GEOS-Chem

NOTE: In GEOS-Chem v11-01 and higher versions, SMVGEAR will be replaced by the FlexChem solver. The globchem.dat mechanism file, as well as the CSPEC_FULL and CSPEC arrays, will be removed from v11-01.

By Melissa Sulprizio

These instructions describe how to add chemical species to GEOS-Chem. Chemical species are carried by the CSPEC_FULL and CSPEC arrays, and constitute the chemical mechanism reaction matrix. Many chemical species are also advected tracers.

  1. Modify the following files in your GEOS-Chem run directory:

    1. Add tracers to input.geos file, under the TRACER MENU section

    2. Increase “Number of tracers” accordingly

    3. Add tracer number, name, molecular weight, and emitted species to end of tracer list

NOTE: Do not use tabs to fill out the columns in either the TRACER MENU or tracerinfo.dat when adding new tracers. Make sure to use spaces instead. Geos-Chem will not parse tab-delineated columns correctly, and the resultant run will return apparently nonsense errors.

--Jared Brewer 17:40, 26 March 2015 (EDT)
  1. Add tracer(s) to restart file – see separate instructions

  2. Modify the globchem.dat file to include additional species, kinetic reactions (including emissions and drydep), or photolysis reactions

    1. NOTE: If you modify globchem.dat and plan to run GEOS-Chem using the KPP chemical solver, you will need to generate new gckpp*.F90 files. For more information see the following wiki pages:

      1. What are the cons of using KPP?

      2. Generating KPP input files from the globchem.dat file

    2. NOTE: if you are using HEMCO, you do not need to add an 'Emission' reaction to globchem.dat. Modifying HEMCO_Config.rc fills this role instead.

      --Jared Brewer 17:40, 26 March 2015 (EDT)
  3. If necessary, modify:

    1. The FJX_j2j.dat file – contains species names and branching ratios for FAST–JX photolysis species

    2. The FJX_spec.dat file – contains cross-sections and quantum yields for FAST–JX photolysis species

--Bob Y. 11:40, 14 December 2012 (EST)

Adding passive tracers to GEOS-Chem

NOTE: In GEOS-Chem v11-01, passive tracers may be added with the HEMCO emissions component.

For some research projects (especially those focusing on intercontinental transport), you may wish to add a passive tracer to GEOS-Chem. By "passive", we mean that the tracer is advected, has CO-like emissions, but has a fixed lifetime (i.e. is not affected by chemistry or deposition).

For more information, please see the our Adding passive species to GEOS-Chem wiki page.

--Bob Yantosca (talk) 15:32, 7 December 2016 (UTC)

Other resources

We invite you to read the following documentation, which describe other aspects of GEOS-Chem:

  1. Adding gas-phase chemistry to GEOS-Chem by May Fu

  2. Organic compounds in GEOS-Chem by May Fu

  3. Adding photolysis to GEOS-Chem by Justin Parella

  4. How is dry deposition implemented into GEOS-Chem? by Bess Corbitt

  5. How is wet deposition implemented into GEOS-Chem? by Helen Amos

  6. Adding passive (CO-like) species with fixed lifetime to GEOS-Chem by Jenny Fisher

--Bob Yantosca (talk) 15:34, 7 December 2016 (UTC)