Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5d72a48
hacks to build https://github.com/ACCESS-NRI/cice5/tree/cice_gsi8.1
anton-seaice Oct 23, 2024
6e9c3f6
draft of changes
anton-seaice Oct 25, 2024
b944115
attempt at a cice package
anton-seaice Nov 13, 2024
c984bee
draft of MOM6 package
minghangli-uni Nov 14, 2024
c53d2b9
add invariant
minghangli-uni Nov 14, 2024
2001f54
beginnings of an access share package
anton-seaice Nov 15, 2024
9d856f8
Revert "hacks to build https://github.com/ACCESS-NRI/cice5/tree/cice_…
anton-seaice Nov 17, 2024
4e4908e
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Nov 17, 2024
42eb0fc
revert cice5
anton-seaice Nov 17, 2024
0aaeca1
improvements
anton-seaice Nov 18, 2024
7f93dbc
Update MOM6/package.py
minghangli-uni Nov 26, 2024
2944f7a
increments
anton-seaice Nov 28, 2024
a2d610d
Merge remote-tracking branch 'origin/163-om3-components' into 163-om3…
anton-seaice Dec 6, 2024
79d34bb
increments
anton-seaice Dec 6, 2024
6e6421c
rename to access-cice & make access3-exe and other experiments
anton-seaice Dec 12, 2024
b8b394a
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Jan 9, 2025
d2dab1f
working draft of OM3 build (with CICE only)
anton-seaice Jan 14, 2025
b167ae5
formatting
anton-seaice Jan 14, 2025
ed3b028
whitespace
anton-seaice Jan 14, 2025
b72c6e0
whitespace
anton-seaice Jan 14, 2025
bd2bca8
fix define
anton-seaice Jan 14, 2025
c5f1658
temp set defaul configuration to CICE6 only
anton-seaice Jan 14, 2025
b75b6c9
refinements
anton-seaice Jan 17, 2025
d3aff02
Remove mom6
minghangli-uni Jan 20, 2025
2a0ad48
add access-mom6
minghangli-uni Jan 20, 2025
f91f2be
resolves whitespaces
minghangli-uni Jan 20, 2025
f2def26
Update package.py
anton-seaice Jan 21, 2025
a8e8a5f
submodules = True
anton-seaice Jan 21, 2025
2a4b0f1
Missing fms precision
anton-seaice Jan 21, 2025
07fc321
new cmakelist dir
anton-seaice Jan 22, 2025
49bde52
remove mom6_exec variant
minghangli-uni Jan 23, 2025
3ac4aea
Fix syntax errors
minghangli-uni Jan 23, 2025
71561ad
name tweaks
anton-seaice Jan 23, 2025
f219d71
Update packages/access-cice/package.py
anton-seaice Jan 23, 2025
30d37f2
possibly better build curation
anton-seaice Feb 5, 2025
be5bfcf
comment out unused lines
anton-seaice Feb 5, 2025
174fcb5
Update packages/access3-exe/package.py
anton-seaice Feb 24, 2025
4bede53
Update packages/access3-exe/package.py
anton-seaice Feb 24, 2025
94b9cb6
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Feb 25, 2025
30abf59
try without CMAKE compiler flags in package
anton-seaice Feb 25, 2025
957a4c8
some tidyups and review comments
anton-seaice Feb 27, 2025
9b6c462
messing around with configurations validation
anton-seaice Feb 27, 2025
2b84afc
fix handing of deps
anton-seaice Mar 4, 2025
7e77090
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Mar 12, 2025
3295e10
review comments and messing around with deps
anton-seaice Mar 13, 2025
7e91874
ww3 package
anton-seaice Mar 13, 2025
c7ae134
Update packages/access-mom6/package.py
anton-seaice Mar 13, 2025
3a4cdc5
today's tidup / review comments
anton-seaice Mar 14, 2025
eb20ffd
general cleanup
anton-seaice Mar 17, 2025
62b1075
tidyuup
anton-seaice Mar 18, 2025
d993b03
typo
anton-seaice Mar 18, 2025
25477fd
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Mar 19, 2025
7bf11ff
rm -fp-model and build_type
anton-seaice Mar 19, 2025
8219072
some variable name changes
anton-seaice Mar 26, 2025
79e9a6a
some variable name changes
anton-seaice Mar 26, 2025
a9a450e
some variable name changes
anton-seaice Mar 26, 2025
d48948e
some variable name changes
anton-seaice Mar 26, 2025
5945470
fix asymmetric_mom
anton-seaice Mar 26, 2025
db4a6e5
typos don't help
anton-seaice Mar 27, 2025
37814a7
formatting
anton-seaice Mar 27, 2025
998cb6d
rm CESMCOUPLED as a variant
anton-seaice Mar 27, 2025
97d725e
finish removing cesmcoupled
anton-seaice Mar 27, 2025
0a9df31
rename access3-exe to access3
anton-seaice Mar 28, 2025
043d65a
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice Mar 28, 2025
c4399b2
more copyright notices
anton-seaice Mar 28, 2025
07d9096
Apply suggestions from code review
anton-seaice Mar 31, 2025
91f40f1
Update packages/access-mom6/package.py
anton-seaice Mar 31, 2025
21b12fa
Update packages/access3/package.py
anton-seaice Apr 2, 2025
b811a55
Update packages/access3-share/package.py
anton-seaice Apr 3, 2025
2ca4940
Apply suggestions from code review
anton-seaice Apr 3, 2025
d3447c9
Update packages/access3-share/package.py
anton-seaice Apr 3, 2025
fa6f12d
Update packages/access3-share/package.py
anton-seaice Apr 3, 2025
d48546f
Some neatening
anton-seaice Apr 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions packages/access-cice/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class AccessCice(CMakePackage):
"""CICE is a computationally efficient model for simulating the growth,
melting, and movement of polar sea ice. CICE is maintained and developed by
the CICE-Consortium. This package builds using the Access3Share common
libraries for ACCESS3 models."""

