From 5ac75d8f324c1e0bb08ac8b081269d7fd7d95a4e Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Thu, 8 Jun 2023 14:41:18 +0200
Subject: [PATCH] fix to "archive obs_seq.out also if not generated"

---
 dartwrf/assim_synth_obs.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dartwrf/assim_synth_obs.py b/dartwrf/assim_synth_obs.py
index 0df6404..6c51da0 100755
--- a/dartwrf/assim_synth_obs.py
+++ b/dartwrf/assim_synth_obs.py
@@ -367,6 +367,7 @@ def get_obsseq_out(time):
         print(f_obsseq, 'copied to', cluster.dart_rundir+'/obs_seq.out')
 
         # copy to sim_archive
+        os.makedirs(cluster.archivedir + "/obs_seq_out/", exist_ok=True)
         copy(f_obsseq,  time.strftime(cluster.archivedir+'/obs_seq_out/%Y-%m-%d_%H:%M_obs_seq.out'))
 
         oso = obsseq.ObsSeq(cluster.dart_rundir + "/obs_seq.out")  # read the obs_seq.out file
-- 
GitLab