Skip to content

Commit

Permalink
Merge pull request #65 from C2SM/icon-2024.01
Browse files Browse the repository at this point in the history
Update for icon version 2024.01
  • Loading branch information
mjaehn authored Apr 18, 2024
2 parents 2fd5f0a + b2edb98 commit f4774f3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 21 deletions.
2 changes: 0 additions & 2 deletions cases/icon-art-global-test/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ cat > NAMELIST_{cfg.casename} << EOF
igradp_method = 3 ! discretization of horizontal pressure gradient
itime_scheme = 4 ! time integration scheme
ivctype = 2 ! type of vertical coordinate
l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition
l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion
rayleigh_coeff = 5.0 ! Rayleigh damping coefficient
thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion)
Expand All @@ -272,7 +271,6 @@ cat > NAMELIST_{cfg.casename} << EOF
! dynamics_nml: dynamical core -----------------------------------------------
&dynamics_nml
divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging
idiv_method = 1 ! method for divergence computation
iequations = 3 ! type of equations and prognostic variables
lcoriolis = .TRUE. ! Coriolis force
/
Expand Down
2 changes: 0 additions & 2 deletions cases/icon-art-oem-test/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ cat > NAMELIST_{cfg.casename} << EOF
! dynamics_nml: dynamical core -----------------------------------------------
&dynamics_nml
iequations = 3 ! type of equations and prognostic variables
idiv_method = 1 ! method for divergence computation
divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging
lcoriolis = .TRUE. ! Coriolis force
/
Expand Down Expand Up @@ -240,7 +239,6 @@ cat > NAMELIST_{cfg.casename} << EOF
divdamp_order = 24 ! order of divergence damping
divdamp_type = 3 ! type of divergence damping
divdamp_fac = 0.004 ! scaling factor for divergence damping
l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition
igradp_method = 3 ! discretization of horizontal pressure gradient
l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion
thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion)
Expand Down
2 changes: 0 additions & 2 deletions cases/icon-test-euler/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ cat > NAMELIST_{cfg.casename} << EOF
! dynamics_nml: dynamical core -----------------------------------------------
&dynamics_nml
iequations = 3 ! type of equations and prognostic variables
idiv_method = 1 ! method for divergence computation
divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging
lcoriolis = .TRUE. ! Coriolis force
/
Expand Down Expand Up @@ -213,7 +212,6 @@ cat > NAMELIST_{cfg.casename} << EOF
divdamp_order = 24 ! order of divergence damping
divdamp_type = 3 ! type of divergence damping
divdamp_fac = 0.004 ! scaling factor for divergence damping
l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition
igradp_method = 3 ! discretization of horizontal pressure gradient
l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion
thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion)
Expand Down
2 changes: 0 additions & 2 deletions cases/icon-test/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ cat > NAMELIST_{cfg.casename} << EOF
! dynamics_nml: dynamical core -----------------------------------------------
&dynamics_nml
iequations = 3 ! type of equations and prognostic variables
idiv_method = 1 ! method for divergence computation
divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging
lcoriolis = .TRUE. ! Coriolis force
/
Expand Down Expand Up @@ -218,7 +217,6 @@ cat > NAMELIST_{cfg.casename} << EOF
divdamp_order = 24 ! order of divergence damping
divdamp_type = 3 ! type of divergence damping
divdamp_fac = 0.004 ! scaling factor for divergence damping
l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition
igradp_method = 3 ! discretization of horizontal pressure gradient
l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion
thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion)
Expand Down
13 changes: 10 additions & 3 deletions jenkins/scripts/build_icon-art.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ pushd ${MODEL}

