Preprints
https://doi.org/10.5194/egusphere-2025-1096
https://doi.org/10.5194/egusphere-2025-1096
17 Mar 2025
 | 17 Mar 2025

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 paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.
Share

Journal article(s) based on this preprint

04 Sep 2025
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
Geosci. Model Dev., 18, 5635–5653, https://doi.org/10.5194/gmd-18-5635-2025,https://doi.org/10.5194/gmd-18-5635-2025, 2025
Short summary
Emmanuel Nyenah, Petra Döll, Martina Flörke, Leon Mühlenbruch, Lasse Nissen, and Robert Reinecke

Interactive discussion

Status: closed

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on egusphere-2025-1096', Rolf Hut, 13 May 2025
  • RC2: 'Comment on egusphere-2025-1096', Anonymous Referee #2, 28 May 2025
  • RC3: 'Comment on egusphere-2025-1096', Anonymous Referee #3, 11 Jun 2025

Interactive discussion

Status: closed

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on egusphere-2025-1096', Rolf Hut, 13 May 2025
  • RC2: 'Comment on egusphere-2025-1096', Anonymous Referee #2, 28 May 2025
  • RC3: 'Comment on egusphere-2025-1096', Anonymous Referee #3, 11 Jun 2025

Peer review completion

AR: Author's response | RR: Referee report | ED: Editor decision | EF: Editorial file upload
AR by Emmanuel Nyenah on behalf of the Authors (08 Jul 2025)  Author's response   Author's tracked changes   Manuscript 
ED: Referee Nomination & Report Request started (09 Jul 2025) by Ting Sun
RR by Anonymous Referee #3 (09 Jul 2025)
RR by Rolf Hut (10 Jul 2025)
ED: Publish subject to minor revisions (review by editor) (10 Jul 2025) by Ting Sun
AR by Emmanuel Nyenah on behalf of the Authors (14 Jul 2025)  Author's response   Author's tracked changes   Manuscript 
ED: Publish subject to minor revisions (review by editor) (19 Jul 2025) by Ting Sun
AR by Emmanuel Nyenah on behalf of the Authors (23 Jul 2025)  Author's response   Author's tracked changes   Manuscript 
ED: Publish subject to technical corrections (25 Jul 2025) by Ting Sun
AR by Emmanuel Nyenah on behalf of the Authors (28 Jul 2025)  Manuscript 

Journal article(s) based on this preprint

04 Sep 2025
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
Geosci. Model Dev., 18, 5635–5653, https://doi.org/10.5194/gmd-18-5635-2025,https://doi.org/10.5194/gmd-18-5635-2025, 2025
Short summary
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: 918 (including HTML, PDF, and XML)
HTML PDF XML Total Supplement BibTeX EndNote
796 103 19 918 50 14 40
  • HTML: 796
  • PDF: 103
  • XML: 19
  • Total: 918
  • Supplement: 50
  • BibTeX: 14
  • EndNote: 40
Views and downloads (calculated since 17 Mar 2025)
Cumulative views and downloads (calculated since 17 Mar 2025)

Viewed (geographical distribution)

Total article views: 896 (including HTML, PDF, and XML) Thereof 896 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 04 Sep 2025
Download

The requested preprint has a corresponding peer-reviewed final revised paper. You are encouraged to refer to the final revised version.

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