Skip to content

Releases: hydpy-dev/hydpy

6.4.0

Choose a tag to compare

@holgeralbert holgeralbert released this 23 Jun 15:47

HydPy 6.4 includes two relevant changes:

  1. It is now possible to store additional files (README, .gitignore, etc.) within the network, control, conditions, and series subdirectories (#166).

  2. We fixed and improved how HydPy-Meteo-Glob-FAO56 and HydPy-Meteo-Sun-FAO56 calculate extraterrestrial radiation (#192).

    1. Because of following the units of the documented FAO56 equation too closely, both models under- or overestimated extraterrestrial radiation severely for subdaily simulation steps shorter or longer than one hour.
    2. Because of taking the fixed integration bounds of the documented FAO56 equation instead of adjusting them to the time of sunrise or sunset when necessary, both models underestimated extraterrestrial radiation slightly for all possible subdaily simulation timesteps.

    These changes are irrelevant for models that operate on a daily or longer timestep, cause small improvements for models that operate on an hourly timestep, and lead to substantially different evapotranspiration estimates for models that operate on subdaily, non-hourly timesteps. If your model might be affected, we recommend testing the impact of switching to HydPy 6.4 before going operational. We will update HydPy 6.3 for a while to keep it compatible with future changes to the Python ecosystem.

HydPy 6.3.2

Choose a tag to compare

@holgeralbert holgeralbert released this 23 Jun 07:25

NumPy 2.5 introduced a change that is incompatible with how HydPy 6.3.1 creates ndarray subclasses. We adjusted this in f63338d.

HydPy 6.3.1

Choose a tag to compare

@holgeralbert holgeralbert released this 20 May 19:58

This bugfix release lets HydPy add the cf_role = "timeseries_id" information to the station_id variable when writing NetCDF files (#184) and improves the strictness for detecting accidental changes of the variable property of Node instances (#186).

HydPy 6.3.0

Choose a tag to compare

@holgeralbert holgeralbert released this 04 May 05:24

We are happy to release HydPy 6.3, which contains many internal optimisations and the following user-relevant extensions.

New model features and improvements:

New general features and improvements:

  • We again improved the type hints in HydPy's source code. They help both framework developers and users who write more complex workflow scripts. One user-relevant example is that we started typing the shapes of the internally defined numpy.ndarray aliases.
  • Static type hints cannot completely express the dynamic composition of HydPy models. We therefore started providing a plugin, which gives the static type checker Mypy a clearer understanding of each model. It helps, for example, to detect mispelled parameter names early. The plugin is still incomplete and hasn't been officially documented yet. Still, you can already activate it by adding the entry plugins = hydpy.mypy_plugin.py to the mypy section of your configuration file and also adding a special hydpy.mypy_plugin section with the entry relevant_sources = X, where X points to your own library or libraries that depend on HydPy.
  • The property currentdir now supports the context manager protocol, like most "normal" options in HydPy do. Hence, by using the with statement, you can temporarily change the current directory for reading or writing files, without having to reset the previous value.
  • The property conditions does not raise (annoying) errors anymore if one passes a dictionary to it that also contains information for models that are currently not selected.

HydPy 6.2.0

Choose a tag to compare

@holgeralbert holgeralbert released this 23 Dec 19:02

We are pleased to release HydPy 6.2, which accelerates simulation runs through multithreading, introduces the new main model families HydPy-G and HydPy-WHMod, supports Python 3.13 and 3.14, and includes several smaller enhancements.

All these new features should be implemented without relevant breaking changes. For example, "normal" single-threaded simulations are still possible and remain the default behaviour. The only exception is that we have dropped support for Python 3.9 and 3.10.

Please note that the new submodel family HydPy-Snow is functional, but it is still not as convenient as other submodel families. We plan to completely submodularise snow processes in HydPy 7.0.

New models:

  • The new model family HydPy-G brings the ideas of the GR model series (modèle due Génie Rural) into HydPy. Among the available application models is HydPy-G-GR4, which implements the well-known, parameter-sparse lumped model GR4J.
  • The new submodel family HydPy-Snow so far provides the relatively simple application models HydPy-Snow-CemaNeige_T-Mean and HydPy-Snow-CemaNeige-T-MinMax
  • The new model family HydPy-WHMod stands out from the so-far available model collection by providing SVAT models that focus more on water balance aspects of individual sites than on simulating the discharge of entire river basins.
  • The new main model HydPy-KinW-Implicit-Euler is a very robust hydrological routing method. Its numerical stability is not restricted by the Courant condition, which makes it very efficient when applied to short routing distances or long time simulation timesteps.
  • The new submodel HydPy-WQ-Widths-Strickler serves to specify complex cross-section profiles based on width measurements. It enables distinguishing subareas actively involved in water routing from those that are not, allowing one-dimensional routing methods to approximate some two-dimensional phenomena.
  • The new main model HydPy-Dam-DB serves to simulate detention basins that actively control their release. It is the first member of the HydPy-Dam model family capable of utilising discharge information from distant observation points to enhance flood protection in river sections further downstream.
  • The new submodel HydPy-Exch-Interp transfers arbitrary information from multiple observation points to its main model and transforms it via configurable interpolation functions.

New model features:

  • The new HydPy-L model parameter BSf0 gives more flexibility in configuring direct runoff generation. This can help prevent the simulation of excessively high runoff peaks from short rainfall events during otherwise dry summer periods.
  • All HydPy-L models now allow specifying the elevation of individual response units (parameter GH) and the atmospheric temperature gradient (parameter ATG) to ease adjusting subbasin-wide average air temperatures to local terrain differences.
  • HydPy-L-DD now has a temperature-based mechanism that helps to prevent the formation of persistent "snow towers" in alpine catchments. One can enable it via the new parameters AGGH and AGSH.
  • HydPy-L-DD now has a simple glacier routine. The new parameters FEis and GSF serve to configure the transformation of snow into glacier ice and the melting of glacier ice.
  • HydPy-Dam-L-Lake, HydPy-Dam-L-RB, HydPy-Dam-L-Res, and also the new application model HydPy-Dam-L-DB now allow defining a commissioning date, before which they behave inactively.
  • Calibrating the ARMA coefficients of the routing model HydPy-ARMA-RIMO/RIDO by optimising, for example, the parameters of the translation diffusion equation is now more robust and much faster (but maybe sometimes a little less accurate).

New general features:

  • After offering additional CPU resources via the new option threads, HydPy tries to accelerate simulation runs by performing calculations in parallel. In different projects, the speedup ranged from less than 1% per additional thread (due to widely "unparallelisable" networks) to more than 100% (due to an improved processing order of "parallelisable" network parts).
  • Node instances now provide methods to plot (flow) duration curves of simulated and measured time series.
  • The new efficiency criteria functions fdc_nse and fdc_nse_log allow putting more emphasis on the statistical distribution than on the timing of individual events when calibrating or evaluating hydrological models.
  • All efficiency criteria functions now have the skip_notpositive option, which is especially useful for functions like nse_log that cannot deal with negative and zero values.
  • Function write_ncfile makes writing NetCDF time series files readable by HydPy more comfortable.
  • The different file managers (for example, the ConditionManager) now print a note if their current working directory is not explicitly defined but successfully "guessed". You can turn this off by setting printprogress to False.
  • Changing the project root directory (for example, to store a modified project version in a separate directory) now requires only a single command: pub.projectname = "new_project".
  • The "complete" selection of a project's network is now automatically created upon request by the new property complete of class Selections. This change decreases the risk of working with outdated data.
  • We added top-level update_parameter methods that should help not to forget to update the derived parameters of all relevant model instances after changing their control parameters (for example, during calibration).
  • The new calibration rule LogReplace supports optimising selected model parameters by using logarithmic transformation. CalibrationInterface provides interfaces that allow users to define custom transformation rules.
  • Reading time series from files that cover only a part of the whole considered period previously generally resulted in a loss of data for the uncovered parts. This overwriting of already available data with nan values can now be turned off with the reset option.

HydPy 6.1.5

Choose a tag to compare

@holgeralbert holgeralbert released this 09 May 22:13

As discussed in issue #168, HydPy-Musk-MCT's behaviour for negative inflow was previously left to chance to some extent. Starting with HydPy 6.1.5, it is always well-defined and configurable by users who wish to have complete control over situations where the occurrence of negative inflow values cannot be excluded.

Additionally, commit 27591db fixed a possible zero division in method Calc_MaxTimeStep_V5 of application model sw1d_gate_out that could occur when testing or experimenting in the pure Python mode.

HydPy 6.1.4

Choose a tag to compare

@holgeralbert holgeralbert released this 28 Mar 10:22

Again, we encountered cases where HydPy-Musk-MCT calculated nan values for low-flow situations. This time, these were caused by negative estimates of the reference discharge. We fixed this problem by simply resetting negative values to zero (see Calc_ReferenceDischarge_V1 for an example).

HydPy 6.1.3

Choose a tag to compare

@holgeralbert holgeralbert released this 27 Feb 09:01

This bugfix release improves how main models share information with their sub-submodels. Previously, some data was not passed as deep copies (see 54a5b7d), which could result in wrong assumptions of sub-submodels on, for example, which hydrological response units of the main model consider interception processes.

The previous bug could impact simulation results. However, only those projects could be affected that use a main model that defines a specific "prepare method" (for example, prepare_interception), a submodel that does not specify an equivalent method, and a sub-submodel that uses the information provided by this method. Such combinations can currently only occur when HydPy-Evap is involved and should be rare. Hence, it is unclear if any real projects have been affected.

HydPy 6.1.2

Choose a tag to compare

@holgeralbert holgeralbert released this 15 Jan 21:36

We encountered cases where HydPy-Musk-MCT calculated nan values for extremely small reference discharge values. We could fix this problem by increasing the precision of the iterative search for the corresponding reference water level (based on the Pegasus method). Hence, this bugfix release should not only avoid the nan value problem but might also result in slightly different (typically slightly more precise) results during low flow periods compared to previous releases. Please have a look at #162 for more information.

HydPy 6.1.1

Choose a tag to compare

@holgeralbert holgeralbert released this 24 Sep 04:59

The function create_projectstructure introduced in HydPy 6.1.0 was only of limited use because one still had to manually create the project's subdirectories (for example, projectroot/network/default). With HydPy 6.1.1, the different FileManager subclasses do this automatically if their base directory (for example, projectroot/network) is still empty. See (the end) of the documentation on the currentdir property for an example.