1 Introduction

Sustainable cities are characterized by several features, such as adequate health centers, accessible public transportation, and excellent education facilities (Satterthwaite 1997; Haughton and Hunter 2004; Evans et al. 2019; Sodiq et al. 2019). Water adequacy is also vital to urban residential sustainability. As such, decision-makers are concerned with accurately estimating future urban water demands so that cities can optimize their water supply facilities.

Providing a new water distribution system or upgrading existing systems requires substantial investments, time, and effort. These concerns highlight the importance of short- and long-term urban water demand forecasting, which has become a necessary component of smart and viable cities (Noiva et al. 2016; Jayarathna et al. 2017).

Several factors, including demographic (i.e., population and number of consumers), climatic (i.e., precipitation and temperature), environmental (i.e., solar radiation and humidity), and socio-economic (i.e., water price, household size, and financial income) factors, significantly impact urban water demand (Gato et al. 2007; Arbués et al. 2010; House-Peters et al. 2010; Abrams et al. 2012; Haque et al. 2014; Felfelani and Kerachian 2016).

While all these factors are essential to estimate the urban water demand, climatic and environmental factors have an especially strong impact on urban water demand in regions with low population growth rates (Babel and Shinde 2011). Haque et al. (2018) assessed many predictive variables, including rainfall depth, number of rainy days, mean and maximum temperature, total evaporation, solar radiation, and water price, to predict water demand in urban areas. They found that rainfall depth and temperature were the most robust predictors of water demand. Zubaidi et al. (2018) developed a hybrid ANN algorithm to forecast the short-term urban water demand using several climate variables (e.g., maximum temperature, evaporation, solar radiation). The maximum temperature had the highest prediction accuracy of all investigated variables.

In other research, Ashoori et al. (2016) evaluated the impacts of the conservation, demographic data, price, and climate variations on urban water demand in Los Angeles. Price and population had the most significant impacts on urban water demand. Bakker et al. (2014) predicted urban water demand using two input combinations (i.e., with and without climate variables). The climate-based input combination yielded a lower prediction error (7%) than other combinations. Also, Ruth et al. (2007) assessed climatic and socio-economic variables’ impacts on per capita consumption in Hamilton, New Zealand. They found that population has a significant impact on urban water demand.

As climate variables affect the urban water demand, it follows that climate change also causes significant fluctuations in future urban water demand due to corresponding temperature increases, especially in arid and semi-arid regions (Waha et al. 2017; Perea et al. 2019). Moreover, climate change has created critical problems in many cities around the world. Such problems include worsened infrastructure and sustainability and decreased social health (Keath and Brown 2009; Stone et al. 2010; Harlan and Ruddell 2011; Leichenko 2011; Salimi and Al-Ghamdi 2020). Climate change also significantly affects urban water quality and quantity management (Stakhiv 1998; Narsimlu et al. 2013; Özerol et al. 2020). Subsequently, warm days with low precipitation rates are associated with increased water demand in urban areas, and the current water distribution infrastructure will be unable to meet future demands if they remain unchanged (Adamowski et al. 2012).

The impact of climate change on urban water demand can be evaluated using the climate variables (i.e., rainfall depth, minimum and maximum temperature, radiation or sunshine) projected through the general circulation models (GCMs) (Lobell et al. 2005; Khan et al. 2006; Meza et al. 2008). The GCM outputs should be downscaled on a targeted region due to its coarse spatial resolution.

Several downscaling approaches, including dynamic and statistical methods, have been developed to improve the accuracy of climate change modeling. Several downscaling packages have been developed, including the Statistical Downscaling Model (SDSM) (Wilby et al. 2002), Weather Generator (WGEN) (Richardson and Wright 1984), Nonhomogeneous Hidden Markov Model (NHMM) (Hughes et al. 1999), and Long Ashton Research Station Weather Generator (LARS-WG) (Semenov et al. 1998). The LARS-WG uses the Markov chain for downscaling procedure and projects daily climate variables by considering the present conditions and upcoming climate change scenarios. LARS-WG is considered a reliable method in climate change modeling based on literature (Semenov et al. 1998; Hashmi et al. 2011). Hence, the present study employs this model to project climate variables based on different GCMs and RCPs.

Several studies have assessed the impacts of climate change on urban water demand. For instance, Rasifaghihi et al. (2020) used the Bayesian model to evaluate climate change impact on long-term residential water demand in Montreal, Canada. They found that daily temperature and rainfall significantly affected water demand. Research has detected a significant increasing trend in future water demand. For example, Flörke et al. (2018) predicted that the urban water demand will increase more than 80% by 2050 over 500 large cities. Similarly, Wang et al. (2018) developed a statistical method to project how much urban water demand will be affected by climate and social changes in Huaihe River Basin, China. They calculated that urban water demand will increase by 2030 due to increases in the mean temperatures and population.

In another work, Nazif et al. (2017) assessed climate change effects on hydrological cycles in urban areas. Their findings indicated that the water distribution systems’ reliability will decrease as water consumption increases. Wang et al. (2017) used seven GCMs to predict climate change impacts on future temperature and water demand in a residential area near the Yellow River in China. They detected significant increasing trends in both measures.

Furthermore, Parandvash and Chang (2016) investigated the climate change effect on per capita water demand in Portland, USA, based on daily weather and socio-economic variables. They projected that per capita water demand will increase by 4.8% and 10.6% in urban and suburban areas, respectively. Xiao-jun et al. (2015) predicted that water demand in Yulin will double from 2010 to 2030 due to increased temperature.

To assess the climate change impact on urban water demand, developing a reliable water demand simulator to employ the projected climate variables is necessary yet challenging. Artificial intelligence (AI) models have been implemented to simulate the urban water demand in recent years. Table 1 shows a summary of AI algorithms employed to predict urban water demand.

Table 1 Summary of artificial intelligence models for predicting the urban water demand

Table 1 shows various benchmark AI algorithms, such as the artificial neural network (ANN), adaptive neuro-fuzzy inference system (ANFIS), and support vector regression (SVR). Such models have been combined into hybrid models and utilized to predict water demand per capita. However, very few genetic-based algorithms have been applied. Also, alternative AI models like ANN, ANFIS, and SVR contain several drawbacks, including difficulties with parameter tuning, structure establishment, and time-consuming computations, and the fact that they cannot deal with noisy data (Keith and Martin 1994; Abraham et al. 2006; Koga and Ono 2018). Hence, this study assesses how well the genetic programming (GP) model simulates urban water demand.

The genetic-based predictive model has been employed often to predict various phenomena such as runoff (Sedki et al. 2009; Mehr and Nourani 2018), precipitation (Nasseri et al. 2008; Wahyuni and Mahmudy 2017), flood risk management (Wu and Chau 2006; Yen et al. 2011), and regional drought detection (Merabtene et al. 2002; Song and Singh 2010).

The variability of GCM models and emission scenarios has created uncertainty regarding climate change impacts (Khan et al. 2006; Sharafati and Zahabiyoun 2014). Moreover, urban planners must quantify climate change uncertainty to develop reliable adaptation policies (Sharafati and Pezeshki 2019; Sharafati et al. 2020a). Hence, the primary goal of the present study is to quantify the relationship between the uncertainty in climate change projections and the variability of urban water demand. The proposed method is utilized in the city of Neyshabur, Iran. The GP model is used to simulate possible changes in future water demand per capita using the climate variables of rainfall depth and maximum temperature, as projected by LARS-WG6 through the CMIP5 GCMs for two RCP scenarios.

2 Study area description

Neyshabur was selected as the area for the present case study. This city is located in the center of the Khorasan Razavi province of northeast Iran (Fig. 1). It has a population of approximately 259,000 and covers an area of 8366 km2. The climate is semi-arid, and the mean annual rainfall depth is 203 mm. The highest precipitation depths are observed in spring and winter, while the lowest occur during the summer. The mean annual maximum and minimum temperatures are 23 °C and 7 °C, respectively. June and December are the hottest and coldest months, respectively. Historical daily climate data consist of rainfall depth and the minimum and maximum temperatures from 1997 to 2016. These data were obtained by the Iran Meteorological Organization, while data related to daily urban water demand were obtained from the Khorasan Razavi Water and Wastewater Company.

Fig. 1
figure 1

The maps of Neyshabur City. a Location in Iran and b digital elevation map

While all climate regions in Iran will suffer the harmful effects of climate change, cities located in arid and semi-arid areas will endure the most volatility in rainfall and temperature (Rahimi et al. 2019). Neyshabur plain, as one of the most important regions in Khorasan Razavi province, undergoes high population rate growth over the past decades. Meanwhile, observed synoptic data depict that the plain will experience decreased rainfall and increased temperatures during future periods, significantly impacting urban and agricultural water demand (Dehghan et al. 2011; Yaghoobzadeh et al. 2017; Mohammadi et al. 2019). Thus, the Neyshabur plain is selected as the case study area for the current study owing to these trends and the availability of climate data.

3 Methods

This study projects the urban water demand per capita for three future periods, namely the near future (2021–2040), middle future (2041–2060), and far future (2061–2080). LARS-WG is implemented to project future rainfall rates and temperatures based on four GCM models (EC-EARTH, HadGEM2-ES, MIROC5, and MPI-ESM-MR) for two emission scenarios (RCP45 and RCP85). The projected climate data are then used as input data in gene programming (GP) and are used to simulate water demand per capita in an urban area. Climate change impact on water demand is predicted based on these simulations. After water demand in the future is compared to water demand during the base period, the uncertainty of the LARS-WG projections is assessed. The entire process by which climate change impacts urban water demand is depicted in Fig. 2.

Fig. 2
figure 2

The methodological framework used in the present study

3.1 Description of LARS-WG

LARS-WG is a stochastic weather generator that utilizes climate data as a training dataset to project the future climate of an area. The LARS-WG model uses daily climatic data (i.e., rainfall and temperature). It considers the statistical characteristics of the observed weather variables to generate climatic status at certain points in the present and future. Weather generators estimate the climate variables using surrounding weather data and interpolating them in the desired location to predict the climate data at an ungauged location. Weather generators can also evaluate the future climate variables of known locations using the global climate model (GCM) for different representative concentration pathway (RCP) scenarios and interpolating them to the site of interest.

In this research, climate data for the base period of 1999–2018 (obtained from the Iran Meteorological Organization) is used to train and test the LARS-WG model. Future climates are modeled and projected using four GCM simulations, namely European Community Earth-System Model (EC-EARTH), Hadley Centre Global Environment Model version 2 (HadGEM2-ES), Model for Interdisciplinary Research on Climate (MIROC5), and Max Planck Institute for Meteorology Earth System Model MR (MPI-ESM-MR). These GCMs are selected based on recommendations given in the literature (Hazeleger et al. 2010; Watanabe et al. 2010; Jones et al., 2011; Giorgetta et al. 2013) and the availability of data for observations of all three of these climate variables over the base period of 1999 to 2018 (which were incomplete for other GCMs). Also, two CMIP5 scenarios (RCP45 and RCP85) are utilized in LARS-WG.

Table 2 outlines the GCMs applied in this research. Projections for three future periods (2021–2040, 2041–2060, and 2061–2080) are investigated.

Table 2 Description of GCMs and emission scenarios employed in the present study

3.2 Genetic programming model

The GP model, which was introduced by Koza (1994), comprises logical and mathematical expressions. This model utilizes a population of individuals chosen based on fitness and then applies one or more genetic operators to propose a genetic variation. Generally, the following five steps are conducted to perform GP modeling: (i) determining the terminals, such as predictive variables and constants; (ii) specifying the symbolic functions and operators (i.e., \( \sqrt{},\log, \mathrm{power},\exp, \kern0.5em \times, \kern0.5em \pm, \kern0.5em \div, \dots \)); (iii) assessing individuals’ performance over the member of the population using error metrics like RMSE; (iv) specifying parameters (e.g., population size) to control the execute procedure; and (v) determining a criterion for terminating the program (e.g., maximum generation number). The best predictive model (equation) is chosen from among the many equations generated by the GP approach; this choice is based on several error metrics (e.g., RMSE and MAE) (Sharafati et al. 2020b).

This study presents a new formula for simulating monthly urban water demand per capita that includes two predictive variables: rainfall depth (Rd), and maximum temperature (tmax). Several operators (i.e., ×,  ± , ÷) and functions (\( \sqrt{},\kern0.5em \log, \mathrm{power},\exp \)) are included in the GP-based formula. The tree structure of the proposed GP model is presented in Fig. 3.

Fig. 3
figure 3

Tree structure of the GP model proposed for simulating the water demand per capita

To assess the simulation performance over both training and testing phases, the correlation coefficient (R) is used as follows (Abdelwares et al. 2020; Hai et al. 2020; Malik et al. 2020; Sharafati et al. 2020b):

$$ R=\frac{\sum_{i=1}^N\left({X}_o-\overline{X_o}\right)\left({X}_P-\overline{X_P}\right)}{\sqrt{\sum_{i=1}^N{\left({X}_o-\overline{X_o}\right)}^2{\sum}_{i=1}^N{\left({X}_P-\overline{X_P}\right)}^2}} $$
(1)

where XP, Xo, \( \overline{X_o} \), and \( \overline{X_P} \) are the simulated value, the observed value, the observed average, and the simulated average, respectively.

4 Results and discussion

4.1 Projection of the climate variables

LARS-WG is used to project the rainfall depth and temperature in future periods utilizing eight weather scenarios consisting of the four mentioned GCMs with RCP 45 and RCP 85 in Neyshabur.

Figure 4 compares the monthly rainfall depths projected for three different future periods with the rainfall depth of the base period. The projected rainfall depths indicate increases for all three future periods in several months (e.g., January, April, June, and November), while decreases are expected for May. All other months are associated with either increased or decreased rainfall, depending on the GCM.

Fig. 4
figure 4

Variations of projected rainfall depth in Neyshabur City for three future horizons compared to the base period by a EC-EARTH, b MIROC5, c MPI-ESM-MR, and d HadGEM2-ES

The highest decrease in rainfall (54%) is observed in May (MPI-ESM-MR for RCP 85) for the far-future period; the highest increase (265%) is observed in October (MPI-ESM-MR for RCP 85) in the near future. According to Table 3, the GCMs project increases in annual rainfall depth for all three future periods. The highest and lowest increases are 53% (MPI-ESM-MR for RCP 85) and 14% (MIROC5 for RCP 45).

Table 3 Projected changes in annual average of rainfall and temperature by the GCMs for two RCPs for three future periods

Figure 5 provides the projected monthly minimum and maximum temperatures. For all scenarios, the minimum temperature is expected to be higher during the future periods than during the base period. Meanwhile, the maximum temperatures in January and February are projected to decrease in the future. The highest increase in maximum temperature (6.42 °C; 35.9 °C “projected value” vs. 29.5 °C “base value”) is found in September (HadGEM2-ES for RCP 85) from 2061 to 2080. The largest drop in maximum temperature (− 2.9 °C; 7.3 °C “projected value” vs. 10.2 °C “base value”) is projected in January (MPI-ESM-MR for RCP 45) from 2021 to 2040. Meanwhile, the highest increase in minimum temperature of 6.55 °C (12.7 °C “projected value” vs. 6.15 °C “base value”) is observed in October. Also, the HadGEM2-ES projected significant increases in the annual average maximum and minimum temperatures of 4.2 °C and 4.8 °C, respectively (Table 3).

Fig. 5
figure 5

Variations of projected maximum and minimum temperature in Neyshabur City for three future horizons compared to the base period by a EC-EARTH, b MIROC5, c MPI-ESM-MR, and d HadGEM2-ES

The uncertainty associated with the projected climate variables is assessed using the confidence interval obtained from the GCM models. Figure 6 illustrates the R − factor as a method for quantifying uncertainty in the projected rainfall and temperature, which is evaluated separately for two selected RCPs. Overall, the figure denotes more uncertainty in rainfall depth (R − factor = 0.34 − 0.49) than in temperature (R − factor = 0.05 − 0.19) for all future periods.

In the case of rainfall depth (Fig. 6 a and b), it is observed that the uncertainty for both RCPs slightly decreases over time. The near future with R − factor of 0.38 and 0.49, for RCP 45 and 85, respectively, has the highest uncertainty while the middle and far future with 16% and 18% reduction in R − factor show lower uncertainties compared to that of the near future.

Fig. 6
figure 6figure 6

Uncertainty in projected weather variables for RCP45 and RCP85 emission scenarios in Neyshabur City for three future horizons compared to the base period for a, b rainfall depth; c, d maximum temperature; and e, f minimum temperature

However, the temperature uncertainties show an opposite trend in R − factor compared to rainfall depth. In both RCP scenarios for minimum and maximum temperatures, the near-future period represents the lowest R − factor (ranging from 0.05 to 0.11). However, as time goes on, this quantity becomes nearly 2.5 times its initial value. The far future has the most uncertainty as indicated by the R − factor of 0.19 for both minimum and the maximum temperatures resulting from RCP85.

The findings obtained from the uncertainty analysis of projected climate variables indicate that the uncertainty associated with projected rainfall depth is significantly more than that of the temperature data. This concern may be raised due to the outlier projected rainfall depths.

4.2 Simulation of urban water demand per capita

The GP model is used to simulate water demand, with rainfall depth (Rd) and maximum temperature (tmax) employed as input variables. The monthly data obtained from 1997 to 2006 are utilized, and the dataset is randomly split into two phases (training and testing) at a proportion of 70 to 30, respectively. The simulated and observed water demand per capita for both training and testing phases are then compared (Fig. 7).

Fig. 7
figure 7

Scatter plot between the simulated and observed urban water demand per capita over both training and testing phases

