From c5e58e2cacea7a3a38c7e5e1587ea05e8467cff3 Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Tue, 23 Nov 2021 21:23:25 +0100
Subject: [PATCH] dynamic run wrf path

---
 scheduler.py           | 3 ++-
 scripts/run_ens.vsc.sh | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scheduler.py b/scheduler.py
index 40f7678..d02b2d6 100755
--- a/scheduler.py
+++ b/scheduler.py
@@ -159,7 +159,8 @@ def run_ENS(begin, end, depends_on=None, first_minute=True,
     runtime_wallclock_mins_expected = int(8+time_in_simulation_hours*9.5)  # usually below 9 min/hour
     s = my_Slurm("runWRF2", cfg_update={"nodes": "1", "array": "1-"+str(exp.n_nodes),
                 "time": str(runtime_wallclock_mins_expected), "mem-per-cpu": "2G"})
-    cmd = script_to_str(cluster.run_WRF).replace('<expname>', exp.expname)
+    cmd = script_to_str(cluster.run_WRF).replace('<exp.expname>', exp.expname
+                                       ).replace('cluster.wrf_rundir_base', cluster.wrf_rundir_base)
     id = s.run(cmd, depends_on=[id])
     return id
 
diff --git a/scripts/run_ens.vsc.sh b/scripts/run_ens.vsc.sh
index f93de82..ab74cd4 100755
--- a/scripts/run_ens.vsc.sh
+++ b/scripts/run_ens.vsc.sh
@@ -5,9 +5,9 @@ export SLURM_STEP_GRES=none
 
 ##  $SLURM_ARRAY_TASK_ID
 echo "SLURM_ARRAY_TASK_ID:"$SLURM_ARRAY_TASK_ID
-EXPNAME=<expname>
+EXPNAME=<exp.expname>
 
-MAINDIR=/gpfs/data/fs71386/lkugler/run_WRF
+MAINDIR=<cluster.wrf_rundir_base>
 pinning=(0-11 12-23 24-35 36-47)
 
 for ((n=1; n<=4; n++))
-- 
GitLab