1 Introduction

Reservoirs are expected to fulfil the task of increasing water availability in space and time. The operation policy of a water reservoir can be influenced by many factors depending on its purpose(s). Besides the differences due to various purposes, the time scale of the operational policy may also change. For example, for flood control a reservoir might need a daily or hourly operation rule, whereas a predetermined long-term operating policy (monthly, weekly, etc) might work well for domestic or irrigation water supply. The operation policy of a reservoir can be derived by applying a variety of methods. A comprehensive review of mathematical models developed for reservoir operation analyses was prepared by Yeh (1985). The review concentrated on optimization and simulation models as well as on operation analyses under deterministic and stochastic conditions. Optimization techniques included linear programming (LP), dynamic programming (DP) and non-linear programming (NLP). The author concluded that both LP and DP optimization models, as well as simulation and combined optimization–simulation models have been extensively used in reservoir operation analysis.

However, these two methods are not the only methods used in this domain. For example, Saad et al. (1994, 1996) and Bouchart (1996) applied neural network, Esat and Hall (1994), Oliveira and Loucks (1997) used genetic algorithms. Shrestha et al. (1996) used the modeling based of the fuzzy rules to derive operation rules of a reservoir. However, many models of management in temperate climates are not transferable to the study of semi-arid zones (Bellostas 1981). Two summers of consecutive droughts experienced in southern Europe during 1989 and 1990 (Parent and Lebdi 1992) would not have had the same impact on the agricultural economy of a semi-arid zone. Early developments in model optimizing returns for stochastic hydrologic sequences (assuming that these sequences are known a priori) were conducted by Hall (1964) and Hall and Buras (1961). Their reservoir operation models were solved using methods of DP. Young (1966, 1967) extended the results of these earlier investigations. He proposed an implicit stochastic approach to optimize the operation of a single reservoir for annual usage such that the economic loss as a function of draft rate is minimized. He combined Monte Carlo simulation for synthetic streamflow generation, deterministic DP optimization and regression analysis to derive the operating strategy. The regression analyses were used to define release values in terms of storage levels and previous inflow rates. The data used for regression analyses were derived from the sequence of computed responses obtained from the optimization model. Karamouz and Houk (1982) proposed an iterative approach which combined deterministic DP, multiple regression and simulation to derive a general operating rule of a single water supply reservoir. Although not entirely conforming to the general definition, the method was essentially an implicit stochastic optimization. One iterative cycle consisted of deterministic DP optimization over the available historical inflow record, the subsequent derivation of the general linear release rule by means of multiple regression and the final step, which included the simulation of the reservoir operation according to the defined operating rule over a long synthetic sequence of reservoir inflows. The applicability of an implicit stochastic approach in which the operation of the system is optimized for a number of deterministic hydrologic data series is investigated by Kularathna (1992) in the case of a system of three reservoirs in cascade. This analysis consisted of generating several sets of streamflow data, followed by a deterministic optimization for each generated data set. Resulting optimum operation strategies were used in the derivation of operation rules using a least squares regression analysis.

This paper is focused on the optimization of operating rules of a single reservoir for dry events with variable time steps, taking into account the drought phenomena pertinent to Mediterranean climate. Ten synthetic rainfall events series, each having a length of 50 years, were generated based on an observed daily rainfall time series, and coupled this with a rainfall-runoff model. Implicit stochastic optimization (ISO) using dynamic programming is then performed for the operational optimization of the dam. Incremental dynamic programming (IDP; Larson 1968) was the technique used for this optimization. IDP has a considerably less computational requirement than traditional DP. In the iterative procedure of IDP, a limited state space is considered for a given iteration run. To increase the precision of the results, each series have optimized many time because the IDP. The choice of DP is also justified by a limitation of LP, that both the objective function and constraints must be linear functions of the variables. It constitutes a method for a tactical management of dams with times steps that are not constant. This approach has been demonstrated on a case study of the Ghézala dam in the basin North of Tunisia.

2 Case study

The case study involves the Ghézala reservoir dam (lat. 37°00′50″, 37°02′75″N, long. 9°26′, 9°32′07″E) located in the basin of Ichkeul in northern Tunisia (Fig. 1). The catchment area of this reservoir is approximately 48 km Sq. A storage reservoir created by the Ghezala dam has a capacity of 11.7 millions of m3, which is used to irrigate an area of 1,100 ha. The climate of the Ghezala basin is classified as sub-humid; the average annual rainfall is below 40% of the total annual potential evaporation. Time series of daily precipitation as provided by one precipitation station, Ghézala-dam, cover a period of 35 years (i.e. 1968–2002). Considering the small size of the catchment area of Ghézala dam (48 km2), it can admit that the precipitation of the Ghézala dam rain gauge is representative of all the catchment area. Indeed, by calculating the weighted factor of the method of Thiessen, by taking account of two other stations located apart from the catchment area, it found that the catchment area is completely located in the influence zone of the Ghézala dam station. Thus, this approach can be justified in spite of the precipitation measurements at a point have a large stochastic component and spatial variability. The accuracy of the modelling results increases when the rainfall stations are uniformly distributed within the catchment. Table 1 summarizes the basic statistics of the monthly and annual precipitation. Table 2 give the basic statistics of the monthly and annual elevation losses due to the evaporation estimated for Ghézala reservoir for the period 1985–2005. For instance, the mean monthly evaporation estimated varies between 40.7 mm/month in January and 263.9 mm/month in July (Table 2). Times series of monthly inflow volumes for Ghézala reservoir cover a period 1985–2003. Table 3 resumes the basic statistics of the monthly and annual inflows for this period. The average annual inflow to the reservoir is estimated at 7.615 106 m3/year. However, the great variability of inflows under the prevailing climatic conditions tends to constrain the utilization of the available resources. As to the seasonal flow variability, the major portion of the reservoir inflow (i.e. 95.5%) arrives in the period November–April whereas the remaining 4.5% of the total are distributed over the period May–October. The three driest months on the record are June, July and August, jointly contributing only 0.4% of the total mean annual inflow. The statistics of the irrigation demand recorded with the reservoir during the period 1985–2003 is shown in Table 4. The average annual demand is estimated at 2.029 106 m3/year. Except in occasional wet years, most precipitation is confined to the winter months in this basin. The dry season lasts from May to August. There is considerable variation of precipitation from year to year.

Fig. 1
figure 1

Localization of the studied system

Table 1 Basic statistics of the monthly and annual precipitation at the Ghézala rain gauge (mm)
Table 2 Basic statistics of the monthly and annual evaporation for Ghézala reservoir (mm)
Table 3 Basic statistics of the monthly and annual inflows (106 m3)
Table 4 Basic statistics of the monthly and annual irrigation demand (106 m3)

3 Characterization of an event

In the wet–dry spell approach, the time axis representing the rainy season is split up into intervals called wet and dry periods (Fig. 2). A rainfall event is an interval in which it rains continuously (it is an uninterrupted sequence of wet periods). Since the analysis of dry periods has been carried out to provide data for water resources development studies, the definition of event is associated with a rainfall threshold value which defines a wet period. The limit 3.6 mm day−1 has been selected because it corresponds to the average daily evapotranspiration in the area of the Ghézala dam. This amount of water corresponds approximately to the expected daily evaporation rate, thus marking the lowest physical limit for considering rainfall that may produce utilizable surface water resources during the rainy season which lasts from September to April. Rainfall below this threshold will only be considered on days which are elements of a given event, wherein at least one day fulfils the condition of having received of more than 3.6 mm. In this approach, the occurrence of rainfall is specified by the probability of the length of the wet periods (storm duration), and the length of the dry periods (time between storms or interevent time).

Fig. 2
figure 2

Definitions for the event based analysis

A rainfall event m in a given rainy season n will be characterized by its duration D n,m, symbolizing the number of subsequent rainy days, and by the total accumulated rainfall depth of H n,m of D n,m rainy days in mm (Bogardi et al. 1988; Bogardi and Duckstein 1993).

$$ H_{{n,m}} \, = \,{\sum_{j = 1}^{D_{{n,m}}} {h_{j}}},\quad n\, = \,1,\,2,\,...\,N\;\hbox{and}\quad m\, = \,1,\,2,\,...\,M_{n}, $$
(1)

where

N :

total number of observed rainy season;

M n :

number of events/rainy season n;

h j stands for the daily rainfall totals in mm. Note that h j > 0 and that for at least one h j > 3.6 mm. In order to define the temporal position of an event within the rainy season, a time parameter is needed. In study of Fogel and Duckstein (1982), this time parameter is usually the interarrival time. In this investigation, the interarrival time is replaced by the dry event or interevent time or dry event Z n,m (Fig. 2) represents the number of days without rainfall between two subsequent rainfall events. The beginning of the first rainfall event in autumn, in September, marks the beginning of the rainy season, while the end of the last rainfall event in spring, in April, marks the term of the rainy season. Thus, a wet season, with variable length, must start with a rainfall event and end in a rainfall event. The dry season thus lasts approximately four months. Z n,m is assigned to the event preceding a dry period. Thus, Z n,m = 0 for the last event of a season, m = M n (Bogardi et al. 1988; Bogardi and Duckstein 1993) according with the assumption that a rainy season must start and to end with a rainfall event.

The length of the rainy season L n is defined as the time span between the start of the first and the end of the last event of the given season; while the “annual" climatic cycle is determined as the time lapsed between the onsets of two subsequent rainy seasons (Fig. 2) (Bogardi et al. 1988). The climatic cycle define the position of the first rainfall event within the rainy season. However, the length of the year is fixed at 365 days, and it is taken as a constant.

$$ L_{n} \, = \,{\sum\limits_{m = 1}^{M_{n}} {D_{{n,m}} \, + \,{\sum\limits_{m = 1}^{M_{n} \, - \,1} {Z_{{n,m}}}}}},\quad n\, = \,1,\,2,\,...\,N\,\hbox{and}\quad m\, = \,1,\,2,\,...\,M_{n}, $$
(2)

where

L n :

length of rainy season in days;

N :

total number of observed rainy season;

M n :

number of events/rainy season n.

4 Generation of synthetic events

Regression analyses have been conducted in order to investigate the interrelationship between the parameters describing the rainfall events, rainy season and annual climatic cycle. Table 5 summarizes, for some selected parameters, the resulting value of coefficient of determination r 2. A relationship between event duration D n,m and rainfall depth per event H n,m with r 2 of 0.64 is identified, while no significant pairwise correlation between Z n,m and the duration D n,m and rainfall depth H n,m could be detected. Accordingly, the assumption made in the subsequent analysis that rainfall events within a rainy season are elements of an independent random process, seems to be justified.

Table 5 Maximum values of the coefficients of determination r 2

The number of events per season M n has been found to be independent of the other parameters except, as expected, of the total event-based rainfall depth \( {\sum_{m = 1}^{M_{n}} {H_{{n,m}}}} \) of the rainy season.

4.1 Probability distribution functions

4.1.1 Events per rainy season

Under the assumption of sequential independence of rainfall events, as formulated above, the Poisson density function:

$$ f_{N} (n)\, = \,\frac{{e^{{- \lambda}} \,\lambda^{n}}}{{n\,!}}, \quad n\, = \,0,\,1,\,2,\, \ldots $$
(3)

was found to adequately describe the distribution of the number of events per season. Figure 3 displays the empirical and fitted Poisson probability density function (pdf) while Table 6 summarizes the parameters of the pdf. The goodness of fit has been assessed favourably throughout the study by using the Kolmogorov–Smirnov test at 95% confidence level. The arithmetic mean appears to provide a stable estimate of the parameter λ of the Poisson pdf.

Fig. 3
figure 3

Distribution of the number of rainfall events per season

Table 6 Parameters of the distribution of the number of rainfall events per season

4.1.2 Duration of rainfall events

The analysis of the data enabled us to conclude that 62% of the events lasted 1–2 days. The maximum observed duration is 13 days. Table 7 presents the parameters of the best fitting pdf of rainfall event duration, the geometric pdf:

$$ f(j)\, = \,p\,q^{{j - 1}}, $$
(4)

where j is the duration of the event in days, \( p\, = \,1/\overline{j} \) is the inverse value of the mean event duration, and q = 1 − p was selected since it provided an excellent fit. The empirical and fitted geometric pdf of event duration are displayed in Fig. 4.

Fig. 4
figure 4

Distribution of rainfall event duration

Table 7 Parameters of the distribution of the rainfall events duration

4.1.3 Rainfall depth per event

Since the regression analysis (Table 5) indicates the existence of a relationship between rainfall depth and duration, it is necessary to distinguish between the pdfs of the rainfall depth for different values of event duration. This is done by means of estimating conditional pdfs. Different duration classes selected for the analysis were classes 1 for duration of rainfall events of 1 day, 2 for 2 days, 3 for 3 days, 4 for 4 and 5 days, and 5 for duration of rainfall events greater than or equal to 6 days. Table 8 summarizes the parameters of the pdfs of the depth per rainfall event distribution. The rainfall depths H n,m recorded during the events are grouped into 4 mm wide classes, starting with the 4–8 mm class. For events lasting at least 6 days, the Gamma distribution appears to provide the best fit (Fig. 5).

Fig. 5
figure 5

Distribution of the rainfall depth of the ≥ six-day long rainfall events

Table 8 Rainfall depth per event

4.1.4 Duration of dry events

Table 5 shows that the dry event duration (length of the interevent time) can be assumed to be independent from all other characteristics of the rainfall phenomenon. Thus the distribution of the dry event duration follows an unconditional probability distribution function. Figure 6 reveals that the shortest interruption (one day) is the most frequent. Almost 19% of the observed interevent times are only one-day long. Nevertheless, dry periods up to 30 or more days have been recorded. The mean length, 7.3 days (Table 9) and the high standard deviation are both serious warnings about the unsuitability of assuming an evenly distributed precipitation during the rainy season. The univariate negative binomial distribution has been found to best fit the interevent time process (Fig. 6).

Fig. 6
figure 6

Distribution of the dry event duration (interevent time)

Table 9 Parameters of the distribution of the dry events duration

4.1.5 Length of the “annual" climatic cycle

