1 Introduction

According to studies by the Intergovernmental Panel on Climate Change (IPCC), the shortage of water resources is expected to become a major challenge in many regions of Asia, as the demand for water is increasing due to the rise in population and standards of living (IPCC 2014). Given the strong dependence of the Asian economy on agriculture, about 80% of groundwater in Asia is used for this purpose. The groundwater level in coastal aquifers can be influenced by population growth (Alimohammadi et al. 2020), High quality of life (Mirdashtvan et al. 2021), tides, rising sea level, increased salinity, uncontrolled withdrawal, and reduced recharge (Hamidi and Sabbagh-Yazdi 2008; Natarajan and Sudheer 2020; Nasiri et al. 2021). As an arid and semi-arid country in Western Asia, Iran has a shoreline of 750 km on the Caspian Sea and about 2250 km on the Persian Gulf and the Gulf of Oman, and numerous islands and estuaries. As a result, it has earned the title of a coastal country. As of the latest census, about 22% of Iran’s population inhabit coastal lines. These regions play a significant role in the economic growth of a developing society, in terms of both agriculture and industry. Moreover, they can greatly contribute to the gross domestic product of a country. The critical role played by groundwater in this economic growth necessitates the awareness and management of changes in groundwater levels. Researchers have employed theoretical and observation models to investigate prospective climate conditions. Models of global climate change (GCMs) are primary tools for predicting the trend of changing climate change through different scenarios of greenhouse gas emissions (Ouhamdouch and Bahir 2017). General circulation models (GCMs) are some of the most authoritative theoretical models that are based on physics (O’Neill et al. 2017). However, they have certain disadvantages, such as their large scale. Nonetheless, they can be converted to small scales through techniques termed “downscaling methods”, (Hewitson and Crane 1996; Wilby and Wigley 1997; Guo and Wang 2016; Theodossiou 2016). One of the most well-known and useful downscaling models is the Long Ashton Research Station-Weather Generator (LARS-WG) developed by Semenov and Barrow (Semenov et al. 1998). Its input data include minimum temperature, maximum temperature, precipitation, and sunshine hours or solar radiation on a daily scale. The model is capable of simulating climatic parameters for future decades based on various scenarios and GCMs. The models in Coupled Model Intercomparison Project Phase 6 (CMIP6) have produced the latest simulations of the past, present, and future climates for a better understanding of climate change. These new models boast considerable improvements over those used in CMIP5, including a higher resolution and better physics (Priestley et al. 2020; Xin et al. 2020). Various researchers have simulated climatic parameters using the LARS-WG model and confirmed the results (Hassan et al. 2014; Sha et al. 2019; Bayatvarkeshi et al. 2020). Most previous research has used CMIP3 or CMIP5 outputs for this purpose. In this regard, it is necessary to simulate and evaluate the impact of the latest versions of CMIPs on climatic parameters and natural resources. In this study, the impact of updating CMIPs was investigated on groundwater levels.

In recent years, international climatologists and economists have created a wide range of new pathway scenarios. They have described changes in climates and international communities in terms of population, economy, and greenhouse gas (GHG) emissions. The latest is named Shared Socio-economic Pathways (SSP), divided into five categories, from SSP1 to SSP5. These scenarios are displayed in the form of SSPx-y, where x represents SSP, and y denotes the radiative forcing (w/m2) in 2100 (O’Neill et al. 2017; Gupta et al. 2020).

The artificial neural network (ANN) is known as an estimator whose effectiveness has been verified in previous research, being utilized in numerous scientific fields in recent years (Yoon et al. 2011; Shen 2018; Rajaee et al. 2019). The applications of ANN in hydrology include the prediction of nonlinear phenomena, such as rainfall-runoff, evapotranspiration, dam volume evaluation, streamlines, and water and rain quality modeling (Taormina et al. 2012; Zhao et al. 2020; Roy et al. 2020; Di Nunno and Granata 2020; Chen et al. 2020; Derbela and Nouiri 2020). One of the most important challenges in forecasting groundwater levels using ANN has been the selection of input data. Daily, weekly, or monthly temperature and precipitation have been the major driving factors in the impact of climate change on water resources in the literature. (Yoon et al. 2011; Maharjan et al. 2021). Moghaddam et al. (2019) used monthly evaporation, average temperature, aquifer discharge and recharge, and aquifer level to evaluate the performance of ANN, Bayesian network (BN), and MODFLOW in the simulation of a 12-year period work. Hasda et al. (2020) employed the neural network (NN) to forecast weekly levels of groundwater, 52 weeks in advance. The studies by Chang et al. 2015; Ghazi et al. 2021; and Sharma et al. 2021 investigated the impact of climate change using the output of CMIP3 and CMIP5 climate models and various scenarios on variations in groundwater levels.

