Skip to content

Commit

Permalink
tweak build options & tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Dec 13, 2024
1 parent 28ce2ff commit 6135927
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
4 changes: 3 additions & 1 deletion packages/cice5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
37 changes: 21 additions & 16 deletions packages/cice5/spack-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <executable> | 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 <executable> | 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
Expand Down

0 comments on commit 6135927

Please sign in to comment.