The phenomenon of a rainy season followed by a dry season constitutes an “annual" climatic cycle (Fig. 2). This is distinguished from the length of the year, which is constant and equal at 365 days. The expected value of the cycle (Table 10) confirms the annual characteristic of this phenomenon. The low coefficient of variation indicates the stability of this expected value. Positive skewness can be observed. The gamma pdf provides a good fit to distribution of the length of the climatic cycle C n (Fig. 7). While the length of the climatic cycle C n seems to be independent of the number of events per rainy season M n , it shows a slight dependence on the length of the rainy season L n . These conditions should be taken into account, even in the simplified generation procedure.

Fig. 7
figure 7

Distribution of the length of the climatic cycle

Table 10 Statistical parameters for the length of the climatic cycle

4.2 Generation procedure

Along with the interrelationships and/or independence among the parameters, a simple procedure to generate synthetic rainfall event sequences, based on drawing random numbers from a population distributed according to the pdf defined by the parameters characterizing the rainfall events, has been derived (Bogardi et al. 1988). In this procedure, all parameters relating to the sequences of dry periods are generated by event basis in term of duration. The rainfall depth per event is also generated by event; relating to the duration of the rainfall event (not daily basis). It starts by selecting the number of climatic annual cycles to be generated N then draw N random numbers from a Poisson distributed population to represent the number of rainfall events per season M n . Draw \( {\sum_{n = 1}^N {M_{n}}} \) random numbers from a geometrically distributed population. Assign these values to generated rainfall events to obtain rainfall events duration D n,m. Draw \( {\sum_{n = 1}^N {M_{n}}} \) random numbers from a population distributed according to the pdf defined by the event duration class associated with D n,m, to obtain depth of the rainfall events H n,m. Draw \( {\sum_{n = 1}^N {(M_{n}}} - 1) \) random numbers from a population following the negative binomial pdf to represent the interevent time Z n,m. As a by-product of the previous steps, the length of the rainy season L n can be derived (Eq. 2). Consequently, synthetic rainfall events, and their positions within the individual rainy seasons were defined. Furthermore, the time sequence of the rainy seasons is needed in order to able to identify the most severe droughts periods between rainy seasons. Therefore, the generated rainy season should be embedded into the corresponding climatic cycle. The empirical procedure which has been adopted to generate the length of the climatic cycle is defined thus: (1) define the minimum possible length of the climatic cycle, minimum C n , is 300 days for this area (2) the allowed range of deviation of the sum of generated cycle lengths \( {\sum_{n = 1}^J {C_{n}}} \) from the length of 365 J, is 30 days. This deviation should to be adequate to reproduce adequately the observed standard deviation (result obtained by a trial and error method). (3) climatic cycle length generated by drawing a random number from the Gamma distribution population should satisfied this previous constraints. (4) If any of these constraints is violated, reject the drawn value and drawing another value. (5) Then, one must check if the length of the synthetic rainy season L n obtained by summation of the durations of dry and rainfall events and associated with the generated climatic cycle C n does not deviate more than a given threshold from the length of the rainy season, L t estimated by regression on the length of the climatic cycle. A deviation up to 60 days was allowed (trial and error procedure). If this constraint is violated, reject C n and drawing another value.

By using these simple rules and constraints, with numerical values derived directly from observation data, the distribution of the synthetic climatic cycle lengths is preserved; also, both the fluctuation of rainy season length, and the correlation between rainy season length and cycle length can be taken into consideration. The event based rainfall analysis described above has been used to generate 50-year long synthetic rainfall sequences, complete with the corresponding climatic cycles. Table 11 compares the interrelationships between parameters for generated series and historic series. It can be concluded according to this table that the relations are preserved. The base for this paper is the event (rainfall or dry). As was described previously a rainfall event has characterized by its duration, rainfall depth per event and temporal position within the rainy season (Fig. 2). Thus, the rainfall depths were generated per duration of the event. Thus, to compare the statistics of the generated series with those of the historical series, the generated rainfall depths are discretized in daily rainfall by dividing each rainfall depth by the duration of the rainfall event corresponding. Thus, firstly, it can say that for the daily scale it does not reproduce the proprieties historic exactly since an approximation is making by supposing that the daily rainfall depth are equally distributed, contrary to what was postulated in Fig. 2. Table 12 compares the generated series to the historic in terms of extreme daily precipitation while Tables 13 and 14 compare the weekly and monthly statistics for precipitation of the generated series to the appropriate historic series. Table 15 gives the principal descriptive statistics of annual precipitation for the historic and generated series. The comparison of the observed and generated data show only very limited deviations especially concerning the minimal values. Comparisons of generated and observed means and standard deviations are summarized in Table 16. While the comparison of the arithmetic mean values of the observed and generated data show only very limited deviations, the difference in the standard deviation figures appear to be more substantial (Table 16). Furthermore, a slight tendency of the model to produce standard deviation values superior to the recorded ones can be observed. These differences can be attributed to the incorporation of simplifying concepts into the analysis.

