subroutine LowStorageRK3_timeIntegrator(this,tn)
implicit none
class(Model),intent(inout) :: this
real(prec),intent(in) :: tn
! Local
integer :: m
real(prec) :: tRemain
real(prec) :: dtLim
real(prec) :: t0
dtLim = this%dt ! Get the max time step size from the dt attribute
do while(this%t < tn)
t0 = this%t
tRemain = tn-this%t
this%dt = min(dtLim,tRemain)
do m = 1,3
call this%CalculateTendency()
call this%UpdateGRK3(m)
this%t = t0+rk3_b(m)*this%dt
enddo
this%t = t0+this%dt
enddo
this%dt = dtLim
endsubroutine LowStorageRK3_timeIntegrator