diff options
author | Alberto Invernizzi <9337627+albestro@users.noreply.github.com> | 2024-08-29 14:19:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 14:19:04 +0200 |
commit | 9a169279934c316711c18af52a4c25e864dc5266 (patch) | |
tree | 4e04d3f67712371419ddeb18d58875eb08875a02 | |
parent | 093b273f5cb900f91077d3562a0bddb8583499d0 (diff) | |
download | spack-9a169279934c316711c18af52a4c25e864dc5266.tar.gz spack-9a169279934c316711c18af52a4c25e864dc5266.tar.bz2 spack-9a169279934c316711c18af52a4c25e864dc5266.tar.xz spack-9a169279934c316711c18af52a4c25e864dc5266.zip |
paraview: add cdi support (#44222)
* add basic CDI package
* add CDI variant to paraview
* [@spackbot] updating style on behalf of albestro
---------
Co-authored-by: albestro <albestro@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/cdi/package.py | 30 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/paraview/package.py | 7 |
2 files changed, 37 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cdi/package.py b/var/spack/repos/builtin/packages/cdi/package.py new file mode 100644 index 0000000000..67ced0fa8a --- /dev/null +++ b/var/spack/repos/builtin/packages/cdi/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Cdi(AutotoolsPackage): + """ + CDI is a C and Fortran Interface to access Climate and NWP model Data. + Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG. + """ + + homepage = "https://code.mpimet.mpg.de/projects/cdi" + url = "https://code.mpimet.mpg.de/attachments/download/29309/cdi-2.4.0.tar.gz" + + version("2.4.0", sha256="91fca015b04c6841b9eab8b49e7726d35e35b9ec4350922072ec6e9d5eb174ef") + + variant( + "netcdf", default=True, description="This is needed to read/write NetCDF files with CDI" + ) + + depends_on("netcdf-c", when="+netcdf") + + def configure_args(self): + args = [] + if "+netcdf" in self.spec: + args.append("--with-netcdf=" + self.spec["netcdf-c"].prefix) + return args diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 6eb986df7f..03907038fb 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -88,6 +88,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:") variant("visitbridge", default=False, description="Enable VisItBridge support") variant("raytracing", default=False, description="Enable Raytracing support") + variant("cdi", default=False, description="Enable CDI support") variant( "openpmd", default=False, @@ -234,6 +235,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): depends_on("openimagedenoise", when="+raytracing") depends_on("ospray +mpi", when="+raytracing +mpi") + depends_on("cdi", when="+cdi") + depends_on("bzip2") depends_on("double-conversion") depends_on("expat") @@ -706,6 +709,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): cmake_args.append(self.define_from_variant("VTK_ENABLE_OSPRAY", "raytracing")) cmake_args.append(self.define_from_variant("VTKOSPRAY_ENABLE_DENOISER", "raytracing")) + # CDI + cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_ENABLE_CDIReader", "cdi")) + cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_AUTOLOAD_CDIReader", "cdi")) + return cmake_args def test_smoke_test(self): |