Difference between revisions of "Sandbox"

From Geos-chem
Jump to: navigation, search
 
(205 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== feel free to experiment here ==
+
== Instructions for adding tracers to GEOS-Chem ==
  
Dear GEOS-Chem Users,
+
'''''By [mailto:mpayer@seas.harvard.edu Melissa Payer]'''''
  
Here is the February 2009 newsletter:
+
These instructions describe how to add advected tracers to GEOS-Chem.  Advected tracers are carried in the <tt>STT</tt> array (which is declared in <tt>GeosCore/tracer_mod.F</tt>), and are transported by the winds. 
  
== Requests for help ==
+
NOTE: Some advected tracers are also chemical species, which comprise GEOS-Chem's NOx-Ox-HC-aerosol chemistry mechanism.
Just a reminder: all GEOS-Chem questions should be sent to the email address '''''geos-chem-support@as.harvard.edu'''''.  This will ensure that Bob, Philippe, and Claire will all receive your email question at the same time.  This will allow us to serve you better.  If one of us is unavailable then the others will be able to respond to you.
+
  
== GEOS-Chem update ==
+
#<p>Add tracers to input.geos under Tracer Menu</p>
 +
##<p>Increase “Number of tracers” accordingly</p>
 +
##<p>Add tracer number, name, molecular weight, and emitted species to end of tracer list</p>
 +
#<p>Add tracer(s) to restart file – see separate instructions</p>
 +
#<p>Modify the following source code routines:</p>
 +
##<p><tt>Headers/CMN_SIZE_mod.F</tt></p>
 +
###<p>Increase <tt>NNPAR</tt> by number of tracers being added</p>
 +
###<p>If the species have anthropogenic emissions, increase NEMPARA accordingly</p>
 +
###<p>If the species have biogenic emissions, increase NEMPARB accordingly</p>
 +
###<p>If the species have biomass burning emissions, increase NBIOMAX accordingly</p>
 +
##<p><tt>GeosCore/tracerid_mod.F</tt></p>
 +
###<p>Increase <tt>NNNTRID</tt> by the number of tracers being added NOTE: <tt>NNNTRID</tt> must be equal to <tt>NNPAR</tt> in <tt>CMN_SIZE_mod.F</tt></p>
 +
###<p>Define tracer IDs as needed:</p>
 +
####<p>IDxxxx – ID for SMVGEAR species</p>
 +
####<p>IDTxxxx – GEOS-Chem tracer ID</p>
 +
####<p>IDExxxx – GEOS-Chem emission ID</p>
 +
####<p>IDBFxxxx – GEOS-Chem biofuel ID</p>
 +
####<p>IDBxxxx – GEOS-Chem biomass ID</p>
 +
###<p>In subroutine <tt>TRACERID</tt>,</p>
 +
####<p>Under “Assign tracer, biomass, biofuel, and anthro emission ID’s,” add case for added tracers to initialize IDTxxxx, IDBFxxxx, IDBxxxx</p>
 +
####<p>Under “Initialize the IDExxx flags,” add IF statement for added tracer IDs and initialize IDExxxx</p>
 +
####<p>Under “Fill IDEMS with appropriate tracer ID #’s,” add IF statement for added tracers</p>
 +
####<p>Under “Print additional information,” add WRITE statements for added tracers</p>
 +
###<p>In subroutine SETTRACE  (NOTE: Only do the following if species is included in SMVGEAR chemical mechanism<p>
 +
####<p>Add IF statement, to initialize IDxxxx</p>
 +
####<p>In subroutine INIT_TRACERID,</p>
 +
####<p>Zero all IDs added (IDxxxx, IDTxxxx, IDExxxx, etc.)</p>
 +
##<p>Other modules that may need to be updated include:</p>
 +
###<p>wetscav_mod.F</p>
 +
###<p>drydep_mod.F</p>
 +
###<p>emissions_mod.F</p>
 +
###<p>biomass_mod.F</p>
 +
###<p>biofuel_mod.F</p> etc.
  
=== Emissions release v8-01-04 ===
 
Our emissions release, [[GEOS-Chem versions under development#v8-01-04|GEOS-Chem v8-01-04]] is in the final testing phase.  We are running a couple of 1-year benchmarks in order to assess how the most up-to-date emissions inventories impact the full-chemistry simulation.
 
  
Because the menu of emissions options is more complex than in prior versions, we are also in the process of documenting everything up in a clear and consistent manner.
 
  
=== Bug with Intel Fortran Compiler ("IFORT") 11 ===
+
Instructions for adding species to GEOS-Chem
A couple of users have reported problems when migrating GEOS-Chem from the Intel "IFORT" compiler version 10 to version 11.  [[Machine issues & portability#Problems_with_IFORT_11|Please visit this page to view the complete discussion thread]].
+
  
In the interim, our recommendation is for GEOS-Chem users to stay with IFORT 10, as we know that this compiler produces code that optimizes well on multi-core chipsets.  We have not yet had chance to examine this problem more thoroughly.
+
Modify run directory files
  
== ESMF update ==
+
1) Add tracers to input.geos under Tracer Menu
Max Suarez from GSFC visited us in mid February.  While Max was present, we held a telecon with some other members of the GSFC team to discuss the best way in which GEOS-Chem could be incorporated into the GEOS-5 GCM at NASA.  Based on their recommendations, we are moving forward to provide them with a column-ized version of the chemistry solver of GEOS-Chem.
+
c) Increase “Number of tracers” accordingly
 +
d) Add tracer number, name, molecular weight, and emitted species to end of tracer list
  
Bob and Philippe also have recently created an ESMF-ized version of the GEOS-Chem emissions module.  This module will also be an important part of the future GEOS-Chem model.
+
2) Add tracer(s) to restart file – see separate instructions
  
== GEOS-5 met field reprocessing ==
+
3) Modify globchem.dat to include additional species, kinetic reactions (including emissions and drydep), or photolysis reactions
 +
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:
 +
