Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wknoben opened this issue Nov 16, 2022 · 0 comments
Labels
enhancement usability changes designed to improve the usability of SUMMA (ie ease of running for different applications)

Comments

@wknoben
Copy link
Collaborator

wknoben commented Nov 16, 2022

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
@wknoben wknoben added enhancement usability changes designed to improve the usability of SUMMA (ie ease of running for different applications) labels Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement usability changes designed to improve the usability of SUMMA (ie ease of running for different applications)
Projects
None yet
Development

No branches or pull requests

1 participant