Adaptive optimal allocation of water resources response to future water availability and water demand in the Han River basin, China

Global warming and anthropogenic changes can result in the heterogeneity of water availability in the spatiotemporal scale, which will further affect the allocation of water resources. A lot of researches have been devoted to examining the responses of water availability to global warming while neglected future anthropogenic changes. What’s more, only a few studies have investigated the response of optimal allocation of water resources to the projected climate and anthropogenic changes. In this study, a cascade model chain is developed to evaluate the impacts of projected climate change and human activities on optimal allocation of water resources. Firstly, a large set of global climate models (GCMs) associated with the Daily Bias Correction (DBC) method are employed to project future climate scenarios, while the Cellular Automaton–Markov (CA–Markov) model is used to project future Land Use/Cover Change (LUCC) scenarios. Then the runoff simulation is based on the Soil and Water Assessment Tool (SWAT) hydrological model with necessary inputs under the future conditions. Finally, the optimal water resources allocation model is established based on the evaluation of water supply and water demand. The Han River basin in China was selected as a case study. The results show that: (1) the annual runoff indicates an increasing trend in the future in contrast with the base period, while the ascending rate of the basin under RCP 4.5 is 4.47%; (2) a nonlinear relationship has been identified between the optimal allocation of water resources and water availability, while a linear association exists between the former and water demand; (3) increased water supply are needed in the water donor area, the middle and lower reaches should be supplemented with 4.495 billion m3 water in 2030. This study provides an example of a management template for guiding the allocation of water resources, and improves understandings of the assessments of water availability and demand at a regional or national scale.

www.nature.com/scientificreports/ within the century from 1906 to 2005. It would accelerate the process of the water cycle 10,11 , and then affect the balance between the water availability and the agricultural water demand in the future. In addition, human activities (e.g., land use/cover change, water transfer projects, water-saving measure, the rapidly development of socioeconomy, etc.) may also alter the distribution and volume of water availability and water demand 1,[12][13][14][15] . For instance, shifts in farmland area and cover types would result in altered conditions of the underlying surface that was deeply related to the hydrological response 12,14 ; the reduced available water volume would be observed in the water donor area because of water transfer project 15 ; the application of water saving measure can increase the water-use efficiency and reduce the local water shortage degree 1,13 ; the shifts in the regional population and the constitution of different water-use units would significantly change local water demand. Furthermore, it has been suggested that climate change and human activities will evolve in the future for most basins in the world 16,17 , indicating vital and varying implications for water availability and water demand 18 . Thus, the allocation of water resources that was only based on historical observations (e.g., historical runoff) cannot provide useful references for future water resources planning and management 13 . It is necessary and urgent to study the optimal allocation of water resources based on hydrological cycle simulation under future climate change and future human activities.
A large number of studies have been presented to assess the hydrological response to climate change or anthropic intervention at different scales with the purpose to formulate adaptive water resources planning and allocation strategies for the future 17,[19][20][21] . For example, Chawla and Mujumdar 20 examined the runoff response in the upper Ganga basin with the VIC model and illustrated that the runoff is sensitive to the change of urban areas and climate change. Pan et al. 21 studied the hydrological response of 83 catchments in southeastern Australia before and during the meteorological drought period based on the GR4J model, and significant shifts in the catchment water storage capacity have been observed in 62.7% of the meteorological drought period. Yin et al. 17 studied the temperature scaling of precipitation and storm runoff extremes under different climate conditions over mainland China. However, most of the previous literatures only concentrated on the variations in future water availability due to the projected climate changes, while ignored the impacts of the future anthropic intervention, and did not analyze their impacts on future water resources allocation.
Therefore, the objectives of this study are: (1) to propose a framework to investigate the joint impact of the future climate changes and human activities on water resources allocation; (2) to project future climate by a large set of multi-model ensembles and LUCC scenarios by the CA-Markov model, respectively; (3) to explore the relationship between optimal water resources allocation and water availability (or water demand); (4) to quantify the water supply and compensation measures in the water donor area. The realization of these objectives will make future climate and human activities change projections more reliable, and make the optimal water resources allocation response to future water availability and water demand more adaptive. The remainder of this study consists of several parts: the methodology employed in this study is presented in "Methodology", followed by the case study and research data in "Study area and data". Then the results and discussion have been made in "Results and discussion". Finally, the conclusions are summarized in "Conclusions".

