From ab1138c7ff8a510eec87f878f67fef68e872899e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oriol=20Tint=C3=B3=20Prims?= <oriol.tinto@lmu.de>
Date: Mon, 27 Mar 2023 16:09:52 +0200
Subject: [PATCH] Add --first to all load icon.

---
 templates/common/run_icon.sh                      | 2 +-
 templates/real-from-dwd-ana/prepare_experiment.sh | 2 +-
 templates/real-from-ideal/prepare_experiment.sh   | 2 +-
 templates/real-from-ideal/run_ideal.sh            | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/templates/common/run_icon.sh b/templates/common/run_icon.sh
index a1ceaf1..f45e9eb 100644
--- a/templates/common/run_icon.sh
+++ b/templates/common/run_icon.sh
@@ -16,7 +16,7 @@ cd ${RUNDIR}
 load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%"
 
 # Load icon module
-spack load icon-nwp@%ICON_VERSION%
+spack load --first icon-nwp@%ICON_VERSION%
 
 # Set environment variable for eccodes-dwd definitions:
 source ${WORKDIR}/eccodes_defs.env
diff --git a/templates/real-from-dwd-ana/prepare_experiment.sh b/templates/real-from-dwd-ana/prepare_experiment.sh
index 677cc05..ddbd2db 100644
--- a/templates/real-from-dwd-ana/prepare_experiment.sh
+++ b/templates/real-from-dwd-ana/prepare_experiment.sh
@@ -12,7 +12,7 @@ EXTERNAL_PARAMETERS_FILE=%simulation.external_parameters_filename%
 load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%"
 
 # Load icon module needed to retrieve some data
-spack load icon-nwp@%ICON_VERSION%
+spack load --first icon-nwp@%ICON_VERSION%
 
 # Create a folder for the common inidata and go there
 COMMON_INIDATA_FOLDER=${WORKDIR}/inidata
diff --git a/templates/real-from-ideal/prepare_experiment.sh b/templates/real-from-ideal/prepare_experiment.sh
index d7f3791..7d1cbf2 100644
--- a/templates/real-from-ideal/prepare_experiment.sh
+++ b/templates/real-from-ideal/prepare_experiment.sh
@@ -10,7 +10,7 @@ RADIATION_GRID_FILE=%simulation.radiation_grid_filename%
 load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%"
 
 # Load icon module needed to retrieve some data
-spack load icon-nwp@%ICON_VERSION%
+spack load --first icon-nwp@%ICON_VERSION%
 
 # Create a folder for the common inidata and go there
 COMMON_INIDATA_FOLDER=${WORKDIR}/inidata
diff --git a/templates/real-from-ideal/run_ideal.sh b/templates/real-from-ideal/run_ideal.sh
index b808cae..00eaa28 100644
--- a/templates/real-from-ideal/run_ideal.sh
+++ b/templates/real-from-ideal/run_ideal.sh
@@ -15,7 +15,7 @@ cd ${RUNDIR}
 load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%"
 
 # Load icon module
-spack load icon-nwp@%ICON_VERSION%
+spack load --first icon-nwp@%ICON_VERSION%
 
 # Set environment variable for eccodes-dwd definitions:
 source ${WORKDIR}/eccodes_defs.env
-- 
GitLab