From 83b09a38ab6551828a57a41b54211e3dc6acdb10 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 09:44:56 +0200 Subject: [PATCH] Getting the proper eccodes version in build_icon.sh --- templates/common/build_icon.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/common/build_icon.sh b/templates/common/build_icon.sh index 8ad3ebe..0761921 100644 --- a/templates/common/build_icon.sh +++ b/templates/common/build_icon.sh @@ -1,6 +1,8 @@ # Get some variables provided by autosubmit. # TODO: What do we do to ensure that these variables are defined in the proj file? WORKDIR=%HPCROOTDIR% +ICON_VERSION=%ICON.VERSION% +COMPILER=%SPACK.COMPILER% # If the workdir directory does not exist create it if [ ! -d ${WORKDIR} ]; then @@ -33,7 +35,7 @@ else fi # Need to get ECCODES DWD definitions: -eccodes_version=$(spack find eccodes | grep eccodes@ | cut -d "@" -f 2) +eccodes_version=$(spack spec icon-nwp@${ICON_VERSION}%${COMPILER} | grep eccodes | grep -o "@.*%" | grep -o "[0-9\.]*") definitions_tar_file=eccodes_definitions.edzw-${eccodes_version}-1.tar.bz2 if [ ! -f "${definitions_tar_file}" ]; then -- GitLab