http://wiki.seas.harvard.edu/geos-chem/index.php/KPP_solvers_FAQ#What_are_the_cons_of_using_KPP.3F
 +
http://wiki.seas.harvard.edu/geos-chem/index.php/Interfacing_GEOS-Chem_with_KPP#Generating_KPP_input_files_from_GEOS-Chem_globchem.dat
  
=== Status ===
+
4) If necessary, modify:
As described in the [[GEOS-Chem Newsletter January 2009|January 2009 newsletter]], we are reprocessing the entire archive of GEOS-5 met field data.  As of February 17, 2009 the following fields have been completed:
+
a) ratj.d – contains species names and branching ratios for FAST–JX photolysis species
 
+
For more information: http://acmg.seas.harvard.edu/geos/doc/man/chapter_5.html#5.4.1
* 2008: entire year
+
b) jv_spec.dat – contains cross-sections and quantum yields for FAST–JX photolysis species
* 2004: July - December
+
For more information: http://acmg.seas.harvard.edu/geos/doc/man/chapter_5.html#5.4.3
 
+
for each of the following geographic domains:
+
 
+
* China nested 0.5 x 0.667
+
* Global 2 x 2.5
+
* Global 4 x 5
+
 
+
The files have been TAR'd and Gzip'd for your convienience (as this dramatically reduces the size of the data).  In each directory there are files <tt>01.tar.gz</tt>, <tt>02.tar.gz</tt> .. <tt>12.tar.gz</tt>, each of which contains a single month of met field data.  GEOS-Chem users outside Harvard may obtain these data files via anonymous FTP:
+
 
+
  ftp ftp.as.harvard.edu
+
  cd pub/geos-chem/data/GEOS_0.5x0.666_CH.d/GEOS_5/2008
+
  mget *.tar.gz
+
  cd pub/geos-chem/data/GEOS_2x2.5.d/GEOS_5/2008
+
  mget *.tar.gz
+
  cd pub/geos-chem/data/GEOS_4x5.d/GEOS_5/2008
+
  mget *.tar.gz
+
  cd pub/geos-chem/data/GEOS_0.5x0.666_CH.d/GEOS_5/2004
+
  mget *.tar.gz
+
  cd pub/geos-chem/data/GEOS_2x2.5.d/GEOS_5/2004
+
  mget *.tar.gz
+
  cd pub/geos-chem/data/GEOS_4x5.d/GEOS_5/2004
+
  mget *.tar.gz
+
 
+
However, to simplify the FTP process you might want to use a 3rd party FTP software program with a GUI interface, such as Mozilla FireFTP.
+
 
+
At present, the throughput rate is approximately 28 days of model data per day.  Therefore it will still be a couple of months before the entire GEOS-5 dataset has been reprocessed.
+
 
