Difference between revisions of "GEOS-Chem v9-01-02"

From Geos-chem
Jump to: navigation, search
(What's new in this version)
(What's new in this version)
Line 166: Line 166:
 
|Chris Holmes (UC Irvine)
 
|Chris Holmes (UC Irvine)
 
|[[GEOS-Chem_v9-01-02_benchmark_history#v9-01-02p|v9-01-02p]]
 
|[[GEOS-Chem_v9-01-02_benchmark_history#v9-01-02p|v9-01-02p]]
|Pending approval
+
|Approved 29 Sep 2011
 
|-
 
|-
 
|[[#Further bug fixes for the offline Hg simulation|Further bug fixes for the offline Hg simulation]]
 
|[[#Further bug fixes for the offline Hg simulation|Further bug fixes for the offline Hg simulation]]
Line 190: Line 190:
 
|Mauricio Santillana<br>Jingqiu Mao<br>Lin Zhang<br>GEOS-Chem Support Team
 
|Mauricio Santillana<br>Jingqiu Mao<br>Lin Zhang<br>GEOS-Chem Support Team
 
|[[GEOS-Chem_v9-01-02_benchmark_history#v9-01-02q|v9-01-02q]]
 
|[[GEOS-Chem_v9-01-02_benchmark_history#v9-01-02q|v9-01-02q]]
|TBD
+
|Pending approval
 
|-
 
|-
 
|[[#Minor bug fixes in ISORROPIA II|Removal of code that would hamper future expansion of ISORROPIA II]]
 
|[[#Minor bug fixes in ISORROPIA II|Removal of code that would hamper future expansion of ISORROPIA II]]

Revision as of 19:50, 30 September 2011

Contents

Overview

BETA RELEASE -- Summer/Fall 2011

What's new in this version

GEOS-Chem v9-01-02 contains the following new features:

Feature Type Submitted by Benchmark
(1 Month)
Status
Corrected mis-indexing error in partition.f caused by the dynamic tropopause Bug Fix Daven Henze (Colorado U)
Jamin Koo (MIT)
v9-01-02a Approved 28 Jun 2011
Corrected out-of-bounds error in readchem.f Bug Fix GEOS-Chem Support Team " " " "
Fix for mis-indexing issue in CSPEC restart file Bug Fix Jingqiu Mao
GEOS-Chem Support Team
v9-01-02c Approved 21 Jul 2011
Initial source code modifications for compatibility with Earth System Model Framework Structural GEOS-Chem Support Team v9-01-02d Approved 26 Jul 2011
Various bug fixes for the offline Hg simulation Bug Fix Jenny Fisher (Harvard)
Helen Amos (Harvard)
Chris Holmes (UC Irvine)
v9-01-02e Approved 01 Aug 2011
Bug fixes for leap years when using GCAP met fields Bug Fix GEOS-Chem Support Team " " " "
Minor bug fixes for emissions routines affecting offline simulations Bug Fix GEOS-Chem Support Team " " " "
Fixes for minor issues affecting nested-grid simulations Bug Fix Luke Schiferl (Colorado State)
Lin Zhang (Harvard)
" " " "
Fixes for better compatibility with the PGI compiler Bug Fix Gan Luo (SUNY Albany)
GEOS-Chem Support Team
" " " "
Add MERRA SEAICExx fields to the planeflight diagnostic Structural Jenny Fisher (Harvard)
GEOS-Chem Support Team
" " " "
Washout fix for non-aerosol species Bug Fix Helen Amos (Harvard) v9-01-02f Approved 02 Aug 2011
Overhaul of AOD diagnostics Structural Sungshik Patrick Kim (Harvard)
GEOS-Chem Support Team
v9-01-02g Approved 10 Aug 2011
Fix for GEIA emissions scaling factor over Botswana Bug Fix Dylan Millet (U. Minnesota) v9-01-02h Approved 12 Aug 2011
Updated dry deposition velocities for aerosols over ice and snow Science Jenny Fisher (Harvard) v9-01-02i Approved 15 Aug 2011
Archive the MERRA SWGDN (incident radiation @ sfc) field in the ND67 diagnostic Structural Jenny Fisher (Harvard) " " " "
Imposed seasonality on NH3 emissions from David Streets 2000 inventory Science Jenny Fisher (Harvard) v9-01-02j Approved 16 Aug 2011
Fixed minor issues in MERRA cloud convection routine Bug Fix Jenny Fisher (Harvard) " " " "
Implementation of RETRO Anthropogenic Emissions Science Wes Reinhart (U. Minnesota)
Dylan Millet (U. Minnesota)
v9-01-02k Approved 17 Aug 2011
APM aerosol microphysics Science Fangqun Yu (SUNY Albany)
Gan Luo (SUNY Albany)
v9-01-02l Approved 23 Aug 2011
Attempt to eliminate numerical noise in ISORROPIA II (ifort compiler only) Structural Shannon Capps (Georgia Tech) " " " "
Eliminate common block header files + Other source-code updates for ESMF compatibility Structural GEOS-Chem Support Team v9-01-02m Approved 07 Sep 2011
GFED3 biomass burning emissions Science Prasad Kasibhatla (Duke) v9-01-02n Approved 22 Sep 2011
Minor fixes in APM microphysics Structural Gan Luo (SUNY Albany) " " " "
Eliminate double-counting of residential biofuel when using RETRO anthro VOC emissions Bug Fix Dylan Millet (U. Minnesota) v9-01-02o Approved 27 Sep 2011
Fix for vertical regridding of offline OH for offline simulations Bug Fix Chris Holmes (UC Irvine) v9-01-02p Approved 29 Sep 2011
Further bug fixes for the offline Hg simulation Bug Fix Chris Holmes (UC Irvine) " " " "
Further fixes for nested-grid simulations Bug Fix Luke Schiferl (Colo. State U.)
Aaron van Donkelaar (Dalhousie)
" " " "
Further fixes for APM microphysics Bug Fix Gan Luo (SUNY Albany) " " " "
Centralizing chemistry time step Structural Mauricio Santillana
Jingqiu Mao
Lin Zhang
GEOS-Chem Support Team
v9-01-02q Pending approval
Removal of code that would hamper future expansion of ISORROPIA II Bug Fix Havala Pye (EPA) TBD Under further investigation

--Bob Y. 14:22, 8 September 2011 (EDT)

New data directories

The following new data directories have been added for GEOS-Chem v9-01-02. You will have to download the directories relevant to your simulation.

You can download these directories with anonymous FTP or the Wget utility. For instructions, please see Chapter 2.4, Downloading the GEOS-Chem shared data directories in the GEOS-Chem Online User's Guide.

GEOS_1x1/APM_201011                                             # For APM microphysics only
GEOS_1x1/Streets_200607/NH3-Streets-SeasonalScalar.generic.1x1  # For NH3 seasonality in Streets 2000 

GEOS_2x2.5/CO_201003/fossilfuel_andres/annual_v2010             # CO2 annual emissions from CDIAC
GEOS_2x2.5/CO_201003/fossilfuel_andres/monthly_v2010            # CO2 monthly emissions from CDIAC
GEOS_2x2.5/RETRO_201103                                         # RETRO anthropogenic VOC emissions

GEOS_4x5/CO_201003/fossilfuel_andres/annual_v2010               # CO2 annual emissions from CDIAC
GEOS_4x5/CO_201003/fossilfuel_andres/monthly_v2010              # CO2 monthly emissions from CDIAC
GEOS_4x5/RETRO_201103                                           # RETRO anthropogenic VOC emissions

--Bob Y. 12:50, 6 July 2011 (EDT)

Previous issues now resolved in v9-01-02

Patches from v9-01-01

The following patches that were issued after the initial release of GEOS-Chem v9-01-01 are now standardized in v9-01-02:

  1. Double counting of biofuel emissions over Asia
  2. Updated annual and monthly CO2 emissions from CDIAC
  3. Typos in vdiff_mod.f90
  4. Negative tracer caused by DO_MERRA_CONVECTION
  5. Omitted code in Hg simulation
  6. Bug fixes for drydep (ND44) and wetdep (ND17,ND18,ND37,ND38,ND39) diagnostic archival
  7. Bug fix for time-in-tropopause (ND54) diagnostic
  8. Only apply wetdep error trap when using MERRA met fields
  9. Apply washout to the proper fraction of the grid box
  10. Better representation of aqueous SO2 chemistry

--Bob Y. 11:51, 24 June 2011 (EDT)

Mis-indexing error in partition.f

This update was tested in the 1-month benchmark simulation v9-01-02a and approved on 28 Jun 2011.

The implementation of the Dynamic tropopause was causing a mis-indexing error in subroutine partition.f. On every timestep, partition.f uses the concentrations of grid boxes at the previous timestep to partition family tracers (e.g. NOx, Ox) into individual species (e.g. NO2, NO, O3, etc.). The way in which this was done did not take into account the fact that some boxes near the tropopause could be in the troposphere at one timestep and in the stratosphere at the next timestep (or vice-versa). Thus, the concentrations that partition.f was sending to the chemistry solver was incorrect.

This problem affected both the forward and adjoint models.

--Bob Y. 10:14, 6 July 2011 (EDT)

Out-of-bounds error in readchem.f

This update was tested in the 1-month benchmark simulation v9-01-02a and approved on 28 Jun 2011.

It was discovered that this code near the end of subroutine readchem.f:

                 ELSEIF ( J == MAPPL(ILBRO2H,NCS) .or.
    &                     J == MAPPL(ILBRO2N,NCS) .or.
    &                     J == MAPPL(ILTRO2H,NCS) .or.
    &                     J == MAPPL(ILTRO2N,NCS) .or.
    &                     J == MAPPL(ILXRO2H,NCS) .or.
    &                     J == MAPPL(ILXRO2N,NCS) ) THEN
                    ITS_NOT_A_ND65_FAMILY(J) = .FALSE.
                    EXIT

will cause an out-of-bounds error if any of the IL* indices are zero. This error manifested itself in a standard 43-tracer simulation.

We have corrected this error by first making sure that each IL* index is nonzero before doing the corresponding IF ( J = ... ) test:

                 ! Avoid out-of-bounds-errors by making sure that each
                 ! IL* index is nonzero before doing the IF test for J. 
                 ! (bmy, 3/1/11)
                 IF ( ILBRO2H > 0 ) THEN 
                    IF ( J == MAPPL(ILBRO2H,NCS) ) THEN
                       ITS_NOT_A_ND65_FAMILY(J) = .FALSE.
                       EXIT
                    ENDIF
                 ENDIF

                 ... etc ...

--Bob Y. 10:42, 24 June 2011 (EDT)

Mis-indexing when reading restart.cspec file

This update was tested in the 1-month benchmark simulation v9-01-02c and approved on 21 Jul 2011.

Please see this post on the "Restart files" wiki page for more information about an indexing problem when reading the restart.cspec.YYYYMMDDhh file.

--Bob Y. 15:22, 21 July 2011 (EDT)

Various bug fixes for the offline Hg simulation

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

The following issues were discovered in the offline Hg simulation shortly after the release of v9-01-01. These have all been fixed in v9-01-02. Please follow the links below for more information:

  1. De-hardwire file path BR_DIR in global_br_mod.f
  2. Negative concentrations of aquatic mercury
  3. VEGEMIS bug fix for GCAP simulation

--Bob Y. 10:41, 1 August 2011 (EDT)

Bug fix for leap years with GCAP

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

Recall that the GCAP met fields are climatological GCM output, and do not have any leap years (i.e. there are no Feb 29ths).

In GEOS-Chem v9-01-01 and prior versions, routine SET_CURRENT_TIME in time_mod.f) uses the Astronomical Julian Date algorithms (located in julday_mod.f), which assume that there are leap-years. If you ran GEOS-Chem with the GCAP met fields for more than one year, the current code caused the time & date to be computed incorrectly at the start of the second year. GEOS-Chem would die because the wrong met fields would be read in from disk.

We have added an improved algorithm fix into SET_CURRENT_TIME for GCAP met fields only. Whenever a leap-year day (Feb 29th) is encountered, we shall just skip ahead a day to March 1st and compute the corresponding time & date values. However, we must also keep track of how many leap years we have encountered since the start of the GEOS-Chem simulation. This count is needed so that we can increment the current Astronomical Julian Date so as to "skip over" from Feb 29th to Mar 1st for each new leap year that we encounter.

This fix now skips from Feb 28 to Mar 1st for all leap years. We have tested this for multiple leap years and it works fine.

--Bob Y. 10:42, 1 August 2011 (EDT)

Minor bug fixes for emissions routines affecting offline simulations

We have now corrected some bugs that caused errors when running the offline aerosol-only simulation and tagged CO simulation. (NOTE: These errors do NOT occur when running the full-chemistry simulation, only the offline simulations.)

Fixes in biomass_mod.f

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

In biomass_mod.f, there are some IF blocks such as:

           IF ( ITS_A_FULLCHEM_SIM() ) THEN              
              BIOMASS(:,:,IDBCO) = BIOMASS(:,:,IDBCO) * 1.05d0
           ELSE IF ( ITS_A_TAGCO_SIM() ) THEN
              BIOMASS(:,:,IDBCO) = BIOMASS(:,:,IDBCO) * 1.11d0
           ENDIF

However, if your simulation does not use CO (e.g. offline aerosols), then the ID flags IDTCO and IDBCO will both equal zero. If IDBCO = 0, this will cause an out-of-bounds error.

The solution is to add an outer IF block to prevent the code from being executed if IDBCO = 0.

           IF ( IDBCO > 0 ) THEN
              IF ( ITS_A_FULLCHEM_SIM() ) THEN              
                 BIOMASS(:,:,IDBCO) = BIOMASS(:,:,IDBCO) * 1.05d0
              ELSE IF ( ITS_A_TAGCO_SIM() ) THEN
                 BIOMASS(:,:,IDBCO) = BIOMASS(:,:,IDBCO) * 1.11d0
              ENDIF
           ENDIF

--Bob Y. 10:44, 1 August 2011 (EDT)

Fixes for minor issues affecting nested-grid simulations

The following typographical errors affect nested-grid simulations:

Wrong directory specified in nei2005_anthro_mod.f

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

Luke Schiferl wrote:

I have been working with the nested NA simulation and ran into a bug in the code. In GEOS-Chem v9-01-01, line 779 of nei2005_anthro_mod.f should point to the NEI2005_201007 directory rather than NEI2005_200710. There is a comment in line 709 that confirms this.

--Bob Y. 13:34, 27 July 2011 (EDT)

CAC, BRAVO emissions inadvertently turned off in NA nested grid runs

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

Lin Zhang wrote:

I found a small bug in recent GEOS-Chem v9-01-01 when running nested NA. The error is in routine READ_EMISSIONS_MENU of module input_mod.f, around line 1700. The line:
   #if defined( GRID05x0666 ) || defined( NESTED_CH ) 
should be
   #if defined( GRID05x0666 ) && defined( NESTED_CH ) 
or just simply
   #if defined( NESTED_CH )
Otherwise, it will turn off CAC, BRAVO emissions when running nested NA.

--Bob Y. 10:44, 1 August 2011 (EDT)

Bug fixes for compatibility with the PGI compiler

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

Gan Luo from SUNY/Albany pointed out several minor typos that cause the PGI compiler to choke when building the GEOS-Chem executable. These will all be fixed in v9-01-02.

(1) Line 303 of GeosCore/depo_mercury_mod.f:

Change this:
 #include 'define.h'

to this:
 #include "define.h"

(2) Line 169 of GeosCore/ocean_mercury_mod.f:

Change this:
 REAL*8, PARAMETER     :: Kd_part   = 10**(5.5)

to this:
 REAL*8, PARAMETER     :: Kd_part   = 10d0**(5.5d0)

(3) Line 1281 of GeosCore/ocean_mercury_mod.f:

Change this:
 HgPaq(I,J)   = MAX ( HgPaq(I,J) , 0.0 )

to this:
 HgPaq(I,J)   = MAX ( HgPaq(I,J) , 0d0 )

(4) In subroutine DO_MERRA_CONVECTION of convection_mod.f

Change this:
 REAL*8            :: ALPHA,       ALPHA2,   CLDBASE, CMFMC_BELOW

to this:
 INTEGER           :: CLDBASE
 REAL*8            :: CMFMC_BELOW, ALPHA,    ALPHA2

(5) In module vdiff_mod.f90: Several numerical constants had to be rewritten so that explicitly use "D" exponents. In other words:

Change numbers like these:
 1.
 1.e-12

to these:
 1.d0
 1.d-12

In short, the PGI compiler expects constants to agree strictly with the type of the variable that they are being assigned to (i.e. if A is a REAL*8, then you must use A = 1.0d0 instead of A = 1.0). IFORT will correct for this situation during compilation, but PGI will throw an error.

--Bob Y. 10:44, 1 August 2011 (EDT)

Planeflight diagnostic update

This update was tested in the 1-month benchmark simulation v9-01-02e and approved on 01 Aug 2011.

The MERRA SEAICExx fields are now saved to the plane flight diagnostic, per request of Jenny Fisher.

--Bob Y. 10:45, 1 August 2011 (EDT)

Washout fix for non-aerosol species

This update was tested in the 1-month benchmark simulation v9-01-02f and approved on 02 Aug 2011.

The current Wet deposition algorithm was underestimating washout of non-aerosol species. Please see this wiki post for more information about how we corrected this situation.

--Bob Y. 14:34, 2 August 2011 (EDT)

Overhaul of aerosol optical depth diagnostics

This update was tested in the 1-month benchmark simulation v9-01-02g and approved on 10 Aug 2011.

Patrick Kim discovered some inconsistencies in the way aerosol optical depth diagnostics were being computed in GEOS-Chem v9-01-01 and prior versions. We have now corrected these inconsistencies.

Sungshik Patrick Kim wrote:

Here is an example of a daily (first page) and monthly (second page) average AOD for January 2008 from the public release of v9-01-01 and a newer version that addresses the changes we discussed earlier vs. the corresponding average AERONET data, a difference plot, and a histogram of the differences by grid box. [T]he largest differences appear to be due to the change in met field rather than changing the timing of the AOD calculation and it may be largest in the Arctic due to uncertainties in the previous calculation of RH.

--Bob Y. 15:15, 10 August 2011 (EDT)

Fix for GEIA emissions scaling factor over Botswana

This update was tested in the 1-month benchmark simulation v9-01-02h and approved on 12 Aug 2011.

Please see this wiki post about a problem in the scale factors for GEIA emissions over Botswana and southern Africa. We are planning to fix this in GEOS-Chem v9-01-02.

--Bob Y. 11:16, 15 August 2011 (EDT)

Archive the MERRA SWGDN field in the ND67 diagnostic

This update was tested in the 1-month benchmark simulation v9-01-02i and approved on 15 Aug 2011.

Jenny Fisher pointed out that we were saving the MERRA "longwave radiation at the ground" (LWGNT) field into the ND67 diagnostic instead of the MERRA "shortwave radiation at the ground" (SWGDN) field. We have fixed this by archiving SWGDN to ND67 instead of LWGNT. This is done in the module merra_a1_mod.F.

--Bob Y. 10:24, 16 August 2011 (EDT)

Fixed minor issues in MERRA cloud convection routine

Jenny Fisher discovered two minor issues in the MERRA convection routine DO_MERRA_CONVECTION (in module convection_mod.f):

ND38 diagnostic issue in routine DO_MERRA_CONVECTION

This update was tested in the 1-month benchmark simulation v9-01-02j and approved on 16 Aug 2011.

Jenny Fisher wrote]:

The bug is in routine DO_MERRA_CONVECTION. When DIAG38 is first written (around line 2056 in my code, after the comment titled "(3.4) ND38 Diagnostic"), DIAG38 is formed by adding T0 (converted to appropriate units) to the diagnostic each level K. This is correct. However, the second time we add to DIAG38 (below the cloud base, around line 2245 in my code), we add T0_SUM to each level. From what we can tell, T0_SUM represents not the washout from each level but instead the total wet scavenging loss, summed over the entire column. So we are effectively double counting in these levels and adding way too much. [Helen Amos and I] think this should instead be adding WETLOSS.

The fix is below:

                  IF ( OPTIONS%USE_DIAG38 .and. F(K,IC) > 0d0 ) THEN
                     DIAG38(K,IC) = DIAG38(K,IC)
!------------------------------------------------------------------------------
! Prior to 8/16/11:
! Now use WETLOSS instead of T0_SUM in the ND38 diagnostic below the cloud
! base.  WETLOSS is the loss in this level, but T0_SUM is the loss summed
! over the entire column.  Using T0_SUM leads us to over-count the tracer
! scavenged out of the column. (jaf, hamos, bmy, 8/16/11)
!     &                            + ( T0_SUM * AREA_M2 / TCVV_DNS )
!------------------------------------------------------------------------------
     &                            + ( WETLOSS * AREA_M2 / TCVV_DNS )
                  ENDIF

--Bob Y. 16:48, 16 August 2011 (EDT)

Wrong IF tests used in routine DO_MERRA_CONVECTION

This update was tested in the 1-month benchmark simulation v9-01-02j and approved on 16 Aug 2011.

Routine DO_MERRA_CONVECTION was using tracer flags IDTHg2 and IDTHgP to determine whether routines ADD_Hg2_WD, ADD_HgP_WD, and ADD_Hg2_SNOWPACK should be called. However, IDTHg2 and IDTHgP aren't ever defined and were set to zero, so these routines were never called even when the correct mercury species were used.

The fix is to replace these two lines of code

   IF ( IS_Hg .and. IC == IDT%Hg2 ) THEN
   ...
   IF ( IS_Hg .and. IC == IDT%HgP ) THEN

with these:

   IF ( IS_Hg .and. IS_Hg2( IC ) ) THEN
   ...
   IF ( IS_Hg .and. IS_HgP( IC ) ) THEN

--Bob Y. 16:47, 16 August 2011 (EDT)

Minor fixes in APM microphysics

Gan Luo wrote:

I have finished the checking of the updated V9-01-02 version copied from you last week. The updates from us are listed as follows:
1. Current version does not include updated code for pbl_mix_mod.F in GeosApm. The tracers need to be extended to all APM tracers.
2. In GeosApm/wetscav_mod.F:
a) Please add the missing codes after Line2066
        ELSE IF ( (N >= IDTCTSEA .and. N<(IDTCTSEA+NCTSEA)) .or.
       &          (N >= IDTSEABIN1 .and. N<(IDTSEABIN1+NSEA)) ) THEN
           CALL F_AEROSOL( KC, F )
b) Lines 5628-5632 need to be moved to the line after Line 5646
3. In GeosCore/vdiff_mod.F: Line884 [ustar(i) = max( ustr,.01 )] need to be changed to [ustar(i) = max( ustr,.01d0 )]
We have finished one year benchmark run with 4x5 horizontal resolution, and we also analyzed the results. They look reasonable.

--Bob Y. 15:39, 7 September 2011 (EDT)

Fix for vertical regridding of offline OH for offline simulations

Chris Holmes wrote:

I have a bug fix for offline simulations that use offline OH fields. The way the code previously lumped layers in the stratosphere was incorrect for OH. Other offline fields (e.g. O3, Br, BrO) are OK, as long as they are in mixing ratio units.
Unlumped layers are unaffected. OH number densities in the lumped layers increase up to 7%. I tested for Hg only and found that they Hg changes were correspondingly modest.
Here are my comments from the commit:
Offline OH fields are stored as number concentrations (molec/cm3) on a 3D grid with unreduced vertical coordinate (e.g. in the file OH_3Dglobal.geos5.4x5). The model lumps layers in the stratosphere into a reduced vertical grid within global_oh_mod.f. The regridding routine (subroutine transfer_3d) requires input as a mixing ratio, but this assumption was violated for OH fields. To correct this problem, we convert OH number concentration to a mixing ratio, then regrid, then convert back to number concentration.
OH concentrations in unlumped layers are unaffected, while increases up to 7% occur in lumped layers in the stratosphere.

--Bob Y. 15:15, 10 August 2011 (EDT)

Further bug fixes for the offline Hg simulation

The following bugs were discovered after the release of v9-01-01 and have been fixed in v9-01-02. Please follow the links below for more information:

  1. Division by zero error
  2. Bug fixes for ND03 mercury diagnostics

--Melissa Payer 14:51, 19 September 2011 (EDT)

Further fixes for nested-grid simulations

The following fixes were submitted in September 2011 from the nested-grid user community:

Bug fix in planeflight diagnostic for nested-grid simulation

Luke Schiferl wrote:

While running the planeflight diagnostic with the NA nested grid in v9-01-01, I discovered an issue with the formulas that assign the grid box index from which to pull the concentration values. The formulas remained valid for the global grid regardless if running either a global or nested simulation, thus improperly assigning the grid box index for a nested run. I've made the necessary modifications which now take into account the offsets assigned in input.geos. These offsets are required when running a nested simulation, so the indices will now be properly calculated. I successfully tested the modification with global 2x2.5 and NA nested 0.5x0.667.

--Bob Y. 14:00, 6 September 2011 (EDT)

NH3 emissions set to zero in China nested-grid simulations

Aaron van Donkelaar wrote:

We've recently found that CH Nested NH3 emissions were being set to zero when using the 2006 inventory in v9-0-01. This bug had already been addressed for the global simulation, but had not been applied to the CH nested one. Attached please find a patch file that corrects the problem.

--Bob Y. 11:47, 8 September 2011 (EDT)

Further fixes for APM microphysics

Gan Luo wrote:

The column concentrations of the original tracers of BC, OC and dust in GEOS-Chem (59 tracers for full chemistry simulation) simulated by v9-01-02n at remote oceans are much lower than those simulated by v9-01-02l. And we believe that the low values over remote oceans in v9-01-02n may be not reasonable.
The bug leading to the differences between v9-01-02n and v9-01-02l over remote regions is located at wetscav_mod.F. In v9-01-02n, GEOS_5 is undefined in module WETSCAV_MOD. After added # include "define.h" into wetscav_mod.F, the differences between v9-01-02n and v9-01-02l disappeared.
The summary of v9-01-02n debugging for APM is here:
1. In GeosApm/Makefile, the rules to make GFED3 related codes need to be added
2. Please add # include "define.h" at GeosApm/wetscav_mod.F line 19 and GeosApm/apm_wets_mod.F line 130

--Melissa Payer 13:57, 27 September 2011 (EDT)

Under further investigation

The following updates (which should ideally not yield any differences) seem to cause slight numerical discrepancies when added to the standard code. We shall postpone including these into the standard code, pending investigation.

Minor bug fixes in ISORROPIA II

Please see this wiki post for a description of two proposed bug fixes that should go into source code file ISOROPIA/isorropiaIIcode.f. This bug should not affect the current GEOS-Chem ISORROPIA configuration, but may affect future development.

Update 7/28/11: Implementing this change causes the 1-month standard benchmark simulation to have divergent results than the previous version. Therefore, we should understand the source of these differences before we add this update into the standard repository.

--Bob Y. 14:40, 28 July 2011 (EDT)

Fixes in emep_mod.f

In routines READ_EMEP_UPDATED and READ_EMEP_UPDATED_05x0666 of emep_mod.f, there were some IF statements that were used to pick the proper filename and tracer number with which to read data from the bpch file format:

        IF ( TRACER .eq. IDTNOx ) THEN
           FILENAME = TRIM( DIR ) // 'SeasonalVariation/' 
    &        // 'NOx-EMEP-SeasonalScalar.geos.1x1'
           RATIOID = 71
        ELSEIF ( TRACER .eq. IDTCO ) THEN
           FILENAME = TRIM( DIR ) // 'SeasonalVariation/'
    &        // 'CO-EMEP-SeasonalScalar.geos.1x1'
           RATIOID = 72
        ELSEIF ( TRACER .eq. IDTSO2 ) THEN
           FILENAME = TRIM( DIR ) // 'SeasonalVariation/'
    &        // 'SOx-EMEP-SeasonalScalar.geos.1x1'
           RATIOID = 73
        ELSEIF ( TRACER .eq. IDTNH3 ) THEN
           FILENAME = TRIM( DIR ) // 'SeasonalVariation/'
    &        // 'NH3-EMEP-SeasonalScalar.geos.1x1'
           RATIOID = 74
        ENDIF

where TRACER is passed to these routines via subroutine calls such as these:

        CALL READ_EMEP_UPDATED(  1, EMEP_YEAR, EMEP_NOx, 0 )
        CALL READ_EMEP_UPDATED(  4, EMEP_YEAR, EMEP_CO,  0 )
        CALL READ_EMEP_UPDATED( 26, EMEP_YEAR, EMEP_SO2, 0 )
        CALL READ_EMEP_UPDATED( 30, EMEP_YEAR, EMEP_NH3, 1 )

The problem is the code is set up to assume that IDTNOX will always be 1, IDTCO will always be 4, IDTSO2 will always be 26, and IDTNH3 will always be 30. This is true only if you are running a full-chemistry simulation. However, for an offline-aerosol simulation NOx and CO are undefined, and SO2 and NH3 will not equal 26 and 30. Therefore, the IF statement will not return the proper file name and tracer ID.

The solution is to remove all references to IDTNOX, IDTCO, IDTSO2, IDTNH3 from that section of code. The new code looks like:

        ! Pick proper filename & tracer #
        SELECT CASE( TRACER )

           ! NOx
           CASE( 1 ) 
              RATIOID  = 71
              FILENAME = TRIM( DIR )                        // 
    &                    'SeasonalVariation/'               //
    &                    'NOx-EMEP-SeasonalScalar.geos.1x1'
           ! CO
           CASE( 4 )
              RATIOID  = 72
              FILENAME = TRIM( DIR )                        // 
    &                    'SeasonalVariation/'               //
    &                    'CO-EMEP-SeasonalScalar.geos.1x1'
           ! SO2
           CASE( 26 )
              RATIOID  = 73
              FILENAME = TRIM( DIR )                        // 
    &                    'SeasonalVariation/'               //
    &                    'SOx-EMEP-SeasonalScalar.geos.1x1'
           ! NH3
           CASE( 30 )
              RATIOID  = 74
              FILENAME = TRIM( DIR )                        // 
    &                    'SeasonalVariation/'               //
    &                    'NH3-EMEP-SeasonalScalar.geos.1x1'
        END SELECT

There are a couple more instances of this error in emep_mod.f, but the fix is the same.

Update 8/1/11: Implementing this change causes the 1-month standard benchmark simulation to have divergent results than the previous version. Therefore, we should understand the source of these differences before we add this update into the standard repository.

--Bob Y. 10:43, 1 August 2011 (EDT)

Fix for offline simulations in nei2005_anthro_mod.f

Routines EMISS_NEI2005_ANTHRO and EMISS_NEI2005_ANTHRO_05x0666 in nei2005_anthro_mod.f contained similar errors to the errors in emep_mod.f described above. Again, the crux of the problem is that the IDTxxxx tracer flags are being used for the indices of tracers in the binary punch file. And as described above, the various IDTxxxx flags will have different values for an aerosol-only simulation as for a full-chemistry simulation.

The fix is to keep a separate array of tracer indices in the code, and use those for aerosol-only simulations:

     ! list of ID of available species
     SPECIES_ID = (/ IDTNOX,  IDTCO,   IDTSO2,  IDTSO4,  IDTNH3,
    &                IDTACET, IDTALK4, IDTC2H6, IDTC3H8, IDTOCPI, 
    &                IDTBCPI, IDTALD2, IDTCH2O, IDTPRPE, IDTMEK   /)

     ! ID #'s for that are not tied to IDTxxxx flags
     OFFLINE_ID = (/ 1,       4,       26,      27,      30,
    &                9,       5,       21,      19,      35,           
    &                34,      11,      20,      18,      10       /) 

     ! Loop over species
     DO KLM = 1, SIZE( SPECIES_ID )

        ! Species ID (IDT* flags)
        SNo         = SPECIES_ID( KLM )

        ! Skip undefined tracers (bmy, 4/11/11)
        IF ( SNo == 0 ) CYCLE
           
        ! Pick the proper tracer # for fullchem or offline simulations
        ! This prevents crashes for e.g. offline aersol sims (bmy, 4/11/11)
        IF ( ITS_A_FULLCHEM_SIM() ) THEN
           BPCH_ID = Sno
        ELSE
           BPCH_ID = OFFLINE_ID(KLM)
        ENDIF

where BPCH_ID is the index for the given species in the binary punch file. If you are running the full-chemistry simulation, then BPCH_ID is defined from the IDTxxxx flags. If you are running an offline aerosol-only simulation, then BPCH_ID is defined from the values in the OFFLINE_ID array.

Update 7/28/11: Implementing this change causes the 1-month standard benchmark simulation to have divergent results than the previous version. Therefore, we should understand the source of these differences before we add this update into the standard repository.

--Bob Y. 15:42, 28 July 2011 (EDT)

Outstanding issues not yet resolved in v9-01-02

Apparent bug in LINOZ

Prasad Kasibhatla wrote:

There is a bug in LINOZ related to calculation of column ozone associated with very tiny negative O3 mixing ratios in strat, that can cause the model to crash. This is compiler dependent because sometimes the tiny concentrations appear as tiny positive numbers and the model does not crash. Dylan Jones. is looking into this - a quick fix is possible to prevent the model from crashing, but a bigger issue is the non-physical tiny O3 concentrations that occassionally occur in stratosphere - I suspect this has something to do with handling of STT and CSPEC arrays when a box goes [from the troposphere to the stratosphere] in a time-step.

--Bob Y. 10:52, 1 August 2011 (EDT)

Inconsistencies when partitioning tracers into species

Prasad Kasibhatla wrote:

There seem to be some inconsistencies in how [the CSPEC, CSPEC_FULL, and STT] arrays are used in the code. I am working with Daven Henze to sort out, and hope to have this taken care off by end of Aug. I would however recommend that a sub-group take a careful look at how partioning of transported species before chemistry and lumping of chemical species after chemistry is done to ensure that there are no remaining bugs.

--Bob Y. 10:52, 1 August 2011 (EDT)