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>
This commit is contained in:
parent
f3c4e1adbb
commit
f9dfd5fcb8
1 changed files with 9 additions and 0 deletions
|
@ -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 @@ def setup_build_environment(self, env):
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue