From b17a7c304a5132ebb1e15b5c7345b90d9e3b17db Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Mon, 29 Mar 2021 20:48:56 +0200
Subject: [PATCH] add geodata to all DART inputs

---
 scripts/pre_assim.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/pre_assim.py b/scripts/pre_assim.py
index 24cfa20..707ff64 100755
--- a/scripts/pre_assim.py
+++ b/scripts/pre_assim.py
@@ -2,6 +2,7 @@ import os, sys, shutil
 import datetime as dt
 from config.cfg import exp, cluster
 from utils import symlink, copy_scp_srvx8, copy, sed_inplace
+import wrfout_add_geo
 
 def run(assim_time, background_init_time, exppath_firstguess):
     #if cluster.name != 'srvx8':
@@ -22,6 +23,9 @@ def run(assim_time, background_init_time, exppath_firstguess):
         symlink(wrfout_run, wrfout_dart)
         symlink(wrfout_dart, dart_ensdir+'/wrfinput_d01')
 
+        # this seems to be necessary (else wrong level selection)
+        wrfout_add_geo.run(cluster.dartrundir+'/geo_em.d01.nc', wrfout_dart) 
+
     fpath = cluster.dartrundir+'/input_list.txt'
     print('writing', fpath)
     os.remove(fpath)
@@ -53,4 +57,4 @@ if __name__ == '__main__':
     background_init_time = dt.datetime.strptime(sys.argv[2], '%Y-%m-%d_%H:%M')
     exppath_firstguess = str(sys.argv[3])
 
-    run(assim_time, background_init_time, exppath_firstguess)
\ No newline at end of file
+    run(assim_time, background_init_time, exppath_firstguess)
-- 
GitLab