From 8d6ac902eaf681bc5f757e86f7dd565935265495 Mon Sep 17 00:00:00 2001 From: MB <michael.blaschek@univie.ac.at> Date: Fri, 16 Dec 2022 10:59:21 +0100 Subject: [PATCH] wrf bug fix --- models/WRF/Makefile | 2 +- models/WRF/Singularity.dev | 36 ++++++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/models/WRF/Makefile b/models/WRF/Makefile index 410277d..bafb67b 100644 --- a/models/WRF/Makefile +++ b/models/WRF/Makefile @@ -16,7 +16,7 @@ wrf.dev: @if [ ! -f ./wrf.dev.sif ]; then\ echo Building the WRF dev;\ make -C ../.. alma8.base;\ - ln -s ../../containers/alma8.base .;\ + ln -s ../../containers/alma8.base.sif .;\ sudo singularity build wrf.dev.sif Singularity.dev;\ fi @[ -f ./wrf.dev.sif ] && echo Exists: WRF dev || true diff --git a/models/WRF/Singularity.dev b/models/WRF/Singularity.dev index a5b273f..fe2ef87 100644 --- a/models/WRF/Singularity.dev +++ b/models/WRF/Singularity.dev @@ -5,21 +5,32 @@ From: alma8.base.sif maintainer IT-IMGW <it.img-wien@univie.ac.at> baseimage AlmaLinux8 + %apprun downloadwrf - WRF_VERSION=4.4.1 - if [ $# -ne 0 ]; then - WRF_VERSION=1 - fi - echo "[WRF.dev] Downloading WRF $WRF_VERSION from github:" - curl -SL https://github.com/wrf-model/WRF/releases/download/v${WRF_VERSION}/v${WRF_VERSION}.tar.gz +WRF_VERSION=4.4.1 +if [ $# -ne 0 ]; then + WRF_VERSION=1 +fi +echo "[WRF.dev] Downloading WRF $WRF_VERSION from github:" +curl -SL -o WRF-${WRF_VERSION}.tar.gz https://github.com/wrf-model/WRF/releases/download/v${WRF_VERSION}/v${WRF_VERSION}.tar.gz + +%apphelp downloadwrf +This will download the WRF source code from GitHub. Use the Version as a commandline argument. +curl -SL -o WRF-{WRF_VERSION}.tar.gz https://github.com/wrf-model/WRF/releases/download/v{WRF_VERSION}/v{WRF_VERSION}.tar.gz + %apprun downloadwps - WPS_VERSION=4.4 - if [ $# -ne 0 ]; then - WPS_VERSION=1 - fi - echo "[WRF.dev] Downloading WPS $WPS_VERSION from github:" - curl -SL https://github.com/wrf-model/WPS/archive/refs/tags/v${WPS_VERSION}.tar.gz +WPS_VERSION=4.4 +if [ $# -ne 0 ]; then + WPS_VERSION=1 +fi +echo "[WRF.dev] Downloading WPS $WPS_VERSION from github:" +curl -SL -o WPS-${WPS_VERSION}.tar.gz https://github.com/wrf-model/WPS/archive/refs/tags/v${WPS_VERSION}.tar.gz + +%apphelp downloadwps +This will download the WPS source code from GitHub. Use the Version as a commandline argument. +curl -SL -o WPS-{WPS_VERSION}.tar.gz https://github.com/wrf-model/WPS/archive/refs/tags/v{WPS_VERSION}.tar.gz + %post # Every line will be a layer in the container @@ -73,6 +84,7 @@ CNAME=wrf.dev echo "export PS1=\"[IMGW-$CNAME]\w\$ \"" >> /.singularity.d/env/99-zz-custom-env.sh # not sure why that does not happen as default echo "export PKG_CONFIG_PATH=/usr/lib64/openmpi/lib/pkgconfig/" >> $SINGULARITY_ENVIRONMENT +# add App informaiton to runscript %environment export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:/usr/lib64:/lib64:/lib -- GitLab