increase_time_step Subroutine

private subroutine increase_time_step(this)

Increases the time step by a factor of 2, unless doing so would take it above the maximum.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this

Contents

Source Code


Source Code

  subroutine increase_time_step(this)
    !* Author: Christopher MacMackin
    !  Date: April 2017
    !
    ! Increases the time step by a factor of 2, unless doing so would
    ! take it above the maximum.
    !
    class(cryosphere), intent(inout) :: this
    this%dt_factor = min(1.2_r8 * this%dt_factor, 1._r8)
#ifdef DEBUG
    call logger%debug('cryosphere%increase_time_step','Reducing time '// &
                      'step by factor of '//trim(str(this%dt_factor)))
#endif
  end subroutine increase_time_step