Linear runs timestep size change upon restart with check_restart = T
Issue #127
resolved
We encountered that when ‘delt' was unspecified and ‘check_restart’ was true, a linear restart would attempt to change the timestep size. This did not happen if 'check_restart’ is unspecified. Presumably, the timestep size modification is an attempt to satisfy the CFL condition, which is only valid for the nonlinear case.
Comments (4)
-
-
Option 5 : Store
dt0
in restart files and ensure that it is restored from here on restart (withdelt_option = ‘check_restart’
) -
PR #353 implements option 5.
-
- changed status to resolved
Fixed in 8.1
- Log in to comment
For linear runs we still call
add_explicit
and this results in us setting thedt_cfl
to1e8
and as such when we check the cfl condition during the time advance the code thinks it can increase the time step. It will keep on doing so until it reaches the cfl limit (set at 1e8) or the maximum allowed time step set bydt0
which defaults to whateverdelt
is. I guess this default initialisation happens before we load the time step from the restart file and hence if you don’t setdelt
in the input file we end up withdt0=0.1
so the restarted linear job then immediately tries to increase the time step up to this maximum.
There are several possible “fixes” I can think of here.
dt0
is set consistently with the loadeddelt
– this may actually be relatively tricky as we don’t know that we want to setdt0
from the restart file until after we’ve read the namelist which containsdt0
. I think we could probably do something likedt0=-999 ; read_namelist ; load_delt_from_restart_file_if_needed ; if (dt0==-999.0) then dt0 = delt ; end if
delt
to indicate that we never expect to change the time step.delt/dt0
to be explicitly set in these sorts of cases.Option 1 probably sounds the most reasonable. Unfortunately this could have an issue for nonlinear runs as this would end up setting the maximum permitted time step to whatever the time step value is at the start of a restarted run (unless the user explicitly sets
dt0
) which would not be great.Option 3 and 4 are not great as they require some assumptions about the rest of the code or how the user is using it.
Option 2 may be reasonable and I can’t currently think of any restrictions this would impose.