Fix alarm error for MALI adaptive timestepper #6725
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.
MALI uses an MPAS alarm to handle ensuring its adaptive timestepper does not step past a coupling interval. In recent attempts to enable the adaptive timestepper in MALI within E3SM, it was discovered that the required alarm is not being reset properly during init in the glc driver, which results in an error because MALI tries to use a 0 second dt on the first timestep. This PR resets the alarm in glc_init_mct after the component clock is finished being set up, which solves the problem.
This PR also enables the adaptive timestepper for the
mali-gis20km
testmod to ensure this functionality gets tested. Because the coupling interval in this test (1 day) is much smaller than the CFL-limiting timestep, the dt being applied remain unchanged, so there are no answer changes. But the adaptive timestepper functionality in MALI is active and being run.