Skip to content

Commit

Permalink
drop rttov (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasjucker committed Aug 13, 2024
1 parent f22a605 commit 3cce5de
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 256 deletions.
24 changes: 1 addition & 23 deletions repos/c2sm/packages/icon/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ class Icon(AutotoolsPackage, CudaPackage):
default=True,
description='Enable usage of the RTE+RRTMGP toolbox '
'for radiation calculations')
variant(
'rttov',
default=False,
description='Enable usage of the radiative transfer model for TOVS')
variant('dace',
default=False,
description='Enable the DACE modules for data assimilation')
Expand Down Expand Up @@ -232,9 +228,6 @@ class Icon(AutotoolsPackage, CudaPackage):
depends_on('libfyaml', when='+coupling')
depends_on('libxml2', when='+art')

depends_on('rttov+hdf5', when='+rttov')
depends_on('rttov~openmp', when='~openmp+rttov')

for x in serialization_values:
depends_on('serialbox+fortran', when='serialization={0}'.format(x))
# WORKAROUND: A build and link dependency should imply that the same compiler is used. This enforces it.
Expand Down Expand Up @@ -322,7 +315,6 @@ def configure_args(self):
'nwp',
'ecrad',
'rte-rrtmgp',
'rttov',
'dace',
'emvorado',
'art',
Expand Down Expand Up @@ -507,17 +499,14 @@ def configure_args(self):
if '+cdi-pio' in self.spec:
libs += self.spec['yaxt:fortran'].libs

if '+rttov' in self.spec:
libs += self.spec['rttov'].libs

libs += self.spec['lapack:fortran'].libs
libs += self.spec['blas:fortran'].libs
libs += self.spec['netcdf-fortran'].libs

if '+coupling' in self.spec or '~cdi-pio' in self.spec:
libs += self.spec['netcdf-c'].libs

if '+emvorado' in self.spec or '+rttov' in self.spec:
if '+emvorado' in self.spec:
libs += self.spec['hdf5:fortran,hl'].libs
elif '+sct' in self.spec:
libs += self.spec['hdf5'].libs
Expand Down Expand Up @@ -683,17 +672,6 @@ def validate_extra_config_args(self, arg):
f'with the existing variant {variant_from_arg}. Set this variant instead.'
)

@run_after('configure')
def adjust_rttov_macro(self):
if '+rttov' in self.spec:
rttov_major_version = self.spec['rttov'].version.up_to(1)
if rttov_major_version != ver(13):
filter_file('_RTTOV_VERSION=13',
'_RTTOV_VERSION={0}'.format(rttov_major_version),
'icon.mk',
string=True,
backup=False)

def check(self):
# By default "check" calls make with targets "check" and "test".
# This testing is beyond the scope of BuildBot test at CSCS.
Expand Down
10 changes: 0 additions & 10 deletions repos/c2sm/packages/rttov/kind_inconsistency/mod_brdf_atlas.patch

This file was deleted.

14 changes: 0 additions & 14 deletions repos/c2sm/packages/rttov/kind_inconsistency/rttov_types.patch

This file was deleted.

200 changes: 0 additions & 200 deletions repos/c2sm/packages/rttov/package.py

This file was deleted.

10 changes: 1 addition & 9 deletions test/system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def test_install_2024_1_nvhpc():
@pytest.mark.icon
def test_install_conditional_dependencies():
# +coupling triggers libfyaml, libxml2, netcdf-c
# +rttov triggers rttov
# serialization=create triggers serialbox
# +cdi-pio triggers libcdi-pio, yaxt (but unfortunately this is broken)
# +emvorado triggers eccodes, hdf5, zlib
Expand All @@ -132,7 +131,7 @@ def test_install_conditional_dependencies():
# gpu=openacc+cuda triggers cuda

spack_install(
'icon @2024.1-1 %nvhpc +coupling +rttov serialization=create +emvorado +mpi gpu=openacc+cuda cuda_arch=80'
'icon @2024.1-1 %nvhpc +coupling serialization=create +emvorado +mpi gpu=openacc+cuda cuda_arch=80'
)


Expand Down Expand Up @@ -258,13 +257,6 @@ def test_install_py_typing_extensions_default(devirt_env):
spack_install('py-typing-extensions')


@pytest.mark.no_balfrin #Irrelevant
@pytest.mark.rttov
@pytest.mark.parametrize("compiler", ['gcc', 'nvhpc'])
def test_install_rttov(compiler):
spack_install(f'rttov @13.1 %{compiler}')


@pytest.mark.scales_ppm
def test_install_default():
spack_install('scales-ppm')
Expand Down

0 comments on commit 3cce5de

Please sign in to comment.