Difference between revisions of "Bugs and fixes"

From Geos-chem
Jump to: navigation, search
(New page: == NaN's in SMVGEAR == === 05-Jul-2007 === From Lok Lamsal (lok.lamsal@fizz.phys.dal.ca) <blockquote> I ran into a problem while running GEOS-4, version v7-04-09, at 2x2.5. The simulati...)
 
(GEOS-Chem 13)
 
(653 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== NaN's in SMVGEAR ==
+
On this page we list the GEOS-Chem specific bugs and issues that users have recently encountered, and how to fix them. 
  
=== 05-Jul-2007 ===
+
== Bugs and fixes lists have now been migrated to Github ==
  
From Lok Lamsal (lok.lamsal@fizz.phys.dal.ca)
+
We have been migrating bug reports to our GEOS-Chem issue tracker, which is located on our Github repository: https://github.com/geoschem/geos-chem/issues/. We recommend that you also look through both the open and closed issues on this page, as your issue might be listed there.
  
<blockquote>
+
=== GEOS-Chem 13 ===
I ran into a problem while running GEOS-4, version v7-04-09, at 2x2.5. The simulation stops on 15th July 2006 with different error messages on two of our machines tuque and beret. One of the error messages on tuque is like this:
+
  
<pre>
+
{| border=1 cellspacing=0 cellpadding=5
  sum of rrate = Infinity
+
|-bgcolor="#CCCCCC"
  SMVGEAR: CNEW is NaN!
+
!Version
  Species index :            1
+
!Released
  Grid Box      :          121          15          1
+
!colspan="2"|List of bugs and issues (now posted on the listed Github repository)
  STOP in smvgear.f!
+
      - CLEANUP: deallocating arrays now...
+
forrtl: severe (174): SIGSEGV, segmentation fault occurred
+
</pre>
+
  
And on beret the message is like this:
+
|-valign="top"
 +
|[[GEOS-Chem_model_development_priorities#13.3.0|13.3.0]]
 +
|TBD
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/19 '''Milestone 13.3.0''']
  
      - CLEANUP: deallocating arrays now...
+
|-valign="top"
  forrtl: severe (174): SIGSEGV, segmentation fault occurred
+
|[[GEOS-Chem_model_development_priorities#13.2.0|13.2.0]]
  Image              PC                Routine            Line
+
|TBD
  Source
+
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
  geos_4_nv          400000000059EA10  Unknown              Unknown
+
|[https://github.com/geoschem/geos-chem/milestone/18 '''Milestone 13.2.0''']
  Unknown
+
  libguide.so        200000000039C1A0  Unknown              Unknown
+
  Unknown
+
  etc.
+
  
The message which is repeated in either case is like this:
+
|-valign="top"
 +
|[[GEOS-Chem 13.1.0|13.1.0]]
 +
|TBD
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/17 '''Milestone 13.1.0''']
  
  SMVGEAR: DELT= 9.96E-16 TOO LOW DEC YFAC. KBLK, KTLOOP, NCS, TIME, TIMREMAIN, YFAC, EPS =
+
|-valign="top"
 +
|[[GEOS-Chem 13.0.2|13.0.2]]
 +
|12 Apr 2021
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/21?closed=1 '''Milestone 13.0.2''']
  
Could you suggest me what the problem could be? Just to inform you: while trying to figure out the problem, I noticed from Bastien that he did not have problem on that day with version v7-04-10, which stopped on September 13 2006.
+
|-valign="top"
</blockquote>
+
|[[GEOS-Chem 13.0.1|13.0.1]]
 +
|23 Mar 2021
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/20?closed=1 '''Milestone 13.0.1''']
  
Response by Bob Yantosca (yantosca@seas.harvard.edu):
+
|-valign="top"
 +
|width="80px"|[[GEOS-Chem 13.0.0|13.0.0]]
 +
|width="100px"|18 Mar 2021
 +
|width="200px"|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|width="400px"|[https://github.com/geoschem/geos-chem/milestone/8?closed=1 '''Milestone 13.0.0''']
  
<blockquote>
+
|}
I think there is a division by zero somewhere that is causing SMVGEAR to choke.  It could be a couple of things:
+
  
(1) Make sure that in your In a6_read_mod.f (routine READ_A6) you have the following code to prevent Q from going to zero.  This can make logarithms blow up in other places in the code:
+
=== GEOS-Chem 12 ===
  
          !--------------------------------
+
{| border=1 cellspacing=0 cellpadding=5
          ! Q: 6-h avg specific humidity
+
|-bgcolor="#CCCCCC"
          ! (GEOS-4 only)
+
!Version
          !--------------------------------
+
!Released
          CASE ( 'Q' )
+
!colspan="2"|List of bugs and issues (now posted on the listed Github repository)
            READ( IU_A6, IOSTAT=IOS ) XYMD, XHMS, Q3
+
            IF ( IOS /= 0 ) CALL IOERROR( IOS, IU_A6, 'read_a6:16' )
+
   
+
            IF ( CHECK_TIME( XYMD, XHMS, NYMD, NHMS ) ) THEN
+
                IF ( PRESENT( Q ) ) CALL TRANSFER_3D( Q3, Q )
+
                NFOUND = NFOUND + 1
+
   
+
                ! NOTE: Now set negative Q to a small positive #
+
                ! instead of zero, so as not to blow up logarithms
+
                ! (bmy, 9/8/06)
+
                WHERE ( Q < 0d0 ) Q = 1d-32
+
            ENDIF
+
  
 +
|-valign="top"
 +
|[[GEOS-Chem 12#12.9.3|12.9.3]]
 +
|06 Aug 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/16?closed=1 '''Milestone 12.9.3''']
  
(2) In fvdas_convect_mod.f, make SMALLEST a smaller number (i.e. 1d-60):
+
|-valign="top"
 +
|[[GEOS-Chem 12#12.9.2|12.9.2]]
 +
|24 Jul 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/15?closed=1 '''Milestone 12.9.2''']
  
    !=================================================================
+
|-valign="top"
    ! MODULE VARIABLES
+
|[[GEOS-Chem 12#12.9.1|12.9.1]]
    !=================================================================
+
|17 Jul 2020
   
+
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
    ! Variables
+
|[https://github.com/geoschem/geos-chem/milestone/14?closed=1 '''Milestone 12.9.1''']
    INTEGER            :: LIMCNV              ! Constants
+
    LOGICAL, PARAMETER :: RLXCLM  = .TRUE.
+
    REAL*8,  PARAMETER :: CMFTAU  = 3600.d0
+
    REAL*8,  PARAMETER :: EPS      = 1.0d-13     
+
    REAL*8,  PARAMETER :: GRAV    = 9.8d0
+
    !-------------------------------------------------------
+
    ! Prior to 12/19/06:
+
    ! Make SMALLEST smaller (bmy, 12/19/06)
+
    !REAL*8,  PARAMETER :: SMALLEST = 1.0d-32
+
    !-------------------------------------------------------
+
    REAL*8,  PARAMETER :: SMALLEST = 1.0d-60
+
    REAL*8,  PARAMETER :: TINYALT  = 1.0d-36         
+
    REAL*8,  PARAMETER :: TINYNUM  = 2*SMALLEST
+
  
 +
|-valign="top"
 +
|[[GEOS-Chem 12#12.9.0|12.9.0]]
 +
|17 Jul 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/10?closed=1 '''Milestone 12.9.0''']
  
(3) In "fvdas_convect_mod.f", avoid division by zero in routine CONVTRAN:
+
|-valign="top"
 +
|[[GEOS-Chem 12#12.8.2|12.8.2]]
 +
|27 May 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/13?closed=1 '''Milestone 12.8.2''']
  
            IF ( CDIFR > 1.d-6 ) THEN
+
|-valign="top"
   
+
|[[GEOS-Chem 12#12.8.1|12.8.1]]
                ! If the two layers differ significantly.
+
|21 May 2020
                ! use a geometric averaging procedure
+
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
                CABV = MAX( CMIX(I,KM1), MAXC*TINYNUM, SMALLEST )
+
|[https://github.com/geoschem/geos-chem/milestone/12?closed=1 '''Milestone 12.8.1''']
                CBEL = MAX( CMIX(I,K),  MAXC*TINYNUM, SMALLEST )
+
  !-----------------------------------------------------------------
+
  !  Prior to 12/19/06:
+
  ! Avoid division by zero (bmy, 12/19/06)
+
  !                  CHAT(I,K) = LOG( CABV / CBEL)
+
  !    &                      /   ( CABV - CBEL)
+
  !    &                      *    CABV * CBEL
+
  !-----------------------------------------------------------------
+
   
+
                ! If CABV-CBEL is zero then set CHAT=SMALLEST
+
                ! so that we avoid div by zero (bmy, 12/19/06)
+
                IF ( ABS( CABV - CBEL ) > 0d0 ) THEN
+
                  CHAT(I,K) = LOG( CABV / CBEL )
+
  &                        /   ( CABV - CBEL )
+
  &                        *      CABV * CBEL
+
                ELSE
+
                  CHAT(I,K) = SMALLEST
+
                ENDIF
+
   
+
            ELSE                         
+
                ! Small diff, so just arithmetic mean
+
                CHAT(I,K) = 0.5d0 * ( CMIX(I,K) + CMIX(I,KM1) )
+
            ENDIF
+
  
 +
|-valign="top"
 +
|[[GEOS-Chem 12#12.8.0|12.8.0]]
 +
|04 Mar 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/7?closed=1 '''Milestone 12.8.0''']
  
(4) Also I had to rewrite the parallel DO loops in the routine HACK_CONV since this was causing some kind of a memory fault.
+
|-valign="top"
 +
|[[GEOS-Chem 12#12.7.2|12.7.2]]
 +
|09 Mar 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/11?closed=1 '''Milestone 12.7.2''']
  
You may just want to get the most recent version of fvdas_convect_mod.f, which has all of these fixes installed. See:
+
|-valign="top"
 +
|[[GEOS-Chem 12#12.7.1|12.7.1]]
 +
|19 Feb 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/9?closed=1 '''Milestone 12.7.1''']
  
  ftp ftp.as.harvard.edu
+
|-valign="top"
  cd pub/exchange/bmy
+
|[[GEOS-Chem 12#12.7.0|12.7.0]]
  get fvdas_convect_mod.f
+
|03 Feb 2020
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/4?closed=1 '''Milestone 12.7.0''']
  
So I would recommend trying to implement these fixes and see if this solves your problem.
+
|-valign="top"
</blockquote>
+
|[[GEOS-Chem 12#12.6.3|12.6.3]]
 +
|25 Nov 2019
 +
|[https://github.com/geoschem/gchp geoschem/gchp]
 +
|[https://github.com/geoschem/gchp/milestone/2?closed=1 '''Milestone 12.6.3''']
  
NOTE: These fixes have been introduced into GEOS-Chem v7-04-10.
+
|-valign="top"
 +
|[[GEOS-Chem 12#12.6.2|12.6.2]]
 +
|15 Nov 2019
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/6?closed=1 '''Milestone 12.6.2''']
  
 +
|-valign="top"
 +
|[[GEOS-Chem 12#12.6.1|12.6.1]]
 +
|28 Oct 2019
 +
|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|[https://github.com/geoschem/geos-chem/milestone/5?closed=1 '''Milestone 12.6.1''']
  
 +
|-valign="top"
 +
|width="80px"|[[GEOS-Chem 12#12.6.0|12.6.0]]
 +
|width="100px"|18 Oct 2019
 +
|width="200px"|[https://github.com/geoschem/geos-chem geoschem/geos-chem]
 +
|width="400px"|[https://github.com/geoschem/geos-chem/milestone/2?closed=1 '''Milestone 12.6.0''']
  
 +
|}
  
===== regrid_1x1_mod.f =====
+
== Bugs and fixes in older GEOS-Chem versions ==
  
==== 16 Oct 2007 ====
+
For a complete list of bugs and fixes in older GEOS-Chem versions, please see:
  
From Mike Barkley (mbarkley@staffmail.ed.ac.uk)
+
*[[Bugs and fixes in GEOS-Chem 12.0.0 to 12.5.0]]
 +
*[[Bugs and fixes in GEOS-Chem v9, v10, and v11]]
 +
*[[Bugs and fixes in GEOS-Chem v7 and v8]]
  
> I think I've found an error in the regrid_1x1_mod.f subroutine (attached in the text file):
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 14:23, 22 March 2021 (UTC)
>
+
>SUBROUTINE REGRID_MASS_TO_2x25( I1, J1, L1, IN, I2, J2, OUT )
+
>
+
>There is a do loop over longitude with the upper limit defined as the input latitude (J1) instead what should (?) be the output longitude (I2) - I've indicated where this in the program, Which is correct? We didn't notice this until we were running multi-processor 2x2.5 simulations on different servers.
+
 
+
The bug was:
+
 
+
  !-----------------------
+
  ! Non-polar latitudes
+
  !-----------------------
+
  DO J = 2, J2-1   
+
    ...         
+
    DO I = 1, J1
+
 
+
which needs to be replaced by:
+
 
+
  !-----------------------
+
  ! Non-polar latitudes
+
  !-----------------------
+
  DO J = 2, J2-1   
+
    ...         
+
    DO I = 1, I1
+
 
+
This bug has now been fixed in [[wiki:geos-chem:dev_forum|GEOS-Chem v7-04-13]].
+
 
+
===== smvgear.f =====
+
 
+
==== 02 Nov 2007 ====
+
 
+
From Bob Yantosca (yantosca@seas.harvard.edu)
+
 
+
>Some of you have reported a weird error in SMVGEAR that causes GEOS-Chem simulations to die unexpectedly.  The main symptom of this error is that concentrations of some species (e.g CO) appear to go to zero, while other species (e.g. Ox) seem to reach unphysically high values, all within a single chemistry timestep.  Then the simulation dies shortly thereafter.
+
>
+
>May Fu and Philippe Le Sager have isolated the cause of the problem.  They found that in some instances it is possible (e.g. due to locally low OH) to get into a regime where the first derivative of a species goes very negative during SMVGEAR's internal iteration loop.  This then causes the new species concentration to be negative.  This can sometimes happen even if the local & global error tolerance checks have passed.  Then upon exiting the internal iteration loop, SMVGEAR would automatically reset any negative species concentrations to zero (actually a small positive number like 1e-99).  A species with zero concentration can adversely affect other species within the SMVGEAR solver process.  Furthermore, sometimes these zero concentrations were propagating out of SMVGEAR and into the STT tracer array, which caused problems in other areas of the code.
+
>
+
>May & Philippe implemented a fix into the file "smvgear.f" which does the following: If a negative species concentration value is found during an internal iteration, then we don't set it to zero.  We instead reduce the internal iteration timestep and do another iteration (i.e. re-evaluate the Jacobian matrix) to solve for the new species concentration.  This process is repeated until SMVGEAR converges onto a non-negative solution.  May & Philippe also added an extra error trap to stop the simulation if any negative species concentrations still persist upon exiting the subroutine.  So the entire process should now be more robust.
+
>
+
>You may download the updated "smvgear.f" file from our anonymous FTP site:
+
>
+
>  ftp ftp.as.harvard.edu
+
>  cd pub/geos-chem/patches/v7-04-12
+
>  get README
+
>  get smvgear.f
+
>
+
>Then copy the "smvgear.f" file to your own source code directory and recompile.  Please see the README file for more information on how to locate the places in "smvgear.f" that were modified.
+
>
+
>This is not really a "bug" but more of a "design flaw" in the original SMVGEAR package.
+
 
+
This bug has now been fixed in GEOS-Chem [[wiki:geos-chem:dev_forum|GEOS-Chem v7-04-13]].
+

Latest revision as of 13:56, 14 April 2021

On this page we list the GEOS-Chem specific bugs and issues that users have recently encountered, and how to fix them.

Bugs and fixes lists have now been migrated to Github

We have been migrating bug reports to our GEOS-Chem issue tracker, which is located on our Github repository: https://github.com/geoschem/geos-chem/issues/. We recommend that you also look through both the open and closed issues on this page, as your issue might be listed there.

GEOS-Chem 13

Version Released List of bugs and issues (now posted on the listed Github repository)
13.3.0 TBD geoschem/geos-chem Milestone 13.3.0
13.2.0 TBD geoschem/geos-chem Milestone 13.2.0
13.1.0 TBD geoschem/geos-chem Milestone 13.1.0
13.0.2 12 Apr 2021 geoschem/geos-chem Milestone 13.0.2
13.0.1 23 Mar 2021 geoschem/geos-chem Milestone 13.0.1
13.0.0 18 Mar 2021 geoschem/geos-chem Milestone 13.0.0

GEOS-Chem 12

Version Released List of bugs and issues (now posted on the listed Github repository)
12.9.3 06 Aug 2020 geoschem/geos-chem Milestone 12.9.3
12.9.2 24 Jul 2020 geoschem/geos-chem Milestone 12.9.2
12.9.1 17 Jul 2020 geoschem/geos-chem Milestone 12.9.1
12.9.0 17 Jul 2020 geoschem/geos-chem Milestone 12.9.0
12.8.2 27 May 2020 geoschem/geos-chem Milestone 12.8.2
12.8.1 21 May 2020 geoschem/geos-chem Milestone 12.8.1
12.8.0 04 Mar 2020 geoschem/geos-chem Milestone 12.8.0
12.7.2 09 Mar 2020 geoschem/geos-chem Milestone 12.7.2
12.7.1 19 Feb 2020 geoschem/geos-chem Milestone 12.7.1
12.7.0 03 Feb 2020 geoschem/geos-chem Milestone 12.7.0
12.6.3 25 Nov 2019 geoschem/gchp Milestone 12.6.3
12.6.2 15 Nov 2019 geoschem/geos-chem Milestone 12.6.2
12.6.1 28 Oct 2019 geoschem/geos-chem Milestone 12.6.1
12.6.0 18 Oct 2019 geoschem/geos-chem Milestone 12.6.0

Bugs and fixes in older GEOS-Chem versions

For a complete list of bugs and fixes in older GEOS-Chem versions, please see:

--Bob Yantosca (talk) 14:23, 22 March 2021 (UTC)