Skip to content

Commit

Permalink
Add ACCESS-ESM1.6 SBD
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Aug 20, 2024
1 parent 8c92408 commit d1cef91
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
37 changes: 37 additions & 0 deletions packages/access-esm1p6/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2024 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *

class AccessEsm1p6(BundlePackage):
"""ACCESS-ESM1.6 bundle contains the coupled UM7, CICE4 and MOM5 models.
ACCESS-ESM1.6 comprises of:
* The UKMO UM atmospheric model (v7.3), in the same configuration as
ACCESS1.4, at N96 (1.875×1.25 degree), 38 level resolution
* The CABLE land surface model with biogeochemistry (CASA-CNP) (CABLE2.4)
* The GFDL MOM5 ocean model at 1 degree resolution
* The WOMBATlite ocean BGC model (generic tracer version)
* The LANL CICE4.1 sea ice model (version as ACCESS1.4)
* The OASIS-MCT coupler
"""

homepage = "https://www.access-nri.org.au"

git = "https://github.com/ACCESS-NRI/ACCESS-ESM1.6.git"

maintainers("dougiesquire")

version("latest")

depends_on("[email protected]", type="run")
depends_on("[email protected] type=ACCESS-ESM", type="run")
# um7 is in a private repository
depends_on("[email protected]", type="run")

# There is no need for install() since there is no code.
9 changes: 5 additions & 4 deletions packages/mom5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Mom5(MakefilePackage):

version("master", branch="master", preferred=True)
version("access-esm1.5", branch="access-esm1.5")
version("access-esm1.6", branch="master")

variant("restart_repro", default=True, description="Reproducible restart build.")
# The following two variants are not applicable when version is "access-esm1.5":
Expand All @@ -39,7 +40,7 @@ class Mom5(MakefilePackage):
depends_on("oasis3-mct~deterministic", when="~deterministic")
depends_on("libaccessom2+deterministic", when="+deterministic")
depends_on("libaccessom2~deterministic", when="~deterministic")
with when("@access-esm1.5"):
with when("@access-esm1:access-esm1.6"):
depends_on("[email protected]:4.7.4")
depends_on("[email protected]:4.5.2")
# Depend on "openmpi".
Expand All @@ -60,7 +61,7 @@ def edit(self, spec, prefix):
config = {}

# NOTE: The order of the libraries matters during the linking step!
if "@access-esm1.5" in self.spec:
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
istr = " ".join([
join_path((spec["oasis3-mct"].headers).cpp_flags, "psmile.MPI1"),
join_path((spec["oasis3-mct"].headers).cpp_flags, "mct")])
Expand Down Expand Up @@ -166,7 +167,7 @@ def edit(self, spec, prefix):
"""

# Copied from bin/mkmf.template.nci
if "@access-esm1.5" in self.spec:
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
config["intel"] = f"""
ifeq ($(VTRACE), yes)
FC = mpifort-vt
Expand Down Expand Up @@ -300,7 +301,7 @@ def edit(self, spec, prefix):
config["oneapi"] = config["intel"]

# Copied from bin/mkmf.template.t90
if "@access-esm1.5" in self.spec:
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
config["post"] = """
# you should never need to change any lines below.
Expand Down

0 comments on commit d1cef91

Please sign in to comment.