From bbf7f98776350d5985784d5052ace2482786d960 Mon Sep 17 00:00:00 2001
From: "Takumi.Matsunobu" <Takumi.Matsunobu@physik.uni-muenchen.de>
Date: Mon, 21 Aug 2023 22:31:32 +0200
Subject: [PATCH] copy namelists

---
 conf/real-from-d2-ana/simulation.yml | 2 +-
 templates/common/run_icon.sh         | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/conf/real-from-d2-ana/simulation.yml b/conf/real-from-d2-ana/simulation.yml
index 04f9537..a51252f 100644
--- a/conf/real-from-d2-ana/simulation.yml
+++ b/conf/real-from-d2-ana/simulation.yml
@@ -17,7 +17,7 @@ simulation:
     lbc_map: "%HPCROOTDIR%/proj/namelists/real-from-d2-ana/map_file.latbc"
 
   # List of output file names that will be copied (Wildcards * allowed)
-  output_file_names: "idfrf*.nc"
+  output_file_names: "idfrf*.nc *namelist"
   files_to_clean: "*.nc"
 
   initial_conditions:
diff --git a/templates/common/run_icon.sh b/templates/common/run_icon.sh
index 44741da..e1335a2 100644
--- a/templates/common/run_icon.sh
+++ b/templates/common/run_icon.sh
@@ -37,3 +37,7 @@ ICON_LAUNCH_CMD="%ICON.LAUNCH_CMD%"
 
 # Run icon
 ${ICON_LAUNCH_CMD} icon
+
+# copy namelists to output directory
+OUTPUT_DIR=${WORKDIR}/output/${STARTDATE}/${MEMBER}
+cp *.namelist ${OUTPUT_DIR}
\ No newline at end of file
-- 
GitLab