homepage = "https://github.com/CICE-Consortium/CICE"
git = "https://github.com/ACCESS-NRI/CICE"
submodules = True
maintainers("anton-seaice", "harshula")

# see license file at https://github.com/CICE-Consortium/CICE
license("LicenseRef-CICE", checked_by="anton-seaice")

variant("openmp", default=False, description="Enable OpenMP")
variant(
"access3",
default=True,
description="Install CICE as library for Access3 models"
)

variant("io_type",
default="NetCDF",
values=("NetCDF", "PIO", "Binary"),
description="CICE IO Method"
)

depends_on("access3-share", when="+access3")
depends_on("cmake@3.18:", type="build")
depends_on("mpi")
depends_on("netcdf-fortran@4.6.0:", when="io_type=NetCDF")
depends_on("parallelio@2.5.3:", when="io_type=PIO")

root_cmakelists_dir = "configuration/scripts/cmake"

def cmake_args(self):
args = [
self.define_from_variant("CICE_OPENMP", "openmp"),
self.define_from_variant("CICE_IO", "io_type"),
self.define_from_variant("CICE_ACCESS3", "access3"),
]

return args
48 changes: 48 additions & 0 deletions packages/access-mom6/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class AccessMom6(CMakePackage):
"""The Modular Ocean Model (MOM) describes the numerical ocean models
originating from NOAA/GFDL. They are used to simulate ocean currents at both
regional and global scales, enabling scientists to answer fundamental
questions about the role of the ocean in the dynamics of the global climate.
This package builds using the Access3Share common libraries for ACCESS3
models."""

homepage = "https://github.com/ACCESS-NRI/MOM6"
git = "https://github.com/ACCESS-NRI/MOM6.git"
submodules = True
maintainers("minghangli-uni", "harshula")

# see license file in https://github.com/ACCESS-NRI/MOM6/blob/e92c971084e185cfd3902f18072320b45d583a54/LICENSE.md
license("LGPL-3.0-only", checked_by="minghangli-uni")

variant("openmp", default=False, description="Enable OpenMP")
variant("asymmetric_mem", default=False, description="Use asymmetric memory in MOM6")
variant(
"access3",
default=True,
description="Install MOM6 as library for Access3 models"
)

depends_on("access3-share", when="+access3")
depends_on("cmake@3.18:", type="build")
depends_on("mpi")
depends_on("netcdf-fortran@4.6.0:")
depends_on("fms@2023.02: precision=64 +large_file ~gfs_phys ~quad_precision")
depends_on("fms +openmp", when="+openmp")
depends_on("fms ~openmp", when="~openmp")


def cmake_args(self):
args = [
self.define_from_variant("MOM6_OPENMP", "openmp"),
self.define_from_variant("MOM6_ASYMMETRIC", "asymmetric_mem"),
self.define_from_variant("MOM6_ACCESS3", "access3"),
]

return args
5 changes: 2 additions & 3 deletions packages/access-om3-nuopc/package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

Expand Down Expand Up @@ -47,7 +46,7 @@ class AccessOm3Nuopc(CMakePackage):
"cice_io",
default="PIO",
description="CICE IO option",
values=("NectCDF", "PIO", "Binary"),
values=("NetCDF", "PIO", "Binary"),
multi=False,
)

Expand Down
7 changes: 2 additions & 5 deletions packages/access-om3/package.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2024 ACCESS-NRI
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

Expand All @@ -25,4 +22,4 @@ class AccessOm3(BundlePackage):

version("latest")

depends_on("access-om3-nuopc")
depends_on("access3")
36 changes: 36 additions & 0 deletions packages/access-ww3/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *

class AccessWw3(CMakePackage):
"""WAVEWATCH III® is a community wave modeling framework that includes the
latest scientific advancements in the field of wind-wave modeling and
dynamics. This package builds using the Access3Share common libraries for
ACCESS3 models."""

