Skip to content

Commit

Permalink
Merge pull request spack#376 from AlexanderRichert-NOAA/crtm_update_d…
Browse files Browse the repository at this point in the history
…ec23

Add crtm(-fix) 2.4.0.1 (v2.4.0_emc.3)
  • Loading branch information
climbfuji committed Dec 8, 2023
2 parents 8683cc4 + 4d8bf53 commit a6c3d15
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
8 changes: 7 additions & 1 deletion var/spack/repos/builtin/packages/crtm-fix/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class CrtmFix(Package):
"BenjaminTJohnson", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA", "climbfuji"
)

version(
"2.4.0.1_emc", sha256="6e4005b780435c8e280d6bfa23808d8f12609dfd72f77717d046d4795cac0457"
)
version("2.4.0_emc", sha256="d0f1b2ae2905457f4c3731746892aaa8f6b84ee0691f6228dfbe48917df1e85e")
version("2.3.0_emc", sha256="1452af2d1d11d57ef3c57b6b861646541e7042a9b0f3c230f9a82854d7e90924")

Expand All @@ -28,7 +31,10 @@ class CrtmFix(Package):
conflicts("+big_endian", when="+little_endian", msg="big_endian and little_endian conflict")

def url_for_version(self, version):
url = "ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-{}.tgz"
if version == Version("2.4.0.1_emc"):
url = "ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-2.4.0_emc_07112023.tgz"
else:
url = "ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-{}.tgz"
return url.format(version)

def install(self, spec, prefix):
Expand Down
12 changes: 11 additions & 1 deletion var/spack/repos/builtin/packages/crtm/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class Crtm(CMakePackage):
depends_on("netcdf-fortran", when="@v3.0.0-rc.1")

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")
depends_on("crtm-fix@2.4.0_emc", when="@=2.4.0 +fix")
depends_on("crtm-fix@2.4.0.1_emc", when="@2.4.0.1 +fix")

depends_on("ecbuild", type=("build"), when="@v2.3-jedi.4")
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.1")
Expand All @@ -55,6 +56,7 @@ class Crtm(CMakePackage):
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
Expand All @@ -71,3 +73,11 @@ def url_for_version(self, version):
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"
)
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ class GlobalWorkflowEnv(BundlePackage):
depends_on("met")
depends_on("metplus")
depends_on("gsi-ncdiag")
depends_on("crtm@2.4.0")
depends_on("crtm@2.4.0.1")

# There is no need for install() since there is no code.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GsiEnv(BundlePackage):
depends_on("sfcio")
depends_on("nemsio")
depends_on("wrf-io")
depends_on("crtm@2.4.0")
depends_on("crtm@2.4.0.1")
depends_on("ncio")
depends_on("gsi-ncdiag")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NceplibsEnv(BundlePackage):

depends_on("bacio")
depends_on("bufr")
depends_on("crtm@2.4.0")
depends_on("crtm@2.4.0.1")
depends_on("g2")
depends_on("g2c")
depends_on("g2tmpl")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class UfsSrwAppEnv(BundlePackage):
depends_on("esmf")
depends_on("fms@2023.01")
depends_on("bacio")
depends_on("crtm@2.4.0")
depends_on("crtm@2.4.0.1")
depends_on("g2")
depends_on("g2tmpl")
depends_on("ip")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UfsWeatherModelEnv(BundlePackage):

depends_on("fms@2023.03", type="run")
depends_on("bacio", type="run")
depends_on("crtm@2.4.0", type="run")
depends_on("crtm@2.4.0.1", type="run")
depends_on("g2", type="run")
depends_on("g2tmpl", type="run")
depends_on("ip", type="run")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UppEnv(BundlePackage):

depends_on("netcdf-fortran")
depends_on("bacio")
depends_on("crtm@2.4.0")
depends_on("crtm@2.4.0.1")
depends_on("g2")
depends_on("g2tmpl")
depends_on("nemsio")
Expand Down

0 comments on commit a6c3d15

Please sign in to comment.