Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
Preprints
https://doi.org/10.5194/egusphere-2025-1096
https://doi.org/10.5194/egusphere-2025-1096
17 Mar 2025
 | 17 Mar 2025
Status: this preprint is open for discussion and under review for Geoscientific Model Development (GMD).

The Process and Value of Reprogramming a Legacy Global Hydrological Model

Emmanuel Nyenah, Petra Döll, Martina Flörke, Leon Mühlenbruch, Lasse Nissen, and Robert Reinecke

Abstract. Global hydrological models (GHMs) improve our understanding of water flows and storage on the continents and have undergone significant advancements in process representation over the past four decades. However, as research questions and GHMs become increasingly complex, maintaining and enhancing existing model codes efficiently has become challenging. Issues such as non-modular design, inconsistent variable naming, insufficient documentation, lack of automated software testing suites and containerization hinder the sustainability of GHM research software as well as the reproducibility of study results obtained with the help of GHMs. Although some GHMs have been reprogrammed to address these challenges, publications focus on evaluating model performance and do not describe the reprogramming process. To support the reprogramming of large geoscientific research software, we present in detail how the GHM WaterGAP was reprogrammed into sustainable research software. Following an agile project management approach, the software was rewritten from scratch in Python with a modular Model-View-Controller architecture, including development practices such as open-source licensing, version control, unit testing, linting, containerization, consistent and meaningful variable naming, and comprehensive in-code and external documentation. Due to the switch from C/C++ in the legacy code to Python, execution time doubled.  Our evaluation of the reprogrammed WaterGAP code against software sustainability criteria and FAIR4RS principles indicates that the reprogramming substantially improved the software usability, maintainability, and extensibility, making the reprogrammed WaterGAP software much more sustainable than its predecessor. The new WaterGAP software can be easily understood, applied and enhanced by novice and experienced modelers and is suited for collaborative code development across diverse teams and locations, fostering the establishment of a community GHM.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this preprint. The responsibility to include appropriate place names lies with the authors.
Share
Download
Short summary
We reprogrammed the latest WaterGAP model (2.2e) to create a sustainable global hydrological...
Share