-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'worleyph/cime/repro_in_cpldiag' (PR #2407)
a) Use shr_reprosum_calc in seq_diag_avect_mct When BFBFLAG is set to true and when INFO_DBUG > 1, the routine seq_diag_avect_mct uses a reproducible sum algorithm that is not as accurate as the algorithm implemented in shr_reprosum_calc. In particular, when summing a vector of INFs, the current algorithm returns zero. Here we replace the existing algorithm with a call to shr_reprosum_calc. This change is BFB for standard usage (INFO_DBUG == 1). It is not BFB with respect to the associated diagnostic, written to cpl.log, when INFO_DBUG > 1. However, these diagnostics are not used in the simulation, and simulation results will BFB. b) Add option to allow INF or NaN summands in shr_reprosum_calc shr_reprosum_calc aborts if input summands include INF or NaN values. For debugging purposes, it can be useful to allow INF or NaN values, returning the IEEE standard results for such a situation (either NaN, positive INF, or negative INF, depending on the situation). An optional logical parameter, allow_infnan, is being added to the shr_reprosum_calc. When set to .true. the routine determines whether summands for an existing field contain NaN or INF values and returns the appropriate value without going through the reproducible sum algorithm (which is very slow and requires signficant memory when summing these special values). Other fields in a multiple field call to shr_reprosum_calc will be computed in the usual fashion. When allow_infnan == .false. or when the parameter is omitted, then the routine aborts with an informative error message when the input contain INF or NaN values, as is done currently. The default can be changed (from allow_infnan=.false. to allow_infnan=.true.) via a new optional parameter, repro_sum_allow_infnan_in, in shr_reprosum_setopts. A new drv_in namelist parameter, reprosum_allow_infnan, has also been added that will be passed to shr_reprosum_setopts to set the default. This can be set in user_nl_cpl. Since the default is not being changed, this change is BFB. If allow_infnan is set to .true., then runs that failed because of INFs or NaNs would now continue to run (longer), but jobs that did not fail with the original default will be BFB even with the default changed. [BFB] * worleyph/cime/repro_in_cpldiag: Minor cleanup Add option to allow INF or NaN summands in shr_reprosum_calc use shr_reprosum_calc in seq_diag_avect_mct
- Loading branch information
Showing
5 changed files
with
236 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.