From 0ca6c01af40af0212f18886bf60905c24f5969bc Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Wed, 29 Dec 2021 16:25:22 +0100
Subject: [PATCH] write prior to txt

---
 dartwrf/prep_IC_prior.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dartwrf/prep_IC_prior.py b/dartwrf/prep_IC_prior.py
index a4d2a73..c6775c6 100755
--- a/dartwrf/prep_IC_prior.py
+++ b/dartwrf/prep_IC_prior.py
@@ -20,6 +20,11 @@ Ad 2: copies wrfrst to run_WRF directory
 def create_wrfrst_in_WRF_rundir(time, prior_init_time, prior_path_exp):
     """copies wrfrst to run_WRF directory (for next WRF run)
     """
+    # for documentation: Which prior was used? -> write into txt file
+    os.system('echo "'+prior_path_exp+'\n'+prior_init_time.strftime('/%Y-%m-%d_%H:%M/')
+                +'\n'+time.strftime('/wrfrst_d01_%Y-%m-%d_%H:%M:%S')+'" > '
+                +cluster.archivedir + time.strftime('/%Y-%m-%d_%H:%M/')+'link_to_prior.txt')
+
     for iens in range(1, exp.n_ens+1):
         clean_wrfdir(cluster.wrf_rundir(iens))
     
-- 
GitLab