Skip to content

Update -r e logic to always create a restart file on the last timestep, independent of simEndTime in the filemanager #517

Open
@wknoben

Description

@wknoben

case(ixRestart_end); printRestart = (newTime(iLookTIME%im) == endTime(iLookTIME%im) .and. &
newTime(iLookTIME%id) == endTime(iLookTIME%id) .and. &
newTime(iLookTIME%ih) == endTime(iLookTIME%ih) .and. &
newTime(iLookTIME%imin) == endTime(iLookTIME%imin)) ! newTime does not have a '24h', won't write ending state if end_h=24

Currently, SUMMA checks if current_timestep == simEndTime (as specified in the filemanager) and writes a restart file if true.

In cases where the forcing timestep is set such that no simulation is run at exactly simEndTime, no restart file is written. Updating the logic to check whether a timestep is the last timestep (somehow), might avoid scenarios where -r e doesn't work as expected. See example below, obtained from a test case with:

  • 3-hourly forcing timesteps
  • simStartTime is 1951-04-12 00:00
  • simEndTime is 1951-04-12 23:00
    Note how no simulation is run at exactly 23:00 (only at 21:00 and 00:00) and the restart flag is thus always False.
in summa_alarms: printRestart =  F
 newtime (m,d,h,min) =            4          11          21           0
 endtime (m,d,h,min) =            4          11          23           0

  in summa_alarms: printRestart =  F
 newtime (m,d,h,min) =            4          12           0           0
 endtime (m,d,h,min) =            4          11          23           0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementusabilitychanges designed to improve the usability of SUMMA (ie ease of running for different applications)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions