Skip to content

Commit

Permalink
fre-nctools: add new working versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Feb 4, 2025
1 parent b8ebfbc commit 95571ef
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions packages/fre-nctools/package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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.
#
# Copyright 2025 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

Expand All @@ -14,28 +15,43 @@ class FreNctools(AutotoolsPackage):
use in the Flexible Modeling System (FMS) Runtime Environment (FRE)
supporting the work of the Geophysical Fluid Dynamics Laboratory (GFDL)."""

# FIXME: Add a proper url for your package's homepage here.
homepage = "https://github.com/NOAA-GFDL/FRE-NCtools"
url = "https://github.com/NOAA-GFDL/FRE-NCtools/archive/2022.02.tar.gz"

# FIXME: Add a list of GitHub accounts to
# notify when the package is updated.
# maintainers = ["github_user1", "github_user2"]
maintainers("dougiesquire")

# 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("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 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")

args = ["--disable-ocean-model-grid-generator"]
if "+mpi" in spec:
args.append("--with-mpi")

return args

0 comments on commit 95571ef

Please sign in to comment.