Table 11 Coefficients of determination of observed and generated series
Table 12 Comparison of the generated series to the historic in terms of extreme daily precipitation (mm)
Table 13 Comparison of the statistics for generated weekly precipitation series to the historic (mm)
Table 14 Comparison of the statistics for generated monthly precipitation series to the historic (mm)
Table 15 Descriptive statistics of historic and generated series for annual precipitation (mm)
Table 16 Summary of parameters of observed and generated (50 years long) rainfall event time series

5 Rainfall-runoff model

Inflows by events to the dam were obtained from many generated synthetic event series coupled with the rainfall-runoff model developed for this purpose. This model is based on the hydrological balance of the small dam for a given time interval:

$$ \Delta V_{t} \, = \,V_{r} \, + \,V_{p} \, - \,V_{s}, $$
(5)

where ΔV t , V r , V p , V s are respectively the variation of the volume of reservoir during an interval of time t, inflow to the reservoir by runoff, the volume of the precipitations to the stretch of water from reserve, the outflow of water in the considered time interval, in m3.

These terms of the dam balance can be analyzed in the following:

$$ \Delta V_{t} \, = \,100\,\Delta H_{t} \,S_{r}, $$
(6)

where ΔH t , S r are respectively the variation of the water level of reservoir during an interval of time t (cm) and the average surface of the stretch of water during the period t (ha), with S r  = (S i  + S f )/2 where S i and S f are the initial and final surface of the stretch of water during the period t (ha) deduced from the curve altitude–surfaces of the reservoir.

$$ V_{r} \, = \,1,000\,L_{{r}} \,A_{{bv}}, $$
(7)

where L r , A bv are respectively the runoff (mm) and the area of the catchment (km2).

$$ V_{p} \, = \,10\,P_{{b}} S_{r}, $$
(8)

where P b is the precipitation (mm) to the stretch of water from reserve. It is daily observed at the Ghézala-dam rain gauge.

$$ V_{s} \, = \,C_{j}, $$
(9)

where C j is the daily sum of irrigation, evaporation and devasement during the period t (m3 day−1). These values are measured per day at the dam reservoir.

By replacing the terms by their expressions in the Eq. (5), the runoff can be derived as follow:

$$ L_{r} (\Delta t)\, = \,\frac{{{\left({S_{i} (t)\, + \,S_{f} (t + \Delta t} \right)}/2}}{{A_{{bv}}}}\times{\left[{0.1\,{\left({H_{f} (t + \Delta t)\, - H_{i} (t)} \right)}\, - \,0.01\,P_{b} \, + \,0.001.\,n\,.\,\frac{{C_{j}}}{{S_{r}}}} \right]}, $$
(10)

where L r t), n, H i (t), H f (t + Δt) are respectively the runoff (mm), the number of days of the rainy episode, the water level (cm) of reservoir at the beginning and the end of an episode t of duration t = n days. H i (t) and H f (t + Δt), the water levels are daily measured at the dam reservoir.

5.1 Determination of the production function of the runoff

The runoff can be calculated from the mean rainfall of the catchment and other variables such as the antecedent precipitation index or the cumulative rainfall since the beginning of the wet season.

$$ L_{{r}} \, = \,f\,{\left({Pm\,,\,IPA\,,\,P_{c}} \right)} $$
(11)

The time step appointed for calculations is the duration of the rainy episode. It is the originality of the method, which is halfway between the traditional models working at time step very short and aiming at reconstituting the hydrogramme (used in the flood predetermination) and the monthly models aiming at calculating the monthly runoff. The episode considered here, includes all days comprise in the same sequence of flow and takes into account all the rainfall during this sequence. For better separating the flows, each episode is framed by at least one dry day. The episodes generating a spill are excluded from calculations, because the spillage water cannot be evaluated correctly with only one daily measurement of the water level of the reserve whose variations during one day can be significant lasting the periods of spill.

The parameters used in the production function of the runoff are the runoff calculated from the Eq. (10), the mean rainfall that corresponds to the rainfall of Ghézala-dam rain gauge, the cumulative rainfall from September and the antecedent precipitation index of Kohler (Kohler and Linsley 1951) calculated so:

$$ IPA_{i} \, = \,(IPA_{{i - 1}} \, + \,P_{{i - 1}})\,e^{{- \alpha \,t}}, $$
(12)

where IPA i , P i − 1, IPA i − 1, t and α are respectively the antecedent precipitation index at day i (mm), precedent rainfall (mm), antecedent precipitation index when the precedent rainfall (mm), time interval between i et i−1 (days) and fitting coefficient determined by optimization in Eq. (11) join L r and the variables P m and IPA (α = 0.52 for Ghézala catchment).

The runoff considered in this study is the sum of the simple runoff and the retarded or hypodermic runoff. Now, the episodes were defined so as to cover all the duration of an increasing of the water level of the reservoir.

