Hydpy

Latest version: v5.0.3

Safety actively analyzes 621469 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

5.0.2

This release contains minor technical improvements compared to 5.0.1 and, more importantly, some adjustments to recent site-package changes (e.g. of [NumPy](https://numpy.org/)). Its wheels are also available for Python 3.11, the latest Python version.

5.0.1

Fix passing an application model's module to the constructor of class [Rule](https://hydpy-dev.github.io/hydpy/5.0/calibtools.html#hydpy.auxs.calibtools.Rule) of module [calibtools](https://hydpy-dev.github.io/hydpy/5.0/calibtools.html). 62d6d9bd2d517f5f8e30fe1819e820306b8aca00

5.0.0

[HydPy-H-Land]: https://hydpy-dev.github.io/hydpy/5.0/hland.html
[H-Land (HBV96)]: https://hydpy-dev.github.io/hydpy/5.0/hland_v1.html
[H-Land (HBV96-SC)]: https://hydpy-dev.github.io/hydpy/5.0/hland_v2.html
[H-Land (HBV96-SC/PREVAH)]: https://hydpy-dev.github.io/hydpy/5.0/hland_v3.html
[H-Land (HBV96-SC/COSERO)]: https://hydpy-dev.github.io/hydpy/5.0/hland_v4.html
[HydPy-Dam]: https://hydpy-dev.github.io/hydpy/5.0/HydPy-D.html
[Dam (controlled lake)]: https://hydpy-dev.github.io/hydpy/5.0/dam_v006.html
[HydPy-Musk]: https://hydpy-dev.github.io/hydpy/5.0/HydPy-Musk.html
[Musk (classic)]: https://hydpy-dev.github.io/hydpy/5.0/musk_classic.html
[Musk (MCT)]: https://hydpy-dev.github.io/hydpy/5.0/musk_mct.html
[HydPy-H-Stream Version 1]: https://hydpy-dev.github.io/hydpy/4.0/hstream_v1.html
[HydPy-Exch]: https://hydpy-dev.github.io/hydpy/5.0/exch.html
[Exch (weir)]: https://hydpy-dev.github.io/hydpy/5.0/exch_v001.html
[HydPy-Meteo]: https://hydpy-dev.github.io/hydpy/5.0/HydPy-Meteo.html
[Meteo (global radiation, FAO)]: https://hydpy-dev.github.io/hydpy/5.0/meteo_v001.html
[Meteo (sunshine duration, FAO)]: https://hydpy-dev.github.io/hydpy/5.0/meteo_v002.html
[Meteo (global radiation, LARSIM)]: https://hydpy-dev.github.io/hydpy/5.0/meteo_v003.html
[Meteo (sunshine duration, LARSIM)]: https://hydpy-dev.github.io/hydpy/5.0/meteo_v004.html
[Evap (FAO)]: https://hydpy-dev.github.io/hydpy/5.0/evap_v001.html
[HydPy-L-Land (Penman-Monteith, Knauf)]: https://hydpy-dev.github.io/hydpy/5.0/lland_v3.html
[FactorSequence]: https://hydpy-dev.github.io/hydpy/5.0/sequencetools.html#hydpy.core.sequencetools.FactorSequence
[German Federal Institute of Hydrology]: https://www.bafg.de/EN/Home/homepage_en_node.html
[documentation]: https://github.com/hydpy-dev/OpenDA
[release notes]: https://github.com/hydpy-dev/OpenDA/releases

We are pleased to announce the release of HydPy 5.0. It includes technical improvements, freshly implemented hydrological models and extended data-assimilation support. Also, it marks the first step of our efforts towards a higher degree of model modularity, with which we strive to increase the compatibility of the process abstractions of different model families. In the following, we highlight the most notable changes.

First of all, one "feature" that does not relate to HydPy 5.0 directly but to a policy established during its development: We try to shift at least the most relevant content-related discussions between the core members to the GitHub issue system. Sometimes we discuss online; other times, we only document discussion results. This policy helps us to keep track of different ideas and how things evolved, and - as important - it allows others to trace the development of HydPy better and to participate.

New models and model improvements:
- The new model [H-Land (HBV96-SC)] is a slight modification of the long-available [H-Land (HBV96)] model. Like [H-Land (HBV96)], [H-Land (HBV96-SC)] works largely like the conceptional HBV96 model but represents runoff concentration with a linear storage cascade instead of a triangular-shaped Unit-Hydrograph. We implemented the storage cascade as an array of states, allowing us to address it in state-based data assimilation efforts.
- [H-Land (HBV96-SC/PREVAH)] combines concepts from HBV96 and PREVAH, which is also a successor of the original HBV model. All processes "above the soil" (input data correction, interception, snowmelt) and "inside the soil" (evaporation, generation of effective precipitation), as well as the handling of water areas, are identical with [H-Land (HBV96)] (and so with HBV96). Most processes "below the soil" agree with PREVAH (runoff generation and concentration). We intended to implement [H-Land (HBV96-SC/PREVAH)] to improve the drought and small summer-event simulation of [H-Land (HBV96)] with process equations suitable for state-based data assimilation methods. We are pretty happy with its performance so that it will soon replace the current low-flow forecasting model for the river Rhine of the [German Federal Institute of Hydrology]. 67
- [H-Land (HBV96-SC/COSERO)] combines concepts from HBV96 and COSERO, which is another successor of the original HBV model. We developed it for the same reason and similar to [H-Land (HBV96-SC/PREVAH)], except that most processes "below the soil" agree with COSERO. In our first very preliminary studies in a few Rhine sub-catchments, its results were a little less convincing than those of [H-Land (HBV96-SC/PREVAH)], but we still need to examine it in more detail. 68
- All members of the [HydPy-H-Land] model family now include the new land cover type *SEALED*, allowing for simulating surface runoff from sealed surfaces. 71
- We improved the snow module of all [HydPy-H-Land] with the alpine regions of the river Rhine in mind. The changes include (1) a seasonally varying day-degree factor for considering the effect of the annual cycle of global radiation on snow melt, (2) the further subdivision of hydrological response units into *snow classes* for modelling the effects of small-scale snow-depth variability, and (3) the redistribution of snow due to gravitational and wind forcing. 70
- We introduced the [HydPy-Musk] model family, providing Muskingum-like methods, which are finite difference solutions to the routing problem. Its member [Musk (classic)] replaces [HydPy-H-Stream Version 1]. It implements the "classic" Muskingum approach (relying on the storage coefficient *k* and the weighting coefficient *x*). Alternatively, it supports defining the working equation coefficients via the parameters *lag* and *damp* like [HydPy-H-Stream Version 1] did in the style of the IHMS implementation of HBV96. Ambitious users can also calculate the coefficients themselves. The second available member is [Musk (MCT)], which implements a form of the Muskingum-Cunge routing method developed by Todini. Currently, it is hard-coupled to the Manning-Strickler formula, applied on a trapezoidal channel profile. 85
- Until HydPy 4.0, our [HydPy-Dam] models did neither consider precipitation nor evaporation explicitly. Instead, the surrounding "land models" had to calculate these properties (because of our early efforts to strive for consistency with LARSIM). Now, all [HydPy-Dam] members take measured or calculated time series of precipitation and potential evaporation into account (for consistency with the old behaviour, one must currently supply time series with zero values). 51 69
- We added the [HydPy-Exch] model family, which opens new paths for coupling different model instances in one project. Its first member [Exch (weir)] allows for a gradient-based, bidirectional coupling of the inputs/outputs of other model instances and is inspired by the IHMS implementation of HBV96. So far, we have used it in combination with [Dam (controlled lake)] to model, for example, the connectivity of the Swiss lakes Morat, Neuchatel, and Bienne via relatively short canals, through which water can flow in both directions depending on the actual water level differences of the respective lakes. 69
- The new model family [HydPy-Meteo] targets more fine-grained modularisation regarding meteorological "preprocessing". [Meteo (global radiation, FAO)] and [Meteo (global radiation, LARSIM)] calculate global radiation based on (possibly measured) sunshine duration and rely on the equations documented for the FAO grass reference evaporation method and the LARSIM model, respectively. [Meteo (sunshine duration, FAO)] and [Meteo (sunshine duration, LARSIM)] handle the inverse case and calculate sunshine duration based on global radiation (possibly stemming from meteorological simulations). This refactorisation allows, for example, to calculate potential grass evaporation with [Evap (FAO)] using LARSIM-like global radiation estimates or to calculate actual Penman-Monteith evaporation with [HydPy-L-Land (Penman-Monteith, Knauf)] using FAO-like global radiation estimates. 81
- We added more methods for checking that our model implementations satisfy the water balance equation, especially for our HBV- and LARSIM-like models. All checks are part of the automatic test system, and we fully report their results in the online documentation.
- We standardised the units of many variables. So, for example, we now generally use $hPa$ for pressure terms and $W/m²$ for energy fluxes. This change might introduce some deviations from the original model descriptions in the literature but helps to avoid mistakes when setting up projects including different types of models. 81
- The new variable type [FactorSequence] allows for a better grouping of a model's different time series-related variables. We use it, for example, to separate state-like meteorological factors like air temperature from more flux-like variables like precipitation.

General and technical aspects:

- We dropped support for Python 3.6 (which reached its end of life) and started supporting Python 3.10 (the most recent Python release) instead.
- The processes for building (based on setuptools, not distutils) and testing (based on nox) are now up-to-date. One benefit for users is that creating HydPy wheels for alternative platforms becomes easy. 74
- HydPy 5.0 is compatible with the HydPy-OpenDA adapter 1.0 and includes numerous changes to satisfy its new functionalities. Please see the adapter's [documentation] and [release notes] for further information.
- Using NetCDF files now comes with a cleaner interface (mainly by removing of a few options that proved more irritating than helpful). Also, it now works both for left and right timestamps (meaning, the time points specified in a NetCDF file can relate to the start or the end of the respective time interval). 59 84
- Reading and writing data "just in time", which helps save RAM in massive projects, now relies on the NetCDF format and is much more efficient than our old approach. Another benefit is that there is no difference between "normal" NetCDF files and those required for reading or resulting from writing "just in time", which makes switching to the "just in time" approach as a project grows nearly effortless. 18 60
- HydPy 5.0 comes with some speed-ups in project initialisation. The most notable speed-ups relate to building the network between different model instances and preparing instances of the model family [HydPy-Dam] that define seasonally varying control rules.
- Users can now select different interpolation approaches when defining x-y-relationships (for example, between water level and discharge). Besides the old (flexible but complicated) ANN-based interpolation, HydPy now supports different spline interpolation methods (including simple piecewise linear interpolation). Users can either calculate the interpolation weights themselves or apply a suitable spline method to their raw x-y-data. 52

4.0.1

In HydPy 4.0.0, one needs to trigger the automatical generation of the sequence alias modules `inputs.py` and `outputs.py` by hand.
Since HydPy 4.0.1, they are already included in our binary distributions.

4.0.0

It's been a while since we released *HydPy 3.1*, and much has happened since then. The following listing points out only the highlights of the improvements *HydPy 4.0* comes with.

Regarding the model collection:
* Our "old" LARSIM-like application models [lland_v1 (Turc-Wendling, Degree day)](https://hydpy-dev.github.io/hydpy/4.0/lland_v1.html) and [lland_v2 (External PET, Degree day)](https://hydpy-dev.github.io/hydpy/4.0/lland_v2.html) now include a wider range of the original LARSIM options (e.g. capillary rise).
* The new model [lland_v3 (Penman-Monteith, Knauf)](https://hydpy-dev.github.io/hydpy/4.0/lland_v3.html) includes LARSIM options frequently applied in the context of runoff forecasting in Germany (e.g. snow energy balance calculations after Knauf, 2006).
* [lland_v4 (Penman-Monteith, Knauf, snow interception)](https://hydpy-dev.github.io/hydpy/4.0/lland_v4.html) extends [lland_v3](https://hydpy-dev.github.io/hydpy/4.0/lland_v3.html) by the process of snow interception.
* [lstream_v001 (Kinematic Wave, Manning-Strickler)](https://hydpy-dev.github.io/hydpy/4.0/lstream_v001.html) now keeps the water-balance perfectly. We achieved this by implementing LARSIM's "kinematic wave approach" instead of its original (problematic) Williams-like approach.
* [lstream_v002 (Kinematic wave, External rating curve)](https://hydpy-dev.github.io/hydpy/4.0/lstream_v002.html) works like [lstream_v001](https://hydpy-dev.github.io/hydpy/4.0/lstream_v001.html) but expects the relationship between water-stage and discharge to be calculated externally (e.g. by a hydrodynamical model).
* [dam_v006 (controlled lake)](https://hydpy-dev.github.io/hydpy/4.0/dam_v006.html), [dam_v007 (retention basin)](https://hydpy-dev.github.io/hydpy/4.0/dam_v007.html), and [dam_v008 (reservoir)](https://hydpy-dev.github.io/hydpy/4.0/dam_v008.html) are close emulations of the LARSIM models for representing lakes (SEEG), retention basins (RUEC) and reservoirs (TALS).
* [evap_v001 (FAO 56 PM)](https://hydpy-dev.github.io/hydpy/4.0/evap_v001.html) is our first pure "evaporation model" and implements the commonly applied [FAO guideline](http://www.fao.org/3/x0490e/x0490e00.htm) for calculating potential evapotranspiration.
* The "Converter" models [conv_v001 (Nearest Neighbour)](https://hydpy-dev.github.io/hydpy/4.0/conv_v001.html), [conv_v002 (Inverse Distance Weighting)](https://hydpy-dev.github.io/hydpy/4.0/conv_v002.html), and [conv_v003 (Inverse Distance Weighting with External Drift)](https://hydpy-dev.github.io/hydpy/4.0/conv_v003.html) work technically like all other models but are no hydrological models. You can apply them for interpolating input data (e.g. temperature) or the output data of arbitrary models (e.g. the potential evaporation calculated by [evap_v001](https://hydpy-dev.github.io/hydpy/4.0/evap_v001.html)).
* [wland_v001 (semi-distributed WALRUS model)](https://hydpy-dev.github.io/hydpy/4.0/wland_v001.html) is a (slightly extended) implementation of the [WALRUS](https://www.wur.nl/en/Research-Results/Chair-groups/Environmental-Sciences/Hydrology-and-Quantitative-Water-Management-Group/Research/WALRUS.htm) model, designed to simulate surface water fluxes in lowland catchments influenced by near-surface groundwater.
* [wland_v002 (experimental)](https://hydpy-dev.github.io/hydpy/4.0/wland_v002.html) is, as the name suggests, work in practice. So far, it simulates faster responses of the groundwater table than the original model due to more explicit considerations of the capillary fringe. We currently discuss other modifications to improve the WALRUS performance for "moderate-flat" catchments.

Note that, due to their extension, [lland_v1](https://hydpy-dev.github.io/hydpy/4.0/lland_v1.html) and [lland_v2](https://hydpy-dev.github.io/hydpy/4.0/lland_v2.html) now require some additional parameters.

Be aware that we might change some aspects of [lland_v3](https://hydpy-dev.github.io/hydpy/4.0/lland_v3.html) later. We will probably unify some parameter names and possibly even modify some equations.

General features:
* We now test *HydPy* from Python 3.6 to 3.9 (we think about dropping 3.6, but postpone this for the sake of keeping compatibility with the arcpy library of ArcGIS).
* The command "pip install hydpy" now installs *HydPy* and all its requirements in one step.
* Our AppVeyor workflow now creates an "HydPy-Installer" based on Python 3.9 for Windows. This is for users who want to experiment with *HydPy* without installing a complete Python environment or want to have a robust executable for just executing certain tasks (e.g. flood forecasting).
* We improved many features of the online documentation. Many new automatically generated links help to browse through the different pages (for example, to directly jump from a parameter to the methods/equation requiring this parameter). Additionally, we start providing the documentation of several *HydPy* versions in parallel (for now, version 4.0 and our current development status, the "master branch"; others will follow).
* *HydPy* now provides some [server functionalities](https://hydpy-dev.github.io/hydpy/4.0/servertools.html). The reason is to simplify the online coupling to non-Python software like [OpenDA](https://www.openda.org/) (for more information, see the separate documentation of our [OpenDA-Adapter](https://github.com/hydpy-dev/OpenDA)).
* We added and extended lots of "user-comfort" functionalities concerning [calibration](https://hydpy-dev.github.io/hydpy/4.0/calibtools.html), [evaluation](https://hydpy-dev.github.io/hydpy/4.0/statstools.html), [plotting](https://hydpy-dev.github.io/hydpy/4.0/devicetools.html#hydpy.core.devicetools.Element.plot_inputseries), and much more.

Scientifical and technical aspects:
* We finally achieved a test coverage of 100 %. Our Travis-CI workflow does not accept any changes with incomplete coverage. And everything is tested "publically" in the HTML documentation (using doctests). This is a really significant milestone, as it makes introducing bugs much harder and allows the hydrological community to check all implemented equations easily "by hand". We are not aware of any other hydrological modelling system with such an eager and transparent test system.
* We improved the tables and figures showing the results of the model integration tests. We hope they now better guide us into the depth of such huge models as [lland_v3](https://hydpy-dev.github.io/hydpy/4.0/lland_v3.html) and help to understand their details and possible implementation deficits. Our Travis-CI workflow automatically recreates all figures for each new release, so you can always be sure they are up-to-date.
* The source code is now consistently formatted with [black](https://github.com/psf/black).
* We started to add type hints to the source code following [PEP 484](https://www.python.org/dev/peps/pep-0484/). These improve the readability for code-analysis tools (and often also for humans) and improve IDE functions like auto-completion and bug-analysis. So far, these cover most of the features directly accessible to the user. We continue working on this.
* We increased the performance of *HydPy*, mainly regarding initialisation. Two examples are the "lazy importing" of optional site packages that are seldom required (finished) and the caching of pre-compiled byte-code (still room for improvements).

Most of the listed (and unlisted) improvements were implemented on behalf of the [German Federal Institute of Hydrology](https://www.bafg.de/EN/Home/homepage_en_node.html) and the [Forecasting Centre of the German federal state of Saxony (Landeshochwasserzentrum)](https://www.umwelt.sachsen.de/umwelt/infosysteme/lhwz/index.html).

3.1.1

*HydPy* informs the user when trying to read missing or incomplete observed or simulated time series data into *Node* objects. Due to some recent changes, this feature became unreliable. Version 3.1.1 fixes this problem and adds explanations and tests to the online documentation, to (hopefully) prevent this from happening again.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.