From 6135927052c58928aad593266b93dc6cc0f60078 Mon Sep 17 00:00:00 2001 From: anton-seaice Date: Fri, 13 Dec 2024 13:30:45 +1100 Subject: [PATCH] tweak build options & tidy --- packages/cice5/package.py | 4 +++- packages/cice5/spack-build.sh | 37 ++++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/cice5/package.py b/packages/cice5/package.py index fd89dec..9f90af8 100755 --- a/packages/cice5/package.py +++ b/packages/cice5/package.py @@ -78,8 +78,10 @@ def set_deps_targets(self, spec, prefix): if self.spec.satisfies("@access-esm1.6"): # The integer represents environment variable NTASK - self.__targets = {12: {}} + # esm1.5 used 12 (cice4), cm2 used 16 (cice5), build both for testing + self.__targets = {12: {}, 16: {}} self.add_target(12, "access-esm1.6", "360x300", "12x1") + self.add_target(16, "access-esm1.6", "360x300", "8x2") ideps = ["oasis3-mct", "netcdf-fortran"] diff --git a/packages/cice5/spack-build.sh b/packages/cice5/spack-build.sh index 9e3d96c..f0be672 100755 --- a/packages/cice5/spack-build.sh +++ b/packages/cice5/spack-build.sh @@ -43,31 +43,36 @@ if ( $THRD == 'yes') setenv OMP_NUM_THREADS 2 # positive integer setenv BARRIERS yes # set -Dgather_scatter_barrier, prevents hangs on raijin setenv NSNWLYR 1 # number of vertical layers in the snow setenv NICECAT 5 # number of ice thickness categories +setenv OASIS3_MCT yes # oasis3-mct version setenv AusCOM yes + if ($driver == 'access-esm1.6') then - setenv DRVDIR 'access' - setenv ACCESS yes - setenv IO_TYPE netcdf - setenv CHAN MPI1 # MPI1 or MPI2 (always MPI1!) - setenv NICELYR 1 #1 for ktherm=0, zero-layer thermodynamics + setenv DRVDIR 'access' + setenv ACCESS yes + setenv IO_TYPE netcdf + setenv CHAN MPI1 # MPI1 or MPI2 (always MPI1!) + setenv NICELYR 1 #1 for ktherm=0, zero-layer thermodynamics + setenv TRBGCS 0 # else if ($driver == 'access-cm2') then -# setenv DRVDIR 'access' +# setenv DRVDIR 'access' # setenv ACCESS yes # setenv IO_TYPE netcdf # setenv CHAN MPI1 # MPI1 or MPI2 (always MPI1!) -# setenv NICELYR 4 #4 for standard multi-layer ice (ktherm=1) +# setenv NICELYR 4 #4 for standard multi-layer ice (ktherm=1) +# setenv TRBGCS 2 else #driver = auscom - setenv DRVDIR $driver - setenv ACCESS no - setenv IO_TYPE pio - setenv NICELYR 4 # number of vertical layers in the ice - ### The version of an executable can be found with the following - ### command: strings | grep 'CICE_VERSION=' - set version='202301' - sed -e "s/{CICE_VERSION}/$version/g" $SRCDIR/drivers/$driver/version.F90.template > $SRCDIR/drivers/$driver/version_mod.F90 + setenv DRVDIR $driver + setenv ACCESS no + setenv IO_TYPE pio + setenv NICELYR 4 # number of vertical layers in the ice + setenv TRBGCS 2 # number of skeletal layer bgc tracers + # TRBGCS=0 or 2<=TRBGCS<=9) + ### The version of an executable can be found with the following + ### command: strings | grep 'CICE_VERSION=' + set version='202301' + sed -e "s/{CICE_VERSION}/$version/g" $SRCDIR/drivers/$driver/version.F90.template > $SRCDIR/drivers/$driver/version_mod.F90 endif -setenv OASIS3_MCT yes # oasis3-mct version ### Where this model is compiled setenv OBJDIR $SRCDIR/build_${driver}_${grid}_${blocks}_${ntask}p