diff --git a/conf/common/build.yml b/conf/common/build.yml index e87dffb809aa80a71dc92020d989dde02ad4c232..baa307ef9732bdbde1a063f797887183b4fba19d 100644 --- a/conf/common/build.yml +++ b/conf/common/build.yml @@ -31,6 +31,11 @@ icon: load_cmd: build_cmd version: master # The latest release at the moment of creating this file was 2.6.5-nwp0 +dwdicontools: + build_cmd: "dwd-icon-tools% %SPACK.COMPILER%" + load_cmd: build_cmd + + python_environment: # Name of the virtual environment in the remote platform experiment folder folder_name: python_environment diff --git a/templates/common/build_icon.sh b/templates/common/build_icon.sh index 8a5f415616d7ce01ed6afc347bd216704f11aac4..c73a72bace1417e7692eb3ba2a854e032ef5ccd0 100644 --- a/templates/common/build_icon.sh +++ b/templates/common/build_icon.sh @@ -49,7 +49,13 @@ else fi # Build dwd-icon-tools -spack install dwd-icon-tools % "%spack.compiler%" +SPACK_BUILD_DWDICONTOOLS="%DWDICONTOOLS.BUILD_CMD%" +SPACK_LOAD_DWDICONTOOLS="%DWDICONTOOLS.LOAD_CMD%" +if [ "${SPACK_LOAD_DWDICONTOOLS}" == "build_cmd" ]; then SPACK_LOAD_DWDICONTOOLS=${SPACK_BUILD_DWDICONTOOLS}; fi +if [ ! -z "$SPACK_BUILD_DWDICONTOOLS" ]; then + spack install --reuse $SPACK_BUILD_DWDICONTOOLS + spack load --first ${SPACK_LOAD_DWDICONTOOLS} +fi # Need to get ECCODES DWD definitions: eccodes_version=$(spack spec $SPACK_BUILD_ICON | grep eccodes | grep -o "@.*%" | grep -o "[0-9\.]*")