homepage = "https://github.com/noaa-emc/ww3/"
git = "https://github.com/ACCESS-NRI/WW3"
maintainers("anton-seaice", "harshula")
license("LGPL-3.0-only", checked_by="anton-seaice")

variant("openmp", default=False, description="Enable OpenMP")
variant(
"access3",
default=True,
description="Install WW3 as library for Access3 models"
)

depends_on("access3-share", when="+access3")
depends_on("cmake@3.18:", type="build")
depends_on("mpi")
depends_on("netcdf-fortran@4.6.0:")

def cmake_args(self):
args = [
self.define_from_variant("WW3_OPENMP", "openmp"),
self.define_from_variant("WW3_ACCESS3", "access3"),
]

return args
42 changes: 42 additions & 0 deletions packages/access3-share/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class Access3Share(CMakePackage):
"""Shared coupler/mediator libraries used by the ACCESS version 3 climate
models. This package includes the Community Mediator for Earth Prediction
Systems (CMEPS) and Community Data models for Earth Prediction Systems
(CDEPS) as used in ACCESS-OM3 (and the future ACCESS-CM3 and ACCESS-ESM3 etc
). See Access3 package to produce executable programs."""

homepage = "https://github.com/ACCESS-NRI/access3-share"
git = "https://github.com/ACCESS-NRI/access3-share"
submodules = True
maintainers("anton-seaice", "harshula", "micaeljtoliveira")
license("Apache-2.0", checked_by="anton-seaice")

variant("openmp", default=False, description="Enable OpenMP")

depends_on("cmake@3.18:", type="build")
depends_on("mpi")
depends_on("netcdf-fortran@4.6.0:")
depends_on("esmf@8.7.0:")
depends_on("esmf fflags='-fp-model precise'", when="%intel") # for consistency with access-om3-nuopc builds, e.g. https://github.com/ACCESS-NRI/spack-packages/blob/e2bdb46e56af8ac14183e7ed25da9235486c973a/packages/access-om3-nuopc/package.py#L58
depends_on("fortranxml@4.1.2:")

depends_on("parallelio@2.5.3:")
depends_on(("parallelio "
"fflags='-qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model precise' "
"cflags='-qno-opt-dynamic-align -fp-model precise -std=gnu99'"),
when="%intel") # consistency with access-om3-nuopc builds, e.g. https://github.com/ACCESS-NRI/spack-packages/blob/e2bdb46e56af8ac14183e7ed25da9235486c973a/packages/access-om3-nuopc/package.py#L65

def cmake_args(self):
args = [
self.define("ACCESS3_LIB_INSTALL", True),
self.define_from_variant("OPENMP", "openmp"),
]

return args
72 changes: 72 additions & 0 deletions packages/access3/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *

# supported model configurations
KNOWN_CONF = (
"MOM6",
"CICE6",
"WW3",
"MOM6-WW3",
"MOM6-CICE6",
"CICE6-WW3",
"MOM6-CICE6-WW3",
)

class Access3(CMakePackage):
"""Executable build for ACCESS version 3 climate models. The exectuable is
defined in Community Mediator for Earth Prediction Systems (CMEPS).
Currently implemented for ACCESS-OM3, and in the future may support
ACCESS-CM3 and ACCESS-ESM3. This is a companion package to Access3Share
which builds the shared libraries."""

homepage = "https://github.com/ACCESS-NRI/access3-share"
git = "https://github.com/ACCESS-NRI/access3-share"
submodules = True
maintainers("anton-seaice", "harshula", "micaeljtoliveira")
license("Apache-2.0", checked_by="anton-seaice")

variant(
"configurations",
values=(*KNOWN_CONF, 'none'),
default='none',
multi=True,
description=(
"ACCESS-OM3 configurations to build. When a model component "
"is not included in a configuration, that component is replaced by "
"a CDEPS data component."
),
sticky=True # force concretizer to not pick alternative variants
)

# force user to supply a build combination
conflicts(
"configurations=none",
msg=f"A configurations variant must be set, can be one or many of {KNOWN_CONF}"
)

depends_on("cmake@3.18:", type="build")
depends_on("mpi")
depends_on("access3-share")
depends_on("esmf@8.7.0:")

for conf in KNOWN_CONF:
if "CICE6" in conf:
depends_on("access-cice+access3", when=f"configurations={conf}")
if "MOM6" in conf:
depends_on("access-mom6+access3", when=f"configurations={conf}")
if "WW3" in conf:
depends_on("access-ww3+access3", when=f"configurations={conf}")

def cmake_args(self):
# make configurations a cmake argument
buildConf = ";".join(self.spec.variants["configurations"].value)

args = [
self.define("BuildConfigurations", buildConf),
self.define("ACCESS3_LIB_INSTALL", False),
]

return args