Main menu


Known bugs in chemistry compsets

2 posts / 0 new
Last post
Known bugs in chemistry compsets

Please consider the currently known bugs in CESM1.1.1. and CESM1.2.0 if running compsets with chemistry!


A bug in the chemistry pre-processor can produce non-conservative solutions for chemistry mechanisms that have 99 or more species. This bug is present in all released and development version of CESM.


In the file: cam/chem_proc/src/cam_chempp/make_map.f

the variable cls_rxt_map defaults to -99.


This causes a problem in cam/chem_proc/src/cam_chempp/pl_code.f, where the reaction rate is calculated:


rate = REAL( count( abs( cls_rxt_map(k,4:prd_lim+3,class) ) == species ) )


If there is a species 99, this reaction rate can incorrectly be multiplied by 2 or more, as this line falsely counts the default -99 setting as matching the species number.


The fix is to change the default value of cls_rxt_map in cam/chem_proc/src/cam_chempp/make_map.f:



--- cam_chempp/make_map.f       (bug)

+++ cam_chempp/make_map.f       (fix)



             end if


-            cls_rxt_map(kp3) = -99

+            cls_rxt_map(kp3) = -huge(0)

          end if

       end do



This will only fix the bug when a usr_mech_infile is used to create the chemistry subroutines. Existing chemistry mechanisms that have 99 or more species in the source code under cam/src/chemistry may have the bug in those chemistry mechanisms.

This bug has been reported here:

Mike Mills
WACCM Liaison
Atmospheric Chemistry Division
NCAR Foothills Lab
Boulder, Colorado USA

Log in or register to post comments

Who's new

  • opioronald123@...
  • shimura.tomoya....
  • rack.hun.son@...
  • nathalie.schall...
  • sf870222@...