Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 163-om3-components
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Feb 25, 2025
2 parents 4bede53 + 3bfca29 commit 94b9cb6
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a spack package repository maintained by ACCESS-NRI for packages that are not available by default in spack. Where possible packages developed will be contributed to the builtin spack supported packages. In some cases it is not possible to do this, for example software packages that we are not the copyright holders where it isn't appropriate to distribute a package that only supports ACCESS-NRI build use-cases.

The namespace of the pacakge repository is access.nri
The namespace of the package repository is access.nri

## How to utilise this package repository

Expand All @@ -22,17 +22,17 @@ $ spack list oasis3_mct

To use the packages in this repository first clone the repo to a path of your choosing (represented here as `$PACKAGE_PATH`)
```
git clone git@github.com:ACCESS-NRI/spack_packages.git $PACKAGE_PATH/spack_packages
git clone git@github.com:ACCESS-NRI/spack-packages.git $PACKAGE_PATH/spack-packages
```
and then add the location of the repository to your spack instance
```
git repo add $PACKAGE_PATH/spack_packages
spack repo add $PACKAGE_PATH/spack-packages
```
and then confirm it is has been added correctly:
```
$ spack repo list
==> 2 package repositories.
access.nri $PACKAGE_PATH/spack_packages
access.nri $PACKAGE_PATH/spack-packages
builtin $SPACK_ROOT/var/spack/repos/builtin
```
Now the `oasis3-mct` package should be available to install
Expand Down
2 changes: 1 addition & 1 deletion packages/access-om2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AccessOm2(BundlePackage):

maintainers("harshula")

version("latest")
version("access-om2")

variant("deterministic", default=False, description="Deterministic build.")

Expand Down
2 changes: 1 addition & 1 deletion packages/cice4/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Cice4(MakefilePackage):
__targets[12]["blocks"] = "12x1"

