wrf: add optional netcdf_classic variant (#35261)

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
This commit is contained in:
Stephen Sachs 2023-02-06 15:12:32 +01:00 committed by GitHub
parent 13c4f92907
commit 29d710fdec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@ class Wrf(Package):
description="Parallel IO support through Pnetcdf library", description="Parallel IO support through Pnetcdf library",
) )
variant("chem", default=False, description="Enable WRF-Chem", when="@4:") variant("chem", default=False, description="Enable WRF-Chem", when="@4:")
variant("netcdf_classic", default=False, description="Use NetCDF without HDF5 compression")
patch("patches/3.9/netcdf_backport.patch", when="@3.9.1.1") patch("patches/3.9/netcdf_backport.patch", when="@3.9.1.1")
patch("patches/3.9/tirpc_detect.patch", when="@3.9.1.1") patch("patches/3.9/tirpc_detect.patch", when="@3.9.1.1")
@ -228,6 +229,8 @@ def setup_build_environment(self, env):
# Add WRF-Chem module # Add WRF-Chem module
if "+chem" in self.spec: if "+chem" in self.spec:
env.set("WRF_CHEM", 1) env.set("WRF_CHEM", 1)
if "+netcdf_classic" in self.spec:
env.set("NETCDF_classic", 1)
# This gets used via the applied patch files # This gets used via the applied patch files
env.set("NETCDFF", self.spec["netcdf-fortran"].prefix) env.set("NETCDFF", self.spec["netcdf-fortran"].prefix)
env.set("PHDF5", self.spec["hdf5"].prefix) env.set("PHDF5", self.spec["hdf5"].prefix)