From ee2490cc33bab3eeacc5d623132ff847c0061360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 31 Oct 2023 13:21:33 +0100 Subject: [PATCH] Fix for second simulation in spinup --- run_chain.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run_chain.py b/run_chain.py index 1aaee737..2b48cd11 100755 --- a/run_chain.py +++ b/run_chain.py @@ -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.') @@ -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: