Simulating past changes in the balance between water demand and availability and assessing their main drivers at the river basin scale

. In this study we present an integrative modeling framework aimed at assessing the balance between water demand and availability and its spatial and temporal variability over long time periods. The model was developed and tested over the period 1971–2009 in the Hérault (2500 km 2 , France) and the Ebro (85 000 km 2 , Spain) catchments. Natural streamﬂow was simulated using a conceptual hydrological model. The regulation of river ﬂow was accounted for through a widely applicable demand-driven reservoir management model applied to the largest dam in the Hérault Basin and to 11 major dams in the Ebro Basin. Urban water demand was estimated from population and monthly unit water demand data. Water demand for irrigation was computed from irrigated area, crop and soil data, and climatic forcing. Water shortage was assessed at a 10-day time step by comparing water demand and availability through indicators calculated at strategic resource and demand nodes. The outcome of this study is twofold. First, we were able to correctly simulate variations in inﬂuenced streamﬂow, reservoir levels and water shortage between 1971 and 2009 in both basins, in over


Introduction
In recent decades, climatic and anthropogenic pressures on water resources have increased in many regions of the world. According to projections of climate and socioeconomic changes, midlatitude areas could experience increased water stress in the course of the 21st century (Arnell, 2004;Heinrichs et al., 2012). Strategies are thus required to adapt water management to these changes (Hallegatte, 2009;Iglesias et al., 2011). Such strategies aim at maintaining a balance between water demand and availability, i.e., being able to supply enough water to satisfy demand while limiting anthropogenic pressure on water resources to sustainable levels. Therefore, they need to be based on a thorough understanding of each region's exposure and sensitivity to climatic and anthropogenic pressures. Vulnerability to climate change is not only a consequence of a system's exposure to climatic variations but may be due to a combination of biophysical impacts of climate change and of anthropogenic pressures (Farley et al., 2011;March et al., 2012;Reynard et al., 2014). Understanding vulnerability of river basins to climate change thus requires a quantitative assessment of water demand and availability, and an appropriate representation of the inter-

Published by Copernicus Publications on behalf of the European Geosciences Union.
actions between water uses and resources (including storage and regulation facilities).
Many authors have underlined the need for integrative assessments of the impacts of climate change on the balance between water demand and availability (e.g., Füssel and Klein, 2006;Ludwig et al., 2011), and an increasing number of studies that deal with this issue can be found in the literature. Studies at a global scale (e.g., Arnell et al., 2011) combined socioeconomic and hydro-climatic data from global databases, and identified the regions most susceptible to experience water stress. Here water stress is defined as an imbalance between water demand and availability, i.e., when water demand is greater than water supply. However, water management decisions are more often made at the river basin scale. Water resources at this scale are generally highly influenced by human activities and the assessment of imbalance between water demand and availability implies a thorough analysis of the spatial and temporal dynamics of water resources and uses. In this mindset, recent studies comparing water demand and availability were conducted at the river basin scale (e.g., Beck and Bernauer, 2011;Pulido-Velazquez et al., 2011;Varela-Ortega et al., 2011;Griffin et al., 2013;Koutroulis et al., 2013), with the aim of optimizing water allocation in given conditions or for the design of water management plans, which require a long-term perspective.
Studies that compare water demand and availability at the basin scale rarely fully incorporate anthropogenic and climatic drivers. The studies generally focus on simulating water resources (i.e., surface streamflow and/or groundwater levels) under varying climatic conditions. In some cases, water uses are dealt with by looking at population changes, without quantifying the corresponding water demand (i.e., the volumes associated; e.g., Griffin et al., 2013). In other cases, water demand is not simulated but data from historical series or estimates by local water managers are used (e.g., Pulido-Velazquez et al., 2011;López-Moreno et al., 2014). This limits the possibility of analyzing the drivers of the variations of demand in space and over time, even when sufficient data on withdrawals are available to account for this variability. Moreover, the distinction between water demand and actual water withdrawals is unclear. If water demand is simulated and its variations over time accounted for, the impact of climate variability on the demand for irrigation water is not always taken into account (Koutroulis et al., 2013). Consequently, studies that do not fully incorporate anthropogenic and climatic drivers of water availability and demand may not completely grasp the ways in which river basins could be affected by future anthropogenic and climatic changes.
In some studies, water demand is simulated based on anthropogenic and climatic drivers and is compared to water availability based on climatic variability and water management rules (e.g., Purkey et al., 2008;Varela-Ortega et al., 2011;Collet et al., 2013;Milano et al., 2013a). However, they often take a static view of the water balance, accounting for average conditions over several years (Milano et al., 2013a) or characteristic situations such as particularly dry or wet years (Varela-Ortega et al., 2011). In the context of anthropogenic and climatic changes, Krol et al. (2006) underlined the importance of correctly representing the long-term variations in demand and availability which, to our knowledge, few studies have achieved so far (one exception being the study by Collet et al., 2013). Indeed, before looking into complex future changes, we need to be able to represent longterm variations, which implies accounting for the variability of anthropogenic and climatic drivers.
In this mindset, interactions between water demands and water resources should also be accounted for. Notably, few studies have actually simulated natural streamflow separately from influenced streamflow. In some cases, hydrological models are calibrated on observed (i.e., influenced) streamflow data, and the simulated streamflow is compared to water demand to assess water stress (e.g., Collet et al., 2013). Also, a proper distinction should be made between water demand, withdrawals, and consumptive use, which was done for example in Collet et al. (2013) and Kiptala et al. (2014). Finally, a complex issue is the representation of the interactions between groundwater and surface water, i.e., the use of groundwater resources and the influence that their management could have on streamflow, and the partition of return flows from network losses and inefficient irrigation techniques between evaporation, groundwater recharge and return to surface flow.
The balance between water demand and availability can be represented by using indicators. Sullivan and Meigh (2005) defined indicators as "a statistical concept, providing an indirect way of measuring a given quantity or state, and allowing for comparison over time". Indicators should be dynamic and account for changes in the system under study. Some studies of the water balance (Varela-Ortega et al., 2011;Collet et al., 2013;Milano et al., 2013a) included indicators that represent the ability of supply to meet demand (e.g., water demand satisfaction rates or supply reliability) and the level of anthropogenic pressures on water resources (e.g., withdrawal to resource ratios). These indicators usually account for the average water balance (Pulido-Velazquez et al., 2011). In some cases, statistical components are included in the analysis, such as the return period of undesirable events (Asefa et al., 2014).
To be able to adapt effectively to future climatic and anthropogenic changes, we need to understand the interactions between the different drivers leading to water shortage or excessive pressure on water resources. Our review of the literature underlined a lack of integration of anthropogenic and climatic drivers in most modeling studies dealing with the balance between water demand and availability in river basins, i.e., at the scale of water management plans. River basins need to be considered as hydrosystems (i.e., systems made of water and the associated aquatic environments within a delimited geographical entity) that fully incorporate the different water uses and the influence that these uses may have on water resources, including storage and supply facilities. The need to better understand and represent interactions between resources and demand and to account for the variability of anthropogenic and climatic drivers is particularly pronounced in the Mediterranean region, which faces significant climatic variability, rapid population growth and economic development, and increasing competition between different water uses (Milano et al., 2012(Milano et al., , 2013b. Before simulating changes in water demand satisfaction under prospective water use and climate scenarios, we need to show that the modeling approach used is able to represent past variations in demand and availability, in space and over time. Also, giving historical context and explaining the past variations in water demand satisfaction can help us understand the vulnerability of hydrosystems to climatic and anthropogenic changes and design appropriate adaptation strategies. The aim of this study was thus to (i) combine socioeconomic and hydro-climatic data in an integrative modeling framework to represent water stress and its spatial and temporal variations over a past multi-decadal period, and (ii) use this framework and appropriate indicators to assess the sustainability of current water uses. The integrative modeling framework was developed and applied in two contrasting Mediterranean catchments facing increasing climatic and anthropogenic pressures: the Hérault Basin (2500 km 2 , France) and the Ebro Basin (85 000 km 2 , Spain). This constrains its conception to different spatial scales, stakes and water management issues (mainly population growth, irrigation and tourism for the Hérault Basin, and irrigation for the Ebro Basin).

Geographical context
The Hérault and the Ebro catchments differ in their geographical characteristics. The Hérault Basin is located in the South of France (Fig. 1a). It is bordered in the north by the Cevennes Mountains. The Hérault River flows 150 km from Mont Aigoual (1565 m a.s.l.) in the north, through a crystalline system of low permeability in the upstream part, a karstic system in the middle part, and an alluvial valley in the downstream part, into the Mediterranean Sea at the town of Agde.
The Ebro Basin is located in the north of Spain (Fig. 1b). The Ebro River flows 910 km in a northwest to southeast direction from Fontibre in the Cantabrian range (1027 m a.s.l.), to the town of Tortosa where it forms a large delta. It is bordered by the Pyrenean range (up to 3383 m a.s.l.) in the north, the Iberian range in the south and the Catalan coastal range in the east.

Hydro-climatic and socioeconomic data sets
Daily climate forcings for the Hérault Basin for the period 1969-2009 were extracted from the SAFRAN meteorological analysis system, an 8 × 8 km grid provided by Meteo France and validated over France by Quintana-Segui et al. (2008). Potential evapotranspiration (ET 0 ) was calculated using the FAO (Food and Agriculture Organization) Penman-Monteith formula (Allen et al., 1998). For the Ebro Basin, daily temperature and precipitation measurements from 264 and 818 stations, respectively, were interpolated on an 8 × 8 km grid using the inverse distanceweighted method. Lapse rates of −6.65 • C 1000 m −1 and of  . Since additional data for the calculation of Penman-Monteith ET 0 (e.g., wind and humidity) at the scale of the Ebro Basin from 1969 to 2009 were too scarce, the Hargreaves empirical equation (Hargreaves and Samani, 1985) was used to calculate ET 0 at a daily time step. The calibration proposed by Martínez-Cob and Tejero-Juste (2004) in the Ebro Valley was applied to the whole basin using Eq. (1). Windy areas in the Ebro Basin were defined by García- Vera and Martínez-Cob (2004) based on available wind speed data. If a common formula in both basins were to be used, considering data availability it would have been based only on temperature (e.g., Oudin et al., 2005) and not necessarily adapted to agronomic studies. Moreover, simulations of water demand and dam management led to more realistic results with the Hargreaves formula than with the Oudin formula. Thus, we preferred to use the most accurate formula applicable in each basin rather than a common formula for both basins.
where ω = 0.0023 in windy areas, ω = 0.0020 otherwise, Ra is extraterrestrial radiation, λ is latent heat flux, T MAX is maximum daily temperature, T MIN is minimum daily temperature, and T MEAN is mean daily temperature. Daily streamflow data were extracted from the French Ministry of Ecology and Sustainable Development's database Banque Hydro (MEDDE, 2010) for the Hérault Basin and from the Anuario de aforos of the center of studies and experiments on hydraulic systems (CEDEX, 2012) for the Ebro Basin. Reservoir levels and outflow data were provided by the General Council of the Hérault administrative region (Conseil Général de l'Hérault) and by the CEDEX for the Ebro Basin.
Population data were provided by national statistics institutes (INSEE for France and INE for Spain), and information concerning irrigated areas and crop dynamics was extracted from agricultural censuses. The efficiency of water supply networks and of irrigation systems and data relating to unit water consumption and industrial activities were provided by the local water management agencies (adapted from CHE, 2013 andSMBFH, 2005).

Hydro-climatic context
The Hérault catchment is characterized by a Mediterranean climate influenced by the Cevennes Mountain range, with mild wet winters and hot dry summers. The average seasonal temperature in the period 1971-2009 ranged from 6 • C in the winter to 20 • C in the summer; average annual precipitation was 1100 mm over the basin. Temperature and precipitation follow a north-to-south gradient in the basin: aver-age annual temperatures range from 8 • C in the north to over 15 • C in the south, and average precipitation ranges from over 1600 mm yr −1 in the north to less than 600 mm yr −1 in the south. Climatic conditions in the Ebro Basin are complex due to the contrasting influences of the Atlantic Ocean and the Mediterranean Sea and of the three mountain ranges, particularly the Pyrenees (Vicente-Serrano and López- Moreno, 2006). Annual temperatures and precipitation range from 8 • C in the Pyrenees to 17 • C in the lower Ebro Valley and from over 2000 mm yr −1 in the western Pyrenees to less than 400 mm yr −1 in the semi-arid central Ebro Valley.
Mean annual streamflow was 36 m 3 s −1 (14 L s −1 km −2 ) in the Hérault and 330 m 3 s −1 (4 L s −1 km −2 ) in the Ebro between 1971 and 2009. The Hérault and its tributaries have a Mediterranean regime (severe low flows in summer and high flows in fall and winter with potentially severe floods in fall). Hydrological regimes in the Ebro Basin vary from nival to Mediterranean (Bejarano et al., 2010). Upstream sub-basins in the Pyrenean and the Cantabrian ranges produced an average of 47 % of the Ebro Basin's natural runoff between 1971 and 2009.
The period 1971-2009 comprises significant climate variability: statistical breaks in temperature and discharge series were detected in both basins around the year 1980. Temperature increased by 1 • C in both basins between 1971-1980 and 1981-2009 and discharge decreased by 41 and 37 % between 1971-1979 and 1980-2009 at the outlets of the Hérault and the Ebro basins, respectively. Although no statistically significant break was detected, annual precipitation decreased by 10 % in the Hérault Basin and by 12 % in the Ebro Basin between 1971-1980 and 1981-2009. Seasonal disparities were identified in the precipitation trends: while winter precipitation decreased by approximately 40 % between the two periods in both basins, fall precipitation increased by 21 % over the Hérault Basin and by 12 % over the Ebro Basin. Similar hydro-climatic trends were detected by Collet et al. (2014) and Milano et al. (2013aMilano et al. ( ) in the 1969Milano et al. ( -2010Milano et al. ( and 1957Milano et al. ( -2002 periods in the Hérault and Ebro basins, respectively. Figure 1 shows the main anthropogenic pressures on water resources in the Hérault and the Ebro Basins. In the Hérault Basin, the north differs significantly from the south, with low population density and sparse agricultural areas in the north and a high concentration of urban and agricultural areas in the south (Fig. 1a). Water demands for agricultural and urban use inside and outside the basin amount to comparable volumes, i.e., 40 hm 3 yr −1 for each type of demand on average between 1980 and 2010 . The Florensac transfer, which supplies urban water to coastal tourist areas located east of the basin, accounted for one-third of total water demand in 2009. Water demand is highly seasonal, with irrigation demand (mostly for vineyards) and urban demand (increased because of tourism) both peaking between July Hydrol. Earth Syst. Sci., 19, 1263-1285, 2015 www.hydrol-earth-syst-sci.net/19/1263/2015/ and August. Of the five dams in the basin with a total storage capacity of 8 % of total runoff , the main one is the Salagou dam (102 hm 3 ), built in 1968 to supply water for irrigation but currently mostly used for recreational activities on the lake. The main irrigated areas are concentrated around the Gignac canal which distributes water from the Hérault River to an irrigated perimeter of nearly 3000 ha. According to local stakeholders, until the 1990s the efficiency of the system barely reached 7 % but increased to 20 % in the late 2000s. The Ebro is a complex and highly regulated hydrosystem with a total of 234 dams, amounting to a storage capacity of 60 % of total runoff . Irrigated areas are concentrated in the semi-arid Ebro Valley and are supplied by a network of canals linked to large storage dams, most of which collect water from the Pyrenean Mountains. In 2007, agricultural water demand represented 92 % of the total water demand (CHE, 2013). The Ebro Basin concentrates 60 % of Spain's fruit production and 30 % of the country's meat production (CHE, 2013). Agriculture in the basin contributes to a dynamic agro-industrial sector. Together with water demand for the open-air cooling systems of two nuclear power plants, industrial water demand is similar to urban water demand. The population density is mostly very low (under 10 inhab. km −2 ) except in a few urbanized areas such as Zaragoza or Pamplona. Transfers to cities outside the basin have been underway since 1927, the two main ones being urban and industrial water transfers to Bilbao andTarragona, underway since 1975 and1989, respectively. In both basins, hot dry conditions in summer lead to a peak in irrigation water demand associated with low flows. Since the 1970s, the population has doubled in the Hérault Basin and irrigated areas have increased by 30 % in the Ebro Basin. Increasing demand and drier conditions have led to water shortage events in both basins. The EU Water Framework Directive (European Commission, 2000), which applies to both basins, has also been the source of new constraints through the regulation of environmental flows. The Hérault Basin has been part of the territory managed by the Agence de l'eau Rhône-Méditerranée Corse since 1964. The Syndicat Mixte du Bassin du Fleuve Hérault (SMBFH) was created in the 2000s to ensure more local management and in response to issues that are specific to the Hérault Basin, including water availability (SMBFH, 2005). Studies on the balance between water demand and availability have been launched by local authorities in the Hérault Basin and should lead to a water sharing plan for the basin. In contrast, the Confederación Hidrográfica del Ebro (CHE) was created in 1926 with the aim of increasing irrigation and water resource management in the Ebro Basin, with a strong emphasis on the development of the resource and of infrastructure. The CHE now has a wider role in water management, in line with integrated water resources management and water sustainability as a whole. Since the 2000s, efforts have been underway to improve network efficiency and increase demand management (Lecina and Playán, 2002;Lecina et al., 2010;Salvador et al., 2011).

Method
3.1 Modeling approach used to assess the balance between water demand and availability

Integrative modeling framework
A modeling framework including hydro-climatic and anthropogenic dynamics and accounting for interactions between water resources and water demand at a 10-day time step was designed (Fig. 2). Climatic variability affects natural streamflow and water demand (mainly through crop irrigation requirements), while human activities affect water demand through population growth, industrial activity, irrigated areas and the types of irrigated crops, and the efficiency of the water supply networks. Water demand is defined as the amount of water that users would withdraw without restrictions, i.e., the withdrawals that would enable users to have access to optimal amounts of water considering the efficiency of supply networks and irrigation techniques. Anthropogenic drivers of water balance include local water management rules through the operation of dams and canals, which affect water availability. These climatic and anthropogenic drivers were distributed and combined dynamically in space and over time to evaluate changes in water stress. At each demand node, water demand is compared to water availability (based on streamflow and reservoir levels). If water availability is equal to or higher than water demand, then water withdrawals are equal to water demand for all types of demand. If water availability is lower than water demand, then restrictions are applied to limit withdrawals. According to the order of priority defined locally, restrictions are first applied to agricultural water demand (AWD), then to other water demands (OWD) and lastly to urban water demand (UWD). Water shortage is calculated through the difference between water demand and effective water withdrawal. Only a part of the water withdrawn is actually used, the rest is considered to return to the sub-basin outlet as return flow. The quantification of consumptive use and return flows is explained in Sect. 3.3.2. Natural streamflow is thus modified by dam management, water withdrawals and return flows.
This integrative modeling framework was applied to a long period of time to capture past variability in climatic and anthropogenic drivers. The 1971-2009 period was chosen based on data availability in both basins. This nearly 40-year period includes a wetter and colder decade (1971)(1972)(1973)(1974)(1975)(1976)(1977)(1978)(1979)(1980) and a warmer and drier period ). Calibration and validation of the hydrological model was performed over natural streamflow data (see Sect. 3.2.2.), while the simulation of water demand could not be thoroughly validated for lack of data. The simulation of influenced streamflow was validated against observed streamflow data at each resource node (see Sect. 3.3.2.).

Mapping resource and demand management
The spatial distribution of water demand and availability was mapped to correctly reproduce the spatial heterogeneity of water shortage in each study area: water stress assessments can vary depending on the spatial or temporal scale (Boithias et al., 2014). Thus, it is essential to properly account for the main heterogeneities in water demand and availability. Each basin was divided into sub-basins accounting for the water supply to one or more demand nodes. The Hérault Basin was divided into 6 sections and the Ebro into 20 (Fig. 3).
The map of the Hérault hydrosystem ( Fig. 3a) was adapted from the work of Collet et al. (2013). It accounted for the north-south climatic gradient separating the milder wetter upstream catchments from the warmer drier area downstream. Sub-basins were chosen based on their similar water withdrawal characteristics. Water withdrawals are low and mostly agricultural in the Laroque sub-basin, and minimal in the upstream sub-basins of the Saint-Laurent and Lodève. The sub-basin of the Hérault at Gignac was delimited to isolate the Gignac canal and its irrigated areas. The southern section of the Hérault Basin (Agde) has both the highest urban withdrawals in the basin and a high level of agricultural water demand.
Mapping the Ebro hydrosystem was mainly guided by the existence of extensive irrigation systems managed in association with large storage dams (see black triangles in Fig. 3b). The Pyrenean catchments influenced by a snowmelt hydrological regime were selected to accurately represent the corresponding freshwater availability. The two main right bank systems were also selected, as they are representative of the heterogeneous climatic and hydrological conditions in the Ebro Basin.

Modeling spatial and temporal variations in water demand
Three types of water demand were considered: (i) UWD, including domestic water consumption, irrigation of parks and gardens and commercial water use, (ii) AWD for crop irrigation, and (iii) OWD linked to industrial processes and to power plant cooling systems. Details concerning the reconstitution of past water demand at the sub-basin scale in the Hérault and the Ebro basins between 1971 and 2009 can be found in Grouillet et al. (2015). The UWD of each municipality was assessed by multiplying a unit water allocation per capita by the population at each 10-day time step. Unit water allocations were calculated from available urban water withdrawal and population data. These allocations depend on the water consumption rates of urban activities and on the efficiency of water supply networks, and were assumed to remain stable throughout the study period. Annual variations in population over time were taken into account, as were the seasonal dynamics due to summer tourism in the Hérault Basin. Figure 4 shows how AWD was calculated based on irrigated crops, climate conditions and irrigated areas. In the case of irrigated vineyards in the Hérault Basin, the maximum irrigation requirement (MIR) was considered to be the water required to meet 80 % of crop evapotranspiration under standard conditions ET C , in accordance with deficit irrigation techniques. Data on readily available water (  were extracted from the European soil database (European Commission, 2004) and averaged over each sub-basin. OWD was not taken into account in the Hérault Basin because of the very limited industrial activity. In the Ebro Basin, industrial demand was estimated by the CHE (2013) at the municipality scale by assigning water allocation per employee and per year for each industrial sector. Energy demand in the Ebro Basin was assumed to correspond to the volume of water evaporated by the open-air cooling system of the nuclear reactors. Hydropower demand was not accounted for in this study as data for our two study areas were scarce. Moreover, in the Hérault Basin, the production of hydropower is limited to a few minor turbines, while in the Ebro Basin dams are operated primarily to satisfy agricultural water demand.

Modeling spatial and temporal variations in natural streamflow
Streamflow was modeled in the 6 sub-basins in the Hérault and the 20 sub-basins in the Ebro using GR4j (Perrin et al., 2003), a conceptual hydrological model run at a daily time step and calibrated/validated at a 10-day time step. The hydrological model relies on precipitation (P ) and potential evapotranspiration (ET 0 ) inputs. It simulates streamflow via a production function (which determines effective precipitation, filling a production reservoir) and a routing function. A snow module based on mean basin temperature (Ruelland et al., 2011 was added and activated in the sub-basins with a snowmelt regime. GR4j relies on four parameters, and the snow module adds three more parameters. The model was calibrated using the drier period ) and validated using the wetter period (1971)(1972)(1973)(1974)(1975)(1976)(1977)(1978)(1979)(1980). Automatic calibration of the model was performed using a three-step algorithm as described in Dezetter et al. (2014). It combined a random draw of parameter sets and the succession of Rosenbrock and simplex algorithms aimed at minimizing a multiobjective function (Fagg) aggregating three goodness-of-fit criteria: the Nash-Sutcliffe efficiency index (NSE), the cumulative volume error (VE) and the mean annual volume error (VEM). NSE values were considered good when they were above 0.65, satisfactory when between 0.5 and 0.65, and poor when they were under 0.5. To assess natural runoff in each sub-basin, the model was calibrated only against runoff data that were considered to be natural, i.e., not influenced by withdrawals or dam management. Withdrawals upstream from the Pyrenean dams were considered to be negligible, so all streamflow data were used for calibration. Data on discharge entering the dams were not directly available, so streamflow upstream from the dams was computed based on a balance between inflow, variations in the reservoir level, outflow, and evaporation. Runoff produced in each downstream sub-basin was computed at a 10day time step by subtracting the ingoing streamflow from the streamflow at the outlet of the section. However, these downstream sections are also strongly influenced by water withdrawals, and natural streamflow could not be calculated based on observed streamflow and water withdrawal data because withdrawal data were not available with the adequate time step and time depth. Thus, assumptions had to be made in order to evaluate when streamflow was natural, i.e., not modified by consumptive use. Since AWD was considered to have the highest consumptive use, we assumed that when negligible AWD was simulated, then consumptive use was negligible and flows were considered natural. Thus, the time steps for which simulated agricultural demand was greater than 0.1 hm 3 10 days −1 were not used to calculate the goodness-of-fit criteria. In the downstream sections, the 10day periods left out of the calibration data correspond to low flow periods. Consequently, the calibration did not include the effect of withdrawals and consumptive use, which are most relevant under low flow conditions. The simulation of streamflow influenced by reservoir operations and consumptive use was validated against observed data in a later step (see Sect. 3.3.2).

Modeling dam management
Accurate simulation of dam management is essential for simulations of water availability in highly equipped hydrosystems. A demand-driven dam management model adapted from Fujihara et al. (2008) was set up and applied to the Salagou dam in the Hérault Basin and to 11 major dams or groups of dams in the Ebro Basin (see Fig. 3). The model outputs were the reservoir level, the volume of water released into associated canals (if applicable) and into the river downstream from the dam during each 10-day time step. In the Ebro Basin, reservoirs managed for the supply of irrigation systems are managed with target and minimum levels.
In most cases target levels vary throughout the year and the minimum level is fixed and corresponds to a safety reserve of the level of a canal inlet. Water is released to satisfy the demand as long as the reservoir level is above the minimum level. These basic management rules were used to design the dam management model. As shown in Fig. 5, the water balance of the reservoir was computed at each 10-day time step, accounting for water demand, entering streamflow, evaporation, and the initial reservoir level. Infiltration was not included in the water balance. Precipitation and evaporation on the reservoirs were computed by averaging the P and ET 0 grid data over the surface of the reservoirs, available through GIS maps. Evaporation was then computed by multiplying ET 0 by a coefficient Kc, recommended by Allen et al. (1998) for open water in a temperate climate. The rules guiding water release from the dams were the following: (i) after adding entering flows (V in + PR) and subtracting evaporation from the ini- tial reservoir level, water can be released to satisfy demand and/or minimum flow requirements as long as the reservoir level remains above the defined minimum level R min ; (ii) if the reservoir exceeds the target level R tar , additional water is released from the dam into the river downstream. Target levels were defined for each 10-day time step according to maximum observed levels over a given time period in which the dam operation rules were similar. Changes in dam operation rules were accounted for throughout the study period. Data on the reservoir level of the Ebro dam, for example, revealed a change in reservoir level variability after 1980; so, target levels were defined separately for the periods 1971-1980 and 1981-2009. Minimum levels were provided by the stakeholders in charge of dam operations or, if the information was not available, were defined as the minimum level observed over the period. The minimum levels of the reservoirs are kept as a safety reserve for a particular water use (e.g., 100 hm 3 in the Ebro dam are kept as a safety water supply to the city of Zaragoza) or to maintain reservoir levels above the elevation of a canal inlet (e.g., elevation of the Aragon and Catalunya canal inlet in the Barasona dam). In the case of the Salagou dam in the Hérault Basin, a minimum elevation of 137 m a.s.l. is maintained to enable tourist recreational activities on the lake.
Because dam management rules are driven by the demand associated with each individual dam, simulation of dam operations is highly dependent on accurate mapping of resources and demand. In the Hérault Basin, the Salagou dam supplies water for irrigation in a clearly delimited area (Fig. 1a). In the Ebro Basin, dam operation rules are much more complex. Some dams, including the Ebro dam, release water into the river for downstream users. The volume of water released depends on the associated demand and on the runoff produced between the dam and the users (i.e., between the outlet of the Ebro dam and the beginning of the Lodosa canal in the Ebro system). In other cases, a canal is directly associated with the dam (e.g., the Bardenas canal and Yesa dam) and transports water from the reservoir to irrigated areas that may be located in a different sub-basin. The volume of water released from the dam depends on the demand associated with the canal and on the capacity of the canal. This type of dam also releases water directly in the river for downstream users or to respect minimum flows. Lastly, the management of two or more dams may be coordinated to supply a particular irrigation system. The dams may be located on the same river and regulate flows from upstream to downstream (e.g., the Escales, Canelles and Santa Ana dams on the Noguera Ribagorzana River or the Mediano and Grado dams on the Cinca River; see Fig. 3b), in which case they were simulated as if they were one large dam located downstream. Two dams located in different sub-basins can also be operated jointly: if the total volume of water demand cannot be met by the first dam, it can be supplemented by the second. This is the case of two systems in the Ebro Basin modeled in this study: the Alto Aragon and the Aragon and Catalunya areas (Fig. 3b).

Modeling the influence of water uses on streamflow
At each time step, water withdrawals were evaluated according to water availability, simulated water demand, and the following order of priority: (i) UWD (ii) OWD and (iii) AWD. Return flows were also taken into account. For each type of water demand, a part of the water withdrawn was considered to return to the environment and, in fine, to the streamflow at the outlet of the sub-basin in which the water was pumped. For UWD, two types of return flows were considered. First, 80 % of the volume actually supplied to domestic and more generally urban users was considered to return to the sub-basin outlet as treated effluent. The volume actually supplied was calculated by subtracting losses from the supply network from withdrawals. Second, part of the losses from supply networks was considered to return to the sub-basin outlet. For OWD, 80 % of withdrawn water was considered to return to the sub-basin outlet. For AWD, only part of the losses from supply networks was considered to return to the sub-basin outlet. All the water actually available for crop irrigation was considered to be used by the crops (i.e., consumptive use). The return flow rate from losses from urban and irrigation supply networks was estimated for the Hérault Basin as a whole, and for each sub-basin of the Ebro Basin, to account for soil and geological heterogeneities. Return flow rates were tested from 0 to 1 with a step of 0.1 and were calibrated by optimizing goodness-of-fit criteria including NSE on low flows (July-September included), noted NSE LF , on modified runoff. The calculation of these criteria also allowed validating the whole run of the integrative model. Therefore, although the hydrological model was not calibrated over low flows (see Sect. 3.2.2) we validated the simulations of influenced streamflow, including over low flows.

Sustainability indicators for the balance between water demand and availability
First, anthropogenic and climatic pressures on water resources were assessed. Anthropogenic impacts on streamflow, i.e., consumptive use, were estimated as the difference between natural and modified streamflow. The part of natural streamflow and anthropogenic consumptive use variations in the cause of the decrease in streamflow observed was evaluated by comparing variations in simulated natural and influenced streamflow. Second, water shortage for each type of demand was characterized by the magnitude, frequency, and average length of withdrawal restrictions (see Fig. 2). These indicators were calculated for each demand node considering hydro-climatic and anthropic variability between 1971 and 2009. The percentage of water demand that could not be satisfied due to lack of available water was computed for each type of demand at a 10-day time step. According to the local stake-holders, withdrawal restrictions were acceptable as long as they did not exceed 50 % of AWD and 5 % of UWD. Water shortage analysis concentrated mostly on agricultural demand since it was last in order of priority (Fig. 2). The frequency of withdrawal restrictions (F ) was expressed by the number of years out of 5 including at least one time-step in which restrictions on irrigation water withdrawals exceeded 50 % of the demand. The average length of a water shortage (L) was represented by the average number of consecutive time steps with restrictions exceeding 50 % of the demand. Years with urban water shortage exceeding 5 % of the demand during at least one 10-day time step were also identified. These years corresponded to critical situations in which withdrawal restrictions also applied to non-agricultural users, pointing to potential water sharing conflicts (C). When restrictions are applied to urban water withdrawals, it means that all three types of demands faced water shortage.
Last, the current sensitivity of the two basins to water stress was evaluated using the calibrated framework: water demand corresponding to the size of the population, the irrigated areas, and industrial activity in the year 2009 was compared to water availability under the prevailing hydroclimatic conditions in the period 1971-2009, using the dam management rules applied in 2009. Five indicators (see Fig. 2) were computed at each demand node to characterize the balance between water uses and water availability in the Hérault and Ebro basins with their current human activities and water management practices, and faced with the climate variability of the recent past. Maximum shortage (MS) was defined as the maximum simulated annual irrigation water shortage rate and reliability (Rel) was considered to be the rate of occurrence of satisfactory years (adapted from Asefa et al., 2014), i.e., years with an annual irrigation water shortage below 50 %. Shortage frequency (F ) indicates the frequency of occurrence of irrigation water withdrawal restrictions of more than 50 % at a 10-day time step, and resilience (Res), computed as the inverse of the average length of withdrawal restrictions, shows how quickly withdrawal restrictions were lifted. Resilience ranges from 0 to 1, a value of 0.5 indicating for example that restrictions were lifted after two time steps on average. The definitions of maximum shortage (the maximum annual shortage over the study period, also called "vulnerability" in the literature), reliability (the frequency of years with overall water supply at least at 50 % of demand), and resilience (indicating how quickly the system returns into balance, i.e., the inverse of average length of shortage episodes) were based on the metrics used in previous studies to evaluate the performance of water supply systems (Hashimoto et al., 1982;Fowler et al., 2003). The final indicator was the frequency of occurrence of water sharing conflicts (C). As stated above, the years with an occurrence of water sharing conflicts were considered to be the years with urban water shortage exceeding 5 % of the demand during at least one 10-day time step. For each indica-Hydrol. Earth Syst. Sci., 19, 1263-1285, 2015 www.hydrol-earth-syst-sci.net/19/1263/2015/ tor, an acceptable range of values was defined according to management criteria in the local basin agencies.

Simulation of natural streamflow
Calibration and validation results for the simulation of natural streamflow are presented in Table 1. Overall, the results were satisfactory except for some downstream sections in which discharge was significantly modified and few calibration data were consequently available on natural streamflow. However, the sub-basins where the model performed poorly generally produced only a small proportion of total discharge.
In the Hérault Basin NSE values were over 0.80 and volume error (VE) was negligible over the calibration period in all sub-basins except in the Agde section. In the upstream Saint-Laurent and Laroque sub-basins, NSE values over the validation period were slightly lower (0.79 and 0.72, respectively), and volume errors tended to increase slightly. The lack of observed streamflow in the 1970s in the Gignac, Salagou and Agde sub-basins prevented validation of natural streamflow simulations in these areas.
The simulated natural streamflow in the Ebro Basin was in good agreement with observed streamflow in the sub-basins that contribute most to discharge at the outlet, i.e., the Pyrenean sub-basins and the Ebro upstream from the Aragon River. In these sub-basins, NSE values were above 0.60 and VEM and absolute values of VE were below 18 % over the calibration and validation periods, with the exception of the Noguera Ribagorzana sub-basin upstream from the Santa Ana dam. In this sub-basin the three dams (Escales, Canelles and Santa Ana) were simulated as one large dam in the location of Santa Ana (see Sect. 3.3.1), thus, multiplying possible errors in the calculation of the natural discharge at Santa Ana. In sub-basins 13, 14 and 20 (Ebro at Zaragoza, Mequinenza and Tortosa; see Table 1) results indicated poor calibration and validation scores. This can be explained by the high level of influence of withdrawals on streamflow, leaving very few data for calibration. The simulation of natural streamflow in these three sub-basins of the semi-arid Ebro Valley was thus considered to be unreliable. However, the climatic and topographic conditions of the middle and lower Ebro Valley suggest that the contribution of these areas to total discharge is minor. For the rest of the study, the contributions of subbasins 13, 14 and 20 to the natural discharge of the Ebro River were set to zero. Figure 6 shows the simulated reservoir levels in comparison with observed reservoir levels. Seasonal dam operations were well represented for the majority of dams. Moreover, simulated interannual variations of the reservoir levels were in good agreement with observations (e.g., the Ebro, Sotonera or Tranquera dams). Despite the complexity of their management, the reservoir levels of the Yesa and Grado dams were satisfactorily simulated, with NSE values of 0.68 and 0.56, respectively, and mean volume errors of 9 and 8 %.

Simulation of dam management
Simulations of the Salagou reservoir level led to scores of 0.53 for NSE and 1 % for VEM for the period 1990-2009 (reservoir level data were only available after 1990). As can be seen in Fig. 6a, the reservoir level started showing significant seasonal variations in 1986, which is consistent with the start-up of a hydropower turbine and with increasing water demand for irrigation since the 1990s.

Simulation of influenced streamflow
Influenced streamflow was accurately simulated in the Hérault Basin (see Fig. 7) with NSE values above 0.80 in all sub-basins for the calibration and validation periods, except at the outlet of the Salagou dam where the outflow was only moderately well simulated by the dam management model. However, the contribution of the Salagou dam to streamflow at the outlet of the basin is very low. Results at the outlet of the Ebro Basin (see Fig. 8) showed that the influenced discharge in this complex hydrosystem was well simulated: aggregated simulations at the basin outlet led to NSE and volume error scores of 0.68 and −6 %, respectively, over the calibration period, and of 0.64 and −12 % over the validation period. The influenced discharge in the Cinca and Segre systems was poorly reproduced, with NSE values under 0.50 and negative low flow NSE (NSE LF , see Sect. 3.3.2) values over the calibration period. Streamflow in the downstream Segre sub-basin is influenced by outflows from the Santa Ana, Talarn and Oliana dams, which have complex management rules.
The ability to represent observed low flows, which are highly influenced by storage and water withdrawals, is an indicator of the modeling chain's efficiency. Low flows were well simulated at the outlet of the Hérault Basin (Hérault at Agde) with NSE LF values of 0.66 and 0.87 over the 1981-2009 and 1971-1980 periods, respectively. The low NSE LF values in the Vis at Saint-Laurent and Hérault at Laroque sub-basins over the 1971-1980 period (0.28 and −0.16), respectively, are most likely due to difficulties of the hydrological model to reproduce the functioning of the karstic system in wet periods, as it was calibrated over a drier period. Low flows in some of the Ebro sub-basins were poorly simulated, particularly in the Cinca and Segre sub-basins, where low flows are highly influenced and depend almost exclusively on the outflow from the various storage dams.

Variations in water demand under anthropogenic and climate variability
Total water demand in the Hérault Basin doubled between the 1970s (24 hm 3 yr −1 ) and the 2000s (53 hm 3 yr −1 ) mainly because of a significant increase in UWD (from 18 hm 3 yr −1 in the 1970s to 36 hm 3 yr −1 in the 2000s over the whole basin), particularly for the Florensac transfer in the Agde section where UWD more than doubled (see Fig. 10a). Total AWD also increased (from 6 to 17 hm 3 yr −1 between the 1970s and the 2000s) with heterogeneities throughout the basin. In the Laroque upstream section, AWD decreased in the 1990s due to agricultural decline and stabilized in the 2000s. In the other upstream sections, AWD increased significantly, but volumes nevertheless remained very low. The simulated increase in AWD over the Hérault Basin is mostly due to warmer and drier conditions from the 1980s on, which led to a threefold increase in AWD in the Gignac area (see Fig. 10a). Total demand in the Ebro Basin increased from 4330 hm 3 yr −1 in the 1970s to 6820 hm 3 yr −1 in the 2000s, with the largest increase in the 1970s and the 1980s. As  Cal: 1981-2009) and validated (Val: 1971-1980. Optimal values of NSE, NSE LF , VE, and VEM are 1, 1, 0 and 0, respectively. shown in Fig. 10b, the main increase in AWD occurred in the Bardenas and Alto Aragon irrigation systems (from 400 to 880 hm 3 yr −1 and from 320 to 950 hm 3 yr −1 , respectively, between the 1970s and the 2000s). In the Ebro Valley, Aragon and Catalunya and Segre systems, AWD increased between the 1970s and the 1980s and stabilized (or even slightly decreased in the case of the Ebro Valley) after 1990. On the right bank, AWD remained almost unchanged, with a peak in the 1980s in the Jalon sub-basin.

Impact of climatic variability on natural streamflow
Simulated changes in natural streamflow at the outlet of the Hérault and the Ebro basins are illustrated in Fig. 9. The 1980s and 2000s appear to have been particularly dry compared to the 1970s and the 1990s, mainly in the Hérault Basin. In both basins, simulated natural streamflow decreased by approximately 20 % between 1971-1980 and 1981-2009. At Agde, the natural streamflow of the Hérault River decreased in the winter, spring and summer (−52, −30 and −39 %, respectively) and increased in the fall (+36 %). Similar changes were observed in upstream sections, with a bigger decrease in the streamflow in summer at Laroque and Gignac (−47 and −48 %, respectively). The natural streamflow of the Ebro River at Tortosa also decreased in the winter, spring and summer (−21, −29 and −23 %, respectively) and increased slightly (+8 %) in the fall. In sub-basins influenced by a snowmelt regime such as the Cinca and Segre catchments, peak flow occurred 1 month earlier (May instead of June) after 1980, and streamflow decreased in spring and summer.
The changes in natural streamflow simulated in both basins are in agreement with the climatic trends described in Sect. 2.3., i.e., a decrease in winter precipitation and an increase in fall precipitation between 1971-1980 and 1981-2009, associated with a 1 • C annual increase in temperature.

Relative impact of anthropogenic and climatic drivers on streamflow
Figure 9 also shows that the consumptive use increased between 1971 and 2009 in both basins, in absolute terms and relative to natural streamflow: average annual consumptive use increased from 11 hm 3 yr −1 (1 % of mean annual natural streamflow) in the 1970s to 27 hm 3 yr −1 (2 % of mean annual natural streamflow) in the 2000s in the Hérault Basin, and from 3 830 hm 3 yr −1 (24 % of mean annual natural streamflow) in the 1970s to 5000 hm 3 yr −1 (38 % of mean annual natural streamflow) in the 2000s in the Ebro Basin. Annual water consumption stabilized in the 2000s in both basins.
In the Hérault Basin the impact of water use was highest in the summer: it reached 30 % of natural flow between mid-July and mid-August in the 2000s (Fig. 9a). In the Ebro Basin the storage role of reservoirs is clearly visible, with anthropogenic impacts decreasing in July and August, when withdrawals were made from reservoirs (Fig. 9b).
Simulating natural and influenced streamflow made it possible to distinguish between the impacts of climate and con-Hydrol. Earth Syst. Sci., 19, 1263-1285, 2015 www.hydrol-earth-syst-sci.net/19/1263/2015/ sumptive use variations. In the upstream sections of the Hérault Basin (Saint-Laurent, Laroque and Lodève, data not shown) the decrease in streamflow between 1971-1980 and 1981-2009 was linked to a natural decrease in streamflow only, whereas in Gignac and Agde, respectively, 1 and 3 % of the decrease in annual influenced streamflow was linked to an increase in consumptive use. Simulations linked 80 % of the decrease in influenced discharge at the outlet of the Ebro Basin between 1971-1980 and 1981-2009 to a decrease in natural discharge, and 20 % to the increase in consumptive use. These proportions varied throughout the basin: 75-25 % in the Aragon sub-basin, 50-50 % in the Cinca sub-basin and a decrease in consumptive use in the Segre sub-basin. Figure 10 shows the water shortages simulated between 1971 and 2009 in the Hérault and the Ebro basins. Results are only presented for the Gignac and Agde sections of the Hérault Basin, as they concentrate most of the water uses and our simulations did not identify any water shortage in the other sub-basins. Figure 9a shows the frequent occurrence of agricultural water shortages in the Gignac area from the 1980s on. Although AWD decreased slightly in the 2000s due to recent efforts to improve the efficiency of the Gignac canal, water shortage events continued to occur 3 years out of 5. In Agde, increasing UWD and AWD continued to be satisfied until the 2000s. Restrictions on agricultural and urban water withdrawals appeared in 2005, a dry year. These results are consistent with the information provided by local stakeholders on the occurrence of water supply problems in the Hérault Basin in the past 40 years: the main stakes concerning the supply of agricultural water are concentrated around the Gignac canal, while user conflicts may appear in the downstream area of Agde. The year 2005 was indeed notable for tensions around water resources, with strict regulations concerning the use of water and special negotiations that led to the release of additional water from the Salagou dam to compensate for low flows in the Hérault River. Figure 10b shows the results of the simulation of water shortage for the eight main management systems in the Ebro Basin. The systems on the right bank are very exposed to water shortage, particularly the Guadalope sub-basin. Although some agricultural water withdrawal restrictions may have been applied in all areas except the lower Ebro, between 1971 and 2009, only the Ebro Valley, Bardenas and Alto Aragon areas faced shortages exceeding 50 % of demand. In the case of the Bardenas irrigation system, the increase in water shortage mirrored an increase in water demand. The storage capacity of the Yesa dam is currently being increased by about 600 hm 3 . In the Alto Aragon system, the Sotonera and Grado dams have been managed together since 1982, which helped improve the balance between water demand and availability despite a significant increase in demand (from 320 to 950 hm 3 yr −1 between the 1970s and the 2000s). However, agricultural water shortage periods did occur in the 2000s. The construction of new storage facilities to increase the storage capacity by about 400 hm 3 is planned in this area.

Sustainability of current water uses in the hydro-climatic conditions of the recent past
In the Gignac area of the Hérault Basin, the impact of the improved efficiency of the canal in the 2000s (see Sect. 2.3) is clear: while AWD reached 13 hm 3 yr −1 on average and shortages occurred in 3 years out of 5 in the 1990s (see Fig. 10a), AWD would only have been 4 hm 3 yr −1 with shortages 1 year out of 5 on average, with the same irrigated areas and efficiency as today and under the same climate conditions (Fig. 11a). However, water shortages would have become more frequent and intense with the warmer and drier conditions of the 2000s, owing both to an increase in demand due to increasing evapotranspiration and decreasing precipitation, and to a reduction in available water resources (see Fig. 9a). Figure 12 shows that, on the whole, water use and availability are better balanced in the Hérault than in the Ebro hydrosystem. Apart from the Salagou area with a maximum shortage of 70 % and resilience of 0.3 and the Agde area with a resilience of 0.3, the indicators remain in an acceptable range in all demand nodes of the Hérault Basin (see Fig. 12).
Hydrol. Earth Syst. Sci., 19, 1263-1285 According to the results shown in Fig. 12, the Aragon and Catalunya, Ebro Valley, Segre-Urgel and lower Ebro sections in the Ebro Basin appear to have found a sustainable balance between water use and availability if climatic conditions remain in the range of variability as that observed in the recent past. Comparison of Figs. 10b and 11b shows an improvement in the water balance in the Segre-Urgel irrigation system due to the construction of the Rialb dam in the early 2000s, which was added to the storage capacity of the Oliana dam. The combined operation of the two dams reduces annual agricultural water shortage rates (Fig. 11b) compared to the Oliana dam without the additional storage capacity of Rialb (Fig. 10b). On the other hand, the expansion of irrigated areas in the Bardenas and Alto Aragon systems appears to have contributed to the increase in water stress revealed in Fig. 10b. Figure 11b shows that the current uses of water in the Bardenas system would not match water availability in the hydro-climatic conditions of the recent past. With its current water use and water management and under unchanged climate variability, in the future, this area could face many long severe shortage events (MS = 75 % and Res = 0.2), even though, generally speaking, the system can still be considered to be reliable since years with a total deficit of over 50 % occur in our simulations less frequently than once every 5 years (see Fig. 12). Finally, the Jalon and Guadalope areas appear to be particularly unbalanced (see Fig. 12), even though no conflicts between users have arisen in the Jalon (C = 0) due to very low UWD.

Outcome
The purpose of this study was to (i) combine socioeconomic and hydro-climatic data in an integrative modeling framework to represent water stress and its spatial and temporal variations over a past multi-decadal period, and (ii) use this framework and appropriate indicators to assess the sustainability of current water uses. The approach presented in this paper enabled better identification of the drivers of water stress in basins facing rapid climatic and anthropogenic changes, which is at the heart of the challenges put forward in the Panta Rhei hydrological scientific decade of the IAHS (International Association of Hydrological Sciences) (Montanari et al., 2014). The originality of this approach lies in its ability to integrate different modeling tools (runoff, water demand, dams) and data with many different time and space scales, and provide fine indicators to assess the sustainability of water uses. The outcome of this study is twofold. First, the presented modeling framework was shown to efficiently simulate long-term variations in influenced streamflow, reservoir levels and water stress in complex hydrosystems facing sig- nificant water use and climate variability. Second, the simulations enabled us to understand the relative influence of anthropogenic and climatic pressures on water stress and, thus, provided knowledge on the processes leading to water stress, which was not available through simple data analysis.
The modeling framework was validated by comparing simulated reservoir levels and influenced streamflow with observed data over a nearly 40-year period. Influenced streamflow was represented by accounting for the significant variability of water use and climate during the period, and by properly simulating anthropogenic pressures on water resources (i.e., water withdrawals, consumptive use and dam management). A combination of socioeconomic and hydroclimatic data based primarily on the mapping of resource and demand nodes enabled us to account for heterogeneities in water use and management practices in the two basins. The main heterogeneities in resource availability were identified by isolating the catchments that contributed most to runoff in the Hérault Basin and the catchments with a snowmelt hydrological regime in the Ebro Basin, and by defining the dams most important for the satisfaction of water demands. Also, local water management was taken into account and the demand nodes in our study represent actual management units, a scale at which water allocations are discussed.
To our knowledge, other studies did not simulate natural and influenced streamflow at the mesoscale and over this long period, and did not achieve a historical reconstruction of water demand and the influence of water use on streamflow over such a long period. Lanini et al. (2004) designed an integrated model of the Hérault socio-hydrosystem, with detailed accounts of hydrogeological processes and decisions on water use. However, this model was calibrated and validated over a short period and only covers an area of approximately 100 km 2 in the Hérault Valley. Collet et al. (2013) successfully modeled influenced streamflow with simulations of water demand satisfaction and consumptive use; however, the hydrological model was calibrated using observed streamflow data, i.e., influenced streamflow. In the Ebro Basin, some studies such as López-Moreno et al. (2014) successfully simulated natural streamflow in snowmelt sub-basins, and demand-driven dam management, although with water demand assumed constant from 1 year to another and therefore an incomplete integration of drivers of water stress. Finally, Milano et al. (2013a) proposed a representation of water stress over the whole Ebro Basin, accounting for three storage dams and with a simulation of natural streamflow. However, the natural streamflow data used for calibration of the hydrological model in this case were based on outputs from another model, and the hydrological model did not account for snowmelt's influence on runoff. Moreover, water stress was assessed at a monthly time step, and water demand was considered constant over a 20-year period.
Because the indicators used to measure water stress were defined with local stakeholders, they were appropriate for water management issues. These indicators are sensitive to the spatial and temporal dynamics of anthropogenic pressures, and should help anticipate undesirable situations and/or make projections, as recommended by Juwana et al. (2012). Threshold values were set to define undesirable situations in each hydrosystem. The indicators can be seen as a way of interpreting simulation results to characterize the dynamics of the balance between demand and availability over 4 decades. Including anthropogenic and climatic drivers in a spatially and temporally distributed modeling approach enabled us to correctly simulate changes in water demand satisfaction in the Hérault and the Ebro basins: the simulated Hydrol. Earth Syst. Sci., 19, 1263-1285, 2015 www.hydrol-earth-syst-sci.net/19/1263/2015/ trends matched the situations described by local managers. Our simulation results made it possible to analyze the impacts of climate variability and variations in water uses and water management practices on the balance between demand and availability.
In the Hérault Basin, the irrigation needs of vineyards increased and were subject to great variability (standard deviation reached 60 % of the mean water demand over . Urban water demand also increased significantly, and water use conflicts started to appear in the basin. AWD satisfaction in the Gignac area appears to be sensitive to hydroclimatic variability (the 1970s were wetter whereas the 1980s and the 2000s were warmer and drier). However, the improvement in irrigation efficiency in the 2000s succeeded in limiting agricultural water shortages in the Gignac area. In the Agde section, an imbalance between demand and availability emerged in the 2000s because of the combined increase in AWD and UWD and the decrease in natural streamflow. Although UWD also increased in the Ebro Basin, it remained very low compared to AWD. The main driver of the decrease in water demand satisfaction in the Ebro was the increase in demand triggered by the expansion of irrigated land, which exceeded the water supply capacity in some areas (under current management and storage capacity).
Although key areas of the Hérault Basin were highly sensitive to hydro-climatic variability, the balance between water uses and availability in the Ebro Basin appears to be more critical, owing to high agricultural pressure on water resources. All the same, water demand and availability were shown to be in balance in large systems of the Ebro Basin such as the Ebro Valley, Aragon and Catalunya, Segre, and lower Ebro, which concentrate 60 % of the water demand from the large irrigation systems in the basin. In comparison, water demand in the Gignac area represented, on average, 70 % of total AWD over the Hérault Basin over the past 40 years. What is more, the vineyards in the Hérault Basin may be more vulnerable to an unreliable water supply than the cereal and fodder crops grown in the Ebro Basin, where cropping patterns can be adjusted on a yearly basis to adapt them to the hydro-climatic conditions. The spatial distribution of our integrative approach enabled us to identify the most vulnerable areas: the main stakes for maintaining or reaching water balance are concentrated in the Gignac and Agde areas in the Hérault Basin, and on the right bank and in the Bardenas and Alto Aragon systems in the Ebro Basin.

Limitations
The widespread anthropogenic influence on streamflow made calibration and validation of natural streamflow difficult, particularly in the Ebro Basin. The challenge was that no water withdrawal data were available at a finer timescale than annual values; consequently reconstructing series of natural streamflow through data analysis would have been impossible. Another way of simulating natural flow would have been to integrate the water withdrawals and return flows in the calibration procedure by simulating natural flows, modifying them with simulated withdrawals (according to simulated demand and availability) and return flows, and applying the performance criteria to the influenced flow (e.g., Beck and Bernauer, 2011). Although this method could be conceivable in a simple system of, for example, one or two sub-basins with few storage dams, here the calibration on influenced flow would have taken into account the bias in streamflow regulation, withdrawal simulations, etc., thus, not guaranteeing the quality of natural streamflow simulations. Since the influence of consumptive use is highest during low flow periods, the hydrological model was mostly calibrated over periods of mid and high flows.
The other components of the modeling chain (the dam management model, the simulation of water demand, and the simulation of influenced streamflow) were validated against observed data, if available. As shown in Sect. 4.1.2, the functioning of some dams was poorly simulated. In the case of the Caspe and Talarn dams, this may be due to the streamflow regulations by other dams located upstream and not included in this study. Furthermore, the Talarn dam is mostly operated for hydropower production, which was not included in this study. In the case of the Caspe dam, the irrigated areas actually linked to the dam may have been underestimated. The Sotonera and Grado dams are operated jointly since 1981. The reconstruction of the changes in irrigated areas and their attribution to one dam or the other was a difficult task and a misrepresentation of the links between irrigated areas and each dam might have led, for example, to the Sotonera dam to be undersolicited in our simulations. The same can be said of the jointly operated Barasona and Santa Ana dams. Moreover our simulations considered the three dams Escales, Canelles and Santa Ana as one large dam in the location of Santa Ana (see Sect. 3.3.1). This may be an oversimplification of the real-life management of these dams.
The ability to represent observed low flows, which are highly influenced by storage and water withdrawals, is an indicator of the modeling chain's efficiency. Low flows were well simulated at the outlet of the Hérault Basin. As indicated in Sect. 4.1.3, the poor simulations of low flows in the upstream sub-basins of the Vis at Saint-Laurent and the Hérault at Laroque are most likely due to difficulties of the hydrological model to reproduce the functioning of the karstic system. Indeed, withdrawals are very scarce in these areas; therefore, their influence on streamflow is limited and many natural streamflow data were available for the calibration of the model. The simulated low flows in the Hérault at Gignac could be biased because of the upstream natural streamflow simulations and because of a biased simulation of withdrawals from the Gignac canal and their influence on streamflow. Low flows in the Ebro Basin were more problematic, particularly in the Cinca and Segre sub-basins, where low flows depend almost exclusively on the outflow from the various storage dams. Streamflow is influenced by the management of the Grado dam (operated jointly with the Sotonera dam) and of the Barasona dam (operated jointly with the Santa Ana dam) at the outlet of the Cinca sub-basin, and by the management of the Santa Ana dam and of the jointly operated Talarn and Oliana dams at the outlet of the Segre Basin.
Although the long-term reconstruction of past water demands produced valuable information that was not available using regular data sources, accurate validation of water demand simulations in space and over time was not possible due to the lack of appropriate data on withdrawals. Nonetheless, the orders of magnitude, seasonal distributions, and past dynamics appear to be in agreement with the data that were available as well as with the knowledge of local managers (see Grouillet et al., 2015). For example, in this study an average agricultural water demand of 6820 hm 3 yr −1 was simulated in the 2000s, while the CHE (2013) indicated an AWD of 8500 hm 3 yr −1 .
Another point to consider is the assumption made on groundwater simulation and the groundwater-surface flow links. The hydrological model used in this study does not fully account for groundwater and groundwater-surface flow links. It simulates streamflow coming from both surface and groundwater sources. Other models that properly account for surface-groundwater interactions exist (e.g., Pulido-Velazquez et al., 2007. However, the application of such models at the scale of the Hérault or the Ebro basins is complex, considering the heterogeneity of hydrogeological contexts (e.g., the Hérault Basin varies from schist to karstic and alluvial zones) and the availability of piezometric data too sparse in space and in time to allow for acceptable calibration and validation of a more complex hydrological model over the 40-year period. Considering the small contribution of groundwater to the water supply in the Ebro Basin (4 %; see CHE, 2013), this modeling issue probably has a limited impact on the simulation of streamflow. In the Hérault, the sub-basins of the Vis at Saint-Laurent, Hérault at Gignac and Lergue at Lodève have developed karstic systems, and low flows are comprised almost exclusively of streamflow from karstic springs. Our simulations somewhat underestimate low flows of the Vis at Saint Laurent and the Hérault at Gignac, which could be explained by the inability of the GR4j model to represent the complex karstic system. However the main water withdrawal in these areas is by far the Gignac irrigation canal, which takes water directly from the Hérault River upstream from Gignac. In the downstream subbasin of the Hérault (the Agde area), most of the water supply comes from the alluvial aquifer a few meters from the riverbed. In our simulations, we assumed these withdrawals impacted surface flow directly, since surface and groundwater flows have been shown to be tightly linked in this area (Weng and Dörfliger, 2002).
Simulations of water shortages at a 10-day time step should be interpreted with caution, as no real-time water management adjustments were considered in this modeling framework. Indeed, the order of priority for the supply of water to different uses was fixed in our model, and no restrictions were imposed on industrial and urban demand before agricultural withdrawal restrictions reached 100 % of demand. In real life, water use restrictions can be decided on in advance to limit non-essential urban uses before supplies to irrigators are entirely cut off. Likewise, in the Ebro Basin each Junta de Explotación can decide on the water volumes allocated to different users at the beginning of the irrigation season, based on the filling level of the associated reservoirs. Thus, if the irrigation season begins with low reservoir levels, withdrawals can be partially restricted throughout the season instead of waiting until the reservoirs are at their minimum level before limiting withdrawals. Sometimes farmers decide on their cropping patterns according to the reservoir level and/or snow cover (Salvador et al., 2011). In systems with no storage capacity like the Gignac canal or the Agde section in the Hérault Basin, water shortages may be more irregular. In future studies, anticipated water reallocation should be incorporated in the model to better integrate the human aspects of water management.
Finally, the simulation of UWD, OWD and AWD does not provide a comprehensive view of water uses. Notably, the demand for hydropower production was only partly accounted for through reserved flows at the dams concerned for the satisfaction of AWD. This could be a source of bias in the modeling of influenced streamflow, as the operation of dams for the production of hydropower can have a major impact on the downstream streamflow and hence significantly affect downstream users. Also, despite the increasing attention paid to environmental flows, these flows were not included in this study, except for reserved flows at dam outlets in the Ebro Basin. However, considering the time depth of the study, one could argue that water withdrawals would not have been limited by environmental concerns during the majority of the study period. In future studies, environmental flows should be taken into account when assessing the sustainability of a hydrosystem's water balance.

Prospects
Despite the limitations mentioned above, the approach described in this paper will enable the identification of the drivers of water stress in basins that are likely to face rapid climatic and anthropogenic changes in the coming decades. Such information will be extremely useful to policy makers when designing water plans for coming decades. The next step of this work, which is currently being conducted in the framework of the GICC REMedHE project (www.remedhe. org), consists in using the proposed integrative modeling chain to simulate and compare the impacts of socioeconomic trend scenarios and a wide range of possible future climates. Further research will assess the effectiveness of adaptation measures in reducing water stress and achieving a sustainable balance between water uses and availability.