Introduction

Groundwater is the main source of water in Madinah, where surface water is rare (Delgado et al. 2010; Li et al. 2013; Hofmann et al. 2015). It is a limited water resource in Saudi Arabia, and it is increasingly threatened by expanding urbanization and intensified land use for agriculture and industrial activities. Besides rare precipitation and overexploitation of groundwater resources, the level of groundwater was declined, and the groundwater was deteriorated. Quality of groundwater is almost influenced by weathering, lithology, nature of geochemical reactions, and evapotranspiration or by various human activities, such as agriculture, sewage, and industrial wastes (Singh and Chandel 2006; Nisi et al. 2008; Jiang and Yan 2010).

In arid and semiarid regions, groundwater salinization results from physical and chemical processes of the groundwater and leads to deterioration in water quality and reduction of usable groundwater (Bernaldez and Benayas 1992; Salama et al. 1999; Wang et al. 2008; Han et al. 2015).

Understanding the hydrogeochemical parameters is necessary to utilize and protect valuable water sources effectively and predict changes in groundwater environments (Guendouz et al. 2003; Edmunds et al. 2006; Bozdağ and GöÇmez 2013; Missimer et al. 2014). Little knowledge about the location, extent, and type of groundwater pollution exits in the Madinah. Few hydrogeological and hydrogeochemical studies were performed in the study area (El Maghraby 2004, 2014; Al Harbi et al. 2006; Shraim et al. 2013; El Maghraby et al. 2013; Bob et al. 2015).

Industrial wastewater from southwest of Madinah city is disposed in an unlined site located southwest the study area. This location is considered as the main source of pollution of groundwater that may influence the quality of groundwater by releasing high concentrations of metals (e.g., Pb, Cd, Cr, Ni, As, and Al).

The results of the current work were used to determine the contaminants and the processes governing the groundwater and to access the quality of groundwater for different uses. The different constituents of groundwater of the Madinah area are of wide ranges of concentrations, which point to the contribution of a number of chemical practices inducing the chemistry of water. Scatter plots between chloride and major ions were constructed to show the extent of correlation among ions.

In the current work, the diagrams of Piper, Durov, and Schoeller were benefited for the purpose groundwater categorization. In order to understand and illustrate the hydrogeochemical processes, concentrations of different major elements and their interrelationship ionic ratios were studied.

Cluster analysis (CA) and principal component analysis (PCA) were applied in the current work. These techniques were used to obtain the relationship between parameters and sampling site and to identify the factors and sources influencing groundwater quality (Usman et al. 2014). CA was employed to examine the spatial groupings of the sampling wells. It is a common method to classify variables into cluster (Massart and Kaufman 1983). CA and PCA are usually referred to as pattern recognition techniques (Adams 1998). The application of different pattern recognition techniques to reduce the complexity of large data set has proven to give a better interpretation and understanding of water quality data (Brown et al. 1980).

Weathering of silicate was studied as an important source for elevated concentrations of sodium besides calcium in groundwater. In the current work, to define the chemical balance between minerals and water, saturation indices (SI) of certain minerals were estimated.

Nutrients, which include nitrate, nitrite, ammonia, phosphate, fluoride, and boron in groundwater, were analyzed to investigate the anthropogenic effects and the pollution extent in the study area. Trace constituents of the area of study were studied as a possible source of pollution of groundwater.

Studying the different constituents of the groundwater of the study area showed that the Madinah groundwater is unsafe for purpose of drinking, whereas it is moderately appropriate for activities of irrigation work.

Thus, a hydrogeochemical investigation was conducted to identify the pollution sources at the groundwater system of Madinah. The present work also includes groundwater characteristics and a groundwater quality assessment.

Study area

Madinah lies between latitudes 24° 15′ 54″ and 24° 36′ 54″ N and longitudes 39° 29′ 06″ and 39° 50′ 15″ E (Fig. 1). It forms a shallow basin. Uhud Mountain is located to the north and Ayre and Jammah Mountains to the west. Lava plateaus surround Madinah from south to east. Its altitude ranges between 600 and 610 m. Arid conditions, low rainfall rate, and high temperatures characterize it. Rain takes place usually as uneven gales in November, December, March, and April. In Madinah area, the mean rainfall is nearly 40.1 mm/year. The calculated rate of infiltration varies between 0.13 and 1.01 cm/min. The mean daily temperatures ranged between 27 and 43 °C in July and August and 10–25 °C in December and January (PME 2012).

Fig. 1
figure 1

Map of the study area with location of the groundwater samples

