Skip to content
Snippets Groups Projects
Commit c3e8da2e authored by Oriol Tintó Prims's avatar Oriol Tintó Prims
Browse files

Fix eccodes definitions in build_icon.sh

parent 0148742b
No related branches found
No related tags found
1 merge request!4Switching to the advanced configuration method and fixing spack build.
# 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%
# If the workdir directory does not exist create it
if [ ! -d ${WORKDIR} ]; then
......@@ -9,7 +8,7 @@ if [ ! -d ${WORKDIR} ]; then
fi
# Go to the working directory
cd ${WORKDIR}
cd ${WORKDIR} || exit
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
......@@ -37,12 +36,12 @@ fi
eccodes_version=$(spack find eccodes | grep eccodes@ | cut -d "@" -f 2)
definitions_tar_file=eccodes_definitions.edzw-${eccodes_version}-1.tar.bz2
if [ ! -f ${definitions_tar_file} ]; then
if [ ! -f "${definitions_tar_file}" ]; then
defs_url=https://opendata.dwd.de/weather/lib/grib/${definitions_tar_file}
wget ${defs_url}
wget "${defs_url}"
# Decompress definitions file
tar -xf ${definitions_tar_file}
tar -xf "${definitions_tar_file}"
# Create a file containing the environment variable that needs to be set in order to use DWD's definitions:
echo "export ECCODES_DEFINITION_PATH=${WORKDIR}/definitions.edzw-${eccodes_version}-1" >eccodes_defs.env
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment