Skip to content

Commit 9aa0b44

Browse files
authored
Merge pull request #81 from billsacks/shr_reprosum_e3sm_changes
Bring in shr_reprosum fixes from E3SM ## Summary This PR brings in three related sets of fixes/cleanups to shr_reprosum_mod from @worleyph , which were made to E3SM about 3 years ago: - E3SM-Project/E3SM#5534 - E3SM-Project/E3SM#5549 - E3SM-Project/E3SM#5560 Resolves #79 This **changes answers for CAM-FV cases**, and may change answers for other cases, but I haven't observed other answer changes from my so-far-limited testing. ## How I brought in these changes I brought in the changes by cherry-picking the commits that were made in E3SM. I organized these into three batches so that I could make a merge commit corresponding to each of the E3SM PRs, where the merge commit message summarizes the changes in the corresponding batch. I then compared the final shr_reprosum_mod.F90 with the version in E3SM. These are now identical except for the following: (1) CESM has numerous `#ifdef TIMING`, whereas E3SM has `#ifndef EAMXX_STANDALONE`. There are also some whitespace differences between the CESM and E3SM versions around these ifdefs. (2) CESM has `#include <mpif.h>`, E3SM has `use mpi` (3) E3SM has: ```Fortran #ifdef EAMXX_STANDALONE ! Declare the C function interface interface subroutine shr_reprosumx86_fix_start(arg) bind(c) use iso_c_binding integer, intent(out) :: arg end subroutine shr_reprosumx86_fix_start end interface interface subroutine shr_reprosumx86_fix_end(arg) bind(c) use iso_c_binding integer, intent(in) :: arg end subroutine shr_reprosumx86_fix_end end interface #endif ``` (4) E3SM has: ```Fortran ! With Fujitsu always abort on NaNs or INFs in input #ifdef CPRFJ abort_inf_nan = .true. #endif ``` (5) E3SM has an `#ifndef CPRFJ` around a small block of code ## Testing done These changes have been tested extensively in E3SM. From some limited testing in CESM, I am finding that the changes here **seem to change answers for CAM-FV cases, but not for CAM-SE**. Specifically, here is the testing I ran, showing which baselines passed vs. failed. The pattern I see is that FV tests have baseline differences whereas SE tests do not. ``` PASS ERS_D_Ld3.ne30pg3_t232.B1850C_LTso.derecho_intel.allactive-defaultio BASELINE cesm3_0_alpha08a: PASS SMS_Ld1.ne30_ne30_mg17.FC2010climo.derecho_intel.cam-outfrq1d BASELINE cesm3_0_alpha08a: PASS SMS_Ln9.ne30_ne30_mg17.FW2000climo.derecho_intel.cam-outfrq9s BASELINE cesm3_0_alpha08a: FAIL ERP_Ld3.f09_f09_mg17.FCfireHIST.derecho_intel.cam-outfrq1d BASELINE cesm3_0_alpha08a: DIFF FAIL ERP_Ln9.f09_f09_mg17.F2000climo.derecho_intel.cam-outfrq9s BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_D_Ln9.f09_f09_mg17.FCHIST.derecho_intel.cam-outfrq9s_ocnemis BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_D_Ln9.f09_f09_mg17.FCts2SD.derecho_intel.cam-outfrq9s BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_D_Ln9.f09_f09_mg17.FWma2000climo.derecho_intel.cam-outfrq9s BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_D_Ln9.f19_f19_mg17.FWsc2010climo.derecho_intel.cam-outfrq9s BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_D_Ln9_P144x3.f19_f19_mg17.FC2000climo.derecho_intel.cam-outfrq9s_camchem_mam4 BASELINE cesm3_0_alpha08a: DIFF FAIL SMS_Ld1.f09_f09_mg17.FW2010climo.derecho_intel.cam-outfrq1d BASELINE cesm3_0_alpha08a: DIFF ``` All of those tests themselves passed.
2 parents 2356728 + ee957a8 commit 9aa0b44

1 file changed

Lines changed: 902 additions & 397 deletions

File tree

0 commit comments

Comments
 (0)