Introduction

The study of hydrological response in a watershed requires hydrological modeling as an effective prediction tool (Verma et al. 2022). In basins with complex hydrography and contrasting climates, such as those around the Mediterranean, the simulation of low-flow and high-flow events is an obstacle for physically based models. To address this issue, parsimonious approaches must be studied as efficient operational tools (Perrin et al. 2003).

In Algeria, several regions are threatened by extreme rainfall events (Boumessenegh and Dridi 2022). The particular geographical and climatic conditions of the El-Taref region, lead surface water accumulation that generate redundant floods. These are considered as one of the most disastrous natural phenomena in the world (Natarajan and Radhakrishnan 2019). In view of the lack of river flow measurement data for the quantification and management of this risk, rainfall-runoff modeling is applied to reconstruct the missing flows of two main wadis (Bounamoussa and Kebir-Est) (Fig. 2).

The parsimonious approach of this study is based on the conceptual hydrological rainfall-runoff models of Génie-Rural-GR, which were developed at the French laboratory of Cemagref in the early 1980s (Perrin 2002; Perrin et al. 2003). They allow to link rainfall and runoff of a catchment (Michel 1983) and require few parameters and calibration data (Perrin et al. 2007).

This models use precipitation P (mm) and evapotranspiration E (mm) as input data for the models. To obtain simulated flows (output data), they must be calibrated against observed flows. Data management (input–output), calibration-simulation parameters and graphical visualization are performed in R. This runtime environment facilitates their implementation (Coron et al. 2017).

In this context, a database has been structured and processed in accordance with the monthly time step model requirements: GR2M (Génie Rural with 2 parameters) (Mouelhi et al. 2006). To enable its implementation two open-source packages are used: airGR (Version 1.6.12) (Coron et al. 2017, 2021) and airGRteaching (Version 0.2.12) (Delaigue et al. 2018). Both packages are easy to set up in the R (version 4.1.0) (Slater et al. 2019). It is defined as “an open-source programming language and an advanced high-level statistical computing and graphics system" (R Core Team 2019). All of these tools will contribute to build the model steps: initialization, calibration, validation and simulation, throughout the study period (1981–2019).

The structure of the GR2M model relies on eight (08) empirical mathematical equations (Mouelhi et al. 2006) (Fig. 1), which express the transformation of rainfall into the runoff and link the three functions (Perrin et al. 2007):

  • Production function X1 (mm),

  • Routing function X2 (unitless),

  • External exchanges to rivers, groundwater and the atmosphere.

Fig. 1
figure 1

Structure of the GR2M model (Mouelhi et al. 2006)

The model is based on feeding, storing, and draining two reservoirs known as the Production and Routing reservoirs. The main parameters that control them, X1 and X2, are assigned automatically (Coron et al. 2021).

The GR2M model has been tested and applied on a wide range of samples from various climatic conditions (Perrin 2002), including France (Makhlouf and Michel 1994), Australia (Bennett et al. 2017), Tunisia (Mouelhi et al. 2017), Peru (Llauca et al. 2020), Morocco (Ouhamdouch et al. 2020) and Thaïland (Ditthakit et al. 2021).

For its application in Algeria we cite the works of (Amireche et al. 2017; Bekhira et al. 2018; Belaroui et al. 2019; Hadour et al. 2020; Charifi Bellabas et al. 2021).

Materials and methods

Study area

Located in the extreme North-East of Algeria, the El-Taref catchment belongs to the Constantine coastal hydrographic basin coded (03). It is situated between the Mediterranean Sea (north), the Algerian-Tunisian border (East), the wilayas of Souk-Ahras (south), Annaba (north-west), and Guelma (south-west) (Fig. 2). It is constituted by four (04) sub-catchments, two of which are the subject of our study. These are the Kebir-Est sub-catchment coded (0316) and the Bounamoussa sub-catchment coded (0315). The study of the characteristics of the two sub-catchments shows that they have comparable elongated shape and high relief (Table 1).

Fig. 2
figure 2

Location of the study area

Table 1 Characteristics of the Kebir-Est and Bounamoussa sub-catchments

