From ec9a42ef5dccb6d260dfb4b82b23922cc80ec2b2 Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@univie.ac.at>
Date: Fri, 24 May 2024 14:06:01 +0200
Subject: [PATCH] bugfix for cases with existing obs_seq.out and no nature file

---
 dartwrf/assimilate.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dartwrf/assimilate.py b/dartwrf/assimilate.py
index c5cea49..f8e9eca 100755
--- a/dartwrf/assimilate.py
+++ b/dartwrf/assimilate.py
@@ -19,10 +19,11 @@ pattern_init_time = "/%Y-%m-%d_%H:%M/"  # pattern for the init_time folder in si
 pattern_obs_seq_out = cluster.archivedir + "/diagnostics/%Y-%m-%d_%H:%M_obs_seq.out"  # how an obs_seq.out file is archived
 pattern_obs_seq_final = cluster.archivedir + "/diagnostics/%Y-%m-%d_%H:%M_obs_seq.final"  # how an obs_seq.final file is archived
 
-def _prepare_DART_grid_template():
+def ():
     # DART needs a wrfinput file as a template for the grid
     # No data will be read from this file, but the grid information must match exactly.
-    symlink(cluster.dart_rundir + "/wrfout_d01", 
+    # ./perfect_model_obs might fail in case there is no ensemble data in the folder prior_ens1
+    symlink(cluster.dart_rundir + "/prior_ens1/wrfout_d01", 
             cluster.dart_rundir + "/wrfinput_d01")
 
 def _find_nature(time):
-- 
GitLab