Fix floating point exception in phys/module_mp_radar.F when debugging with -D #2249
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Prevent floating point exception in phys/module_mp_radar.F when debugging with -D related to new variables in UDM scheme.
TYPE: bug fix
KEYWORDS: debug, radar, microphysics, UDM, -D
SOURCE: Jack Bartlett (Imperial College London)
DESCRIPTION OF CHANGES:
Problem:
Lines 225 and 226 in phys/module_mp_radar.F trigger a floating point exception when debugging with option -D and using any microphysics scheme which calls
radar_initexcept the UDM scheme becausexam_handxbm_hare not initialised in any other microphysics scheme.Solution:
Initialise
xam_handxbm_hat 0 and check if they have been given a value greater than 0 before finding their reciprocals.ISSUE: For use when this PR closes an issue.
Fixes #2248
LIST OF MODIFIED FILES: list of changed files (use
git diff --name-status masterto get formatted list)phys/module_mp_radar.F
TESTS CONDUCTED:
Only tested by trying
mp_physics=8with debugging option -D and the new fixes (which previously triggered a fpe).