In particular, it is distinguished by its rainy and sub-humid climate with rainfall varying from 800 to 1200 mm and an average temperature of 20 (°C). Making it one of the most watered regions in Algeria (Seltzer 1946). Due to its specific coastal geographical position with an opening to the Mediterranean sea, and its particular hydro-geomorphological characteristics, the catchment has several natural depressions and lake reserves (lakes: Tonga, Oubéira, Mellah, Lake of the Birds and the Blue Lake and marshes of Mekrada, etc.) and a dense hydrographic network. The main wadis named, Kebir-Est and Bounamoussa join downstream to form the Oued Mafragh, the main outlet of the catchment (Fig. 2).

Wadi Kebir-Est is about 95 km long and drains the same-named sub-catchment, coded (0316), gauged by the hydrometric station of Ain-Assel. This station presents a lack of flow measurement data since the year 2003. Wadi Bounamoussa is about 48 km long and drains the same named sub-catchment, coded (0315). Its incomplete flow data come from the Cheffia dam station.

Structures and descriptions of the implemented packages (airGR, airGRteaching)

airGR: (Version 1.6.12), it is an R package, which is an hydrological modeling tool developed at INRAE-Antony (HYCAR research unit, France) since 2016 by Coron et al. (2017). For proper execution, the core of this package is coded in FORTRAN, but for flexibility, the other package functions are coded in R (Delaigue et al. 2018). It consists of three families of functions (Coron et al. 2021) which are successively:

  • The functions of the RunModel family require three arguments: InputsModel, Param, and RunOption. These allow the input of data and the preparation of functions and execution periods.

  • The functions of the ErrorCrit family require two arguments: InputsCrit and OutputsModel. These allow the definition of the performance parameters and the outputs of the model.

  • The functions of the Calibration family require four arguments: in addition to InputsModel, RunOptions, and InputsCrit, there is CalibOptions which determines the Calibration algorithm and optimizes the error criterion with Calibration_Michel from Irstea (Michel 1991).

All these functions, are easily executable using the structured arguments defined in the classes: CreateInputsModel, CreateRunOptions, CreateInputsCrit, and CreateCalibOptions (Fig. 3).

Fig. 3
figure 3

Implementation diagram of the airGR package functions (Thirel et al. 2021)

airGRteaching: Teaching Hydrological Modeling with the GR Rainfall-Runoff Models; Version (0.2.12), developed since 2017 by Delaigue et al (2018). It is designed and defined as an extension based on three families of functions:

Application functions structured by arguments:

  • PrepGR () allows the preparation of the observation data and the choice of the GR model type,

  • CalGR () allows the initialization and calibration of the model,

  • SimGR () allows the execution of the model simulation.

Static and dynamic graphical functions to interpret the observed data and the calibration and simulation results.

The 'Shiny' GUI function executes the model parameters in real-time.

Data acquisition and usage

All the tools chosen in this parsimonious model require as input four hydroclimatological calibration parameters (Michel 1991; Perrin et al. 2003; Mouelhi et al. 2006; Coron et al. 2017; Delaigue et al. 2019) (rainfall P (mm), temperature T (°C), potential evapotranspiration E (mm) and observed flow rate Q (m3/s)) of the catchments to be studied. The data series are at a monthly time step over 39 years for the period (1981–2019) (Table 2).

Table 2 Construction and characteristics of the sub-catchment databases

However, the data of mean monthly temperatures T (°C) are missing in the Ain-Assel station and are acquired from the GMAO MERRA-2 regionalization model (open-source data) provided by (NASA POWER 2021) (Table 3). Consequently, the monthly potential evapotranspiration E (mm/month) is calculated by the empirical formula of Thornthwaite (Thornthwaite 1948).

Table 3 Characteristics of temperature data (NASA POWER 2021)

The correlation by simple linear regression between the temperatures observed at the Cheffia station and those obtained by the regionalization model shows a strong positive and linear relationship R2 = 0.92 (Fig. 4).

Fig. 4
figure 4

Correlation diagram between the temperatures observed at Cheffia station and those provided by GMAO MERRA-2

The construction of the model with these data requires several steps (Table 2).

Results

