Skip to content

Commit

Permalink
Restore application of config_max_adaptive_timestep
Browse files Browse the repository at this point in the history
It accidentally got dropped in an earlier commit.
  • Loading branch information
matthewhoffman committed May 5, 2022
1 parent 5122a22 commit 258eadc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,13 @@ subroutine set_timestep(allowableAdvecDt, allowableDiffDt, calvingCFLdt, clock,
call mpas_log_write("Timestep limited by calving CFL condition.")
endif
! Take minimum of the max adaptive timestep setting and the allowable dt from the CFL condition
proposedDt = min(allowableDt, config_max_adaptive_timestep)
! Round down the proposed dt to avoid complications with fractional seconds
! (some timekeeping-related functionality, like restarts, don't support them)
! (need to perform floor with an 8-bit integer to allow up 293 billion years in seconds)
proposedDt = real(floor(allowableDt, KIND=8), RKIND)
proposedDt = real(floor(proposedDt, KIND=8), RKIND)

! Check if the proposed timestep is smaller than specified limit.
! Do this prior to limiting the timestep for the force interval
Expand Down

0 comments on commit 258eadc

Please sign in to comment.