crtm: add noaa versions and package mods (#43635)

* crtm: add noaa versions and package mods
* crtm@v2.4.1-jedi: add missing depends_on netcdf-fortran, ecbuild from jcsda spack fork
This commit is contained in:
eugeneswalker 2024-04-15 13:24:07 -07:00 committed by GitHub
parent e40676e901
commit 0cd2a1102c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,7 @@ class Crtm(CMakePackage):
depends_on("netcdf-fortran", when="@v2.3-jedi.4")
depends_on("netcdf-fortran", when="@v2.4-jedi.1")
depends_on("netcdf-fortran", when="@v2.4-jedi.2")
depends_on("netcdf-fortran", when="@v2.4.1-jedi")
depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix")
depends_on("crtm-fix@2.4.0_emc", when="@2.4.0 +fix")
@ -41,6 +42,7 @@ class Crtm(CMakePackage):
depends_on("ecbuild", type=("build"), when="@v2.3-jedi.4")
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.1")
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.2")
depends_on("ecbuild", type=("build"), when="@v2.4.1-jedi")
# ecbuild release v2.4.0 is broken
# add ecbuild dependency for next release with fix
@ -48,6 +50,10 @@ class Crtm(CMakePackage):
license("CC0-1.0")
version(
"v2.4.1-jedi", sha256="fd8bf4db4f2a3b420b4186de84483ba2a36660519dffcb1e0ff14bfe8c6f6a14"
)
version("2.4.0.1", tag="v2.4.0_emc.3", commit="7ecad4866c400d7d0db1413348ee225cfa99ff36")
# REL-2.4.0_emc (v2.4.0 ecbuild does not work)
version("2.4.0", commit="5ddd0d6b0138284764065feda73b5adf599082a2")
# Uses the tip of REL-2.3.0_emc branch
@ -58,3 +64,17 @@ class Crtm(CMakePackage):
# Branch release/crtm_jedi_v2.4.0
version("v2.4-jedi.1", commit="82223419fdb479d76c2f2109c2b704e1d9618f22")
version("v2.4-jedi.2", commit="62831cbb6c1ffcbb219eeec60e1b1c422526f597")
def url_for_version(self, version):
if self.spec.satisfies("@v3") or version >= Version("3.0.0"):
return "https://github.com/JCSDA/crtmv3/archive/refs/tags/{}.tar.gz".format(version)
else:
return "https://github.com/JCSDA/crtm/archive/refs/tags/{}.tar.gz".format(version)
@when("@2.4.0.1")
def patch(self):
if self.compiler.name in ["gcc", "clang", "apple-clang"]:
# Line lengths in RSS_Emissivity_Model.f90 are too long for gfortran default limit
filter_file(
"-fbacktrace", "-fbacktrace -ffree-line-length-none", "libsrc/CMakeLists.txt"
)