Methodology
To investigate the effects of future water availability and water demand changes on the optimal allocation of water resources, this assessment scheme is conducted following three procedures: (1) the water availability response to future projected scenarios of climate change and LUCC is studied. A large set of multi-model climate ensembles associated with the DBC method are employed to project future climate scenarios, while the CA-Markov model is used to project future LUCC scenarios. The runoff simulation was based on the SWAT hydrological model under multiple combinations of the projected climate scenarios and LUCC scenarios. (2) the Quota method is used to predict the water demand of various water-using departments under the planning year. (3) the optimal water resources allocation model is established to allocate available water resources on account of the evaluation of the water supply-demand balance structure under different scenarios, and then to quantify the nonlinear impacts of future runoff variation and water demand on water resources planning and allocation. The proposed methodology and procedure are sketched in Fig. 1.
Future runoff projection. The future temperature and precipitation can be projected by General Circulation Models (GCMs), while the spatial scale of GCM outputs does not match the input scale of the hydrological model in a basin. Therefore, a bias correction method is needed to obtain future temperature and precipitation data in a basin-scale as the inputs of the hydrological model 22 .
In this study, the data of daily precipitation and temperature are generated from ten GCMs of the Coupled Model Inter-comparison Project Phase 5 (CMIP5) under Representative Concentration Pathway 4.5 (RCP4.5). The daily series of precipitation and temperature during 2021-2060 of each GCM were statistically downscaled at twenty-five meteorological stations using the DBC method. The DBC method combined DT (daily translation) and LOCI (local intensity) method 23,24 , assumed that the future and historical climate events have the same deviation in each quantile. When the method is applied to precipitation correction, both the deviation of precipitation and the deviation of precipitation frequency can be considered. Further details are provided by Chen et al. 25 .
Future land-use scenarios of the Han River basin (LUCC2020, LUCC2030, LUCC2040, LUCC2050) were simulated based on the CA-Markov model. The CA-Markov model fully combines the spatial dynamic simulation advantages of the Cellular Automata model and the superiorities of long-term prediction of the Markov model, which can well simulate the change of land use from time and space and is widely discussed and applied 26,27 . Following the general procedures for projecting future LUCC condition, the CA-Markov model are implemented at four stages. ( www.nature.com/scientificreports/ ensuing that the LUCC simulation is not divergent from the actual land use planning. (3) The suitability maps are generated according to the evaluation index in the multi-criteria evaluation module. (4) The spatial distribution of LUCC is simulated by the CA model based on the modified transition matrix and suitability maps. The SWAT model was selected to simulate runoff, which is a distributed watershed hydrological model developed by the U.S. Department of Agriculture-Agricultural Research Service (USDA-ARS). The hydrological process simulated by SWAT model can be divided into two parts: the land surface part of water cycle (i.e. runoff generation and slope confluence) and the water surface part of water cycle (i.e. river flow routing). The former controls the input of water, sand, nutrients, and chemicals in the main channel of each sub-basin, while the latter determines the transport of water, sand, and other substances from the river network to the outlet of the basin. It can well simulate and predict the changes in hydrological variables on different time scales 28,29 .
In the SWAT model, the whole catchment is firstly segmented into multiple sub-catchments based on the terrain factors and river network distribution. Thus, the hydrological response unit (HRU) is then classified based on the soil type, land use type, and slope area threshold of the basin, and the runoff is calculated separately. Finally, the total runoff of the outlet section is obtained through the river confluence routing [30][31][32][33] . According to the water balance principle, the water quantity calculation of the SWAT model follows the following equation.
(1) www.nature.com/scientificreports/ where SW t represents the final soil moisture content (mm); SW 0 is the initial soil moisture content (mm); t refers to the period of the model simulation; R, Q s , and ET are the precipitation (mm), surface runoff (mm), and actual evapotranspiration (mm), respectively; S represents the infiltration and side flow of the bottom layer of the soil profile (mm); QR represents the groundwater flow (mm). The parameters of the SWAT model were calibrated by the SUFI-2 algorithm in SWAT-Calibration and Uncertainty Procedures (SWAT-CUP). The Nash-Sutcliffe coefficient (NSE) and the relative error of water volume (RE) were used as criteria to evaluate the applicability of the SWAT model in the Han River basin: where Q t o denotes the observed runoff (m 3 /s); Q t s refers to the simulated runoff (m 3 /s); Q o is the average of the real runoff observations (m 3 /s); n represents the length of observation series.
Future water demand projection. Socioeconomic water demand. The quota method has been proved to be an effective method to project the annual off-stream water demand in the planning year according to Chinese standard (GB/T 51051-2014). The amounts of water demand can be determined by: where WD t i,j refers to the amount of water demand for the jth user in the ith operational zone at the tth period (m 3 ); Wq t i,j denotes the water quota unit of water demand user; Wa t i,j represents the water use per activity level; UR t i,j refers to the utilization rate of water user. The water quota units are the amount of water consumption per capita in domesticity user, the amount of water consumption per ten thousand Yuan in the industry user, and the amount of net irrigation water per unit area in the agriculture user, respectively; the water activity level is projected population in the domestic user, projected GDP in the industry user and projected irrigated area in the agriculture user.
In-stream ecological water demand. The Tennant method 34 is used to estimate the in-stream ecological water demand in each area. It is calculated by multiplying the average annual runoff of the operation area by the minimum runoff ratio required in flood season and non-flood season.
where W t eco,i refers to the ecological water demand in the river channel (m 3 ); R aa,i represents the mean annual runoff of the ith sub-area (m 3 ); ε eco,i denotes the ratio coefficient of the minimum ecological water demand of ith sub-area.
Optimal water resources allocation model. According to the optimal allocation model of water resources as shown below, water resources are allocated among different regions and different water users. The optimal water resources allocation model contains objective function, system constraints, and optimization algorithm.
Objective function. The objective function is determined as follows: where t denotes to the period, i represents the count of sub-regions, and j refers the count of water user sectors. WD t i,j and x t i,j refers to the water demand and water supply of the jth sector of the ith sub-region, respectively. α j refers to the weight coefficient of water shortage in each water-using sector.
System constraints. The system constraints are as follows: (a) Water balance constraint of sub-regions www.nature.com/scientificreports/ where W t i is the outlet runoff of the ith region at the tth period; W t n is the runoff from the nth upstream zone, α n,i is the interrelated coefficient between the nth and the ith region;R t i is the sum of the local water volume in the ith region; O t k is the release from the kth reservoir; β k,i is the hydraulic connection between the ith operational region and the kth reservoir; cc t i,j is the return flow coefficient of the jth sector in the ith region; L t i is the quantity of water loss; TW t i is the water quantity transferred from of the basin. (b) Ecological water requirement of river system Water flows in rivers should maintain a healthy environmental condition. That is, where EWR i t is the environment and ecological water requirement of river system in the ith operational zone at the tth period. where WA t i is the water available in the ith operational zone at the tth period. (g) Non-negativity constraint Optimization algorithm. The genetic algorithm (GA) is originally based on Darwin's evolution theory 35 , which is an optimization method based on simulating natural gene and natural selection mechanism. According to the rule of "selecting the best and eliminating the inferior", the algorithm combines the survival of the fittest with the laws of gene variation and reproduction in nature. It adopts random search, selects, crosses and mutates according to the individual's fitness with population as the unit to achieve the optimization purpose 36 .
The optimal allocation of water resources is simulated as a biological evolution problem by GA, the water supply allocated to each water user in each sub-region is taken as the decision variable 37 . By judging the optimization degree of the objective function, the survival of the fittest is carried out, and a new generation of feasible solution set is generated. Therefore, GA is used to solve the water resources allocation model in this study.

Study area and data
Study area. The Han River in China is 1532 km in length, the largest tributary of the Yangtze River. The area of the Han River basin is about 159,000 km 2 , covering 20 prefectures (cities) and 78 counties (cities) in Hubei, Shaanxi, Sichuan, Chongqing, and Gansu provinces. In the basin, the annual average temperature is 12-16 °C, the general trend of annual precipitation is decreasing from southeast and southwest to northwest, the regional variation is between 800 and 1300 mm, and the runoff depth is between 300 and 900 mm. Figure 2. presents the sketch map of the Han River basin, locations of meteorological stations, reservoirs and hydrological stations, and four water transfer projects (detailed information of water transfer projects is shown in Table 1).
The spatial distribution of LUCC types in the basin has large terrain and regional variations, the main types are forest, cropland, grassland, and construction area, the area of water and bare land is very small. The Danjiangkou reservoir services as the boundary of the upper and mid-lower reaches of the Han River basin, provides abundant and clean water to the capital city of China (Beijing) through the middle route of the South-to-North Water Transfer Project. While alleviating the shortage of water resources in the receiving area, the water transfer project also exerts water resources pressure to the water donor area. Hence, the water availability in the Han River basin is not only affected by future climate change and future LUCC, but also by the water transfer projects and the reservoirs' operation policies. Furthermore, because of the development the socio-economic and urbanization in the basin, the water consumption is increasing and water pollution is becoming intensified serious. Recently, the contradiction of water resources development and utilization in the Han River basin is increasingly significant. Thus, it is urgent to study the optimal allocation of water resources in the Han River www.nature.com/scientificreports/ basin under the changing environment, which can provide support for the establishment of the strictest water resources management system in the Han River basin. The construction of inter-basin water transfer projects was one of the most effective approaches to mitigate the unevenness of water resources distribution, which has been used worldwide to solve the water shortage problem of cities. The Han River has served as the water source of several intra-basin and inter-basin water transfer projects, including the middle route of the South-to-North Water Transfer Project, Han-to-Wei Water Transfer Project, North Hubei Water Transfer Project, and Yangtze-to-Han Water Transfer Project. The description of these inter-basin and intra-basin water transfer projects and the designed annual mean water transfer amount is presented in Table 1.
The water network of the Han River basin is further segmented into 26 sub-regions based on the key nodes, including the water transfer projects, the reservoirs, the sub-regions, the ecological stations and the hydrological gauge stations. The location of each sub-region is presented in Fig. 3a.
To analyze and calculate the supply and demand in the Han River basin, it is necessary to generalize the real water resources system of the study area and draw the node network diagram of the water resources system according to the geographical location and various hydraulic connections between the upper and lower reaches. The node network diagram includes the water node (each calculation unit in the study area), the water source node (including local water source and incoming water), regulation and storage node (large and medium-sized reservoir or large lake with certain regulation capacity), water intake node, water return node, etc. The nodes combined with the water supply route constitute the water resources system network of the whole study area. Taking each sub-region as the water demand control node, according to the hydraulic connection among water  www.nature.com/scientificreports/ system, reservoir, and water users, the node network diagram of the water resources system in the Han River basin is drawn, as shown in Fig. 3b.

Data.
A large set of observational data and model outputs are used, including the data of the Digital Elevation Model (DEM), the data of soil, the data of land use, meteorological inputs, climate series, water demand data, hydrological observations, and reservoirs characteristics. The description and source of each dataset are listed in Table 2.
It is informative to note that: (1) the future daily precipitation (Prec), minimum and maximum temperature (T min and T max ) data are obtained from selected ten GCMs in the CMIP of the Intergovernmental Panel on Climate Change (IPCC). Table 3

Description of scenarios.
To assess the response of water resources allocation to future water availability and water demand changes, four scenarios are applied to the study area, which is composed of two water availability scenarios and two water demand scenarios. The impact of water availability change on water resources allocation is assessed based on S1 and S3, (or based on S2 and S4). The influence of water demand change on water resources allocation is investigated by comparing S1 with S2 (or S3 with S4). The detailed information is shown in Table 4.

Results and discussion
Projecting future runoff and water resources. Performance of the SWAT model. The initial series from 1980 to 2000 is segmented into two periods, i.e., the calibration period (1980)(1981)(1982)(1983)(1984)(1985)(1986)(1987)(1988)(1989)(1990)(1991)(1992)(1993) and the validation period (1994)(1995)(1996)(1997)(1998)(1999)(2000). The evaluation indexes of the simulation performances at the calibration and verification periods of the four hydrological stations are presented in Table 5, which shows that the NSE value of each hydrological station is greater than 0. Water availability under future climate change and LUCC . The daily precipitation and temperature in the future (2021-2060) after bias correction are generated by ten GCMs are then used to force the SWAT model for runoff simulation, the statistical characteristics of simulated runoff series by ten GCMs at the mainstream stations of the Han River basin are compared in Fig. 4. From the figure, we can see that, the simulation effects of GCM on the extreme value and mean value are not the same. Some GCM simulation series have great interannual variation (such as G2, G7), while some GCM simulation results have little interannual variation (such as G8, G9). The results show that the runoff simulation error is caused by GCM precipitation error input into the hydrological model, which is consistent with the previous research results 38 . Therefore, to reduce the uncertainty of the single climate model for runoff simulation, this study uses the multi-GCMs average results as the input of the hydrologic model to predict future runoff and water resources.
The changes in annual average local water availability from ten GCMs in the Han River basin under future climate change and future human activities conditions are listed in Table 6. It should be noted that the runoff value in the historical period is simulated from the SWAT model. The results show that: the future water availability in all areas will increase in the future compared to the base period . Under the RCP4.5 concentration pathway, the water availability change rate of the upper, Tangbai river, and middle and lower reaches in the Han River basin are + 5.26%, + 2.82%, and + 2.81%, respectively. From the perspective of water resources distribution in a year, the local water resources in the flood (non-flood) season under future RCP4.5 scenario are projected to increase (decline). The water availability changing rates of the upper, Tangbai river, middle and lower reach reaches in the flood season are + 19.57%, + 3.05%, and + 10.61%, while the rates in the non-flood season are − 15.88%, − 0.82%, and − 1.25%, respectively. The results show that the uneven distribution of local water resources may be more severe in the future. Overall, the change rate of local water availability in the Han River basin is + 4.47% under the RCP4.5 concentration pathway. The impact of precipitation change on runoff is direct, and the relationship between them is positive, while the impact of temperature change on runoff is indirect with a negative correlation.
In the multi-year average runoff series, the local water resources under four water inflow frequencies (50%, 75%, 90%, and 95%) in the history and future (RCP4.5) are selected for analysis, and the results are shown in Fig. 5. No matter in the upper, Tangbai river, or the middle and lower reaches, the average local water resources of the four inflow frequencies under future RCP4.5 scenario is greater than the historical inflow conditions. At the same water flow frequency, the local water resources in the upper reach are the largest, followed by the middle and lower reaches, and finally in the Tangbai river reach.
Water demand in the planning year. Based on the water demand prediction model, the water demands in the five water users in 2016 base year and 2030 planning year are estimated. The in-stream water demand is determined by the Tennant method based on the local water resources. The annual water demand of different water user sectors is listed in Table 7. Taking the water demand scheme under the water flow frequency of 75% as an example, the proportion of different water user sectors to total off-stream water demand is shown in Fig. 6.
According to Table 7, under the water flow frequency of 50%, 75%, 90%, and 95% in 2016, the total water demand of the Han River basin is 32.  From the perspective of different water users, with the increasing population and the improvement of living standards, the demands in domestic water users show a gradual increasing tendency, among which the urban domestic water demand increases compared with the slight reduction in rural domestic water demand. Although the industrial water consumption quota in 2030 planning year is projected to decline in reference with 2016 base year, the total industrial water consumption will increase rapidly due to industrialization, while the agricultural water demand will drop due to the popularization of water-saving technologies. In the upper, Tangbai river, middle and lower reach reaches, the total industrial water demand will increase by 0.12, 0.12 and 0.28 billion m 3 , while the agricultural water demand will decrease by 0.08, 0.04 and 0.59 billion m 3 , respectively.  www.nature.com/scientificreports/ Adaptive optimal allocation of water resources. Based on the water availability and water demand prediction results of the Han River basin under future climate scenarios, future LUCC scenarios and water transfer projects, the water supply of different water users in sub-regions of the case study is calculated according to the established water resources allocation model. The water deficit rate of different water users under the four scenarios is shown in Fig. 7. Changes in future water availability are caused by future climate change and LUCC. Figure 8 shows the assessment results of future climate change and future LUCC on the water resources allocation in the Han River basin. In Fig. 8, the color of the arc line and arc polygons mean the water flow frequency level of available water resources (i.e. the probability of that drought event will not occur), while the value of arc line and arc polygon represent the water demand and the water allocation result. The interval of the arc lines and the arc polygons is the water deficit value. Four scenarios described in "Description of scenarios" are shown in the four quadrants of the Cartesian coordinate system. What's more, there are four water flow frequencies (50%, 75%, 90%, and   www.nature.com/scientificreports/ 95%,) used for analysis under each scenario. Hence, there are 16 (2 × 2 × 4) kinds of water resources allocation results of each sub-region to show the effects of changing environment on optimal allocation of water resources. As shown in Figs. 7 and 8, the water shortage rate of the Han River basin is not large under the condition of historical inflow. As for the results under S1, the total water deficit ratio in the Han River basin is 5.02%, 5.74%, 7.76%, and 11.87%, at the four frequencies 50%, 75%, 90%, and 95%. From the spatial distribution of water shortage rate, the total water deficit ratio in the upper reach is 1.68%, 2.89%, 3.03% and 8.33% in the Tangbai river reach is 10.63%, 16.27%, 19.57% and 20.20%, and 3.16%, 3.37%, 4.62%, 5.10% in the middle and lower reaches at the four frequencies 50%, 75%, 90% and 95%. The results show that: at the same level year, the total water shortage ratio increases slowly along with fewer water resources. The water shortage ratio in the Tangbai river reach is much higher than that in the upper reach, and middle and lower reaches, which is since the local water resources in the Tangbai river reach are the least, and there is a large gap due to the lack of effective regulation, because of the large water demand and the limitation of reservoir function in the Tangbai river reach. When comparing the supply and demand balance results of the two years, it can be seen that under the same water flow frequency, the total water deficit ratio shows an increasing trend with the promotion of 2016 base year range to the planning level year 2030. Under the same water demand scheme, the water deficit in the future is slightly smaller than that in the historical period.
Water resources allocation response to future water availability change. The impact of water availability change on water resources allocation is assessed based on S1 and S3 (or based on S2 and S4) according to the same water demand scenario. Figure 7 shows the water shortage rate in different areas and the whole basin under four scenarios. We can see that: (1) judging from the water shortage rates in different scenarios, when comparing the water deficit rates of S1 with S3, or S2 with S4, we can find that the water shortage rate is sorted as S1 > S3, S2 > S4, respectively. It seems to contradict the result of water availability under the three scenarios (the water availability is S3 > S1, S4 > S2). (2) judging from the water shortage in different water areas in any scenario, the water shortage rate in the Tangbai river reach is the highest, which is 12.06% 21.19%, 7.21%, 8.45% from S1-S4 under the water flow frequency of 50%. Followed by the upper reach, and finally is the middle and lower reaches. This is related to that the number of reservoirs in the Tangbai river reach is small and the regulation capacity www.nature.com/scientificreports/ of reservoirs is limited. What's more, the major of the water demand in the Tangbai river reach concentrates on agriculture, and the process of inflow could not match the process of water demand fitly. In terms of spatial distribution (shown in Supplementary Fig. S2), the mainstream of Han River flows through the upper, middle and lower reach reaches. The Tangbai river is a tributary of Han river which is unable to extract water from the mainstream. Combined with the above reasons, the water shortage rate in the Tangbai river reach is the highest. Overall, the effects of future climate change and LUCC will decrease water shortage in the Han River basin. From the results of "Water availability under future climate change and LUCC ", the average water availability change rate in the upper reach, Tangbai river reach, middle and lower reaches of the Han River basin under the RCP4.5 concentration pathway are + 5.26%, + 2.82%, and + 2.81%, respectively, when compared with the historical water availability. However, taking the water demand scheme in 2016 base year as an example, the water shortage rate (S3-S1) will change − 1.66% in the upper reach, − 4.61% in the Tangbai river reach, and − 0.57% in the middle and lower reaches at the water flow frequency of 50% under the RCP4.5 concentration pathway, when compared with the historical water shortage rate. The results show that a nonlinear relationship has been identified between the optimal water resources allocation and the water availability, which may be explained by the reason that the water transfer projects can change the distribution of water supply on the spatial scale, and the reservoirs can change the water supply on the time scale. Therefore, the impacts of future climate change and human activities on water availability does not equal to the impacts on optimal water resources allocation. www.nature.com/scientificreports/ Water resources allocation response to future water demand change. The results of an impact assessment of water demand change on water resources allocation are investigated by comparing S1 with S2 (or S3 with S4) according to the same water availability scenario. As shown in Fig. 7, in the same case of water availability, the water deficit rates of all areas are increasing under the water demand scenario of 2030 compared with the water demand scenario of 2016 (S2 > S1, S4 > S3), which is caused by the increasing water demand shown in Table 7.
As for the different areas, Fig. 8 shows the relationship between water demand and water supply. And it can be found that at the upper reach of the Han River basin, water supply is almost equal to water demand regardless of any scenario except for at the water flow frequency of 95%, which shows that the increased water availability can meet the increased water demand. As for the Tangbai river reach of the Han River basin, the effects of future water demand change will increase water scarcity in the case of insufficient water availability. From the results of "Water demand in the planning year", taking the water flow frequency of 50% as an example, the total off-stream water demand in 2030 will change + 2.97% compared with the historical water demand. Then the total water shortage rate of the basin will change + 4.62% (S2-S1) and + 3.49% (S4-S3) when compared with the historical water shortage rate. This result shows that a linear relationship has been identified between the optimal allocation of water resources and the water demand. That is the increase in water demand will cause an increase in water shortage under the condition of constant incoming water, which will aggravate the contradiction between supply and demand.
In general, in the same planning year, the total water deficit slowly increases along with fewer water resources. Under the same water demand scheme, the water deficit in the future is slightly smaller than that in the historical period. The results show that under the situation where water availability and water demand varied simultaneously in the future, the response result of water resource allocation is that water shortage in the basin will decrease.
Analysis of water replenishment. According to the working conditions considered in years 2016 and 2030 (Table 1) and the dispatching regulations of Danjiangkou reservoir, the actual water quantity of each water transfer project and actual discharge from Danjiangkou in 2016 and 2030 are obtained except for the water resources allocation results for each water sectors of sub-regions. Results under S1 and S2 are used for analysis, the annual average water shortage of each water transfer project and the in-stream water ecology are shown in Table 8. It can be seen that when the natural inflow runoff of Danjiangkou adopts the 1956-2016 series, the average annual water deficit of P1, P2, P3, and in-stream ecology of the mainstream of Han River in 2016 base year is 1.40, 0, 0.80, and 0.10 billion m 3 , respectively. In the 2030 planning level year, the average annual water deficit of P1, P2, P3, and the in-stream ecology in the mainstream of Han River is 3.09, 0, 1.30, and 0.11 billion m 3 , respectively. It should be noted that the Han-to-Wei water transfer project (P2) is directly deducted from the inflow of the Danjiangkou reservoir, and there is no water shortage of P2.
According to the water resources allocation results, the average annual volume of South to North Water Transfer project in 2016 is 8.011 billion m 3 , and that in 2030 is 8.505 billion m 3 . The actual water transfer quantity process of the South-to-North Water Transfer Project (P1) under the two water demand schemes are shown in Fig. 9a. As can be seen from the figure, except for the difference in water quantity, the water diversion process  www.nature.com/scientificreports/ trend under the two-level years is almost identical, which is since the trend of water inflow from Danjiangkou and the water supply sequence of Danjiangkou reservoir for each working condition are completely consistent under the two scenarios. Figure 9b shows the amount of water diverted from the river for each year from 1956 to 2016. Comparing the water replenishment process of the two water demand schemes, it can be seen that the change trends are completely the same. The difference is: in 2016 base year, the annual average water replenishment is 2.301 billion m 3 , the annual average water replenishment is 4.495 billion m 3 in 2030 planning year.
Uncertainties discussion. Researches on climate change mostly belong to the type of "If-then-what".
According to the output results of GCMs, specific scenario is still the basic way to help determine the possible impacts of future climate change, although there are some uncertainties 39 . The uncertainty of climate change impact assessment includes future emission scenarios, GCMs, downscaling techniques, hydrological models, etc. Many scholars have found that the selection of GCM is the biggest factor leading to the uncertainty of climate change impact assessment compared with other factors 38,40 . Figure 10 shows the uncertainty range of future runoff projection at four hydrological stations in the Han River. It is observed that runoff relative changes of GCM ensemble median output at Baihe, Ankang, Danjiangkou and Huangzhuang stations are all fluctuated up and down about zero. As for the 90% confidence interval, the relative changes at four stations are mainly within [− 50%, + 50%]. The simulation results are significant differences among different GCMs, which proves that GCM output is a main factor leading to the uncertainty. It is likely to draw biased conclusions if only one GCM is used to evaluate the impact of climate change on water resources, and the GCM ensemble median results can reduce the uncertainty of runoff projection. Therefore, to reduce the uncertainty of future climate and runoff predictions, ten GCMs are selected in this study and historical meteorological data is used to test the historical scenario simulated by GCMs. The DBC method is used to correct the future precipitation and temperature in Han River basin, which can take into account both precipitation frequency and the distribution of precipitation. Through different GCMs and deviation correction method, the uncertainty of study can be reduced, and the rationality and practicability of hydrological simulation prediction results in Han River basin can be ensured. www.nature.com/scientificreports/

Conclusions
In this paper, the impacts of future climate change and future human activities on water availability and optimal allocation of water resources in the Han River basin are investigated. This work is conducted based on three levels: Firstly, the future climate and LUCC scenarios are generated and used to force the SWAT model to project future water availability. Secondly, the Quota method is used to predict water demand in the planning year. Finally, the optimal water resources allocation model is established to analyze the supply-demand balance results under scenarios, and then to quantify the impacts of future water availability and water demand on water resources allocation. The main conclusions are summarized below.
(1) The annual water availability has an increasing tendency in the future impacted by future climate change and future human activities compared with the base period, while the growth rate of the whole basin in RCP4.5 is 4.47%. (2) In 2030, the total water demand of Han River basin at four annual average water flow frequencies (50%, 75%, 90%, and 95%) will be 35.18, 36.46, 37.84, and 38.33 billion m 3 , respectively, which shows a slight increase compared with the water demand in 2016. (3) A nonlinear relationship has been identified between the optimal allocation of water resources and the water availability while a linear association between the former and the water demand. The effects of future varied water supply combined future climate change and human activities (LUCC and water transfer projects) were assessed and implemented to alleviate water shortages of the case study, while the future varied water demand will increase water shortages of the case study.