Madinah city lies within a shallow basin in the central part of the Al Madinah Province (Fig. 2). The mountainous parts that bound the city are geologically part of the Arabian Shield, which is a Neoproterozoic 900 to 540 Mya in age and subjected to several tectonic events (e.g., Stoeser and Camp 1985; Stoeser and Stacey 1988; Stern 1994; Johnson and Kattan 2001, 2008; Nehlig et al. 2001, 2002; Genna et al. 2002; Volesky et al. 2003; Meert and Lieberman 2008; Stern and Johnson 2010; Bamousa 2013). Tertiary to Quaternary flood basalts of Harrat Rahat bound the city from eastern and western parts. Several eruptions formed a large basaltic plateau and extending 310 km from Wadi Fatimah adjacent to Makkah city to Medina city, with a mean width of 60 km and an area covering about 18,100 km2 (Brown et al. 1963; Brown 1972; Blank and Sadek 1983; Coleman et al. 1983; Camp and Roobol 1989; Walker 1993; Mirza 2008). The fractured Harrat basalts contain aquifer zones and traps groundwater (Coleman et al. 1983; Blank and Sadek 1983; Al-Shaibani et al. 2007; Vincent 2008; Wagner 2011).

Fig. 2
figure 2

Geological map of the Al Madinah Province including Madinah city (MPMR, SA, 1987)

Wadi Qana and Wadi Aqiq are large wadis run in the Madinah area. The Wadi Aqiq runs northward joining Wadi Qana in the eastern part of Madinah area. They form the outlet of the Madinah basin, then they flow together further due north as one major valley, known as Wadi Al Hamd.

Groundwater resources of Madinah occur in two zones: high permeable Harrat Rahat zone in east and south and alluvial deposits zone to the west including the central part of Madinah city. The deposits belong to Quaternary, consisting of clay, sand, and gravel that resulted from weathering of Precambrian rocks with parts of basalts of late Tertiary and Quaternary. The groundwater wells are drilled randomly (Fig. 1). For this reason, a decrease in the level of groundwater is observed, which ranges between 535 and 594 m level. The water table depth ranges between 28 and 93 m.

Buried wadis were found beneath Harrat Rahat’s volcanic area with more than 50-m thickness of alluvial deposits (Italconsult 1989). The hydraulic parameters of the aquifer in the area of study are shown in Table 1 (Bazuhair et al. 2002).

Table 1 Hydraulic parameters of the aquifer in the area of study

Methodology

The 32-groundwater sampling points of Al Madinah area are collected from Al Aqool, Quba, Uhud areas and around the Prophet’s Holy Masjid area (Fig. 1). The selection of the groundwater sites was designed to cover the whole city and its surroundings. The wells are selected to be as uniform as possible to study the behavior of groundwater and the extent of pollution. Prior to groundwater sampling, wells were pumped for enough time, until the field parameters are stabilized.

At each water sampling location, two 1-l polyethylene bottles were filled. All sampling bottles were soaked with 1:1 HNO3 and washed using detergent. These bottles were then rinsed with double-distilled water. At the time of sampling, bottles were thoroughly rinsed 2–3 times by the groundwater.

Duplicate samples of groundwater were collected from all wells. The first sample was acidified using concentrated nitric acid to pH <2 for the cations and minor constituents’ analysis. The second sample of groundwater was also gathered at its ordinary pH and well kept (almost at 4 °C) for anions analysis. Groundwater samples were filtered using membrane filters (0.45 μm) for laboratory analyses following the procedures established in standard methods (Clesceri et al. 1999). Results of chemical analyses are presented in Tables 2, 4, and 6.

Table 2 The chemical analysis results of major constituents (mg/l) of Madinah

Beside the well, a probe (portable HI 991300 Hanna Instruments) was used for field determinations of electrical conductivity (EC), hydrogen ion concentration (pH), total dissolved salts (TDS), and temperature (T°C). The groundwater samples were analyzed in the chemical laboratory of Taibah University. Major ions and trace components were analyzed according to instructions of the APHA (1988). The error of ionic balance is below ±5 % (Domenico and Schwartz 1998). The minor components were measured using ICP/MS (7500cx series, Aglinet Technologies). SI of specific minerals were measured with the help of PHREEQC software (Parkhurst and Appelo 1999).

Results and discussion

Hydrogeochemical characteristics

The characteristics of hydrogeochemistry of Madinah groundwater are provided in Table 2. The results were used to determine the contaminants and the processes governing the groundwater and to access the quality of groundwater for different uses. The temperature values generally ranged between 27.4 and 33.4 °C, which may be due to the geothermal phenomena, where all wells were drilled in basement rocks. The elevated temperatures encourage dissolution process resulting in increasing the dissolution of the existed salts.

The values of pH in groundwater of the area of study vary from 7.12 to 7.87, revealing the slight alkaline nature of water. The pH values approaching 8.00 (Appelo and Postma 2005) propose the dissolution of silicates and carbonates. The values of EC in samples varied between 1683.36 and 5185.48 μS/cm at 25 °C. The quality of groundwater varied from brackish water to saline water, where the TDS values were ranged between 1077.35 mg/l in the southern parts of the area of study and 3318.71 mg/l in the northern parts of the Madinah area.

The drawn iso-TDS map (Fig. 3) of the groundwater reveals that lower values of TDS were noticed in the southwestern, southeastern, and southern parts of the Madinah, although, high salinity values are detected in northern part of the area of study. Besides, the salinity increase may also be ascribed to indigenous conditions of the environment (Lloyd and Heathcote 1985), e.g., leaching from cultivated soil zone and the return flow of irrigation activities to the leakage of septic wastewater or to the interaction between water and rock and cycling salting. The elevated salinity values are present in highly agricultural and residential areas.

Fig. 3
figure 3

TDS distribution in the Madinah area

Distribution of major ions

The constituents of groundwater of the Madinah area are of wide ranges of concentrations, which point to the contribution of a number of chemical practices inducing the chemistry of water (Table 2). The results of groundwater constituents of the Madinah area indicated the following ranges: 255–670 mg/l for Na, 80.45–327.59 mg/l for Ca, 36.42–147.36 mg/l for Mg, 5–9 mg/l for K, 395–1350 mg/l for Cl, 190–655 mg/l for SO4, and 72.66–186.41 mg/l for HCO3.

The groundwater of Madinah area showed two ionic dominances: the first is Na > Ca and Cl > SO4 (24 samples), and the second is Na > Ca > Mg and Cl > SO4 (8 samples).

To show the extent of correlation among ions, scatter plots between chloride and major ions were constructed (Fig. 4). The concentrations of Na, Ca, and Mg indicate a direct relationship with chloride. The elevated concentrations of sodium and calcium in the majority of groundwater samples of the area of study may be due to the Na-rich and Ca-rich silicates and carbonates dissolution, as well as gypsum and halite. To some extent, Na replaces Ca during its pathway through the effect of the process of cation exchange, in which clay exchangers are common in the soil matrix of the aquifer. The anthropogenic calcium in the study area comes from different sources, e.g., domestic effluents, wastewater, and leather industry (Somasundaram et al. 1993; Reimann and Caritat 1998). The magnesium in the samples might be initiated as a result of the dissolution of dolomite and silicate minerals (Hem 1989). The elevated concentrations of magnesium found in industrial regions may result from the metal industry (Pitt et al. 1999). K ion comes from wastewater and fertilizers (Trauth and Xanthopoulos 1997).

Fig. 4
figure 4

Scatter plots between chloride and major ions of the Madinah groundwater

Chloride is an effective pollution indicator. Chloride is likely to be enriched in groundwater. The high concentration of Cl mainly originated from cyclic salting in agricultural areas along the path of groundwater flow starting from southwestern parts toward northeastern parts, as well as from sewage and fertilizers. HCO3 displays weak correlation with chloride indicating varied sources of HCO3 (Fig. 4). Elevated concentration of HCO3 resulted from CO2 gas dissolution, which originated by the organic biodegradation, which may come from the leakage of domestic and industrial manure (Canter 1997; Jeong 2001; Zilberbrand et al. 2001). Sulfates display direct relationship with chloride (Fig. 4). SO4 may be originated from gypsum dissolution from the matrix of aquifer or from phosphate fertilizers and industrialized wastes (Subbarao et al. 1996; Pitt et al. 1999; Cortecci et al. 2002).

Groundwater classification

Hydrochemical diagrams show the relative concentrations of the major ions, which can summarize the main contrasts in hydrochemical composition among different water sources (Soulsby et al. 1998). In the current work, the diagrams of Piper (1944), Durov (1948), and Schoeller (1962) were benefited for the purpose groundwater categorization (Figs. 5, 6, and 7).

Fig. 5
figure 5

Trilinear diagram of Piper for the Madinah groundwater

Fig. 6
figure 6

Diagram of Durov showing the geochemical evolution of the Madinah groundwater

Fig. 7
figure 7

Plot of Schoeller’s for the samples of groundwater of the Madinah area

Classification of groundwater of the area of study is illustrated in the diagram of Piper (Fig. 5). From the Piper diagram, it is obvious that the Madinah samples have high alkali metals (Na + K). They are possibly resulting from cation exchange process.

The arrow in Fig. 5 shows the direction of geochemical evolution of the Madinah groundwater, where it changes from the composition of rainwater (Ca–HCO3) to the current composition of the groundwater in Madinah (Na–Cl). The geochemical composition of the groundwater of the area of study is affected by the silicate mineral dissolutions and their reaction with the groundwater, which tend to change the quality of groundwater.

Chloride ion is the prevailing anion in the groundwater. The groundwater samples are characterized by Na–Cl facies, which point to final phase of the groundwater evolution.

With the purpose of simplifying clarifications of the evolutionary trends and hydrogeochemical reactions in the groundwater system, the results of analysis of samples were presented on the diagram of Durov (Burdon and Mazloum 1958; Lloyd 1965). From Fig. 6, the groundwater samples are located in the ninth field representing reactions of reverse ion exchange and waters of end point facies.

The arrow on the diagram of Durov displays probable evolution of the Madinah groundwater from Ca–HCO3 facies (rainwater) to Na–Cl facies. Rainwater was exposed to many processes such as evaporation and interaction with soils and deposits that penetrate them to reach the groundwater. Furthermore, as the groundwater runs through the alluvial aquifer, extra practices of dissolution/precipitation, cation exchange, and mixing with return flow will act to raise the salinity of groundwater and alter the prevalence of ions from Ca to Mg and lastly to Na-rich water. Concurrently, anion prevalence is altered from HCO3 to SO4 and lastly to Cl, signifying end point waters.

Representing the Madinah groundwater results on the diagram of Schoeller (1962) revealed that the Madinah samples had almost similar trends of increase and decrease with rainwater (Fig. 7). Evidently, the groundwater is affected by evaporation, ion exchange, anthropogenic pollution, and water–rock interaction. The groundwater samples of the area of study show prevalence of Na, Ca, Cl, and SO4 over Mg, K, and HCO3.

Multivariate statistical techniques

The results of hydrochemical data were analyzed using multivariate statistical techniques, such as Cluster Analysis (CA) and Principal Component Analysis (PCA), to identify the sources of pollution that presently affects the groundwater. The water quality data was monitored at 32 different wells, using 23 water quality parameters.

Cluster analysis

This is a group of multivariate techniques, which primarily classify (Massart and Kaufman 1983) samples into cluster with high homogeneity level within the class and high heterogeneity level between classes.

The spatial variability of groundwater was determined by CA. CA was first performed to group all sample site in order to classify them into cluster to minimized their number. CA was used to link sample site in the configuration of a tree with different branches (dendrogram), which provide visual summary of the clustering process, giving a picture of the cluster and their closeness. Branches that have relation closer to each other show a stronger relationship between samples.

In present study, CA was applied for the grouping of 32 different wells using ward’s linkage method (Ward 1963). A classification scheme using Euclidean distance (straight-line distance between two points in C-dimensional space define by C variable) for similarity measurement together with Ward’s method for linkage produces the most distinctive groups, where each member within groups is more similar to its fellow member than to any member outside the group (Guler et al. 2002).

CA was carried out on the results of chemical analysis of groundwater samples to evaluate the spatial variability among the studied wells. This analysis resulted in the grouping of the studied wells into three clusters between the sampling wells, reflecting differences on water quality at different sites as shown in Fig. 8.

Fig. 8
figure 8

A dendrogram showing the three clusters of groundwater samples in the Madinah area

Cluster 1 includes 12 wells located at the northwestern part; cluster 2 includes 7 wells located in southeastern part; and cluster 3 contained 13 wells located at the center, southern, and southwestern parts (Fig. 9).

Fig. 9
figure 9

Map showing the three clusters of groundwater samples in the Madinah area

The clustering of wells indicates that water quality of groundwater varies, and such variation is likely due to different hydrochemical processes, anthropogenic pollution, and water–rock interaction in the Madinah area.

Principal component analysis

PCA analysis was used as a technique of factor extraction. For this work, it needs a previous estimation of the amount of variation in each groundwater quality parameter elucidated by the factors. Eigenvalues are the amount of variance elucidated by each factor; each parameter had a variance of 1 with a total variance of 23 for the whole data set. Factors with eigenvalue >1 elucidated more total variation in the data than individual groundwater quality parameters, and factors with eigenvalue <1 clarify less total variation than individual variable. Therefore, only the factors with eigenvalue >1 were taken for the explanation, while retained factors were subjected to varimax rotation (Vega et al. 1998).

The coefficients having correlation greater than 0.75 are considered as strong and indicate that high proportion of its variance explained by the factor, between 0.50 and 0.75 is considered as moderate loading, while coefficients having 0.30–0.50 correlation are considered as weak significant factor loading, indicating that much of that attribute’s variance remains unexplained and it is less important (Reghunath, et al. 2002).

PCA is applied on the normalized data set (23 parameters) to recognize the major variables affecting the quality of groundwater of the Madinah area. Factors with eigenvalue ≥1.0 are considered significant (Kim and Mueller 1987) and are retained in order to understand the data structure (Jackson 1991), which has expressed that the selected PCs are able to carry more information than single original variables. Four major PCs were extracted, which accounted 86.05 % variance of the original data structure. The results of the PCs are given in Table 3.

Table 3 Factor loading and eigenvalues of principal components

The PC1 accounts for 40.986 % of the total variance, displaying strong positive loading on Na, K, Cl, and Al, while it displays a moderate positive loading on EC, TDS, Ca, Mg, SO4, Mn, Pb, Cu, Cd, Cr, Ni, Zn, and As. PC1 shows a weak positive loading on Fe, Se, and V. The major variables constituting PC1 are related to the hydrochemical variables originating from mineralization of groundwater and Na-rich silicates. The Cl mainly originated from cyclic salting in agricultural areas and from sewage and fertilizers.

The PC2 accounted 31.648 % of the total variance, showing strong positive loading on Fe, while it displays a moderate positive loading on Mn, Cu, Cd, Ni, Zn, and As. PC1 shows a weak positive loading on Pb and Cr. The major variables constituting PC2 are related to the leaching and dissolution processes and from intensive fertilizers use for agricultural purposes. Out of the total variance, 7.400 % is explained by PC3 and is mainly carried by Se, V, and Co. Moreover, 6.011 % of the total variance of water quality is displayed by Hg with a strong positive loading under PC4. PC4 shows a weak positive loading on Se.

Ionic ratios

In order to understand and illustrate the hydrogeochemical processes, concentrations of different major elements and their interrelationship were studied. If the groundwater facies formed in different conditions, the ratios of certain ions may have obvious differences, which can infer the evolution of different groundwater facies (Reddy and Kumar 2010).

Particular ratios calculated to conclude the probable source of the groundwater and to disclose the probable processes that prevailed in the study area (Hounslow 1995). The influence of weathering of silicate mineral on the groundwater composition is supported upon further examination of the aqueous geochemistry. Values of Cl/sum anions 0.59–0.70 (<0.8) are indicative of rock weathering.

The Mg/(Ca + Mg) values of the groundwater vary from 0.31 to 0.48 (<0.5), which indicate the weathering of limestone–dolomite (Hounslow 1995).

The Ca/(Ca + SO4) values of the groundwater samples vary from 0.40 to 0.55 (≈0.5), which indicate the dissolution of gypsum (Hounslow 1995). The SI for gypsum vary from −0.62 to −1.44.

Silicate weathering

Weathering of silicate is considered as an important source for elevated concentrations of sodium besides calcium in groundwater. However, halite is present in the alluvium of Madinah, therefore, if the dissolution of halite is controlling the presence of Na, then the ratio of Na/Cl would be roughly equivalent to 1 (Table 4), but if the Na/Cl ratio is more than 1, it is usually interpreted as sodium liberated from the weathering of silicate (Meybeck 1987). The values of Na/Cl ratio are nearby or above 1.00 (0.71–1.02, median = 0.92), indicating to some extent that weathering of silicate and the dissolution of halite are the main reactions causing the release of Na into groundwater. The silicates of the Madinah area are mostly consisted of basalt, andesite, gabbro, diorite, and few rocks of granitic nature. Thus, Na and Ca are predictable to be freed during weathering processes of these rocks according to the following reactions:

Table 4 Chemical analysis results of nutrients, irrigation water parameters and hydrochemical coefficients in the area of study (conc. in mg/l)
figure a
figure b

In calcite case, the equilibrium of water–mineral is controlled by the following reaction:

figure c

Moreover, the dissolution of silicates and carbonates releases HCO3 into the groundwater system of the area of study, where high concentrations of HCO3 were found to range between 72.66 and 186.41 mg/l. Thus, the reaction between groundwater and weathered rocks is main practice in Madinah.

Minerals equilibrium

Using the approach of saturation indices, it is probable to expect the reactive mineralogy of the subsurface from groundwater results without assembling the specimens of the solid part and examining the mineralogy (Deutsch 1997). In the current work, to define the chemical balance between minerals and water, SI of certain minerals were estimated. If the groundwater is saturated (SI > 0) with respect to a mineral, it is susceptible to deposit (precipitation) some of the solute load. Also, if it is undersaturated (SI < 0), it will yield more mineral into the solution (dissolution). The groundwater becomes in equilibrium with a specific mineral, wherein the case of the calculated SI of a specific mineral is zero. The SI of a mineral is calculated based on the following equation (Lloyd and Heathcote 1985):

$$ \mathrm{S}\mathrm{I}\kern0.5em =\kern0.5em { \log}_{10}\kern0.24em \frac{\mathrm{IAP}}{{\mathrm{K}}_{\mathrm{sp}}} $$

where IAP is the ion activity product, and Ksp is the solubility product of the mineral.

The SI values of carbonate and sulfate minerals of groundwater of the Madinah area (Table 5) revealed that the groundwater situation is in slightly to moderately undersaturation condition with respect to these minerals (SIaragonite −0.22:−0.84, SIcalcite −0.07:−0.70, SIdolomite −0.20:−1.66, SIgypsum −0.62:−1.44, SIanhydrite −0.88:−1.67). The groundwater of the Madinah area is strongly undersaturated with halite (SIhalite −4.72:−5.60). The SI of different minerals are illustrated in Fig. 10.

Table 5 The saturation indices of specific minerals in Madinah groundwater
Fig. 10
figure 10

Diagrams of SI of the minerals anhydrite, aragonite, calcite, dolomite, gypsum, and halite

The studied minerals are intense in the soil zone, since high evaporation degrees cause their deposition. Rainfall or irrigation water dissolves these minerals from the soil zone then flushes into the groundwater system. This causes an increase of the saturation indices of minerals in the system of groundwater.

Nutrients

Nutrients, which include nitrate, nitrite, ammonia, phosphate, fluoride, and boron in groundwater, were analyzed to investigate the anthropogenic effects and the pollution extent in the study area (Table 4). Groundwater pollution with nitrate (NO3) is familiar in several parts of the world. The USEPA has agreed with 10 mg N/l as the maximum contaminant level (MCL) for NO3 in water used for drinking (Federal Register 2002), as drinking of water with elevated nitrate is a reason of methemoglobinemia, which is a possibly serious disorder in children (Exner et al. 2010).

Nitrate originates from many sources such as agricultural activities especially fertilizers, animal wastes, plant remains, industrial, and sewage disposal. The World Health Organization’s guiding limit for nitrate in drinking water is 50 mg/l (SASO 1984; WHO 2011). The concentrations of nitrate range between 18.22 mg/l at well B32, which is located at the eastern part (Aqool) area, and 168.43 mg/l at well B19, which is located in the center of the city (Table 4). Forty-four percent of the groundwater samples have NO3 concentration more than 50 mg/l, which suggest the influence of agricultural activities and sewage disposal. The distribution of nitrate in the Madinah groundwater is presented in Fig. 11. This figure shows that the nitrate has different trends of increase. It is noticed that there are two zones having the highest value of nitrate, wherein they are located in the center of the city, where it is densely populated area, and in the northern part near Uhud Mountain, where it is densely cultivated area.

Fig. 11
figure 11

Distribution of NO3 in the Madinah area

Table 4 shows that the concentration of nitrite in groundwater samples of the area of study is lower than guideline value (3 mg/l) for drinking purposes (WHO 2011). The decreased concentrations of ammonia may be owing to adsorption of clay particles and to the action of bacteria on oxidizing ammonia to nitrate and nitrite (APHA 1988). Ammonia in drinking water is not of immediate health relevance. The values of ammonia in the Madinah groundwater samples indicate very low concentrations reach 0.04 mg/l, or they were below detection limit (Table 4).

The main phosphate source in water might be from the contamination produced from fertilizer use and anthropogenic practices or from the minerals in parent rock (Zanini et al. 1998; Krapac et al. 2002; Daesslé et al. 2006). The maximum limit allowed for phosphate in drinking water varies from 0.4 to 0.5 mg/l (Carney 1991). The concentration of phosphate in the Madinah groundwater (Table 4) is under the maximum limit allowed for drinking.

The breakdown of the fluorine-rich minerals is a possible source of fluoride. As well, it may have originated due to runoff, infiltration of fertilizers, industrial wastes, and manure treatment system (Smedley et al. 2002; Edmunds and Smedley 2013). The concentration of fluoride is lower than 1.5 mg/l in the groundwater samples of the area of study (WHO 2011; Table 4).

Boron concentrations vary widely and depend on the surrounding geology and wastewater discharges (WHO 2011). The pollution of groundwater with boron is also from dissolution processes of the sediments, under reducing conditions or from agricultural activities (e.g., fertilizers, pesticides). The guideline value of boron is 2.4 mg/l (WHO 2011). The boron concentration in the Madinah groundwater (Table 4) is under the guideline value for drinking purpose.

Trace constituents

The various trace component sources in the groundwater of Madinah might have originated from leaching and dissolution processes and from intensive fertilizer use for agricultural purposes.

The analyses of Fe, Mn, Pb, Ni, Zn, Cu, Cd, Cr, As, Se, Hg, V, Co, and Al constituents of Madinah groundwater are shown in Table 6. According to the standards of WHO (2011) for drinking uses, the concentrations of the analyzed trace components of Madinah groundwater show normal contents for Fe, Mn, Cu, Zn, Se, Hg, V, and Co, whereas the concentrations of Pb, Cd, Cr, Ni, As, and Al show high content in some samples (B11, B12, B13, B14), which are located in the southwestern part of the study area. This may be due to the human activities in the industrial area found in the southwestern parts of Madinah. Close to the Madinah area, the wastewater of several manufactures (e.g., paints, dyes, tannery) and car workshops are disposed in badly designed landfills. The wastewater is overloaded with elevated concentrations of trace components, which are the principal sources of pollution of groundwater.

Table 6 The chemical analysis concentrations (mg/l) of minor constituents in the area of study

Groundwater quality assessment

Drinking purposes

WHO (2011) sets no standard limits for TDS, sodium, chloride, bicarbonate, sulfate, potassium, calcium, and magnesium and their health effects. The taste is the only established. However, the standards of nitrate and nitrite were based on health concerns. The normal concentrations of trace components existent in drinkable groundwater have no impact on human health.

Tastiness of water with a lower TDS values (<600 mg/l) is usually good. Levels higher than about 1000 mg/l for TDS (WHO 2011) make the water unpalatable. The existence of high TDS levels might also be unpleasant to users due to extreme scaling in heaters, water pipes, household appliances, and boilers.

Nevertheless, the groundwater of the area of study has high TDS concentrations exceeding 1000 mg/l. Forty-four percent of the groundwater samples have NO3 values more than 50 mg/l, and Pb, Cd, Cr, Ni, As, and Al show high content in some samples, which are considered unsafe for drinking purposes. Consequently, Madinah groundwater is unsafe for purpose of drinking.

Irrigation purposes

The evaluation of groundwater for agricultural purposes is governed by irrigation parameters, e.g., TDS, magnesium hazard (MH), sodium adsorption ratio (SAR), and residual sodium carbonate (RSC).

SAR is a useful tool to measure the danger of sodium on agriculture (Fetter 1994). SAR is calculated using the following equation:

$$ \mathrm{S}\mathrm{A}\mathrm{R}=\frac{{\mathrm{Na}}^{+}}{\sqrt{\frac{{\mathrm{Ca}}^{2+}+{\mathrm{Mg}}^{2+}}{2}}} $$

where the used ions are in milliequivalent per liter.

The parameter SAR is of great importance due to the elevated content of Na in agricultural water may elevate the hardness of soil hardness and may decrease the permeability of the soil. The values of SAR (Table 4) in the Madinah groundwater varied from 5.89 to 8.15 (i.e., <10), which indicate that the water is excellent for agricultural activities (USSL 1954).

To evaluate the groundwater suitability for the irrigation, Wilcox diagram (1955) was used (Fig. 12) for the groundwater of the area of study.

Fig. 12
figure 12

Wilcox plot of TDS and SAR for groundwater samples in the area of study

The usage of salty waters in pervious rocks may raise the groundwater salinity. Figure 12 shows the groundwater points of Madinah on the diagram of Wilcox. It is clear that the samples of groundwater are assembled in three areas, namely C3S2, C4S2, and C4S3 that show medium to high sodium and high to very high salinity.

In the area of study, the groundwater could be safely used for irrigation purposes on practically all types of soils; nevertheless, it might be sensible to retain control on the salinity by appropriate managing and via choosing plants that possess good tolerance for the salts.

The suitability of groundwater for irrigation purposes is affected by higher concentrations of carbonate, bicarbonate, calcium, and magnesium in groundwater. Hence, RSC is generally used to specify the groundwater suitability for irrigation, and it is estimated by using the following equation (Eaton 1950; McLean et al. 2000):

$$ \mathrm{R}\mathrm{S}\mathrm{C}=\left({\mathrm{CO}}_3^{2-}+{{\mathrm{HCO}}_3}^{-}\right)-\left({\mathrm{Ca}}^2+{\mathrm{Mg}}^2\right) $$

in which, all ions are in milliequivalent per liter. The estimated values of RSC (Table 4) for Madinah groundwater samples vary between −5.12 and −25.25. The results of RSC show that all the groundwater samples are below 1.25, so it is of a good category for irrigation (USSL 1954).

The values of MH for irrigation water are obtained using an equation proposed by Szabolcs and Darab (1964), and it is as follows:

$$ \mathrm{M}\mathrm{H}={\mathrm{Mg}}^{+2}/\left({\mathrm{Ca}}^2+{\mathrm{Mg}}^2\right)\times 100 $$