# The reason for the explicit -rpath is:
# https://github.com/ACCESS-NRI/spack_packages/issues/14#issuecomment-1653651447
# https://github.com/ACCESS-NRI/spack-packages/issues/14#issuecomment-1653651447
def get_linker_args(self, spec, name):
return " ".join(
[(spec[name].libs).ld_flags,
Expand Down
8 changes: 4 additions & 4 deletions packages/cice5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Cice5(MakefilePackage):
homepage = "https://www.access-nri.org.au"
git = "https://github.com/ACCESS-NRI/cice5.git"

maintainers = ["harshula", "anton-seaice"]
maintainers("harshula", "anton-seaice")

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

variant("deterministic", default=False, description="Deterministic build.")
Expand Down Expand Up @@ -52,15 +52,15 @@ def url_for_version(self, version):
return "https://github.com/ACCESS-NRI/cice5/tarball/{0}".format(version)

# The reason for the explicit -rpath is:
# https://github.com/ACCESS-NRI/spack_packages/issues/14#issuecomment-1653651447
# https://github.com/ACCESS-NRI/spack-packages/issues/14#issuecomment-1653651447
def get_linker_args(self, spec, name):
return " ".join(
[(spec[name].libs).ld_flags,
"-Wl,-rpath=" + join_path(spec[name].prefix, "lib")]
)

# The reason for the explicit -rpath is:
# https://github.com/ACCESS-NRI/spack_packages/issues/14#issuecomment-1653651447
# https://github.com/ACCESS-NRI/spack-packages/issues/14#issuecomment-1653651447
def make_linker_args(self, spec, name, namespecs):
path = join_path(spec[name].prefix, "lib")
return " ".join(
Expand Down
63 changes: 63 additions & 0 deletions packages/fre-nctools/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# Copyright 2025 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class FreNctools(AutotoolsPackage):
"""FRE-NCtools is a collection of tools for creating grids and mosaics
commonly used in climate and weather models, the remapping of data among
grids, and the creation and manipulation of netCDF files. These tools were
largely written by members of the GFDL Modeling Systems Group primarily for
use in the Flexible Modeling System (FMS) Runtime Environment (FRE)
supporting the work of the Geophysical Fluid Dynamics Laboratory (GFDL)."""

homepage = "https://github.com/NOAA-GFDL/FRE-NCtools"
git = "https://github.com/NOAA-GFDL/FRE-NCtools.git"

maintainers("dougiesquire")

license("LGPL-3.0-only")

# A number of versions are excluded from this spack package due to bugs:
# - 2024.05.01: see https://github.com/NOAA-GFDL/FRE-NCtools/issues/344
# - 2024.03: implicit funcion delcaration in mppncscatter.c; fixed in edcdf78
# - 2024.01: implicit function declaration in make_topog.c; fixed in 6b4d2fb
# - 2023.01.02: implicit function declaration in make_topog.c; fixed in 6b4d2fb
# - 2023.01.01: implicit function declaration in make_topog.c; fixed in 6b4d2fb
# - 2023.01: implicit function declaration in make_topog.c; fixed in 6b4d2fb

version("main", branch="main")
version("2024.05", sha256="61cec52aa03e066b64bed794ef9dc3eb28654c3d1b872aef1b69ce99ef7a9c65")
version("2024.04", sha256="e27346d7ade1b67af163bb7f327a47a288d5e475fe797323bd7cee3a46385de0")
version("2024.02", sha256="90d52abc1b467d635dd648185b0046efcc6d58a232143b0ccaf9a0bff23d2f5d")
version("2022.02", sha256="bd90c9c3becdb19ff408c0915e61141376e81c12651a5c1b054c75ced9a73ad2")

variant("mpi", default=False, description="Builds with MPI support")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("mpi", when="+mpi")
depends_on("nco", when="@2024.05:")

def url_for_version(self, version):
return "https://github.com/NOAA-GFDL/FRE-NCtools/archive/{0}.tar.gz".format(version)

def configure_args(self):
spec = self.spec
args = []

# ocean_model_grid_generator subproject removed in 2023.01
if spec.version <= Version("2022.02"):
args.append("--disable-ocean-model-grid-generator")

if "+mpi" in spec:
args.append("--with-mpi")

return args
4 changes: 2 additions & 2 deletions packages/libaccessom2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Libaccessom2(CMakePackage):
homepage = "https://www.access-nri.org.au"
git = "https://github.com/ACCESS-NRI/libaccessom2.git"

maintainers = ["harshula"]
maintainers("harshula")

version("master", branch="master")
version("access-om2", branch="master", preferred=True)

variant("deterministic", default=False, description="Deterministic build.")
variant("optimisation_report", default=False, description="Generate optimisation reports.")
Expand Down
2 changes: 1 addition & 1 deletion packages/mom5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Mom5(MakefilePackage):

maintainers("harshula", "penguian")

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

Expand Down
2 changes: 1 addition & 1 deletion packages/oasis3-mct/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Oasis3Mct(MakefilePackage):

maintainers("harshula", "penguian")

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

variant("deterministic", default=False, description="Deterministic build.")
Expand Down
2 changes: 1 addition & 1 deletion packages/um/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _get_linker_args(self, spec, fcm_libname):
spec[dep_name].libs.ld_flags,
self._lib_cfg[fcm_libname]["fcm_ld_flags"]]
# The reason for the explicit -rpath is:
# https://github.com/ACCESS-NRI/spack_packages/issues/14#issuecomment-1653651447
# https://github.com/ACCESS-NRI/spack-packages/issues/14#issuecomment-1653651447
rpaths = ["-Wl,-rpath=" + d for d in spec[dep_name].libs.directories]

# Both ld_flags and rpaths are lists of strings.
Expand Down
2 changes: 1 addition & 1 deletion packages/um7/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _exe_name(self, optim_value):
def _get_linker_args(self, spec, name):
"""
The reason for the explicit -rpath is:
https://github.com/ACCESS-NRI/spack_packages/issues/14#issuecomment-1653651447
https://github.com/ACCESS-NRI/spack-packages/issues/14#issuecomment-1653651447
"""
return " ".join(
[(spec[name].libs).ld_flags,
Expand Down

0 comments on commit 94b9cb6

Please sign in to comment.