Skip to content

Commit

Permalink
Fix for second simulation in spinup
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Oct 31, 2023
1 parent 9f4b2a2 commit ee2490c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions run_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,7 @@ def restart_runs_spinup(work_root, model_cfg, cfg, job_names, force):
setattr(cfg, "lrestart", '.FALSE.')
run_time = cfg.restart_step_hours
startdate_sim_spinup = startdate_sim
elif startdate_sim == cfg.startdate + timedelta(
hours=(cfg.restart_step_hours - cfg.spinup)):
elif startdate_sim == cfg.startdate + timedelta(hours=cfg.restart_step_hours):
setattr(cfg, "first_one", False)
setattr(cfg, "second_one", True)
setattr(cfg, "lrestart", '.TRUE.')
Expand All @@ -557,7 +556,7 @@ def restart_runs_spinup(work_root, model_cfg, cfg, job_names, force):
setattr(cfg, "lrestart", '.TRUE.')
run_time = cfg.restart_step_hours + cfg.spinup
startdate_sim_spinup = startdate_sim - timedelta(hours=cfg.spinup)

# If current enddate is later than global enddate, skip
enddate_sim = startdate_sim + timedelta(hours=cfg.restart_step_hours)
if enddate_sim > cfg.enddate:
Expand Down

0 comments on commit ee2490c

Please sign in to comment.