in which, all ions are in milliequivalent per liter.

If the values of MH >50, then the water is unsafe for irrigation purpose. The estimated MH values (Table 4) for water samples from the Aqool area vary from 31.00 to 47.90, which indicate that they are suitable for irrigation activities.

Referring to the calculations of TDS (Table 2), SAR, RSC, and MH (Table 4) for the samples of Madinah groundwater, it is realized that they are moderately appropriate for activities of irrigation work.

Conclusions

Expanding urbanization and intensified land use for agriculture and industrial activities threatened the limited water resources of Saudi Arabia. Besides rare precipitation and overexploitation of groundwater, the level of groundwater was declined, and groundwater was deteriorated. Thus, the quality and quantity of groundwater are of ultimate importance.

Therefore, a hydrogeochemical investigation was conducted to identify the pollution sources at the groundwater system of Madinah. The present work also includes groundwater characteristics and a groundwater quality assessment. This groundwater quality assessment will serve as an important part in optimizing the available water resources and sustaining a desired water quality to satisfy the competing needs of socioeconomic development and maintaining healthy ecosystems. In order to investigate the pollution sources of Madinah, groundwater samples have been collected from 32 locations and were analyzed for major, minor, and nutrient constituents.

Elevated values of salinity were detected in northern part of Madinah. The high values of salinity are found in highly agricultural and residential areas. The varied concentration ranges show the participation of numerous hydrochemical reactions inducing the chemistry of water.

Hydrochemical Piper, Durov, and Schoeller diagrams are constructed to show the relative concentrations of the major ions, which can summarize the main contrasts in hydrochemical composition among different water sources. In the present study, the groundwater is affected by evaporation, ion exchange, anthropogenic pollution, and water–rock interaction. The groundwater samples of the area of study show prevalence of Na, Ca, Cl, and SO4 over Mg, K, and HCO3.

CA and PCA were applied on the results of chemical analysis of groundwater samples to evaluate the spatial variability among the studied wells and to obtain relationship between parameters and sampling site in order to identify the factors and sources influencing groundwater quality. The CA allowed the formation of three clusters between the sampling wells reflecting differences on water quality at different locations. Four major PCs were extracted, which accounted 86.05 % variance of the original data structure.

The geochemical evolution of Madinah is from the composition of rainwater (Ca–HCO3) to the composition of the groundwater (Na–Cl). The geochemical composition of the Madinah groundwater of the area of study is affected by the silicate mineral dissolutions and their reaction with the groundwater, which tend to change the quality of groundwater.

Chloride ion is the prevailing anion in the Madinah groundwater samples. The groundwater samples are characterized by Na–Cl facies, which point to final phase of the groundwater evolution.

Evidently, the groundwater is affected by evaporation, ion exchange, anthropogenic pollution, and interaction of water–rock. The groundwater samples of the area of study show prevalence of Na, Ca, Cl, and SO4 over Mg, K, and HCO3. Ionic ratio of Cl/sum anions indicates rock weathering of Mg/(Ca + Mg) indicates limestone–dolomite weathering, and Ca/(Ca + SO4) indicates gypsum dissolution. The calculated SI for minerals carbonate, sulfate, and halite in the Madinah groundwater show undersaturation phase.

Forty-four percent of the groundwater samples has NO3 concentration more than 50 mg/l, which suggests the influence of agricultural activities and sewage disposal. The highest value of nitrate is located in the center of the city, where it is densely populated area and in the northern part near Uhud Mountain, where it is densely cultivated area. The concentration of nitrite, ammonia, phosphate, fluoride, and boron are below the guideline value for drinking purposes.

The concentrations of Pb, Cd, Cr, Ni, As, and Al show high content in some samples (B11, B12, B13, B14), which are located in the southwestern part of the study area. This may be due to the human activities in the industrial area found in the southwestern parts of Madinah. Close to this area, wastewater from several industries and car workshops is disposed in badly designed landfills. The wastewater is overloaded with elevated concentrations of trace components, which is the principal source of pollution of groundwater.

The groundwater of the area of study has high TDS concentrations exceeding 1000 mg/l; 44 % of the groundwater samples have NO3 values more than 50 mg/l; and Pb, Cd, Cr, Ni, As, and Al show high content in some samples, which are considered unsafe for drinking purposes. Consequently, groundwater of the study area is not safe for drinking purposes. Referring to the results of TDS, SAR, RSC, and MH for the samples of Madinah groundwater, it is realized that they are moderately appropriate for activities of irrigation.

Managing of water resources needs to be urgently implemented to avoid public health impacts. Disposal of industrial wastewater in such insecure landfill must be prohibited to avoid further groundwater contamination.