Figure 7 indicates that the GP model simulates urban water demand per capita with sufficient accuracy. The correlation coefficient (R), a representation of accuracy, is within the suitable range for both the training (R = 0.73) and testing (R = 0.81) phases based on the criterion proposed by Moriasi et al. (2007). In terms of the coefficient of correlation, the GP model simulates urban water demand better than other models used in previous studies (Nasseri et al. 2011; Shabani et al. 2018).

4.3 Climate change impact on water demand

The climate change effect on future urban water demand is evaluated. Future urban water demand is compared to water demand during the base period, and the uncertainty associated with the projected demands is assessed. In this way, the trained GP model is employed to simulate the urban water demand per capita for three future periods using the projected climate data (i.e., rainfall depth and maximum temperature).

Figure 8 illustrates significant fluctuations in the monthly water demand over time. The highest demand of 4.39 (m3 month−1 capita−1) is observed in May, while the lowest demand of 3.37 (m3 month−1 capita−1) occurs in January. Significant changes in future patterns are observed for RCP45 and RCP85, as the water demand peak is predicted to shift from May to April.

Fig. 8
figure 8

Variations of projected water demand in Neyshabur City for three future horizons compared to the base period by a EC-EARTH, b MIROC5, c MPI-ESM-MR, and d HadGEM2-ES

The projected monthly water demand is associated with increasing and decreasing trends. The highest increase and decrease in water demand are seen in October (7.16%) and May (− 3.2%), respectively. The projected water demand per capita pattern represents the base period very well, further justifying the method proposed in the current study.

Table 4 summarizes the changes in annual water demand per capita over the future periods compared to those in the base period. The lowest increase is projected by EC-EARTH in the near future (2021–2040) for RCP 45, while the highest is calculated in the far future (2061–2080) by HadGEM2-ES for RCP85 scenarios. It can also be observed that according to the change percentage from 2020 to 2080, the water demand in the studied area has a slight increase.

Table 4 Changes in water demand projected by four different GCMs over three future periods under two emission scenarios

To quantify the uncertainty associated with the water demand projected by four GCMs for two RCPs, the boxplots of water demand per capita over the base and future periods are generated (Fig. 9). Moreover, the interquartile range (IQR) (3rd quartile minus 1st quartile) is calculated as an indicator of water demand uncertainty over those periods.

Fig. 9
figure 9

Boxplots of uncertainty in projected water demand for the base period and two emissions RCP45 and RCP85 in Neyshabur City for three future periods

Figure 9 depicts the uncertainty associated with the water demand projected for the future (IQR = 0.1 − 0.14 m3 month−1 capita−1) compared to the base period (IQR = 0.08 m3 month−1 capita−1). The levels of uncertainty for water demand are higher in the future than in the base period since climate variability is expected to increase in the future. The uncertainty associated with RCP45 (IQR = 0.1 − 0.12) is lower than that associated with RCP85 (IQR = 0.12 − 0.14). Uncertainty is predicted to increase slightly over time for RCP45 despite a decrease in the mid-period for RCP85 (IQR = 0.11) (this will be countered by a rise in the far future (IQR = 0.14)). While the RCP85 is a more relevant scenario compared to RCP45, it is associated with more uncertainty.

5 Conclusion

The impact of climate change on water demand per capita in Neyshabur, Iran, is assessed over three future periods using four GCMs and two RCP scenarios. Climate change is expected to have a crucial impact on Neyshabur due to the scarcity of water resources in this city. Previous investigations of climate change in Iran have been mostly based on just a few GCMs. The present study contributes to the literature by including several updated GCMs to assess the climate change impact on urban water demand per capita (and related uncertainty) in Neyshabur. To the best of the authors’ knowledge, this study is the first to evaluate the variability in climate change impact on urban water demand using updated GCMs in Iran.

All climate variables employed in this study, including the rainfall depth, maximum and minimum temperature, and future water demand, are projected to increase for the periods of 2021–2040, 2041–2060, and 2061–2080. Future rainfall depths and maximum temperatures are expected to increase significantly in the “wet” months of fall and winter (October~January) and in the “dry” months of summer compared to the based period. These changes in climate variables are projected to increase overall annual water demand, and water demand is expected to peak a month earlier than during the base period. The uncertainty analysis revealed that water demand variability is projected to increase in the future compared with the base period. Also, the overall uncertainty in water demand is projected to increase slightly over time.

Although this study uses climate variables to simulate the urban water demand per capita, other important variables (e.g., demographic, environmental, and socio-economic variables) were not considered. Future studies should incorporate these variables when investigating climate change impact on urban water demand. Ultimately, this study provides reliable insights that urban planners can consider when attempting to mitigate the negative impacts of climate change on urban water demand.