Linear runs timestep size change upon restart with check_restart = T

Issue #127 resolved
Jason Parisi created an issue

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)

  1. David Dickinson

    For linear runs we still call add_explicit and this results in us setting the dt_cfl to 1e8 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 by dt0 which defaults to whatever delt is. I guess this default initialisation happens before we load the time step from the restart file and hence if you don’t set delt in the input file we end up with dt0=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.

    1. Ensure dt0 is set consistently with the loaded delt – this may actually be relatively tricky as we don’t know that we want to set dt0 from the restart file until after we’ve read the namelist which contains dt0 . I think we could probably do something like dt0=-999 ; read_namelist ; load_delt_from_restart_file_if_needed ; if (dt0==-999.0) then dt0 = delt ; end if
    2. Make the linear cfl limit be set to delt to indicate that we never expect to change the time step.
    3. Disable time step checks when running linearly.
    4. Require 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.

  2. David Dickinson

    Option 5 : Store dt0 in restart files and ensure that it is restored from here on restart (with delt_option = ‘check_restart’)

  3. Log in to comment