Various organizations have cooperated to use groups of climate model outputs to standardize the design of GCMs and the distribution of simulated models. These models have recently become a crucial element in guiding global research on climates (Thorne et al. 2017). The rapid growth in population and industry has had diverse effects on the manner of GHG emissions. Since new emission scenarios are introduced every couple of years, it seems necessary to be up-to-date on the latest trends in climate change. The most common aim of climate studies is to determine the changes in the weather of the region under study. To this end, the present study attempted to evaluate the best available models (CMIP6) for the specified basin. The main objective of the CMIP6 is to determine how the structure of the earth responds to different forces in relation to the origins and consequences of organized models, climate change quantification, and scenario uncertainty. The number of vertical layers in all CMIP6 models has increased compared to those in CMIP5 models. An advantage of this increase is a more accurate simulation in the stratosphere, in addition to a significant increase in the number of investigated prospective scenarios. The new scenarios added to CMIP6 are SSP1-1.9, SSP4-3.4, and SSP3-7.0. In addition, the 4 scenarios SSP1-2.6, SSP2-4.5, SSP4-6.0, and SSP5-8.5 have updated RCP2.6, RCP4.5, RCP6.0, and RCP8.5 scenarios in CMIP5, respectively (Eyring et al. 2016; Li et al. 2020; Gupta et al. 2020).

The new CMIP6 models are enhanced in terms of horizontal resolution and better representation of synoptic processes (Di Luca et al. 2020; Nie et al. 2020; Srivastava et al. 2020), which will lead to more reasonable results in climate studies. As a result, CMIP6 simulations of climates are more reliable than before, and this makes investigation to better understand future climates necessary. In this regard, the main aim of this study was to: (1) determine the performance of three CMIP6 GCMs and select the best ones; (2) assess the impact of climate change and forecast monthly groundwater depths of the coastal Sari-Neka aquifer in Iran by FNN under the latest scenarios codified by the Intergovernmental Panel on Climate Change (IPCC) (SSP2-4.5, SSP5-8.5) for near future (2021–2040) decades.

2 Materials and Methods

For the purpose of assessing the potential impact of climate change on groundwater levels in the Sari-Neka aquifer, GCM models were used. Firstly, three CMIP6 GCM models (ACCESS-CM2, HadGEM3-GC31-LL, and NESM3) were selected and compared with observation data. In the following, temperature and precipitation were simulated under two scenarios (SSP2-4.5 and SSP5-8.5) for the near future (2021 to 2040) by LARS-WG. Monthly datasets, maximum and minimum temperature, precipitation, and groundwater level in the previous month were used for the input of the ANN model, with the groundwater level being simulated for two next decades (2021–2040). How the research was carried out is shown in Fig. 1.

2.1 Study Area

Sari-Neka region, a basin which is located by the Caspian Sea between 35° 56′ 36° 52' N and 52° 43′ 54° 44' E, was selected as a case study in Mazandaran province (Fig. 2). It is divided into mountainous parts, hills, and flat plains, mainly covered by alluvial sediments from a geomorphological view. The climate there is regarded as generally Mediterranean and semi-humid by the DeMartonne’s Method. This region covers an area of about 6938.5 km2, of which an area of 977.87 km2 is devoted to plains, while the rest is highland (5877.8 km2). The highest elevation in the area is 3836 m, with the lowest point being -27 m (Nasiri et al. 2021). Annual average rainfall fluctuated between 400–1000 mm from 2000 to 2019. The most humid months there are October and November, and the annual mean maximum and minimum temperatures are 23 and 13 Celsius, with January and August being the coldest and the warmest months respectively. On plains, the groundwater flows from the south to the north. Most of the study area consists of limestone structures, which are the principal sources of groundwater supply through groundwater fronts. East and south portions of the basin predominantly contain geological Jurassic formations that provide surface and groundwater recharge, as well as snow accumulation in the basin (Nasiri et al. 2021). Land types are diverse in the study region, including farmland (rice fields and citrus gardens), residential areas, rangeland, forests, and water bodies. Piezometric wells, which are 0 to 31.1 m deep, are situated within this aquifer (Sahour et al. 2020).

Fig. 1
figure 1

flowchart of the current study

2.2 Date Collection

Different datasets were prepared for this study, identified as:

  1. 1-

    Maximum temperature, minimum temperature, and precipitation data of historical and future period for three models ACCESS-CM2, HadGEM3-GC31-LL, and NESM3 under CMIP6 report from IPCC based on SSP2-4.5 and also SSP5-8.5 scenarios were received for downscaling from https://climate4impact.eu.

  2. 2-

    Maximum and minimum temperatures, and precipitation for the observation period (2000–2019) were provided from the meteorological organization of Mazandaran province on a daily scale.

  3. 3-

    Data on groundwater level fluctuations in 68 piezometers (2000–2019) were provided from the regional water organization of Mazandaran province on a monthly scale.

2.3 Climate Models and Emissions Scenarios

In this study, the outputs of the three climate models from CMIP6 were received from the mentioned databases, and the data of the region were extracted using ArcGis10.8. To this end, the ACCESS-CM2, HadGEM3-GC31-LL, and NESM3 models were used. The precipitation, maximum temperature, and minimum temperature of these models are shown in Table 1. The SSP2-4.5 and SSP5-8.5 scenarios used in this study were called the middle of the road and fossil-fueled development—taking the highway, respectively. Their specifications are summarized in Table 2. These scenarios were used due to the following reasons: (1) the SSP2-4.5 and SSP-5–8.5 were utilized for the vulnerabilities to climate change and its consequences (Warnatzsch and Reay 2019); (2) since SSP1-2.6, which is an update of RCP2.6, is absent in some models, a comparison between the models becomes problematic.

Table 1 List of CMIP6 models that have been used in this study (Priestley et al. 2020)
Table 2 Summary of assumptions regarding demographic and human development elements of SSP2 and SSP5 (O’Neill et al. 2017)

2.4 Downscaling

Presently, GCM outputs are not directly employed in hydrological models due to their resolution inability and lack of sufficient spatial and temporal certainty (Semenov and Barrow 1997). The model employed in this research was LARS-WG6, the initial version of which was introduced by Racsko et al. (1991), to address the issues of the Markov chain, which was frequently used to model precipitation, and was later upgraded by Semenov and Barrow. As a generator, LARS-WG produces climatic parameters, such as maximum temperature, minimum temperature, precipitation, and solar radiation on a daily basis for any period of time according to a set of semi-empirical distributions (Roshan et al. 2013). Even though this model is not a weather forecast tool, it is a means to generate an artificial weather time series that statistically resembles observation data.

The delta change factor (DCF) technique was utilized to generate the Atmosphere–Ocean General Circulation Model (AOGCM) climate change scenario. This method calculates the maximum and minimum temperature difference and the precipitation ratio of the prospective and base periods in the studied region’s model according to Eqs. 1, 2, and 3. The base and prospective periods were assumed to be 2000–2019 and 2021–2040, respectively (Semenov and Barrow 1997).

$$\Delta {P}_{i}={\overline{P} }_{GCM,FUT,i}/{\overline{P} }_{GCM,Base,i}$$
(1)
$$\Delta {T}_{i,Min}={\overline{T} }_{Min\left(GCM,FUT,i\right)-}{\overline{T} }_{Min\left(GCM,Base,i\right)}$$
(2)
$$\Delta {T}_{i,Max}={\overline{T} }_{Max\left(GCM,FUT,i\right)-}{\overline{T} }_{Max\left(GCM,Base,i\right)}$$
(3)

In the above equations, \(\Delta {P}_{i}\), \(\Delta {T}_{i,Min}\), and \(\Delta {T}_{i,Max}\) represent the monthly climate change scenarios of precipitation, minimum temperature, and maximum temperature, respectively. \({\overline{P} }_{GCM,FUT,i}\) denotes the 20-year precipitation average simulated by the AOGCM models for the prospective period, and \({\overline{P} }_{GCM,Base,i}\) represents the same for the base period (2000–2019 in this study). the explanations provided for the minimum and maximum temperature are correct. Two files were created to generate climatic data in the LARS-WG model and to downscale the GCM data for future periods. The first file describes past climatic behavior, while the other contains climate change scenarios. The model was calibrated in the first step and then verified using statistical tests and a comparison of the graphs.

2.5 Clustering of Observation Well

Clustering is an unsupervised learning technique in which samples are categorized into similar groups with identical features. A common clustering method is the K-means, introduced by MacQueen in 1967 (MacQueen 1967), in which the number of clusters is predetermined. The number of clusters was validated using the common Elbow index, determined by Eq. (4) (Brusco and Steinley 2007). Since there were 68 piezometers in this basin, clustering was performed to avoid over-complication of the model. The geographical coordinates and groundwater levels of the piezometers were used for clustering.

$$WCSS=\sum\limits_{k=1}^{K}\sum\limits_{i\in {C}_{k}}\sum\limits_{v=1}^{V}{\left({x}_{iv}-{\overline{x} }_{vk}\right)}^{2}$$
(4)

where \(Ck\) is the set of observations in the Kth and \({\overline{x} }_{vk}\) is the mean of variable \(v\) in cluster \(k\). In this technique, the number of clusters is directly related to the Within-Cluster Sum of Square (WCSS), which is the sum of the squared distance between each point and the centroid in a cluster. The vertical axis represents WCSS, with the horizontal axis showing the number of clusters. In this index, the number of clusters, K, begins from 1 and grows to where the value of WCSS remains almost constant, being the largest in the first cluster.

2.6 Artificial Neural Network (ANN)

Artificial neural networks (ANN) are typically based on human nervous systems. In hydrological contexts, these heuristics are particularly appropriate for predicting and forecasting variables because they are capable of modeling nonlinear, nonstationary, and nongaussian processes. NNs are trained to recognize data patterns until a minimum acceptable error is found between the ANN predicted data and the observation data. NNs are mostly divided into three general layers. The input layer is responsible for receiving data, the output layer contains forecast information, and the middle layer performs the necessary calculations (Maier and Dandy 1997; Daliakopoulos et al. 2005; Moghaddam et al. 2019). The inputs are multiplied by synaptic weights and delivered to the first hidden layer. In the hidden units, the weighted sum of inputs is transformed by a nonlinear activation function (Taormina et al. 2012).

ANNs are either feedforward or recurrent. The present research utilized feedforward NNs and the sigmoid activation function. The Levenberg–Marquardt algorithm was employed to train the NN (Daliakopoulos et al. 2005; Derbela and Nouiri 2020). In feedforward networks, the input enters from the left, and the output exits from the right. The number of input and output neurons are determined by the number of parameters in the network and is typically determined by the nature of the problem (Emamgholizadeh et al. 2014). and those of the hidden layer are determined via trial and error. The hidden layer is tasked with linking the input and output layers. Using this layer, the NN can extract nonlinear relationships from the data input to the model.

Training is aimed at reaching a state where the network is capable of correctly responding to training data in addition to similar non-training data. NN learning is either supervised or unsupervised, with the former being used in the present study. In this approach, training is mostly performed using sample vectors of pairs, such that a specific output vector is assigned to each input vector. As these vectors are presented to the network, the weights are corrected according to the learning algorithm. The present research minimum and maximum temperature, precipitation in the current month, and groundwater level in the previous month were used as the input data. In addition, groundwater level in the current month was employed as the output data (Coppola et al. 2005; Chitsazan et al. 2015; Moghaddam et al. 2019).

2.7 Performance Criteria

Statistical methods for assessing the error between observated and predicted data were used in terms of correlation coefficients (r), coefficients of determination (R2), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE).

$$r=\frac{n\left(\sum_{i=1}^{n}{O}_{i}{P}_{i}\right)-\left(\sum_{i=1}^{n}{O}_{i}\right).\left(\sum_{i=1}^{n}{P}_{i}\right)}{\sqrt{\left(n\sum_{i=1}^{n}{{O}_{i}}^{2}-{\left(\sum_{i=1}^{n}{O}_{i}\right)}^{2}\right)}.\left(n\sum_{i=1}^{n}{{P}_{i}}^{2}-{\left(\sum_{i=1}^{n}{P}_{i}\right)}^{2}\right)}$$
(5)
$${R}^{2}=1-\frac{\sum_{i=1}^{n}{({O}_{i}-{P}_{i})}^{2}}{{\sum }_{i=1}^{n}{\left({O}_{i}-\overline{{O }_{i}}\right)}^{2}}$$
(6)
$$RMSE=\sqrt{\frac{{\sum }_{i=1}^{n}{({P}_{i}-{O}_{i})}^{2}}{n}}$$
(7)
$$MAE=\frac{{\sum }_{t=1}^{n}\left|{P}_{i}-{O}_{i}\right|}{n}$$
(8)

where n is the total number of measured data, \({P}_{i}\) & \({O}_{i}\) are the predicted and observed value, respectively, and \(\overline{{O }_{i}}\) & \(\overline{{P }_{i}}\) are the average value of the measured data (Natarajan and Sudheer 2020).

3 Result and Discussion

3.1 CMIP6 Models Validation

In the first step, the performances of the NESM3, HadGEM3-GC31-LL, and ACCESS-CM2 of the CMIP6 models with respect to the observation data were evaluated in order to determine the best model for studying climate change in the area. To this end, the \({\mathrm{R}}^{2}\) coefficient of determination and the root-mean-square error (RSME) were used for the minimum and maximum temperature and precipitation parameters. According to the results presented in Table 3, the ACCESS-CM2 model showed the smallest RMSE at the minimum and maximum temperatures and the best precipitation performance in both statistical tests. This indicated the superiority of this model over the other two in simulating the area under study. Therefore, it was selected for investigating climate change in the research step.

Table 3 Statistical comparison of AOGCM models to select the best model

This step involved a forecast of the meteorological data by the ACCESS-CM2 model under the climate change scenarios SSP2-4.5 and SSP5-8.5. Additionally, the 2000–2019 climatic data were utilized for the LARS-WG model’s base period, and forecast was made for the subsequent two decades (2021–2040). Using the Site Analysis functionality of the LARS-WG model, calibration and verification were performed simultaneously using two datasets including daily observation data and the geographic information of the research station. The performance of LARS-WG was evaluated by the K-S, t, and F statistical tests. The K-S test was conducted to test the equality of the seasonal distributions of the wet and dry series, the daily distribution of precipitation, and the daily distribution of minimum and maximum temperature. The F-test was performed to test the equality in the standard deviation of monthly precipitation. The t-test was aimed at testing the equality of the monthly average of precipitation and the monthly average of the maximum and minimum daily temperature. Based on the P-value calculated in all tests, there was no significant difference between the simulated and observation values at a significance level of 5%. According to Table 4, the LARS-WG model exhibited acceptable consistency between the simulated and observation series of monthly climate data (Nover et al. 2016; Adnan et al. 2019). However, the same results were erroneous and unreliable on a daily scale. In addition, the largest error corresponded to the simulated precipitation in January. The largest precipitation error might be due to the large variation in precipitation (Hassan et al. 2014) and compared to changes in temperature, changes in precipitation are more uncertain (Msowoya et al. 2016). Given the results of the model, the maximum temperature was simulated better than the other two parameters, providing higher accuracy (Bayatvarkeshi et al. 2020). Although there has been no complete correlation between the models and observations to date, the lack of such correlation is not a barrier to using climate models. Climate models are not used to predict specific weather events, but to predict a trend in climate change over time (Warnatzsch and Reay 2019). Based on simulated and observational values of climatic parameters, Table 4 presents a statistical comparison. As can be seen, the overall statistical evaluation of the ACCESS-CM2 model provided an acceptable result.

Table 4 K-S test daily distribution of observation and simulated data

3.2 Future Climate Modeling

Figure 3 displays a comparison of the average minimum and maximum temperatures of the base period and the average monthly temperature for both SSP2-4.5 and SSP5-8.5 scenarios during the 2021–2040 period. As shown, the minimum and maximum temperatures increased over the months due to climate change. Therefore, minimum and maximum temperatures are expected to rise by 0.20 °C to 1.3 °C over the next two decades. The largest increase in minimum temperature corresponded to SSP5-8.5 with a 1.3 °C in November, and the smallest increase was in February (0.2 °C), corresponding to SSP5-8.5. For the maximum temperature, a similar method was followed, and the results indicated that the most significant changes in the base period would occur in April under SSP5-8.5, while the smallest changes would occur in October under SSP2-4.5. The results of the present study are in good agreement with previous research by (Al-Maktoumi et al. 2018; Shahvari et al. 2019; Maghsood et al. 2019). In general, it can be said that the average air temperature in this basin is on the rise. The rise in temperature could be caused by the unstable and rapid industrial development that is taking place in this area.

Fig. 2
figure 2

Location of the study area in the map of Iran and the location of piezometer wells in the aquifer

The average monthly precipitation during the base period and the forecast period (2021–2040) for both scenarios is displayed in Fig. 3. Except for February, May, June, and September, the results show an increase in precipitation for the rest of the months. As compared to the base period, the highest increase corresponded to the SSP5-8.5 scenario at 41 mm in October. On the other hand, the smallest increase corresponded to September at 6.3 mm under SSP2-4.5. In this regard, as predicted, the precipitation in the two upcoming decades will vary between -12% and 78%, with an overall increase from 2000 to 2040, (Abiodun et al. 2017; Konapala et al. 2020; Tabari 2020). In addition, the results of Zhang et al. (2016) who studied three different GCMs under the RCP2.6, RCP4.5 and RCP8.5 scenarios indicated that precipitation in the RCP2.6 and RCP4.5 scenarios would increase gradually and continuously, but the increase in precipitation in future decades under RCP8.5 is likely to be remarkable.

The highest-precipitation month during the observation period was November, but it changed to October due to climate change in both scenarios. On the other hand, August tends to remain the warmest month in the two coming decades. The results also indicated the highest rise in precipitation in the winter and fall, while the largest absolute increase corresponded to July and August during the summer, which agreed with the results of Sha et al. (2019). Based on the findings, precipitation is also expected to increase in both scenarios. According to IPCC, a rise in temperature intensifies the groundwater cycle and increases evaporation. In turn, an increase in evaporation leads to frequent and strong storms and may further humidify humid regions and dry out dryer regions. In this regard, Boudiaf et al. (2020) reported a rise in temperature and precipitation in the coastal Mediterranean regions. Climate change has contributed to atmospheric warming and resulted in stronger precipitation. Research carried out by Araya-Osses et al. (2020) indicated that an increase in precipitation could lead to a higher snow potential in the heights, but a change in the form of precipitation, for example stronger precipitation was encountered during the same period due to higher temperatures.

3.3 Clustering

The Elbow index was used in this work to determine the optimal number of clusters. The outcome of the clustering is displayed in Fig. 4. The results indicated a significant difference in WCSS in the first four clusters. However, this difference became negligible from K = 4 onward and hence four clusters were considered for the region under study. The locations of the four clusters and the four piezometers are shown in Fig. 5.

Fig. 3
figure 3

Comparison of Minimum and maximum temperature average and precipitation of base (2000–2019) and future (2021–2040) under 2 scenarios SSP2-4.5 and SSP5-8.5: (a) minimum temperature, (b) maximum temperature, (c) precipitation

Fig. 4
figure 4

Clustering by Elbow method

3.4 Groundwater Modeling

The groundwater level of the Sari-Neka basin under climate change during the 2021–2040 period was predicted in MATLAB using ANN. For this purpose, the data were divided into training, validation, and testing data, with 75% of them being assigned to training, and 15% to each of validation and testing. Since an important point in ANN is the number of neurons in the hidden layer, the trial and error resulted in an optimal number of eight neurons in the present work. In the first step, the model was trained to simulate the groundwater level during the observation period. It was then used to predict the prospective groundwater level. To develop the ANN model, maximum and minimum temperature and precipitation in the current month and groundwater levels in the previous months were used. Furthermore, the groundwater level in the current month was used for the output of the ANN model. The performance assessment of the constructed model was conducted for each cluster of piezometers over the 2000–2019 period, and the results are shown in Table 5. In all four piezometers, the results indicated that network performance was acceptable (Chitsazan et al. 2015; Sun et al. 2016; Derbela and Nouiri 2020).

Table 5 Performance of the artificial neural network based on Correlation coefficient (r), coefficient of determination (R.2), root mean square error (RMSE) and Mean absolute error (MAE)

On the other hand, previous research results demonstrated that the three available observation data inputs (groundwater level, temperature, and precipitation or evaporation) were sufficient to construct a high-performance ANN (Daliakopoulos et al. 2005; Szidarovszky et al. 2007; Mohanty et al. 2010; Chang et al. 2015; Ghazi et al. 2021).

In order to better comprehend the results predicted by the ANN, the Taylor diagram was used, (Fig. 6). The horizontal and vertical axes represent the observation data and the standard deviation, respectively. The points approach the hypotenuse which indicates that the standard deviation of the predicted data was close to that of the observation data, confirming that the model was performing properly. In addition, the correlation coefficient was on the main hypotenuse and measured the performance of the model on a 0–1 basis, where a value close to 1 indicated the good performance of the model.

Fig. 5
figure 5

Clustering and positioning of groundwater observation wells (P1-P4) on the Sari-Neka region

The observation groundwater level in all of the piezometers, except for the 4th one, increased, illustrating an improvement in the groundwater depth. Also, the groundwater depth at all of the piezometers showed a gradual decrease in the coming two decades due to climate change (Chang et al. 2015). As seen from the observation trend of the four piezometers in Fig. 7, the depth of groundwater in the basin under study exhibited an increasing trend from about 2012 onward. However, a decreasing trend in depth due to climate change was observed for the coming two decades, except in the fourth piezometer under SSP2-4.5. As discussed, due to the higher precipitation in SSP5-8.5 than SSP2-4.5, the groundwater level was expected to be higher in SSP5-8.5. Additionally, the largest change observed in the depth of groundwater was associated with piezometer P2 in SSP5-8.5. The results of previous research demonstrated an increase in groundwater levels under climate change (Ligotin et al. 2010; Chang et al. 2015). Therefore, from the results, it can be concluded that the groundwater level will improve in the future due to the influence of climatic parameters, such as temperature and precipitation. Nevertheless, other factors, such as industrial and economic developments, population growth, and migration, may adversely affect the availability of water resources.

Fig. 6
figure 6

Performance of the artificial neural network based on Taylor diagram

Fig. 7
figure 7

Groundwater level predicted under climate scenarios (SSP2-4.5 & SSP5-8.5) for 2021–2040

4 Conclusions

Awareness of the changes in the groundwater level can make a remarkable contribution to water resource management. In the present research, three models of the CMIP6 GCMs were selected, and based on the model with the most adaptation to observation data, the groundwater level under two scenarios was simulated for the coastal Sari-Neka aquifer. In the first step, a comparison of the CMIP6 GCMs with observed data was performed in order to determine how well they would reproduce weather parameters over the basin and as a result the best model was selected for the area. Subsequently, the ACCESS-CM2 model was selected, and the weather parameters (temperature and precipitation) under scenarios (SSP2-4.5 and SSP5-8.5) were simulated by LARS-WG for the coming two decades. The results have indicated that the selected model is an improvement over the previous ones, i.e., ACCESS 1.0 and ACCESS 1.3 (Williams et al. 2018; Bodman et al. 2020). The results indicated that the precipitation fluctuated between -10% and 78% and average temperature (0.1–1.2 °C) would increase, which agrees with other research results in this field (Tan et al. 2017; Anjum et al. 2019; Yan et al. 2019). Variations in precipitation throughout the months of the year can make events such as floods and droughts more frequent. Therefore, efficient strategies should be undertaken to address these issues. In the second step, the 68 piezometers were clustered based on geographical coordinates and groundwater level and evaluated using the Elbow method. This resulted in four piezometer clusters. The Sigmoid activation function and the Levenberg–Marquardt algorithm were employed to construct the ANN model. The number of neurons in the hidden layer was determined using trial and error that resulted in eight neurons. The groundwater depth was predicted under the two mentioned scenarios (SSP2-4.5 & SSP5-8.5) for future, 2021–2040 period. The results indicated that the groundwater depth of the Sari-Neka basin is likely to decrease with a gentle slope.