In hydrology, the methods of multidimensional analysis can be used, such as the multiple regression or the analysis in principal components, to describe the runoff from the factors of which it depends (Lavabre 1980; Chevallier 1983). The multiple regression is the method most used to express the runoff according to the rainfall and of an antecedent precipitation index (Chevallier 1983; Albergel 1987; Seguis 1987). The rainfall used can be the mean rainfall simply or the mean useful rainfall (Casenave 1978; Molinier 1981). The antecedent precipitation index can take very diverse forms (Lafforgue and Casenave 1980; Chevallier 1983), it can be even replaced by the cumulative rainfall since the beginning from the season. But, the expression (13) is most often used to calculate the runoff:

$$ L_{r} \, = \,a\, + \,b\,P_{m} \, + \,c\,IPA\, + \,d\,P_{m} \,IPA\,, $$
(13)

where L r , P m , IPA, and abc , d are respectively the runoff, mean rainfall, antecedent precipitation index (mm) and the regression coefficients.

This formula is tested by applying it to the hydrological variables obtained. Tables 17 and 18 give the statistical parameters, as well as the correlations between the hydrological variables used in modelling. Table 18 shows that runoff is correlated with the mean rainfall (P m ), but it only is fairly correlated with the antecedent precipitation index (IPA) and with the cumulative rainfall (P c ). Between these three variables, the correlation is sufficiently weak to conclude their independence. Consequently, it can associate them as explanatory variables of the runoff in a multiple regression. The relation obtained arises in the following form:

$$ L_{r} \, = \,0.12891\,P_{m} \, - \,0.22182\,{\rm IPA}\, + \,0.01827\,P_{m} {\rm IPA}\, - \,0.70298 \quad \hbox{with}\quad r^{2} \, = \,0.644 $$
(14)

We tried to improve the coefficient of determination by statistically seeking the best form of the runoff according to the same hydrological variables. The best coefficient of determination was obtained with the following equation:

$$ L_{r} \, = \, - \,2.92111\, + \,0.00793\,P_{c} \, + \,0.10606\,P_{m} \, + \,0.01866\,P_{m} {\rm IPA}\, - \,0.00957\,{\rm IPA}^{2} $$
(15)

with r 2   =   0.70

Table 17 Statistical parameters of the hydrological variables of the episodes (mm)
Table 18 Correlations between the hydrological variables

Although the obtained coefficient of determination cannot be regarded as very extremely, it constitutes nevertheless, comparing to the preceding cases, a not negligible improvement of the variance explained by the regression.

5.2 Model validation

By carrying out a correlation between all the measured runoff and the runoff calculated by the production function (15) modelling the runoff, one obtains the Eq. (16) allowing reconstituting the runoff on the catchment area:

$$ L_{{\rm rc}} \, = \,0.86515\,L_{{\rm rm}} \, + \,0.45002 \quad \hbox{with}\quad r^{2} \, = \,0.92 $$
(16)

The fact that the slope of the equation is not too different from one show that calibrate is satisfactory. A lower slope than 1 indicates a loss of water during runoff by evaporation and/or infiltration (Albergel 1987). The coefficient of determination of the Eq. (16) makes it possible to explain 92% of the variations of L rc by that of L rm. The difference comes mainly from the errors, on the one hand with the approximation by assimilating the mean rainfall to that of the entirety basin, and on the other hand, with the possible inaccuracies in the estimate of the runoff. However, any error made in one or more terms will find its effect in the runoff.

The precision of the model can be approached by the criterion of Nash:

$$ {\rm Nash}\, = \,1\, - \,\frac{{{\sum\limits_{i = 1}^N {(Lrc_{i} \, - \,Lrm_{i})^{2}}}}}{{{\sum\limits_{i = 1}^N {(Lrc_{i} \, - \,{\mathop {Lrm}\limits^-})^{2}}}}}\,/\,Nash\, \in \,\left] {- \propto \,,\,1} \right], $$
(17)

where \( N, {\mathop {Lr}\limits^ -}m, Lrc_{i}, Lrm_{i} \) are respectively the number of observations, mean of observations, calculated and observed runoff for time step i.

It is generally considered that a hydrological model gives acceptable results if the value of the criterion of Nash is higher than 0.8 (Nash obtained equalizes to 0.90).

Table 19 compares the generated series to the historic in terms of extreme daily inflows while Tables 20 and 21 compare the weekly and monthly statistics for inflows of the generated series to the appropriate historic series. Table 22 gives the principal descriptive statistics of annual inflows for the historic and generated series. A slight tendency of the model to produce statistics values different from the historic ones can be observed. This phenomenon can be attributed to the incorporation of simplifying concepts into the modelling and the small number of rainfall stations (one). The accuracy of the model increases when the number of rainfall stations is important and uniformly distributed within the catchment.

Table 19 Comparison of the generated series to the historic in terms of extreme daily inflows (106 m3)
Table 20 Comparison of the statistics for generated weekly inflows series to the historic (106 m3)
Table 21 Comparison of the statistics for generated monthly inflows series to the historic (106 m3)
Table 22 Descriptive statistics of historic and generated series for annual inflows (106 m3)

