From 66b10a958142f34eea557c175be5fc8eba675d01 Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Tue, 16 May 2023 14:51:15 +0200
Subject: [PATCH] run from scriptsdir

---
 dartwrf/workflows.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dartwrf/workflows.py b/dartwrf/workflows.py
index 630334d..036bd46 100644
--- a/dartwrf/workflows.py
+++ b/dartwrf/workflows.py
@@ -133,7 +133,7 @@ class WorkFlows(object):
         Returns:
             None
         """
-        cmd = self.cluster.python+' '+self.cluster.scripts_rundir+'/prepare_wrfrundir.py '+init_time.strftime('%Y-%m-%d_%H:%M')
+        cmd = 'cd '+self.cluster.scripts_rundir+'; '+self.cluster.python+' prepare_wrfrundir.py '+init_time.strftime('%Y-%m-%d_%H:%M')
         print(cmd)
         os.system(cmd)
 
@@ -251,7 +251,7 @@ class WorkFlows(object):
         if not os.path.exists(prior_path_exp):
             raise IOError('prior_path_exp does not exist: '+prior_path_exp)
 
-        cmd = (self.cluster.python+' '+self.cluster.scripts_rundir+'/assim_synth_obs.py '
+        cmd = ('cd '+self.cluster.scripts_rundir+'; '+self.cluster.python+' assim_synth_obs.py '
                 +assim_time.strftime('%Y-%m-%d_%H:%M ')
                 +prior_init_time.strftime('%Y-%m-%d_%H:%M ')
                 +prior_valid_time.strftime('%Y-%m-%d_%H:%M ')
-- 
GitLab