1 Introduction

Groundwater plays a pivotal role in meeting essential water demands for domestic, industrial, and agricultural purposes, particularly in regions characterized by arid and semi-arid conditions [1]. However, the quality of groundwater in such areas faces degradation due to a complex interplay of factors. These include the dissolution of evaporites, variations in climate, surface runoff, unregulated fertilizer application, and the influx of saline waters from deep strata [2]. These activities, when combined, result in the generation of groundwater with a diverse composition of dissolved elements [3]. Thus, warranting a comprehensive understanding of the underlying processes.

Recent efforts have been directed toward the development of hydrogeochemical methodologies to comprehensively assess groundwater quality [4]. This involves the utilization of statistical and geostatistical models that aid in unraveling the intricate nature of groundwater characteristics. Mechanisms like adsorption, desorption, surface reduction, and cation exchange contribute to chemical interactions [5], particularly those involving ions such as calcium (Ca), magnesium (Mg), and sulfate (SO4) that influence the surface chemistry of rock substrates. Alterations in the predominant chemical makeup of groundwater are attributed to water–rock interactions, encompassing processes like mineral precipitation and dissolution [6], which in turn can significantly impact the salinity of the water [7]. The variability of replaceable solutes within aquatic systems can be attributed to diverse mineral content, dynamic kinematic conditions, and hydrological factors [8, 9], underscoring the complexity of groundwater composition dynamics.

Geochemical models have proven invaluable in both understanding and predicting the potential deterioration of groundwater resources [10]. To achieve an equilibrium portrayal of geochemical systems, an array of unique tools has been employed [11, 12]. These encompass models such as Durov, Gibbs, and end-member diagrams, as well as geo-statistical indices including the saturation index (SI) and chloro-alkaline indices (CAI), which facilitate the evaluation of interactions between rock and water. Further insights are derived by employing multivariate statistical techniques such as principal component analysis (PCA), allowing for a deeper interpretation of variable relationships. Prior scientific endeavors have successfully employed these models to elucidate the intricate geochemical processes governing interactions [6,7,8,9, 12,13,14,15,16,17,18,19,20,21,22,23,24,25], revealing the underlying mechanisms shaping groundwater quality.

Given the recent establishment of groundwater wells, the preservation of their purity holds the utmost significance. The principal objective of this study is to unravel and comprehend the geochemical processes that govern water chemistry and salinity within the research area. Through this endeavor, the research aims to contribute to a holistic understanding of groundwater quality dynamics, laying the foundation for informed water resource management strategies in the southern region of the Mediterranean basin.

1.1 Location

The study space is considered within the 1.5 million Feddan project, located in the western west area of El Minya district and spanning between the longitudes 29° 50–30° 15′ E and the latitudes 28° 10–28° 30′ N (Fig. 1). It acts as a section of the western limestone plateau. The portion included Pleistocene-Oligocene gravels, Quaternary sediments, Minia, Samalut, Makattam, and Moghra Formations, which constituted the stratigraphic series from base to top (Fig. 2) [26, 27]. It sources its water from the fractured Middle Eocene limestone wells, where the water-bearing layer is around 400 m thick and the water table is 70–110 m below the surface (Fig. 2) [28].

Fig. 1
figure 1

Location map of the study site

Fig. 2
figure 2

Geologic map and geological cross section for the research site

2 Material and methodology

Thirty-three samples taken of the groundwater in 2022 from the study site were filtered, acidified with nitric acid (pH < 2) [29], and stored in tight, pre-rinsed polypropylene containers (Fig. 1). Field measurements were recorded with the pH meter were pH, total dissolved solids (TDS), and electric conductivity (EC) values. The primary constituents that formed the water samples under evaluation were examined in the national water research center (NWRC) labs, and the ionic balance error (e%) was less than 5%.

Durov's diagram refers to the ion exchange condition and depicts the water type and dominating ions [30, 31]. Phreeqc Interactive version No. 3.4 was implemented to obtain the saturation index (SI) values of the dissolved minerals in water [13]. Positive scores determine the super-saturation, and negative signs denote the under-saturation [32].

The concentrations are supplied in epm to compute the chloro-alkaline indices (CAI) from the following equations (Eqs. 1, 2):

$$ {\text{CAI}}_{1} = [{\text{Cl}} - \left( {{\text{Na}} + {\text{K}}} \right)]/{\text{Cl}} $$
(1)
$$ {\text{CAI}}_{2} = [{\text{Cl}} - \left( {{\text{Na}} + {\text{K}}} \right)]/\left( {{\text{SO}}_{4} + {\text{HCO}}_{3} + {\text{CO}}_{3} } \right) $$
(2)

Positive results highlight the host rock's alkaline ions (Ca + Mg) being replaced with the alkali element of the groundwater (Na + K), indicating that forward ion exchange has taken place [33]. Negative readings signify the reverse exchange ion that provides surplus alkalis in the water [33]. Negative signs also explain the recharge from rainfall that seeps into wells [13, 34].

The Gibbs diagram (GD), which controls the chemistry of the water, identifies the geochemical processes in groundwater [13, 34]. These processes, like chemical weathering, dissolution, and precipitation, highlight how rocks and water interact [13, 35, 36]. Quantities of GA and GC are obtained using the following equations (Eqs. 3, 4), where the units of measurement are ppm.

$$ {\text{G}}_{\text{C}} = {\text{Na}}/\left( {{\text{Na}} + {\text{Ca}}} \right) $$
(3)
$$ {\text{G}}_{\text{A}} = {\text{Cl}}/\left( {{\text{Cl}} + {\text{HCO}}_{3} } \right) $$
(4)