6 Optimization

The dam operation was optimized for variable time steps corresponding to the dry and rainfall events. The incremental dynamic programming (IDP) (Larson 1968) was used for this optimization. This is carried out over each sequence and many times each because of IDP.

Times step are defined by the dry and rainfall events. The state of the system at each stage is represented by the storage volume of the reservoir S t and the inflow Q t . The decision variable is the water released from the reservoir R t , which contributes towards decreasing the objective function’s value. The partially controllable O t part, spillage water, influences only the value of the state variable for the next stage.

The objective function is to minimize the expected value of the weighted one sided squared deviation of the water supply (releases) from the irrigation demands over the total period. It is expressed in mathematical terms as:

$$ z_{i} \, = \,Minimize\,{\rm E}\,{\sum\limits_{t\, = \,1}^T {{\left[{\omega_{t} \,(R_{t} - \,D_{t})^{2}} \right]}}}\quad \hbox{with}\quad R_{t} \, \leqslant \,D_{t} $$
(18)

where

i :

iteration index;

E:

denotes the expectation;

D t :

downstream irrigation demand during time step t, hm3;

T :

total number of time step in a climatic cycle (variable from one year to another). The maximum value of T that was used in this study is 47. T corresponds to the number of dry and rainfall events for a given rainy season plus the length of the dry season discretized in month;

R t :

release from the reservoir during time step t, hm3.

ω t :

objective function weight that takes account of the nature of event (dry or rainfall):

$$ \omega_{t} \, = \,\left\{{\begin{array}{*{20}c} {{\omega_{0}}} & {{\;t\,{\rm is}\,\;\,{\rm dry}}} \\ {{\omega_{1}}} & {{\;t\,{\rm is}\,\;\,{\rm wet}}} \\ \end{array}} \right. $$

The use of this objective function was necessary due to several reasons. The reservoir dam bears an important objective of meeting the irrigation water demands with the best fit. A ‘deviation’ type of an objective function best represents this objective. It is also recognized that large deviations from the demands produce more adverse effects on irrigation areas. This implies the suitability of a squared deviation objective function.

This optimization is subjected to the following constraints:

The release from the reservoir is constrained by the discharge capacity of the conduit:

$$ 0\, \leqslant \,R_{t} \, \leqslant \,R_{t} \max ; \quad t\, = \,1\,,\,2\,,\ldots,\,T $$
(19)

where

R t max:

maximum allowable release from the reservoir during a time step t, hm3.

Since it concerns an upper limit of release, R t max can be given by this equation:

$$ R_{t} \max \, = \,Q\,.\,d, $$
(20)

where

Q and  d:

are respectively the discharge of the conduct (m3 day−1) and time duration of the event in days.

Reservoir storage during any stage must be within the limits of minimum and maximum live storage capacity.

$$ S_{{\min}} \, \leqslant \,S_{t} \, \leqslant \,S_{{\max}} ;\quad t\, = \,1\,,\,2\,,\,,\ldots,\,T $$
(21)

where

S max :

maximum storage of reservoir at the beginning of stage t, hm3;

S min :

minimum storage of reservoir at the beginning of stage t, hm3.

State transformation equations according to the principle of continuity are presented in the following.

$$ S_{{t + 1}} \, = \,S_{t} \, + \,Q_{t} \, - \,E_{t} \, - \,R_{t} \, - \,O_{t} $$
(22)

with

$$ O_{t} \, = \,Max\,(S_{t} \, + \,Q_{t} \, - \,E_{t} \, - \,R_{t} \, - \,S_{{\max}} \,,\,0) $$
(23)

where

S t :

storage of reservoir at the beginning of stage t, hm3;

Q t :

incremental inflow to reservoir during stage t, hm3;

E t :

losses (principally evaporation) from reservoir during stage t, hm3;

O t :

spill from reservoir during stage t, hm3;

$$ E_{{t - 1}} \, = \,1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-\nulldelimiterspace} 2\,E_{{t - 1,0}} \,[a\,(S_{{t - 1}})\, + \,a\,(S_{t})] \quad \forall \,t $$
(24)

where

E t, 0 :

expected evaporation loss during stage t, m;

a(S t ):

surface area of the reservoir corresponding to the storage volume S t , at the end of stage t, 106 m2;

$$ a\,(S_{t})\, = \,{\sum\limits_{i\, = \,0}^5 {\alpha_{t}}}\,S^{i}_{t} \quad \forall \,t $$
(25)

where

α i :

are the fitted regression coefficients.

6.1 Regression analysis

Having formulated the deterministic optimum operation pattern for each streamflow sequence, after simulation record for optimum trajectory, a least square multiple regression analysis was performed to formulate an operation rule for the reservoir operation. Combinations of independent variables were considered in a preliminary regression analysis in order to determine the significant variables to formulate an operation policy. These independent variables include initial reservoir storages, inflows of reservoir corresponding to the current time step, and irrigation water demand as linear terms. Their cross products and quadratic terms were also considered. Reservoir releases were considered as the dependent variables. From the results of the preliminary analysis, the combinations of independent variables that are found to be insignificant were removed and the analysis was repeated with the remaining variables.

