CSHS-CWRA / RavenHydroFramework

repository for the Raven Hydrological Modelling Framework developed at the University of Waterloo
Artistic License 2.0
18 stars 8 forks source link

The Blended model is segfaulting #41

Open Zeitsperre opened 1 week ago

Zeitsperre commented 1 week ago

Setup Information

Description

It seems that the same type of Segfault being experienced in #35 is being reported in tests that depend on the "Blended" model. Tests around this model have been deactivated for this version of RavenHydroFramework in RavenPy.

Steps To Reproduce

This test (in RavenPy):

def test_ravenpy_blended(self):
    """Test for Blended ravenpy model"""
    model_name = "Blended"
    parameters = [
        0.029,
        2.21,
        2.16,
        0.00023,
        21.74,
        1.56,
        6.21,
        0.91,
        0.035,
        0.25,
        0.00022,
        1.214,
        0.0473,
        0.207,
        0.078,
        -1.34,
        0.22,
        3.84,
        0.29,
        0.483,
        4.1,
        12.83,
        0.594,
        1.65,
        1.71,
        0.372,
        0.0712,
        0.019,
        0.408,
        0.94,
        -1.856,
        2.36,
        1.0,
        1.0,
        0.0075,
        0.53,
        0.0289,
        0.961,
        0.613,
        0.956,
        0.101,
        0.0928,
        0.747,
    ]

    rpm = RavenpyModel(
        model_name=model_name,
        parameters=parameters,
        drainage_area=self.drainage_area,
        elevation=self.elevation,
        latitude=self.latitude,
        longitude=self.longitude,
        start_date=self.start_date,
        end_date=self.end_date,
        qobs_path=self.qobs_path,
        alt_names_flow=self.alt_names_flow,
        meteo_file=self.meteo_file,
        data_type=self.data_type,
        alt_names_meteo=self.alt_names_meteo,
        meteo_station_properties=self.meteo_station_properties,
        rain_snow_fraction=self.rain_snow_fraction,
        evaporation=self.evaporation,
    )
    rpm.run()

Provides this stdout:

OSError: Raven Error (code: -11): 
============================================================
                        RAVEN                               
 a robust semi-distributed hydrological modelling framework 
    Copyright 2008-2024, the Raven Development Team 
                    Version 3.8.1 w/ netCDF
                BuildDate Jun 18 2024
============================================================

And nothing in stderr.

Additional context

Originally posted in RavenPy: https://github.com/CSHS-CWRA/RavenPy/issues/379

Affecting xhydro: https://github.com/hydrologie/xhydro/pull/161

Contribution