The rainfall-runoff modeling with GR2M model implemented with R packages, airGR and airGRteaching, are applied to simulate flows in the two sub-catchments during the periods mentioned (Table.2).The calibration period is optimized by two parameters X1 and X2. The verification of the stability of the model requires a validation period by incorporating the same parameters. Then this stability is confirmed by comparing the quality of the performance parameters obtained from the calibration–validation periods.

Modeling quality and performance

The quality of this modeling depends mainly on a good calibration (Duan et al 1992). It is based on an optimization and robustness algorithm developed at Irstea by Michel (1991) and on efficiency criteria (Perrin et al. 2001); the Nash–Sutcliffe NSE criterion (Eq. 1) (Nash and Sutcliffe 1970) the Killing-Gupta KGE criterion (Eq. 2) and the modified Killing-Gupta KGE′ (Eq. 3) (Gupta et al. 2009). The results are even better when NSE, KGE, and KGE′ are approximate 1, indicating a perfect match between simulated flows and observed flows (Knoben et al. 2019).

$$NSE \left( \% \right) = 100*\left[ {1 - \frac{{\mathop \sum \nolimits_{i = 1}^{n} (Q_{i}^{obs } - Q_{i}^{sim} )^{2} }}{{\mathop \sum \nolimits_{i = 1}^{n} (Q_{i}^{obs} - \overline{{\overline{Q}_{obs} }} )^{2} }} } \right]$$
(1)

\({\text{Q}}_{{\text{i}}}^{{\text{obs }}}\): Observed runoff, \({\text{Q}}_{{\text{i}}}^{{\text{sim }}}\): simulated runoff at time step i, n is the total number of time steps over which the criterion is calculated and \(\overline{{{\text{Q}}_{{{\text{obs}}}} }} { }\): mean of the observed runoff.

$$KGE = 1 - \sqrt {\left( {r - 1} \right)^{2} - \left( { \alpha - 1} \right)^{2} - \left( {\beta - 1} \right)^{2} }$$
(2)
$${\text{Where}}\;\alpha { } = \frac{{\sigma_{sim} }}{{\sigma_{obs} }}\;{\text{and}}\;\beta = \frac{{\mu_{sim} }}{{\mu_{obs} }}$$
(3)

where r = the linear correlation coefficient between simulation and observation, α: a measure of the flow variability error, β: a bias, ɣ: the variability ratio, µ and σ are the mean and standard deviation of the flows.

For the calibration and validation of the model, the airGR package uses two efficiency criteria (NSE and KGE) while airGRteaching uses only one criteria (KGE′).

The efficiency criteria results of airGR and airGRteaching packages

The outcomes of the efficiency criteria obtained from the two packages are shown in (Tables 4, 5).

Table 4 AirGR results, calibration and validation periods
Table 5 AirGRteaching results, calibration period and validation

The graphical outputs results

Figures 5, 6, 7, 8, 9, and 10 show the graphical outputs of the airGR package for the modeling periods.

Fig. 5
figure 5

Model calibration results in the Kebir-Est Wadi sub-catchment at monthly time steps

Fig. 6
figure 6

Model validation results in the Kebir-Est Wadi sub-catchment at monthly time step

Fig. 7
figure 7

Model simulation results in the Kebir-Est Wadi sub-catchment at monthly time step

Fig. 8
figure 8

Model calibration results in the Bounamoussa wadi sub-catchment at monthly time steps

Fig. 9
figure 9

Model validation results in the Bounamoussa wadi sub-catchment at monthly time step

Fig. 10
figure 10

Model Simulation results in the Bounamoussa wadi sub-catchment at monthly time step. NB: The graphic configurations of the airGRteaching package are omitted because of their close analogies with those of airGR

Production and routing outputs

The statistical results of the production and routing obtained from this modeling, for each wadi, at a monthly time step are presented in Fig. 11 and Tables 6 and 7.

Fig. 11
figure 11

Production and routing distribution at monthly time step

Table 6 Descriptive statistics of production obtained with airGR and airGRteaching
Table 7 Descriptive statistics of the routing results obtained with airGR and airGRteaching

However, the production is marked by a positive asymmetric distribution with scattered extremities in the Bounamoussa Wadi sub-catchment, with a mean higher than the median. In contrast to the results for the Kebir-Est Wadi sub-catchment, the mean is close to the median, which implies a symmetrical distribution (Fig. 11). Concerning routing, the means above the medians show a positive asymmetric distribution (Table. 7).

