Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Known bugs in chemistry compsets

tilmes

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

mmills

CSEG and Liaisons
Staff member
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.fthe 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)                 exit             end if          else-            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: http://bugs.cgd.ucar.edu/show_bug.cgi?id=2535
 

mmills

CSEG and Liaisons
Staff member
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.fthe 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)                 exit             end if          else-            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: http://bugs.cgd.ucar.edu/show_bug.cgi?id=2535
 
Top