Introduction

More than two billion people still do not use safely managed drinking water (Arora, 2022b). As a result, one of the most pressing environmental issues today is the degradation of water quality. Groundwater is the source of drinking water in many parts of the world. While in many countries in recent years, the quantity and quality of this valuable resource are diminished (Amini and Homayounfar 2017; Gharibreza et al. 2018). The Water Quality Index (WQI) is one of the indices used to assess the quality of groundwater (Bhimanagouda, et al. 2020). Khan (2010) used the WQI to assess the water quality in Pakistan based on the NO−3, SO4−2, DO, pH, and EC, values. The findings revealed that water contamination is a huge problem in Pakistan. Geographical Information System (GIS) was used to map for determining the possible changes in WQI in the Gaza Strip by Shomar et al. (2010). According to the results, there are significant variations in the WQI. Marko et al. (2014) used the same method in Saudi Arabia and found similar results. A quantitative analysis of 65 samples collected in Ranchi by Gorai and Kumar (2013) was used to evaluate the WQI. A WQI model was developed using analyzed Alkalinity, Turbidity, Total Dissolved Solids (TDS), pH, and Total Hardness (TH). The developed models had low error values, which indicated that they had a high probability of offering reliable estimates and the WQI varies with location. GIS was used by Okoye et al. (2016) to create a map of Awka, Nigeria, to determine the WQI. According to the findings, the water in the entire Awka region was safe to drink. To assess nine water quality variables and calculate the WQI, Venkatesan and Senthil (2018) used Inverse Distance Weighted Spatial Interpolation. The results showed that about 78% of the water was unsafe to drink. Spatio-temporal and trend analyses were conducted by Nong et al. (2020) on 16 water quality parameters. An evaluation of seasonal and spatial water quality changes was made using the WQImin model, which includes five critical parameters. Water quality evaluation and management can benefit from the proposed WQImin model, according to the results. Uddin et al. (2021) conducted a study of the techniques used in different WQI models. The results of their research showed that most of the models had almost the same structure. In addition, they thought that model uncertainty should be taken into account and quantified for any WQI application.

Research on Ground Water Quality (GWQ) has also been conducted in Iraq. Toma et al. (2013) assessed Erbil's WQI using Ca+2, Alkalinity, NO−3, TH, Mg+2, TDS, pH, and EC standards. They found that there was a noticeable variation in the quality of the water around Erbil. For the 2013 dry and wet seasons, Hussain et al. (2014) used GIS to examine the WQI of 39 locations in Iraq. The research was done to examine the water properties with respect to Na+, SAR, Mg+2, EC, Cl, and pH level. Although groundwater remains susceptible to contamination, most regions in Iraq had a high WQI, making it safe and accessible only for irrigation activities. The WQI was used by Hamdan et al. (2018) to determine the pollution levels of 37 Iraqi locations based on their EC, TSS, Turbidity, TDS, NO3−2, Chemical Oxygen Demand (COD), Biochemical Oxygen Demand (BOD5), PO4−3, and pH properties. Due to high sewage pollution and industrial effluent levels, the WQI of these sites were found to be extremely high. In other words, water contamination is primarily caused by sewage and industrial waste. Duraisamy et al. (2019) investigated the bacteriological properties and physicochemical of three water supply resources for Tamil Nadu, India using the drinking water quality index. The results showed that Turbidity, EC, FC, Alkalinity, TC, and TH, have a greater effect on the quality of drinking water. Erbil is one of the largest cities in Iraq after Mosul, Basra, and Baghdad. Since 2003, there have been many expansions and developments taking place in Erbil. Residents of this city face difficulties in accessing high-quality drinking water (Omar 2019). Singh et al. (2022) tried to access the quality and suitability of groundwater for drinking purposes in western drier parts of India. Results showed a significantly high correlation between specific water quality parameters in the region and prevalence of gastroenteritis. Diop et al. (2023) calculated, and applied a water quality index for assessing the suitability of groundwater in the gold mining areas in south-eastern Senegal. They observed that the WQI in artisanal and industrial mining areas are either poor or very poor, while in the reference stations WQI are either good or excellent.

Groundwater contamination in Erbil is one of the most serious threats to the health of the city's residents (Wali and Alwan 2016). Therefore, there is a need to conduct water quality assessment tests in places where groundwater is used for various purposes, including drinking water. The main purpose of this study was to conduct a groundwater quality evaluation, mapping of WQI data from wells in the city of Erbil using GIS-based Kriging and Inverse Distance Weighted geostatistical techniques. The temporal-spatial distribution of water quality in Erbil prepared in this research, for the first time provide the basis for pollution control regulations and measures to control water pollution and improve groundwater quality.

Research method

The research area

The study focuses on Erbil, which is located in northern Iraq at longitudes of 44° 20′ E and 43° 20′ and latitudes of 37° 30′ N and 35° 40′. The area is composed of a mountainous area, plains, and valleys. Figure 1 depicts the study area and the locations of the wells used in this study.

Fig. 1
figure 1

Map of study area and location of wells

Water quality index

In this study, considering 13 parameters including Turbidity, pH, EC, TDS, TALKY, TH, Ca+2, Mg+2, Na+, K+, Cl, NO−3, SO−4, contamination levels were determined using WQI. The period under study were 2015, 2016 and 2017’s wet and dry seasons. Based on recommendations from Cude (2001) to weight the WQI, an estimated weighted WQI was created for Erbil's 61 wells, and this is shown in Eq. 1 as the weighted WQI (Belkhiri et al. 2020).

$$ WQI = \sum {q_{n} } W_{n} /\sum {W_{n} } $$
(1)

The nth water quality variable is assigned a weight as Wn and the quality rating scales are denoted by qn which is determined using incorporating the estimated value will thus be (Vn), ideal value (Vid), and the standard permissible value (Sn), as shown in Eq. 2 (Belkhiri et al. 2020).

$$ q_{n} = \left[ {(V_{n} - V_{id} )/(S_{n} - V_{id} )} \right] \times 100 $$
(2)

Equations (3) and (4) were used to obtain the unit weight (Wn) and the constant of proportionality (k) respectively.

$$ W_{n} = k/S_{n} $$
(3)
$$ k = \left[ {1/(\sum {1/S_{n = 1,2,...n} } )} \right] $$
(4)

Six classes of water quality index values were identified by (WHO 2017). If the WQI is greater than 150, 101–150, 76–100, 51–75, 25–50, and less than 25, it means that it was unsuitable, very poor, poor, fair, good and excellent for drinking, respectively (Table 1).

Table 1 The WQI categories and corresponding status (WHO 2017)

Geographical information system

A geostatistical approach and GIS are used to analyze and present spatial data on water resources in a meaningful way. By utilizing the WQI system and its associated GIS distribution maps, the water quality can be evaluated. Ahmad et al. (2021) outlined that in the groundwater investigation, the GIS is a useful tool to estimate groundwater quality evaluation, transport, leaching, and modeling. This shows how important it is to use GIS methods to test and improve the effectiveness of risk evaluation programs that look at groundwater contamination risk.

Geostatistical approach

The Horton (1965) method, also known as the Weight Arithmetic Water Quality Index (WAWQI), was used to calculate the WQI. Normally distributed data should be transformed using a log transform application if the data distribution shows high skewness (Amini et al. 2009). Outliers and heteroscedasticity can affect the usefulness of the geostatistical approach if data is transformed into logarithms. In addition, the transformation process will help to ensure that the data is distributed normally over time (Nas and Berktay 2010). GIS-based Kriging analyses and Inverse Distance Weighted (IDW) interpolation methods were used to generate WQI maps, and groundwater quality maps were processed. The Kriging weights are controlled by a Variogram model. The mathematical definition of a variogram is that it is a function of distance as a measure of semi-variance (Ahmad et al. 2021):

$$ \gamma (h) = \frac{1}{2N(h)}\sum\limits_{i = 1}^{N(h)} {\left[ {Z(x_{i} ) - Z(x_{i} + h)} \right]^{2} } $$
(5)

where the semi-variance is γ(h); N(h) is the pairs number by distance separated or lag h; Z(xi) is the sample measured at point xi and Z (xi + h) is the measured sample at point (xi + h). The obtained data was used to fit a mathematical model, which revealed the data's spatial structure. The input parameters for Kriging are derived from mathematical models that describe the structure of the spatial variation. It was found that environmental variables had a spatial autocorrelation in their effective ranges when the model was fitted to them. The experimental variogram of data pairs was fit using exponential, spherical, Gaussian, and Linear models.

Kriging

Semi-variogram provides a basis upon which the Kriging approach is based. The general form of the Kriging equation can be written as Eq. 6 (Belkhiri et al. 2020):

$$ \mathop Z\limits^{ \wedge } (x_{P} ) = \sum\limits_{i = 1}^{n} {\lambda_{i} } Z(x_{i} ) $$
(6)

To achieve unbiased estimations in Kriging, Eq. (7) should be solved simultaneously:

$$ \sum\limits_{i = 1}^{n} {\lambda_{i} \gamma (x_{i} ,x_{j} )} - \mu = \gamma (x_{i} ,x_{P} )\;\;{\text{where}}j = {1},{ 2}, \, \ldots ,{\text{ n and}}\;\;\sum\limits_{i = 1}^{n} {\lambda_{i} } = 1 $$
(7)

where (xp) is the variable Z estimated value (i.e., WQI) at location xp; Z(xi) is the known value at location xi; λi is the weight associated with the data; μ is the coefficient of Lagrange; γ (xi, xj) is the value of variogram corresponding to a vector with origin in xi and extremity in xj and n is the number of sampling points used in estimation (Belkhiri et al. 2020). Kriging estimation, which attempts to determine the weighted values of Z(xi), can also help determine the best unbiased linear estimator.

Inverse distance weighted

Unknown parameters can be figured out using the Inverse Distance Weighted (IDW), which is the inverse of the closer points and the distance between parameters. The following is the general equation for the IDW (Khouni et al. 2021):

$$ \mathop Z\limits^{ \wedge } (x_{p} ) = \sum\limits_{i = 1}^{n} {Z(x_{i} ).d_{ij}^{ - p} } /\sum\limits_{i = 1}^{n} {d_{ij}^{ - p} } $$
(8)

where (xp) is the interpolated value of a grid node at location xp; Z(xi) are the neighboring data points; dij are the distances between the grid node and data points.

Cross-validation method

The cross-validation method was used to evaluate the performance of interpolation methods. In this research, estimated and observed values were compared using Root Mean Squared Error (RMSE), Mean Error (ME), Root Mean Square Standardized (RMSS), Mean Standardized Error (MSE), and Average Standard Error (ASE). For a model that provides accurate predictions, the MSE should be close to 0, the MSE and RMSE should be as small as possible, and the RMSS should be close to 1 (Nas and Berktay 2010).

Results and discussion

The GWQ parameters

Table 2 shows the statistical analysis of Erbil's groundwater quality parameters for the wet and dry seasons. Skewness and kurtosis were also taken to evaluate the distribution of data in the study.

Table 2 Examination of the GWQ parameters

As shown in Table 2, wet season turbidity concentration ranged from 0.4 to 15.9, with an average and standard deviation of 3.05 and 3.07, respectively. The turbidity skewness and kurtosis were found to be 1.817 and 13.17, respectively. With an average and standard deviation of 1.60 and 1.61, respectively, the dry season's concentrations of turbidity ranged from 0.2 to 8.1. It was clear from the skewness and kurtosis values that the dry season data was not normally distributed. Dry and wet seasons have seen an increase in chemical parameters such as EC, TD, TDS, TALKY and TTH from 2015 to 2017. The EC was below the value of 1500 μS/cm specified by the (WHO 2011). During the wet season, the EC value ranged from a minimum of 427 μS/cm to a maximum of 783 μS/cm. This was a change from 409 to 958 S/cm for dry season. For both seasons, the TDS level was well below the 1000 mg/l threshold. All seasons except the 2017, dry season had total alkalinity levels within the specified limit of 250 mg/l (WHO 2011). Total hardness within the 500 mg/l limit in wet seasons for all years but exceeded the specified value in the dry season in 2017. Change in water quality during seasons are also reported by (Jwan et al. 2021).

Water quality index

WQI was calculated for dry and wet seasons using water quality parameters to assess the water quality in the study area. The results and the number of wells corresponding to each status of the study area were analyzed. According to the seasons, the wells quality is classified into different categories: excellent, good, fair, poor, very poor, unfit for drinking (WHO 2017). In the wet season at 2015, 31.15% of the wells were excellent, while the sequences continued by 29.51%, 6.55%, 21.31%, 9.84%, and 1.64%, respectively. In the dry season, the excellent and fair status increased. In contrast, the good and poor status decreased, while the very poor and unfit status remained the same in both seasons.

In the wet to dry season of 2016, the wells with excellent and very poor status increased from 31.14% and 11.48% to 39.34% and 16.40%, respectively. While the percentages of good, fair, or poor status fell from 18.03%, 21.31%, and 16.40% to 11.48%, 19.67%, and 13.11% respectively. The final statue had a 1.64% in the dry season, and in the wet season there was no well that had an unfit status.

In compression between 2016 and 2017 wet and dry seasons, the poor and unfit status increased from 16.40% and 1.64% in 2016 wet season to 19.67% and 6.56% in 2017, respectively. Also, the poor and very poor status increased from 13.11% and 16.40% in 2016 dry season to 14.75% and 31.15% in 2017 dry season, respectively. The good and fair status decreased from 11.48% and 19.67% in 2016 dry season to 3.28% and 11.48% in 2017 dry season, respectively. Further analyses showed that in 2015, 1.64% of wells were with a WQI value in the range of unsuitable for drinking. However, the unsuitable wells were increased to 6.56% by 2017. Moreover, in the 2015 and 2017 dry seasons, the poor and very poor status increased from 8.2% and 9.84% to 14.75% and 31.15%, respectively, which these increases are consistent with the findings of (Al-Tamir 2008; Stevanovic and Iurkiewicz 2009).

Temporal analysis of groundwater quality index

Figure 2 shows the water quality of Erbil city from 2015 to 2017. The WQI for wet season values ranged from 14 to 172, 13 to 155, and 15 to 178 for 2015, 2016 and 2017 respectively. In the case of the dry season, WQI values ranged from 17 to 163, 16 to 144, and 12 to 143 for 2015, 2016, and 2017 respectively. From Fig. 2 it can be seen that the water quality index has increased from 2015 to 2017, which indicates a decrease in water quality in 2017. Figure 3 shows the results of the WQI of wells in the wet and dry seasons in the studied years.

Fig. 2
figure 2

The temporal changes of WQI in the wet and dry seasons

Fig. 3
figure 3

Changes in the WQI of wells during a 2015, b 2016 and c 2017 wet and dry seasons

Figure 3 shows that in 2015, the quality of the water was best in the dry season, and the water quality index varied depending on the location of the wells. For both the wet and dry seasons, a few wells had WQI values that were higher than those of other wells. According to this relevant data, the water quality at some wells were unsuitable for human consumption. It was necessary to limit the use of low-quality wells for irrigation during the dry season.

On the other hand, the dry season in 2017 have seen an increase in water quality, as shown in Fig. 3, and the water quality index varied by well. The WQI value of four wells was the highest. It means that the water quality in the wells was unfit for drinking and required proper treatment before use. However, in the dry season, there were some wells that had a very poor WQI status, which necessitated restricted irrigation use, and there was no well that was unsuitable for drinking purposes. As can be seen, the 2017 dry season had the lowest water quality of any year or season. From 1.64 percent to 11.47 percent, the water quality index indicated that the well water was unfit for consumption. This necessitated a thorough cleaning before it could be put to use These results are consistent with earlier researches such as (Rajab and Esmail 2021; Abdulla et al. 2021).

Most fitted semi-variogram model

The WQI was estimated from the results of 13 water quality parameter measurements. ArcGIS software used geostatistical methods in a GIS environment to process the groundwater quality maps and produce the WQI map. During this process, the effectiveness of Kriging and IDW was evaluated. The results are presented in Table 3.

Table 3 RMSE for semi-variogram models based on original and transformed data

Based on RMSE, the best method for mapping each WQI in different seasons varied, as shown in Table 3. The Kriging method found that out of the six parameters, five had the lowest RMSE. In the absence of log transformation, only one parameter had a minimum RMSE, while four parameters had a minimum RMSE after log transformation was applied. Therefore, this method was more suitable for mapping the parameters. It was found that the IDW method worked better for dry season of 2017. Figure 4 shows the experimental semi-variogram for spherical, exponential, and Gaussian distribution functions. Table 4 shows different statistical tests that were used to evaluate semi-variogram models based on ASE, RMSE, ME, RMSS, and MSE, for varied WQI.

Fig. 4
figure 4

Fitting semi-variogram models for the water quality index, a Gaussian (2015 wet season), b Gaussian (2015 dry season), c Gaussian (2016 wet season), d spherical (2016 dry season), e Gaussian (2017 wet season)

Table 4 The most fitted semi-variogram model characteristics for map generation

Based on data in Table 4, it appears that, with the exception of 2016, all periods could benefit from using the Kriging method and a Gaussian model. The spherical model performed well during the 2016 dry season. Because of its large RMSE, the exponential model was not used to generate the map. Moreover, it can be seen from Table 4 that the IDW method was appropriate to be used for 2017 dry season (Nistor et al. 2020; Munyati and Sinthumule 2021).

Groundwater quality index map

Figure 5 shows the WQI maps in the period of 2015–2017 for wet and dry seasons extracted from the results obtained in this research.

Fig. 5
figure 5

Spatial distribution of groundwater quality index for a 2015 wet season, b 2015 dry season, c 2016 wet season, d 2016 dry season, e 2017 wet season and f 2017 dry season

In 2015, the water quality index of the middle of the study area was good and fair in the wet season, as shown in Fig. 5a, c, and e. However, the northeast of Erbil city was with maximum values of the WQI, which means the quality of water was poor, very poor, and improper for drinking. There was a problem with water quality in the city's north, northwest, and central areas in 2016. The WQI for 2017 showed that the quality was fair and good in all directions of the city. The quality of water declined in 2017 compared to 2016. Maps of the wet season's water quality show that the water can be used for irrigation, domestic, and industrial purposes, as shown in Fig. 5a, c, and e. Regarding the dry season, in 2015, the northern part and a small part of the south of the study area had the maximum values of the WQI, which means the quality of water was fair, poor, and improper for drinking. The groundwater quality index in 2016 and 2017 showed that the quality of water was poor to very poor in the north and small parts of the center of the study area. As can be observed from Fig. 5b, d, and f, the overall quality of water in the dry seasons was approximately fair to good. These results are consistent with (Babir and Ali 2016; Issa and Alrwai 2018). Hawez et al. (2020) examined the three parameters of pH, total alkalinity and turbidity of water in Erbil and found that the groundwater quality near the anaerobic Erbil Landfill Site (ELS) was poor. The obtained findings proved that groundwater was contaminated due to leachate formed from this site and Kawergosk Oil Refinery. However, Toma et al. (2013) evaluated the water quality of six wells in Erbil and concluded that the groundwater quality was good or excellent by 2012. Water quality seems to have declined in recent years. Similarly, in the period studied in this research, water quality has decreased.

Conclusion

In recent years, the GWQ in Erbil, Iraq has been problematic. In this research, the WQI zoning and evaluation were conducted based on the 13 groundwater parameters measured. After calculating WQI, to generate maps using GIS, Kriging and Inverse Distance Weighted (IDW) interpolation methods were used. The most important results are as follows:

  • The quality of water was lowest in the 2017 dry season among the other years and seasons.

  • The WQI has increased from 1.64 to 11.47% from 2015 to 2017, which indicates a decrease in water quality during this period.

  • For mapping WQI, the Kriging method was more appropriate and accurate than the IDW method.

  • The water's overall quality ranged from fair to good. As a result, irrigation, domestic, and industrial uses for the water are all possible. Without some sort of treatment, the water quality of wells was insufficient for drinking.

Untreated domestic and industrial wastewater caused groundwater pollution, which was the main reason for a decrease in the water quality in the city of Erbil. The high population requires the city to be developed continuously, while a plan should be established to control the spread and hazards of pollution.