Box-Whisker graphs and principal component analysis (PCA) apply using JASP Statistics version 0.16.4.0 and provide scaled results that aid in obtaining scientific interpretation.

3 Result and discussion

3.1 Hydrogeochemical characteristics

The descriptive data portrayed that the pH of the water differed from low acidic (6.2) to slightly basic (7.96; Table 1 and Fig. 3). EC values revealed that the water samples were overly mineralized (more than 1000 ppm; Table 1) [37]. TDS amounts fluctuated between slightly saline (1764 ppm) and moderately saline (3199 ppm; Table 1 and Fig. 3) [38]. Water samples were very hard (more than 300 ppm) according to TH levels (Table 1 and Fig. 3) [39]. According to ion averages, Cl and Na are dominant (563 and 897 ppm, respectively), which is proved by Durov's plot, where all water samples were projected in Field No. 9 except one, which was in Field No. 8 (Table 1 and Fig. 4). Durov's diagram's fields 8 and 9 proved that both Cl and Na predominated in the analyzed water [30, 31, 40]. It was indicated that groundwater had been mingled with Na-Cl water from deep aquifers by upward seepage and reverse ion exchange [13, 34, 41, 42].

Table 1 Descriptive statistics for the studied water samples
Fig. 3
figure 3

Durov's plot classification for the analyzed water samples

Fig. 4
figure 4

Box–whisker graphs of variables in the studied waters

All variables had asymmetrical patterns that were anomalous compared to WHO [43] standard allowed limits (SAL) for drinking water except alkalinity (Alk), magnesium, and HCO3 (Table 1 and Fig. 4), alluding to the fact that waters are unsafe to drink.

3.2 Geochemical modelling

3.2.1 Saturation index (SI) and chloro-alkaline Indices (CAI)

SI values depict amounts of soluble minerals in water [13, 32]. The waters were oversaturated with carbonate minerals (aragonite, calcite, and dolomite) and evaporites (anhydrite and gypsum), except for halite and sylvite minerals (Fig. 5). Hyper-saturated minerals in water tend to precipitate (Fig. 3), [13, 32]. Halite had a more meaningful impact than the other minerals on the salinity of waters, as supported by the positive correlation matrix results between TDS and soluble minerals, particularly halite (Table 2 and Fig. 5). It clarified Cl and Na prevailing because evaporite dissolves, notably halite minerals, which is reinforced by the significant link between halite and Na and Cl (r = 0.8; Table 2).

Fig. 5
figure 5

SI values of the dissolving minerals in waters and chloro-alkaline indices

Table 2 Correlation matrix between the variables in the studied samples

CAI shows the form of ion exchange that is most common in groundwater [13, 33]. Less than one-third of the samples revealed forward ion exchange between the earth's alkaline (Ca and Mg) in host rocks and alkalis (Na and K) in water, according to positive CAI ratios (Fig. 5), [13, 33]. Negative CAI values indicate that reverse ion exchange occurred in more than two-thirds of the samples, which results in a surplus of Na in the waters (Fig. 5) [13, 33]. The abundance of Na signified that the rain had recharged [13, 34].

3.2.2 Gibbs diagram (GD)

Dissolution, precipitation, and rock weathering are examples of geochemical processes where the predominant ones can control water chemistry, according to GD [35, 36]. GD determined that the evaporite dissolution is more controlling, causing an abundance of Na and Cl in the waters (Fig. 7) [35, 36]. Halite dissolution is the base source of such excesses, as evidenced by the close connection between it and Na and Cl (Table 2 and Fig. 6).

Fig. 6
figure 6

Gibbs' diagram for the studied waters

3.3 Multivariate statistics

3.3.1 Principal component analysis (PCA)

PC1 had a variance of 29.5%, referring to the dissolution of anhydrite and gypsum minerals, which are the prime sources of Ca and SO4 ions in the investigated water and have a moderate contribution to salinity (Table 3 and Fig. 7). PC2 indicates the dissolution of halite minerals, is the essential source of Cl and Na ions in the studied water and is the main contributor to the water's salinity with a variance of 22.7% (Table 3 and Fig. 7). PC3 indicates that dissolved carbonate minerals are the principal suppliers of HCO3 in the studied water and had a variation of 15.6%, not affecting salinity (Table 3 and Fig. 7). PC4 was estimated with a variance of 14.6%, revealing the decomposition of calcite and sylvite minerals are sources of Ca, K, and Cl ions in the analyzed water and contribute to water hardness and salinity (Table 3 and Fig. 7).

Table 3 Component loadings for variables in water samples
Fig. 7
figure 7

Scree plot shows sum of component loadings, and path diagram reveals the variables for each rotated component

4 Conclusion

Water samples had low to medium salinity, extreme mineralization, a low acidic to weak basic pH, and much hard water. According to the classification provided by Durov's diagram, the predominance of Na and Cl signified water mixing with Na–Cl water due to upward water movement from deeper wells or via ion exchange. All variables were above the WHO guideline limit, except magnesium ions, which refer to tainted water. Si results revealed that all minerals, apart from halite and sylvite, were dissolving in excessively saturated waters. Negative CAI ratios proved reverse ion exchange had occurred, leading to an excess of Na and Cl in over two-thirds of the waters and the rainy recharge. According to GD, evaporated dissolution is the dominant process that led to the abundance of Na and Cl in water. PCA components demonstrated that the primary source of Na, K, Cl, and SO4 ions in waters was the dissolution of the evaporite minerals, notably halite. Also illustrated is that the principal source of Ca and HCO3 ions in water was the solution of carbonate minerals that contribute to salinity and hardness. Therefore, if no additional pollutants are present, the tested groundwater should be mixed with fresh water to limit its high salinity content and make it fit for drinking.