summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Krajniak <563684+jkrajniak@users.noreply.github.com>2022-06-02 18:11:45 +0200
committerGitHub <noreply@github.com>2022-06-02 09:11:45 -0700
commitf9dfd5fcb88a22c2a686409fa15b3724de52c4cc (patch)
tree6876af1c8afc8f11e0ff269d0123acb70ab5fed3
parentf3c4e1adbbb2a1a08dcc93dc0ec538fae88d70aa (diff)
downloadspack-f9dfd5fcb88a22c2a686409fa15b3724de52c4cc.tar.gz
spack-f9dfd5fcb88a22c2a686409fa15b3724de52c4cc.tar.bz2
spack-f9dfd5fcb88a22c2a686409fa15b3724de52c4cc.tar.xz
spack-f9dfd5fcb88a22c2a686409fa15b3724de52c4cc.zip
Add flag to enable WRF-Chem module (#30950)
* Add flag to enable WRF-Chem module * Update var/spack/repos/builtin/packages/wrf/package.py Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> * Set chem variant only for v4+ Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/wrf/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/wrf/package.py b/var/spack/repos/builtin/packages/wrf/package.py
index cf051f85bb..0f2663033c 100644
--- a/var/spack/repos/builtin/packages/wrf/package.py
+++ b/var/spack/repos/builtin/packages/wrf/package.py
@@ -110,6 +110,12 @@ class Wrf(Package):
default=True,
description="Parallel IO support through Pnetcdf library",
)
+ variant(
+ "chem",
+ default=False,
+ description="Enable WRF-Chem",
+ when="@4:"
+ )
patch("patches/3.9/netcdf_backport.patch", when="@3.9.1.1")
patch("patches/3.9/tirpc_detect.patch", when="@3.9.1.1")
@@ -195,6 +201,9 @@ class Wrf(Package):
env.set("NETCDF", self.spec["netcdf-c"].prefix)
if "+pnetcdf" in self.spec:
env.set("PNETCDF", self.spec["parallel-netcdf"].prefix)
+ # Add WRF-Chem module
+ if "+chem" in self.spec:
+ env.set("WRF_CHEM", 1)
# This gets used via the applied patch files
env.set("NETCDFF", self.spec["netcdf-fortran"].prefix)
env.set("PHDF5", self.spec["hdf5"].prefix)