Towards a sustainable utilization of the global hydrological modelling software WaterGAP (ReWaterGAP)

Project summary

WaterGAP is a global-scale hydrological simulation software for quantifying water flows and storages on all continents of the Earth. It is used to assess water availability and water stress for both humans and non-human biota. In numerous studies, WaterGAP was applied to simulate the impact of climate change on e.g. irrigation water requirements, ecologically-relevant streamflow characteristics, groundwater recharge and water resources; simulation results were included in IPCC reports.

WaterGAP has a leading role among global hydrological models. However, the research software, which has been modified by many PhD and postdoc researchers over more than 20 years, is still in a prototype state. It has never been refactored to fit a carefully planned software architecture and software documentation is very limited. The software resembles a collection of “script-like” files that each have close to 10,000 lines of code without any separation of concerns. It is therefore currently not possible to hand the software to researchers from other groups to replicate and understand the results or to extend the product for their own research. Due to the complexity of global hydrological models and the importance of the assessments and projections related to water resources, it is essential to have research software that is of a quality that enables the reproducibility of results.

The project goal is to rewrite the software with a modular structure using a modern programming language and providing extensive documentation. Additionally, the code should allow to flexibly change the spatial resolution of WaterGAP. The resulting software is to be testable, maintainable, extensible, and usable and thoroughly tested while maintaining the current computational performance. Rewriting will be done using an adapted scrum method, while designing the software architecture following the IEEE standard 1016-2009. A number of methods will be used to ensure internal and external quality management and to increase external usage of the resulting software product. Then, it will be possible for other researchers to run our global hydrological modelling software by themselves, to reproduce our results or investigate the impact of data and algorithm modifications on the results. The research community can compare algorithms, check the consistency and accuracy of our computational approach and find possible errors in the software more easily. For a quick and reliable reporting of such errors, we intent to make use of github for collaboration, automated testing and benchmark scenarios. This will not only enable others to use the research software more efficiently and make scientific results more reliable; a software that is extensible and maintainable also enables quicker scientific advances as new researchers spend less time understanding the code and writing new code.

The project is done in cooperation with Prof. Martina Flörke, Ruhr University Bochum.

Prof. Dr. Petra Döll (principal investigator)
Emmanuel Nyenah

January 2022 – January 2025

German Research Foundation (DFG) - Project number 443183317