PreStepHook is a template routine invoked by the time integrators once immediately before each time step is taken (before any Runge-Kutta stages of that step). The default implementation is a no-op.
This differs from PreTendencyHook, which runs at the start of every tendency evaluation (i.e. once per RK stage). PreStepHook fires exactly once per step, symmetric with PostStepHook. Override through type-extension for lightweight per-step setup that must stay inside the native time-stepping loop.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
subroutine PreStepHook_Model(this)
!! PreStepHook is a template routine invoked by the time integrators once
!! immediately before each time step is taken (before any Runge-Kutta
!! stages of that step). The default implementation is a no-op.
!!
!! This differs from PreTendencyHook, which runs at the start of every
!! tendency evaluation (i.e. once per RK stage). PreStepHook fires exactly
!! once per step, symmetric with PostStepHook. Override through
!! type-extension for lightweight per-step setup that must stay inside the
!! native time-stepping loop.
implicit none
class(Model),intent(inout) :: this
if(.false.) this%nvar = this%nvar ! suppress unused-dummy-argument warning
endsubroutine PreStepHook_Model