HydPy 6.3.0
We are happy to release HydPy 6.3, which contains many internal optimisations and the following user-relevant extensions.
New model features and improvements:
- The application model HydPy-Manager-LWC (low water control management model) aims to prevent severe low-flow conditions by requesting additional water releases from controlled lakes or dams. It is the first member of the newly introduced HydPy-Manager model family, which focuses on coordinating different models to improve the realisation of water management measures.
- So far, we have added the ability to respond to additional water release requests (calculated by HydPy-Manager-LWC or defined externally) to the models HydPy-Dam-DB (detention basin model), HydPy-Dam-L-Lake (controlled lake model adopted from LARSIM), HydPy-Dam-L-Res (reservoir model adopted from LARSIM), and HydPy-Dam-L-RB (retention basin model adopted from LARSIM).
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.ndarrayaliases. - 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.pyto themypysection of your configuration file and also adding a specialhydpy.mypy_pluginsection with the entryrelevant_sources = X, whereXpoints 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
withstatement, 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.