Discussions

The rainfall-runoff modeling using the GR2M model applied over the period (1981–2019) reconstructs the missing flows data of Bounamoussa Wadi for the years (1992–1993) and Kebir-Est Wadi for the years (2003–2019). This work is based on the calibration period's quality, and the validation period confirms its successful completion.

For airGR, the efficiency criteria show that the calibration periods give values of: NSE (Q) (Eq. 1) > 80% and KGE (Q) (Eq. 2) > 83% for Bounamoussa; NSE (Q) (Eq. 1) > 85% and KGE (Q) (Eq. 2) > 89% for Kebir-Est. The validation periods give values that show an amelioration in these criteria: NSE (Q) and KGE (Q) > 87% for Bounamoussa and NSE (Q) > 86%, KGE (Q) > 89% for Kebir-Est.

From the airGRteaching results (Table 5), the performance criterion KGE′ (Q) (Eq. 3), during the calibration period, in Kebir-Est is greater than 92%. Estimations are also very acceptable and even better than what has been found in Bounamoussa (greater than 89%). As for the validation period, there is a slight amelioration of this criterion.

The efficiency criteria results achieved are close to 1 and show a good correlation between the observed and simulated flows. Therefore, the comparison of the criteria obtained from the calibration and validation periods reveals that the results are also close and show an improvement, particularly for those realized with the airGR package.

The production and routing outcomes analyzed in this study are overlapping. For both packages, the two sub-watersheds receive maximum production quantities in February (winter season), and minimums in August (summer season). The routing results show the same tendencies.

However, the production results (Tables 6, 7) for the Wadi Kebir-Est sub-catchment (125.12 and 120.82 mm) are higher than those for the Wadi Bounamoussa sub-catchment (99.50 and 83.84 mm). The routing gives values (35.63 and 36.22 mm) in the sub-watershed of Wadi Kebir-Est, and (32.90 and 33.80 mm) in the sub-catchment of Wadi Bounamoussa. These are probably due either to the long period of missing flow data in Kebir-Est Wadi (2003–2019) and that the model has overestimated, or to the nature of the sandy soils which favors infiltration to the groundwater. In addition, storage in the various surface reservoirs (lakes: Tonga, Oubéira, Mellah, Lake of the Birds, and the Blue Lake and Dams: Mexa and Bougous).

The graphical outputs are represented in Figs. 5, 6, 7, 8, 9, and 10, including flow hydrographs, rainfall hyetograms, and correlation plots of observed and simulated flows. They illustrate the efficiency and performance of automatic modeling with R and its airGR and airGRteaching packages.

Finally, the methodological approach of this work, which involves automatically implementing the GR2M model with R and its packages airGR and airGRteaching (Coron et al. 2017, 2021), appears to be more simple and yields better results than its manual application in previous works (Mouelhi 2003; Mouelhi et al. 2006).

Conclusion

With this study, the missing runoff was reconstructed as simply as possible. The data here required were calculated from the hydroclimatic data series available for a covering period of 39 years (1981–2019) (rainfall, temperatures, evapotranspiration and observed runoff) using the ‘GR2M’ conceptual hydrological model, included in the R packages, airGR and airGRteaching, which facilitate its implementation. Runoff reconstruction and the determination of the production and routing characteristics in the two sub-catchments depend on the quality of the efficiency criteria (NSE, KGE, and KGE′) of the calibration and validation periods. The results are convincing and confirm a good correlation between observed and simulated runoff. Then, the use of a simple conceptual model with 2 reservoirs (production and routing) seems to be robust enough to reproduce the observed runoff despite heterogeneous morphoclimatic conditions. The implementation with the two packages allows a better optimization of the results from a quality point of view.

However, flood risks in the El-Taref catchment generally correspond to the same periods of high production in the results of this study. For instance, the floods devastated the region in February 2012. It would then be interesting to apply hydrological modeling at daily time steps for more precision. This modeling can provide sufficiently interesting answers for better sustainable management of flood risks frequent in the study area. In particular, the estimation of flows during extreme climate events according to selected climate change scenarios could be performed.