7 Results

For the regression, five intervals were identified. An equation for every initial storage interval was formulated. The operation rules per events, derived by using an objective function of minimization of the squared deviation of the irrigation water supply from the demand, can be expressed as:

$$ R_{t} \, = \,A_{{1j}} \,S_{t} \, + \,A_{{2j}} \,Q_{t} \, + \,A_{{3j}} \,D_{t} \, + \,A_{{4j}}, \quad \forall \,t\, \in \,[1\,,\,t_{{\max}}] $$
(26)

where

R t :

release from the reservoir during event (dry or rainfall) t, hm3;

S t :

storage of reservoir at the beginning of stage t, hm3;

Q t :

inflow to reservoir during stage t, hm3;

D t :

downstream irrigation demand during the stage t, hm3;

A i j :

regression coefficients, i  = 1 , 2 , . . . , 4, j  =   1 , 2 , . . . , 5 intervals of the initial storage (S i );

t max :

maximal duration of the event (dry or rainfall), 1 day.

The estimated regression coefficients of Eq. (26) are presented in Table 23. Corresponding ‘coefficients of determination’ (R 2) are also included in the same table. According to the operation rules of Eq. (26), the dam operation was simulated. Hydrological data of Ghezala dam are available from water years 1985 to 2002. The simulated dam performance obtained by to these ISO based operation rules are compared with the simulation performed according to the deterministic optimum operation and the historical operation, in Table 24. The percentage of irrigation water deficits of ISO based operation rules are shown in Fig. 8. Figure 9 illustrates the comparison of the ISO based operation rules simulated for this period.

Fig. 8
figure 8

Percentage of irrigation deficits of ISO based operation policy per event

Fig. 9
figure 9

Implicit stochastic optimization based operation policy per event for water years 1985–2002

Table 23 Regression coefficients of Ghezala Dam (ISO)
Table 24 Comparison of the performance of implicit stochastic optimization based operation with that the deterministic optimum and historical operation

8 Discussion and conclusions

The so-called dry spell phenomenon in the basin of Ichkeul seems to be particularly well described by fitting a pdf to the length of the interevent time. As Fig. 6 reveals, the elongated tail of the negative binomial pdf provides an excellent fit for the prolonged dry periods between subsequent rainfall events. Conceptually, in a true Poisson process, the time ‘without event’ should follow the exponential pdf or, in a discrete case, the geometric pdf (Fogel and Duckstein 1982). It is interesting to note that this ‘flaw’ could be eliminated by defining the interevent as the (dry) event (Bogardi 1986; Bogardi et al. 1988). Consequently, the present role of the intervent time would be taken over by the duration of the rainfall events (Bogardi et al. 1988). As Fig. 4 shows, the theoretical requirement of the fitted geometric pdf would then be fulfilled.

The distribution of rainfall depth associated with different duration classes seems to fit theoretical expectations. The use of the conditional pdf instead of the more demanding joint pdf makes it possible to perform an event-based analysis in cases of limited data.

The generated synthetic rainfall event time series have been coupled with a deterministic rainfall-runoff model to obtain synthetic streamflow series that were used for reservoir optimization.

Cross products and quadratic terms of independent variables such as the initial reservoir storage, reservoir inflows corresponding to the present and previous event, and irrigation water demand were found insignificant. The shape of the optimal operating rules of the reservoir is rather linear. This results in an operation rule by event (dry or rainfall) for each of the five intervals of the active zone, which the Decision Maker can use for a more realistic management of reservoirs.

In Table 24, the results of the IDP model indicate the objective achievements for the particular historical data set. Table 24 shows that the ISO based operation policy outperforms the deterministic optimum operation. Moreover, the former is preferable in terms of the probability of failure. It can be seen that the historical operation has been mediocre in terms of the water shortage and the probability of failure events compared to the ISO based operation policy.

The Fig. 8 shows water supply deficits in the periods of 1987 to 1990 and 1993 to 1996 explained by overdrawn hydrological years and a peak in the 2001–2002 period due to three consecutive dry years (of 1999–2001). The difference between simulated supply and target demands is shown for the same periods in Fig. 9. During the hydrological year 1987–1988, the historic annual inflow to Ghezala dam was nil.

It can be noted that the model inaccuracies induced by the ISO approach are quite significant. These inaccuracies accrue in the first instance during the data generation process. The deviation of the characteristics of generated data from that of the historical data is seen in Table 16. The accuracy of the rainfall-runoff model increases when the number of rainfall stations is sufficient and uniformly distributed within the catchment. Subsequent regression analysis increases the level of inaccuracy. These inaccuracies could be further enhanced in the case of a complex reservoir system.