These authors contributed equally to this work.

Hydrological modeling is at the core of most studies related to water, especially for anticipating disasters, managing water resources, and planning adaptation strategies. Consequently, teaching hydrological modeling is an important, but difficult, matter. Teaching hydrological modeling requires appropriate software and teaching material (exercises, projects); however, although many hydrological modeling tools exist today, only a few are adapted to teaching purposes. In this article, we present the

In order to anticipate and manage water conditions, outcomes of hydrological research are applied on a regular basis by water managers and stakeholders. These are aimed at addressing numerous challenges, such as the following:

water resources management for hydropower, irrigation, and drinking water

low-flow forecasting, to better manage water resources and to ensure that environmental flows are respected

flood forecasting, to protect people and property, to evacuate inhabitants, and to plan the allocation of rescue forces with sufficient anticipation

flood protection, to define areas that cannot be built or to design dikes or dams

assessing climate change impact, to better anticipate future risks and design adaptation measures

assessing water resources in catchments

testing hypotheses about catchment processes since not all fluxes are easily measurable

For many years, teaching hydrology has implied teaching hydrological modeling

A key step to change this culture is to ensure that computational science training (e.g.,

The development of modeling tools dedicated to teaching hydrology began in the 1960s, with the pedagogic hydrological model

Numerous solutions exist to teach hydrological modeling, but they all have their limitations

The open-source programming language R is one of the most widely used languages in the hydrological community. It offers many open-source libraries useful, for example, for retrieving hydro-meteorological data, performing spatial analysis, and analyzing hydrological statistics. The whole workflow undertaken in hydrological studies can be done with R

A basic search with the keywords “educ

Since

In this paper, after introducing the general concepts taught in hydrology, we present the main features of the

The GR models were initially developed in the 1980s by Claude Michel and his colleagues at Cemagref (that recently became Irstea and then INRAE). The main objective was to design efficient models, starting from a simple structure and gradually adding complexity that proved useful for improving the model's predictive power

To disseminate their models beyond the Fortran programming community, a long time ago, the developers of the GR models proposed Microsoft Excel spreadsheets containing hydrological models, namely, the GR1A, GR2M, and GR4J models, as well as the CemaNeige snow accumulation and melt model (see next section for a description of these models), accompanied by a dummy dataset (

Later, the

To ease the implementation of the GR models,

GR1A

GR2M

GR4J

GR5J

GR6J

GR4H

GR5H

CemaNeige

Semi-distribution is enabled for the aforementioned models (except GR1A), which are originally lumped, in order to represent spatially heterogeneous catchments. The streamflow simulated for upstream catchments is propagated downstream using a lag function

To ease hands-on experience, the choice was made to reduce the number of functions to implement a complete modeling exercise (an

a small set of functions to prepare data, to calibrate and run hydrological models, and to plot outputs, i.e., the basic functions needed to undertake a hydrological modeling study;

a function to launch a graphical user interface (GUI) to set up the hydrological models manually.

These two levels of use allow teachers to choose between different levels of technical difficulty. They can choose the most adapted use according to the time available for the exercises, the teaching objectives, and the students' skills.

To get started with the package, particular attention was given to the documentation. The user manual describes the implementation of functions precisely and succinctly and provides simple examples (

Table

The main steps required to undertake a hydrological modeling study can be performed with

Many graphical outputs are available (see Appendix

Using the functionalities of the

Figure

“Choose a dataset” enables a dataset to be selected from those provided by the user to the function.

“Choose a model” enables a model to be selected among the GR2M monthly model and the GR4J, GR5J, and GR6J daily models according to the time step of the datasets provided (models at other time steps are not included in the GUI) and to activate the CemaNeige snow accumulation and melt model for the daily models.

“Parameter values” enables the parameters of the models to be modified. The parameters proposed are automatically adapted to the chosen model and the ranges are predefined. Changing any parameter value causes a real-time update of the plots and displayed scores (see below).

“Automatic calibration” enables an automatic calibration to be performed by optimizing a chosen objective function (among the Nash–Sutcliffe efficiency (NSE) and the Kling–Gupta efficiency (KGE) and with a squared root, inverse, or no transformation of discharge).

Overview of the

The following options are at the top:

“Choose a plot” enables the kind of plot that is displayed to be changed (see Fig.

“Flow time series” are dynamic plots of observed and simulated discharge as well as precipitation time series and discharge errors.

“Model performance” is an ensemble of static plots of observed and simulated discharge as well as precipitation time series and of annual regimes, flow duration curves, and a scatter plot between simulated and observed discharges.

“State variables” are dynamic plots that show the time series of GR model store levels as well as the time series of internal model fluxes.

“Model diagram” is a plot that can be dynamic and on the right shows the scheme of the chosen GR model and the dynamic evolution of all its fluxes with time and the related hydrometeorological data.

“Select the time window” enables the user to zoom within the provided data period or to move the window using the sliders.

“Select the target date” enables a specific date to be targeted (only for the “Model diagram” panel).

In the center, the plots are proposed by the “Choose a plot” panel.

On the right, the following are found:

A table of criteria provides the values of seven performance criteria (NSE and KGE with use of squared root, inverse, or no transformation of discharge, in addition to the bias).

Using the “Show previous simulation Qold” option, the previously obtained simulated time series appear on the plots provided in the center of the GUI as a dotted gray line. In addition, ticking this option makes criteria of this previous simulation appear in the criteria table introduced above. This option has no effect on the “Model performance” panel.

Two buttons allow users to download the displayed plot in a PNG file format, which can be useful for a report for example (in order to ensure the tracking of the downloaded files, various information is automatically added to the file header: name of the dataset, name of the model, simulation period, and parameter values; see Appendix

Figure

If R is not installed on the students' computers, it is possible to run the

Users are free to use their own datasets, but the

List of the 19 catchments in France included in the

Location of the 19 catchments in France included in the

Distribution of the characteristics of the 19 catchments included in the

The dataset is composed of both static geomatic and physiographic catchment indices and hydro-climatic time series (solid and liquid precipitation, potential evapotranspiration, air temperature, and streamflow time series). The climatic time series have been extracted from the SAFRAN reanalysis

This section and the accompanying sections in the Appendix present tests based on the

Rainfall-runoff models are composed of different components, e.g., reservoirs or unit hydrographs, whose behavior is defined by equations and parameters. Parameter estimation is a key step toward tailoring the models to a specific catchment. Understanding the role of model components and parameters is therefore an unavoidable preliminary step to performing hydrological modeling.

To illustrate the production and the routing parts of hydrological modeling that are present in any model, it is possible to use the different GR models included in

The GR4J model

As an example, the command lines in Appendix Listing

The role of the production component in GR4J illustrated by an example of flow simulation sensitivity to the

The role of the routing component in GR4J illustrated by an example of flow simulation sensitivity to the

The relative importance of the production and routing functions depends on the time step considered for the rainfall-runoff simulation. The production process is more important for the larger time steps (e.g., month or year) since it controls the catchment water balance. This can be easily illustrated by aggregating simulations performed at a daily time step to a yearly time step (see command lines in Appendix Listing

Comparison, at the annual time step, between GR4J daily simulations performed with different

Initial values of the model water storage must be specified at the beginning of a simulation. The way initial levels are defined can lead to potentially significant model errors. The most convenient way for modelers to initialize rainfall-runoff models is to perform a warm-up run of the model in order to limit the impact of this unknown.

This issue can be illustrated with

Example of streamflow simulations obtained considering no warm-up period (in purple), a 1-month warm-up period (in orange), and a 1-year warm-up period (in green) of the GR4J two stores.

In the

Automatic calibration of model parameters is also possible in

clicking on the automatic calibration button in the

using the simple

The calibration algorithm available in

A systematic inspection of the parameter space is performed to determine the most likely zone of convergence. This is done either by direct grid screening or by constrained sampling based on empirical parameter databases.

From the best parameter set of the previous step, a steepest-descent local search procedure is carried out to find an estimate of the optimum parameter set.

Different ways to evaluate the model calibration performance may be conceived using

Analyzing simulated versus observed flow regimes is an informative indicator of model performance (see command lines in Appendix Listing

Example of flow regimes observed for a catchment located in the French Alps (in black) and flow regimes simulated by GR4J without considering snow accumulation and melting (solid red line) or when a snow accumulation and melting routine is used (dashed red line).

Example of observed flow regimes (in black) and flow simulations obtained when GR4J is calibrated on NSE calculated on untransformed flows (solid red line), NSE calculated on square-root-transformed flows (dashed red line), and NSE calculated on logarithmic-transformed flows (dotted red line).

Similarly to the use of different flow transformations during model calibration, the

Split-sample tests, i.e., calibrating and evaluating a model on non-overlapping periods

The differential split-sample test, also introduced by

Example of differential split-sample results (KGE score) obtained for a given catchment.

The basic manipulations of the

Example of a vignette explaining how to perform both manual (left) and automatic (right) calibration of model parameters using the

Final output of the

Final output of the

Users of the

We believe that the proposed exercises and projects are a must if one wishes to learn hydrological modeling. They represent the core of many catchment-related studies.

Like any tool,

In addition, it is not possible for the user to build their own hydrological model by adding, for example, reservoirs (e.g., with different discharge functions) and unit hydrographs, to help understand each compartment of a model. This is possible with the

Other limitations, as mentioned in Sect.

Remote sensing data, other than meteorological or hydrological data, cannot be used in

Finally, proper uncertainty exercises, apart from the calibration on different periods, have so far not been a part of this tool, which we see as a simple way of starting hydrological modeling. However, it is easy enough to add noise to the input data to assess input uncertainty. Uncertainty arising from model structure can only be studied by changing models (e.g., using GR4J and GR5J models). The uncertainty associated with parameter calibration methods cannot be tested, as only an optimization algorithm is provided (NB: other algorithms can be plugged into

Exercises linking hydrology with other disciplines and scientific communities could be developed by the coupling of the

Finally, the

The authors' experience with different audiences has shown that

The introduction to computer programming is ideal to teach these notions to students. If students are to take this tool into their own hands, they must gradually acquire the concepts without difficulty. It is therefore essential that this is done in a playful way so that they are not discarded. The use of a graphical interface allowing modeling notions to be acquired, while putting aside the programming aspects, allows the different problems to be separated: modeling on the one hand and programming on the other hand. As soon as they wish to go further in the understanding of their subject, students very quickly perceive the limitations that a graphical interface can represent (options too limited, etc.). In addition, use can quickly become daunting if tasks need to be repeated (for example, clicking a large number of times and in a well-defined order to reproduce the results on several datasets). Sometimes there is not enough time to learn programming, justifying the need to use simple tools.

As such, the

Teaching hydrological modeling requires hands-on experience with rainfall-runoff models. Dedicated tools need to be adapted to the skills of the students and users and preferably developed in an open-source programming language to ensure the reproducibility of the results. In this context, the

In this appendix, we have used the time series of the X045401001 catchment (the Ubaye at Lauzet-Ubaye [Roche-Rousse] – DREAL PACA). The GR5J model, coupled to CemaNeige, was calibrated on the raw flows of the period from 1 January 2001 to 31 December 2004. The objective function used is the KGE.

Plot generated using the outputs of the

Plot generated using the outputs of the

Plot generated using the outputs of the

Plot generated using the outputs of the

Plot generated using the outputs of the

In this appendix, we have used the time series of the X045401001 catchment (the Ubaye at Lauzet-Ubaye [Roche-Rousse] – DREAL PACA). The GR5J model, coupled to CemaNeige, was calibrated on the raw flows of the period from 1 January 2001 to 31 December 2004. The objective function used is the KGE.

Dynamic plot generated using the outputs of the

Dynamic plot generated using the outputs of the

In this appendix, we have used the time series of the X045401001 catchment (the Ubaye at Lauzet-Ubaye [Roche-Rousse] – DREAL PACA). The GR5J model, coupled to CemaNeige, was calibrated on the raw flows of the period from 1 January 2001 to 31 December 2004. The objective function used is the KGE.

Static plot downloaded from the “Flow time series” tab of the GUI. From top to bottom:

Static plot downloaded from the “Model performance” tab of the GUI. From top to bottom and from left to right:

Static plot downloaded from the “State variables” tab of the GUI:

Static plot downloaded from the “Model diagram” tab of the GUI. Model diagram with adaptation of the arrows representing the different fluxes and of the maximal size and the level of the reservoirs according to the actual parameter values and to the values of all internal variables of the model.

Role of the production component in GR4J.

Role of the routing component in GR4J.

Relative importance of the production and routing functions.

On the need to perform a model warm-up.

Manual calibration.

Automatic calibration.

Model evaluation.

Using flow transformation in objective functions.

Using different objective functions.

Split-sample test.

Differential split-sample test.

The code and data used in this paper are included in the

OD, PB, and GT conceptualized the work. All authors contributed to the

The contact author has declared that none of the authors has any competing interests.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The authors would like to thank Météo-France (

This paper was edited by Matjaz Mikos and reviewed by two anonymous referees.