+
=== Required code modifications  ===
+
To use the new, reprocessed GEOS-5 met data in GEOS-Chem, you must first install [[GEOS-Chem versions under development#v8-01-02|GEOS-Chem v8-01-02]] (or higher) and make sure the following switch in "define.h" is uncommented.
+
 
+
    !----- FOR GEOS-5 MET FIELDS ONLY -----
+
    ! NOTE: If you are using GEOS-5 met fields that were reprocessed to
+
    ! correctly regrid the in-cloud optical depth and cloud fraction fields,
+
    ! then be sure to uncomment the following line of code.  This will cause
+
    ! FAST-J to interpret the optical depth correctly.  Leaving this option
+
    ! commented will cause a "quick fix" (i.e. multiplying the optical depth
+
    ! by the cloud fracton) to be applied, which should be a good enough fix
+
    ! in the meantime. (bmy, hyl, 10/24/08)
+
    #define IN_CLOUD_OD  'IN_CLOUD_OD'
+
 
+
Also, if you are using [[GEOS-Chem versions under development#v8-01-02|v8-01-02]] or [[GEOS-Chem versions under development#v8-01-03|v8-01-03]], you must also insert a minor bug fix to manually set the variable <tt>N_A6_FIELDS</tt> to 21.  Otherwise the fields will not be read in correctly.  This has to be done in routine <tt>OPEN_A6_FIELDS</tt> (located in source code file <tt>a6_read_mod.f</tt>, directly after the variable <tt>N_A6_FIELDS</tt> is read in:
+
 
+
        ! The last 2 digits of the ident string
+
        ! is the # of fields contained in the file
+
        READ( IDENT(7:8), '(i2.2)' ) N_A6_FIELDS
+
 
+
#if  defined( GEOS_5 ) && defined( IN_CLOUD_OD )
+
        !%%% KLUDGE: set N_A6_FIELDS=21 when using the reprocessed
+
        !%%% GEOS-5 met.  This accounts for CMFMC (which doesn't seem
+
        !%%% to get counted) as well as for MOISTQ, which is an extra
+
        !%%% derived field.  (jmao, bmy, 2/12/09)
+
        N_A6_FIELDS = 21
+
#endif
+
 
+
However, it is probably just easier to install [[GEOS-Chem versions under development#v8-01-04|v8-01-04]] GEOS-Chem v8-01-04, which is slated for release shortly.  The above bug for <tt>N_A6_FIELDS</tt> is fixed in v8-01-04.
+
 
+
== GEOS-Chem Meeting: April 7-10, 2009 ==
+
 
+
The 4th Annual GEOS-Chem Scientific & Users' Meeting is rapidly approaching.  Daniel has provided a first draft of the meeting agenda [http://www.as.harvard.edu/ctm/geos/meetings/2009/agenda_gc4_v1.pdf (click here for PDF format)]. Please direct your questions about the agenda to Daniel Jacob ('''''djacob@fas.harvard.edu''''').
+
 
+
If you have not registered for the meeting but would like to attend, then please contact Brenda Mathieu ('''''blm@as.harvard.edu''''') with your name and affiliation as you would like it to appear on your badge. There is no registration fee.
+
 
+
 
+
Thanks for your continued support of GEOS-Chem!
+
 
+
Bob Yantosca, Philippe Le Sager, and Claire Carouge
+
geos-chem-support@as.harvard.edu
+
 
+
--[[User:Bmy|Bob Y.]] 12:09, 17 February 2009 (EST)
+

Latest revision as of 21:25, 10 May 2023

Instructions for adding tracers to GEOS-Chem

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.

NOTE: Some advected tracers are also chemical species, which comprise GEOS-Chem's NOx-Ox-HC-aerosol chemistry mechanism.

  1. Add tracers to input.geos under 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

      3. If the species have biogenic emissions, increase NEMPARB accordingly

      4. If the species have biomass burning emissions, increase NBIOMAX accordingly

    2. 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

        4. IDBFxxxx – GEOS-Chem biofuel ID

        5. IDBxxxx – GEOS-Chem biomass ID

      3. In subroutine TRACERID,

        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<p>

        1. <p>Add IF statement, to initialize IDxxxx

        2. In subroutine INIT_TRACERID,

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

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

      1. wetscav_mod.F

      2. drydep_mod.F

      3. emissions_mod.F

      4. biomass_mod.F

      5. biofuel_mod.F

        etc.


Instructions for adding species to GEOS-Chem

Modify run directory files

1) Add tracers to input.geos under Tracer Menu c) Increase “Number of tracers” accordingly d) 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 globchem.dat to include additional species, kinetic reactions (including emissions and drydep), or photolysis reactions 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: http://wiki.seas.harvard.edu/geos-chem/index.php/KPP_solvers_FAQ#What_are_the_cons_of_using_KPP.3F http://wiki.seas.harvard.edu/geos-chem/index.php/Interfacing_GEOS-Chem_with_KPP#Generating_KPP_input_files_from_GEOS-Chem_globchem.dat

4) If necessary, modify: a) ratj.d – contains species names and branching ratios for FAST–JX photolysis species For more information: http://acmg.seas.harvard.edu/geos/doc/man/chapter_5.html#5.4.1 b) jv_spec.dat – contains cross-sections and quantum yields for FAST–JX photolysis species For more information: http://acmg.seas.harvard.edu/geos/doc/man/chapter_5.html#5.4.3