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
Emmanuel Nyenah, Petra Döll, Martina Flörke, Leon Mühlenbruch, Lasse Nissen, and Robert Reinecke

Status: open (until 12 May 2025)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
Emmanuel Nyenah, Petra Döll, Martina Flörke, Leon Mühlenbruch, Lasse Nissen, and Robert Reinecke

Data sets

March 7, 2025 (v1)DatasetOpen 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 https://doi.org/10.5281/zenodo.14988257

Model code and software

Reprogrammed version of the WaterGAP V2.2e and Groundwater Surface Water Use (GWSWUSE) linking model. Emmanuel Nyenah, Petra Döll, Martina Flörke, Leon Mühlenbruch, Lasse Nissen, and Robert Reinecke https://doi.org/10.5281/zenodo.14988011

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

Viewed

Total article views: 224 (including HTML, PDF, and XML)
HTML PDF XML Total Supplement BibTeX EndNote
189 31 4 224 40 6 6
  • HTML: 189
  • PDF: 31
  • XML: 4
  • Total: 224
  • Supplement: 40
  • BibTeX: 6
  • EndNote: 6
Views and downloads (calculated since 17 Mar 2025)
Cumulative views and downloads (calculated since 17 Mar 2025)

Viewed (geographical distribution)

Total article views: 218 (including HTML, PDF, and XML) Thereof 218 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 23 Apr 2025
Download
Short summary
We reprogrammed the latest WaterGAP model (2.2e) to create a sustainable global hydrological model. By utilizing best software practices like modular design, version control, and clear documentation, the new WaterGAP supports collaboration across teams. It can be easily understood, applied, and enhanced by both novice and experienced modellers. Additionally, we share the reprogramming process to assist in the reprogramming of other large geoscientific research software.
Share