Skip to content

Commit

Permalink
mom5: add new variant "type" (#72)
Browse files Browse the repository at this point in the history
* "type" will have options ACCESS-CM, ACCESS-ESM, ACCESS-OM, ACCESS-OM-BGC
  and MOM_solo.
  • Loading branch information
harshula authored Mar 8, 2024
1 parent b72ae78 commit a2a4887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 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")

variant("deterministic", default=False, description="Deterministic build.")
variant("type", default="ACCESS-OM", description="Build MOM5 to support a particular use case.", values=("ACCESS-CM", "ACCESS-ESM", "ACCESS-OM", "ACCESS-OM-BGC", "MOM_solo"), multi=False)

Check failure on line 22 in packages/mom5/package.py

View workflow job for this annotation

GitHub Actions / Check syntax

Ruff (E501)

packages/mom5/package.py:22:89: E501 Line too long (191 > 88 characters)
variant("optimisation_report", default=False, description="Generate optimisation reports.")

Check failure on line 23 in packages/mom5/package.py

View workflow job for this annotation

GitHub Actions / Check syntax

Ruff (E501)

packages/mom5/package.py:23:89: E501 Line too long (95 > 88 characters)

# Depend on virtual package "mpi".
Expand All @@ -34,7 +35,6 @@ class Mom5(MakefilePackage):
phases = ["edit", "build", "install"]

_platform = "spack"
_mom_type = "ACCESS-OM"

def url_for_version(self, version):
return "https://github.com/ACCESS-NRI/mom5/tarball/{0}".format(version)
Expand Down Expand Up @@ -317,7 +317,7 @@ def build(self, spec, prefix):
# embedded in the binary.
build(
"--type",
self._mom_type,
self.spec.variants["type"].value,
"--platform",
self._platform,
"--no_environ",
Expand All @@ -331,8 +331,8 @@ def install(self, spec, prefix):
join_path(
"exec",
self._platform,
self._mom_type,
"fms_" + self._mom_type + ".x"
self.spec.variants["type"].value,
"fms_" + self.spec.variants["type"].value + ".x"
),
prefix.bin
)
Expand Down

0 comments on commit a2a4887

Please sign in to comment.