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/examples/example_utils.sh b/examples/example_utils.sh index c4f8b78a42d95547aeb9dd300f2a041aefaad62f..ef4aa473927b021d394c733eb1fe69853482c150 100644 --- a/examples/example_utils.sh +++ b/examples/example_utils.sh @@ -125,6 +125,10 @@ icon: build_cmd: "icon-nwp@%ICON.VERSION%% %SPACK.COMPILER%+debug~mpichecks target=x86_64_v2 source=dkrz_https" version: ${ICON_VERSION} +dwdicontools: + build_cmd: "dwd-icon-tools% %SPACK.COMPILER%" + load_cmd: build_cmd + data_management: # Where do we put the output files afterwards? local_destination_folder: $OUTPUTDIR/ diff --git a/spack_repo/packages/dwd-icon-tools/package.py b/spack_repo/packages/dwd-icon-tools/package.py index 202f6793ab2f253f3a723c9436bfcbaacc32c05a..effad57d9dbb1a93a38ab6b6396f0e5a743866b4 100644 --- a/spack_repo/packages/dwd-icon-tools/package.py +++ b/spack_repo/packages/dwd-icon-tools/package.py @@ -69,6 +69,7 @@ class DwdIconTools(Package): def install(self, spec, prefix): options = [ f"--prefix={prefix}", + "--with-eccodes=yes", "--enable-grib2", "--enable-iso-c-interface", f"--with-netcdf={spec['netcdf-c'].prefix}" 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\.]*")