if [[ $(hostname) == eu-* ]]; then
./jenkins/scripts/jenkins_euler.sh -b -fc gcc --configure euler.cpu.gcc.O2
else
SPACK_TAG=`cat config/cscs/SPACK_TAG`
elif [[ $(hostname) == daint* ]]; then
SPACK_TAG=`cat config/cscs/SPACK_TAG_DAINT`
. ../spack-c2sm/setup-env.sh
spack env activate -d config/cscs/spack/${SPACK_TAG}/daint_cpu_nvhpc
spack install -u build
elif [[ $(hostname) == balfrin* ]]; then
SPACK_TAG=`cat config/cscs/SPACK_TAG_BALFRIN`
. ../spack-c2sm/setup-env.sh
spack env activate -d config/cscs/spack/${SPACK_TAG}/daint_cpu_nvhpc_art
spack env activate -d config/cscs/spack/${SPACK_TAG}/daint_cpu_nvhpc
spack install -u build
else
error "Unknown hostname: $(hostname)"
fi

popd
Expand Down
11 changes: 9 additions & 2 deletions jenkins/scripts/build_icon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ pushd ${MODEL}

if [[ $(hostname) == eu-* ]]; then
./jenkins/scripts/jenkins_euler.sh -b -fc gcc --configure euler.cpu.gcc.O2
else
SPACK_TAG=`cat config/cscs/SPACK_TAG`
elif [[ $(hostname) == daint* ]]; then
SPACK_TAG=`cat config/cscs/SPACK_TAG_DAINT`
. ../spack-c2sm/setup-env.sh
spack env activate -d config/cscs/spack/${SPACK_TAG}/daint_cpu_nvhpc
spack install -u build
elif [[ $(hostname) == balfrin* ]]; then
SPACK_TAG=`cat config/cscs/SPACK_TAG_BALFRIN`
. ../spack-c2sm/setup-env.sh
spack env activate -d config/cscs/spack/${SPACK_TAG}/daint_cpu_nvhpc
spack install -u build
else
error "Unknown hostname: $(hostname)"
fi

popd
Expand Down
6 changes: 5 additions & 1 deletion jenkins/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ function clone_and_build_package {

pushd ${MODEL}

. ../spack-c2sm/setup-env.sh
if [[ "${MODEL}" == cosmo-ghg ]]; then
. ../spack-c2sm-cosmo/setup-env.sh
else
. ../spack-c2sm/setup-env.sh
fi
spack ${BUILD} -u build ${PACKAGE}@${VERSION}%${COMPILER} ${FLAGS} || error "Failed to build ${PACKAGE}"

popd
Expand Down
23 changes: 16 additions & 7 deletions jenkins/scripts/setup-spack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

set -e -x

function error {
echo "*** Error: $@" >&2
exit 1
}
source jenkins/scripts/common.sh

# Check if script is called correctly
[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository"

SPACK_TAG_COSMO=v0.18.1.12

if [[ $(hostname) == eu-* ]]; then
source /cluster/apps/local/env2lmod.sh
module load git/2.31.1
SPACK_TAG=main
else
elif [[ $(hostname) == daint* ]]; then
git clone --depth 1 [email protected]:C2SM/icon.git icon-tag
SPACK_TAG=`cat icon-tag/config/cscs/SPACK_TAG_DAINT`
rm -fr icon-tag
elif [[ $(hostname) == balfrin* ]]; then
git clone --depth 1 [email protected]:C2SM/icon.git icon-tag
SPACK_TAG=`cat icon-tag/config/cscs/SPACK_TAG`
SPACK_TAG=`cat icon-tag/config/cscs/SPACK_TAG_BALFRIN`
rm -fr icon-tag
else
error "Unknown hostname: $(hostname)"
fi

GIT_REMOTE=https://github.com/C2SM/spack-c2sm.git
Expand All @@ -26,6 +31,10 @@ rm -fr ext/spack-c2sm

pushd ext

git clone --depth 1 --recurse-submodules --shallow-submodules -b ${SPACK_TAG} ${GIT_REMOTE}
# Clone Spack for ICON
git clone --depth 1 --recurse-submodules --shallow-submodules -b ${SPACK_TAG} ${GIT_REMOTE} spack-c2sm

# Clone Spack for COSMO-GHG
git clone --depth 1 --recurse-submodules --shallow-submodules -b ${SPACK_TAG_COSMO} ${GIT_REMOTE} spack-c2sm-cosmo

popd

0 comments on commit f4774f3

Please sign in to comment.