1 Introduction

Increasing urbanization, industrialization, and irrigation farming in developing countries have imposed great pressure on groundwater resources, with its consequent depletion and/or permanent contamination of aquifers [9, 35, 60, 76, 95]. The hydrochemistry of aquifers is primarily influenced by geology, land use, quality of recharge water, soil–water interactions, recharge pathways, the residence time of recharged water in aquifers, and aquifer rock–water reactions. Therefore, local or regional groundwater chemistry is affected by local anthropogenic activities and inherent hydrogeochemical configurations [29, 31, 80]. The hydrochemistry of some groundwater aquifers is naturally excellent, but over time, their composition can be modified by anthropogenic activities and to a less significant extent by natural factors.

Evaluation of hydrogeochemical properties of groundwater plays a significant role in defining the suitability of groundwater for domestic, industrial, and irrigation use [17, 92, 97, 102, 103]. It provides a better understanding of the hydrochemical composition of groundwater aquifers [84]. Municipal and industrial wastes, in addition to the application of chemical fertilizers and pesticides, have emerged as foremost groundwater pollutants in heavily irrigated areas. Anthropogenic activities alter the natural source of contaminants and consequently initiate pollution load-receiving sub-surface aquifers [96, 98]. Therefore, the assessment of the hydrochemical properties of aquifers is justifiable, as, in some remote areas, groundwater is the only source of water supply, especially in developing countries [25, 30, 47, 86]. Groundwater suitability for drinking and irrigation uses can be determined by its physical and chemical properties. It can be revealed by hydrochemical analysis. The standard for the classification of groundwater for different uses is unique. Studies characterizing groundwater were carried out in different parts of the world [3, 34, 42, 50, 74, 79, 90, 101, 114]. Results have indicated anthropogenic inputs through variation in total dissolved solids (TDS), chloride (Cl), sulfate (SO42−), nitrate (NO3), and sodium (Na+) concentrations. Likewise, many studies have observed that rock weathering, aridity, and saltwater intrusion, are the major controls on hydrochemistry of aquifers [4, 32, 71, 91, 106, 115].

To highlight this problem, an investigation was carried out at the western Sokoto basin in Northwestern Nigeria. Groundwater studies in Sokoto basin have shown that the aquifers contained Holocene aged water (i.e., 100–10,000 years BP). It is hard, and TDS varied from 130 to 2340 (mg/l). Nitrate and Na+ vary widely, at some locations above WHO reference guidelines [12]. Groundwater is chiefly of two facies; Ca–Mg–SO4–Cl and Ca–Mg–HCO3 water type [6,7,8]. The hydrogeochemical facies are derived from the dissolution of carbonate ions (calcite and dolomite). More than ¼ of global population depended on carbonate aquifers for water supply. The geochemical assessment of these types of water-bearing formations is important for the protection and management of regional groundwater resources [49]. Groundwater in Gwandu Formation is soft with moderate TDS. However, groundwater properties of Illo formation are poorly known.

Characterization of groundwater over different geologic environments helps in solving diverse hydrochemical problems, especially if water quality is concerned. Thus, it is vital to understand aquifer hydrogeochemistry, for water quality management and effective development and sustainable utilization of freshwater. Studies relating hydrochemistry of aquifers with geological variability showed that changes in mineralogy and lithology significantly influenced changes in chemical composition and hydraulic properties of aquifers [54]. The spatial variation of groundwater properties and its evolution are regulated by the regional geology [10]. Variation in groundwater hydrochemistry is correlated to the local geology, resulting in distinct hydrochemical processes [64]. The objective of this study is to assess the impact of geological variability on the hydrochemical composition of groundwater in the study area.

2 The geography of the study area

2.1 Location, size, and climate

Sokoto basin, otherwise known as the Iullemmeden basin (Fig. 1), is part of an extensive elongated sedimentary basin in west Africa. It covered most of Northwestern Nigeria and eastern parts of the Niger Republic. The basin is located between Latitude 10° and 14°N and Longitude 3° to 7°E [13]. The Sokoto basin is encircled southward and westward by the Republic of Niger. It is in the driest and hottest parts of West Africa since it is situated above 10°N, within the Sahel Region of Africa that is frequently affected by droughts [83]. The study area has an AW Tropical climate. Temperature is generally high, and the average minimum temperature is 16 °C. The mean maximum temperature reaches a peak of 40 °C in April. Rainfall is highly variable and varies between 500 mm in the northern parts by over 2500 mm in the south. There is an overall decline in relative humidity from south to north. The relative humidity is also highly variable and reaches the peak (> 90%) in August. It falls to desert-like conditions (10–30%) during the dry season. The rate of evaporation is high and potential evaporation exceeds 2500 mm per annum [13, 38].

Fig. 1
figure 1

Location of the study area

2.2 Hydrogeology

Geological analysis in the Sokoto basin began in the 1880s. It focused initially on depicting the general geologic interpretations and reporting of fossil fuel regions. An all-inclusive stratigraphy of the basin was initially depicted by Jones [56] and trailed by Parker et al. [85]. The geology of the Sokoto basin is detailed in the literature [58, 59, 77, 78]. Similarly, the hydrogeology of the Sokoto basin is also well reported by previous studies. There are published data on hydrogeology and hydrogeochemistry of the Sokoto basin. Major aquifers are Gwandu, Illo, Kalambaina, Wurno, Taloka, Gundumi, Dukamaje, and Dange formations. The Basement Complex outcropped in the east and southwest [11, 13]. A theorized hydrogeological setting of the Sokoto basin is presented in Fig. 2.

Fig. 2
figure 2

Theorized hydrogeological cross section of the Sokoto basin, NW Nigeria, illustrating primary confining beds and groundwater aquifers in the study area

2.2.1 The Gwandu formation

The Gwandu formation is the best-known aquifer in the Sokoto basin. It is continental in origin and consists of interbedded, moderately consolidated sands and clays. The clay beds are chiefly thick, massive, white, red grey black, and brown [82, 83]. The sands vary from fine to coarse in texture. Gwandu aquifer is more essential, due to the basal sands, well saturated with water and confined by the underlying 16 m clay of Kalambaina formation and the overlying 10 m of clay of the Gwandu formation. The Gwandu formation contained two aquiferous zones: the uppermost unconfined sandy sections and the lower-most basal confined sandy zones. Recharge into the aquifer is by infiltering run-off and rainfall from the outcrop zones in the eastern region. The shallow aquifers are vulnerable to contamination since they are exposed to direct recharge by surface flows. The artesian aquifer gave free-flowing wells in about 20% of its area of occurrence ~ 14,767 km2 [83]. The Gwandu aquifer showed artesian flows in places with heads varying from a few meters to over 25 m (e.g., Borehole GSN 3056 at Kurdula) and free flows up to 12,000 gph (borehole GSN 3069 at Karfin Sarki). Also, artesian flows have been encountered at Masallaci. Aquifer tests conducted in boreholes tapping the Gwandu artesian aquifer show a wide range in transmissivity. The lowest values, of less than 1000 gpd/ft at borehole GSN 2674 in Bacaka, commonly illustrate the downdip zones near the Niger boundary, such as at Kurdula and Bacaka, in Northern Kebbi State [13] (Fig. 3).

Fig. 3
figure 3

Typical lithological sections of boreholes a Gwandu formation and b Illo formation

The Gwandu artesian aquifer, covering an area of about 9653 km2, can provide flowing artesian water to boreholes in valleys totaling approximately 1693.44 km2. This occurred primarily within the River Sokoto Fadama (floodplain). The flow occurs in a low-lying area trending southwest from Masallaci through Ruawuri, Balle, and Karfin Sarki, along the Niger frontier near Kurdula and Bacaka, and in a narrow lowland stretching some 34 km southwest of Yeldu. With its large proven areal extent, shallow depth, and high heads, the aquifer possessed the most prominent development potential. The aquifer offers the most prominent development potential among the three artesian aquifers recognized in the Sokoto basin [13]. Concerning groundwater, the most significant part of the Gwandu formation is a sandy region in the basal section that, were outlined at depth, forms the most widespread and productive artesian aquifer hitherto known in the Sokoto basin [13]. Aquifer tests showed that artesian flows were obtained in places with heads varying from a few meters up to 25 m above the ground surface. Aquifer tests conducted in boreholes tapping the Gwandu artesian aquifer show a wide range in transmissivity [5, 13, 46]. Recharge into the Gwandu aquifer is predominantly by infiltration from rainfall and runoff on the outcrop zone. Groundwater extraction is chiefly by withdrawal from shallow wells and deep wells (boreholes, are on the rise and are constructed in all parts of the study area) [6, 43]. Boreholes tapping the aquifer contribute to both the public and private water supplies at Birnin kebbi, but the estimated withdrawal was less than 100,000 gpd [13].

2.2.2 The Illo formation

The Illo aquifer is comprised of nonmarine cross-bedded stony clay and sand, that lie beneath an area of ~ 4000 km2 in the southwestern Sokoto basin. The lower “grits” member of ~ 122 m thick lies on Pre-Cretaceous basement crystalline rocks [13]. It is comprised of white friable medium to coarse pebbly sand with interbedded blue, yellow, red clay, and clayey sands. Very little is known about the hydrogeological character of Illo formation. Like the Gwandu aquifer, the latter has abundantly porous fine-gravel and coarse sands. In some locations, the Illo aquifer is continuous hydraulically with the Rima Group, which was characterized by an artesian aquifer, suggesting southward flow of groundwater into the Illo aquifer. Groundwater from the Illo aquifer is emptied into the floodplains areas of the Rivers Niger and Sokoto in the western Sokoto basin. Similarly, the artesian aquifer of the Gwandu formation is hydraulically continuous with the aquifers of the Rima-Illo Group. West of River Sokoto, about 32–48 km northward, the Dange formation which is a confining layer is absent. The hydrogeological conditions of these aquifers have been obstructed by human activities, owing to increased water demands by industry, agriculture, and municipal supplies.

The Illo Group is comprised of nonmarine cross-bedded pebbly sand and clay that lie beneath an area of about 6437.2 km2 in the southwestern Sokoto basin. There is no comprehensive detail on groundwater conditions in the Illo formation. The previous investigation shows that it is an extremely porous coarse sand and fine gravel aquifer, under sub-artesian environments and containing groundwater of good quality [13]. At Birnin kebbi the Illo aquifer seems to be hydraulically continuous with the artesian aquifer in the Rima group. The potentiometry analysis implied that water moves southward from the Rima aquifer into the aquifer of the Illo Group, which in turn discharges into the lower reaches of the River Sokoto and River Niger [13]. The Illo aquifer encountered at Mungadi contained 242.01 m of coarse sand and fine pebbles with some clay that resembles the upper portion of the Illo group in exploratory borehole GSN 3707 [13]. This unit perhaps combined near Birnin kebbi into a corresponding thick segment (from 111.25 to 305.71 m in borehole GSN 2484) of fine to coarse sand of the Rima group. It was interpreted here as representing a deltaic deposit that develops finer-grained northward away from the source area. Between a depth of 268.83 m and bedrock at 388.92 m, borehole GSN 3707 crossed an impenetrable unit of clay intermixed with grit that resembled either to the lower part of the Illo group or perhaps to the Gundumi formation [13].

2.3 Land use

Numerous trans-human herds of cattle owned by Fulani graze extensively in both the fallow farmland and uncultivated areas. Shifting cultivation was common in upland areas, but with increasing population and urbanization, it is no more practiced [1]. At locations where surface water is easily accessible, settlements have been established which are associated with permanent cultivation, along the Fadama (floodplain), both during and after the rainy season [1]. Traditional Shadoof irrigation farming is widely practiced near floodplain areas or where shallow groundwater is available. Western Sokoto basin is currently the rice basket of Nigeria, irrigation farming being the primary economic activity. The increase in irrigation farming coupled with urbanization as well as poor sewage disposal posed a threat to water quality.

Land use (LU)/land cover (LC) in the study is comprised of thirteen (13) classes: dense grassland, forest zone, open grazed grassland, grassy fallow, open grain fallow farmland, open cultivation, rice paddies, pepper farms, sugarcane farmland, scrubland, barren dryland, wetland/floodplain, and sand lodes [39]. Forty percent (40%) of land use in the study area is under cultivation, fallow (22%). Noncultivable or degraded land constitutes 27%, and forested areas constitute 11%. Expansion of farmlands and pervasiveness of grazing are major causes of forest lost in Sokoto basin. Land use changes in the study area are reflection of increasing human activities and effects of climate change [39]. These changes suggest underutilization of cultivable areas which have impact on hydrology, soil, and biodiversity with grave consequences for food security and livelihood [39].

3 Materials and methods

3.1 Sampling, and laboratory analysis

Sampling wells were selected from 40 locations. Twenty (20) water samples were collected, each from Gwandu and Illo aquifers. In situ analysis of physical parameters comprising of pH, temperature, electrical conductivity, and TDS were conducted. Water quality probes (conductivity/TDS meter, DIST; pH Meter, pHep; and temp/salinity-meter) were used. The water quality meters were calibrated using deionized water and followed by water from the sampled boreholes. Separate groundwater samples were taken using 1liter plastic containers. These were analyzed in the laboratory. Insulated containers were used to store water samples with controlled temperatures < 5 °C. The bottles were rinsed using deionized water and dried before water samples were taken. Groundwater water samples were filtered through a “Whatman Polycap GW encapsulated filter (POLYCARP GW 75, 0.45 μm, polyethersulfone)” [65].

The entire analysis was conducted within 24 h. Consequently, preservative was not added. The cations comprising of calcium (Ca2+), magnesium (Mg2+), sodium (Na+), potassium (K+), iron (Fe3+), zinc (Zn2+), and copper (Cu2+) were analyzed using atomic absorption spectrometry (ST-AAS 7000 SERIES). Nitrate (NO3) and phosphates (PO43−) were analyzed using automated colorimetry (San++automated wet chemistry analyzer—continuous flow analyzer (CFA)). Chloride and HCO3 were analyzed by Titration—HC1 0.02 [65]. Sulfate was determined using iron chromatography (Metrohm: ADVANCE MODULAR IC). The entire analyses were conducted in triplicates. Results were found reproducible within the error limit of ± 5%. The raw data matrix is presented in Table 1.

Table 1 Physicochemical composition of groundwater in Gwandu and Illo Geologic formations, Western Sokoto Basin

3.2 Water quality for irrigation use

The suitability of groundwater for irrigation was assessed employing irrigation water index notably sodium adsorption ratio (SAR) as summarized in Table 2. SAR is an operative index for the assessment of alkali and/or sodium hazard to crops [15]. The SAR values are plotted versus electrical conductivity (EC). This technique was first used by US Salinity Laboratory Staff [105]. The SAR index can be applied to rate irrigation water and evaluate its suitability for irrigation usage [108, 109]. This is essential since soil permeability can be lessened by Na+ reaction with soil. Under wet conditions, cation exchange between Mg2+ and Ca2+ can be triggered by high Na+ concentrations which subsequently reduce water and air circulations in the soil. SAR is defined:

$${\text{Na}}^{ + } /\sqrt {{\text{Ca}}} \, + {\text{Mg}}/2$$
(1)
Table 2 Schoeller index (Si), molar ratio (MR), and sodium adsorption ratio (SAR)

3.3 Rock weathering and ion exchange process

The ion exchange process was evaluated using the Schoeller index [94]. Positive values suggest chloro-alkaline equilibrium base-exchange reaction, which occurs in groundwater aquifers where K+ and Na+ are exchanged with Ca2+ and Mg2+. The negative values indicate a choro-alkaline disequilibrium base-exchange reaction (Table 2). However, the Na/Cl molar ratio was also applied to study silicate weathering [75]. Values greater 1 suggest silicate weathering as the source of Na+ in groundwater, in the absence of anthropogenic inputs. It is defined as:

$${\text{Cl}}\left( {{\text{Na}} + {\text{K}}} \right)/{\text{Cl}}$$
(2)

3.3.1 Geochemical modeling

Examining the thermodynamic mechanisms on the hydrochemical composition of aquifers and calculation of equilibrium species is carried out using PHREEQC [2, 14, 20, 22, 27]. Results offered saturation indices of rock minerals. The saturation index of a mineral can be computed as:

$$\mathrm{SI}={\mathrm{log}}_{10}\left(\frac{\mathrm{IAP}}{{K}_{\mathrm{T}}}\right)$$
(3)

where the effect of ion activity of the water rock-mineral reaction is IAP, and the constant of thermodynamic equilibrium corrected to water (sample) temperature is KT. The saturation index (SI) was computed using PHREEQC interactive, version 3.5.0—14000. Table 3 summarizes the saturation indices of rock minerals.

Table 3 Summary of SIs derived from geochemical modeling with PHREEQC

3.4 Statistical analysis

3.4.1 Correlations and analysis of variance

Pearson’s correlation analysis was applied to study the relationship between hydrochemical parameters. Several sample tests ANOVA (i.e., Kruskal–Wallis test) were applied to test the variability of hydrochemistry of the two geologic environments (Tables 3, 4). The Kruskal–Wallis test makes available for assessing numerous autonomous random water samples. It is used as a nonparametric substitute for the one-way ANOVA. The measurement for k samples, for each of size ni, is computed:

$$T=\frac{1}{{S}^{2}}\left[\sum \frac{k}{i=1}\frac{{R}_{i}}{{n}_{i}}-N\frac{{(N+1)}^{2}}{4}\right]$$
(4)

where N = sum of all observations (all ni) and Ri = total of the ranks (of the entire samples taken) for the ith sample and:

$${S}^{2}\frac{1}{N-1}=\left[\sum_{\mathrm{all}}{R}_{ij}^{2}-N\frac{{(N+1)}^{2}}{4}\right]$$
(5)

The Ho of the analysis assumed that the entire k distribution functions are the same. The H1 assumed that one of the observations tends to produce a bigger score over at least one of the other observations [21, 70].

Table 4 Physicochemical parameters of groundwater (bold values did not follow The NSDWQ and WHO reference guidelines)

3.4.2 Factor analysis

Analysis of hydrochemical data is a multivariate problem. Factor analysis (FA) was used to examine the interconnections among the hydrochemical variables. Factor analysis classifies enormous and convoluted datasets by defining an insignificant number of variables that illuminate for ultimate variance within an original set of data. Factor analysis was conducted on a subset of 18 chosen elements (temperature, EC, pH, TDS, TH, K+, Na+, Ca2+, Cu2+, Fe3+, Zn2+, Mg2+, Cl, HC03, CO32−, PO43−, NO3, SO42−) as contained in Table 1.

3.4.3 Hierarchical cluster analysis

Hierarchical cluster analysis (HCA) was applied to gain ultimate insight of hydrochemistry of groundwater by classifying the sampled boreholes into distinct clusters [16, 19, 65]. This technique of clustering is beneficial for not needing any prior hypothesis of the clustering or number of clusters. In grouping, boreholes having similar hydrochemistry or else boreholes having different hydrochemical properties cluster into distinguishable collections. The Ward’s-algorithmic technique was used. It is deemed as a very strong tool for clustering. The technique is capable of curbing the perverting influence or sum of squared distances of centroids between two theoretical groupings created at each step. Therefore, applying factor scores into HCA is an outstanding procedure for analyzing data by simplifying groups into a more communicative manner, despite the unfamiliarity of some hypothetically significant hydrochemical data. However, this technique does not account for the authenticity of hydrochemical data and disconnected values. There are neglects of credible and possible connections or resemblances (statistical interference) between variables that are somewhat clear in most hydrochemical data. As a result, the output would have been inevitable to manipulation and not be considered as complete hydrochemically meaningful data. Therefore, only raw data were included in the HCA. It enables a thorough examination of each grouping and real condition (i.e., no statistical interfering) of hydrochemical data can be achieved [65].

4 Results and discussion

The hydrochemical composition of groundwater in Gwandu and Illo formations is summarized in Table 4. The physical parameters (Temperature, EC, and TDS) showed a significant difference between geological formations. However, hardness did not correspond to geological variability. The temperature level was generally high in both Gwandu and Illo aquifers (\(\overline{x}\) > 25 °C). Water temperature tends to be closely associated with EC; the later rises by 2% with an elevated temperature level of 1 °C [107, 109]. Temperature erraticism between 5 and 10 °C in gravity flow water affects TDS levels, which eventually disturbs pH level, speciation, redox reaction, complexation, sorption activities, and solubility of gasses. To a groundwater analyst, EC is a parameter of considerable importance, since it is often related to the ionic content of water which informs the range into which ions concentration in water is likely to fall.

Groundwater is more acidic in the Illo aquifer (\(\overline{x}\) pH ≥ 4.2). In the eastern section of the Sokoto basin and the south, the most acidic water was discovered [13]. Aquifers in this area are characterized by a low TDS level (28–79 mg/l). Sulfate is the major anion, which is derived from pyrite mineral oxidation [13]. This process accounted for the acidity of the water in the basin. The result obtained from geochemical modeling (saturation indices) showed the undersaturation of pyrite minerals in both Gwandu and Illo aquifers (Table 3). The variability of physical parameters is further shown in Fig. 4.

Fig. 4
figure 4

Variability of physical parameters; a temperature; b electrical conductivity; c pH; d total dissolved solids; and e hardness

4.1 Classification of groundwater

Total dissolved solids (TDS) and total hardness (TH) were used to classify water and assess its aptness for ingestion [33, 93]. Results have shown that groundwater is suitable for drinking based on TDS (Table 5). However, classification based on EC showed 55% of groundwater samples from Gwandu aquifer fall into Doubtful-Unsuitable Class. In contrast, 95% of groundwater samples from the Illo aquifer fall into Excellent-Good Class [23]. Aquifers having the total hardness in the range of 0–75 mg/l are classified as soft [93].

Table 5 Classification of groundwater based on EC, TDS, TH, chloride, and nitrate

However, soft waters (i.e., hardness < 80 mg/l) tend to have a low buffering capacity and can be more corrosive to water pipes. Depending on pH and alkalinity, hardness above 200 mg/l can result in scale deposition, particularly on heating. Several environmental and analytical epidemiological studies have revealed a statistically significant inverse relationship between drinking hard waters and cardiovascular illness [41, 61, 81]. However, there are some indications that very soft waters may have a serious effect on mineral balance [18, 24], though detailed investigations are needed for additional evaluation [110].

4.2 Groundwater chemistry

Calcium and potassium were outstanding elements in Gwandu aquifer (Fig. 5). Although K+ is not limited in drinking water, a higher concentration is associated with toxicity [111]. Sodium differs significantly between the two geologic environments, and like K+, it is not limited in drinking water. It is a nutritional requirement, which is monitored for its joint effect with SO42−. Since drinking water having high Na+ consumption can be associated with hypertension, the risk of being hypertensive is higher among people deriving drinking water from the Illo aquifer. Calcium concentration differs significantly (Table 4). Higher concentrations of Ca2+ in drinking water have some health benefits; elevated Ca2+ and Mg2+ in aquifers are associated with hardness. Like Ca2+, Mg2+ is an indispensable dietary requirement ~ 0.3 – 0.5 g/day. High ingestion is not accompanied by any adverse health threat. But some incidental health effects may be caused when considered in conjunction with sulfate [55, 89]. The importance of Ca2+ in hydrochemical analysis relates to hardness. Calcium is found naturally in various environmental settings and occurs widely in groundwater aquifers. Dissolved calcium hydroxide forms soda and hydrogen gas. It typically occurs when CO2 is freed, resulting in the development of carbonic acid, affecting Ca2+ compounds. The significance of Mg2+ is that it constitutes a second major component of hardness (CaCO3). Dolomite and magnesium carbonate are primary sources of Mg2+ in aquifers [26, 72, 89]. Copper and Fe3+ concentrations differ significantly. High Cu2+ ingestion is not connected to any health threat, as healing dosages of 20 mg/l are sporadically allowed. Similarly, high Fe3+ ingestion is not associated with any serious health risk. In natural waters, Fe3+ concentrations may range from 0.5 to 50 mg/l [53, 88]. Zinc concentration also differs significantly; in the Illo aquifer, mean Zn2+ exceeds WHO and NSDWQ reference guidelines.

Fig. 5
figure 5

Variability of chemical parameters; a potassium; b sodium; c calcium; d copper; e iron; f Zinc; h magnesium; h chloride; i carbonate; j bicarbonate; k phosphate; l nitrate; and m sulfate. Note: The entire ionic concentrations are in mg/l

Excessive intake can be associated with emetic effect and elevated levels can be toxic to aquatic animals. Unfavorable taste can be noticed at a concentration level of ~ 4 mg/l. At levels ranging from 3 to 5 mg/l, water may appear opalescent and when boiled can form an oily film [40]. Natural aquifers hardly contain Zn2+ above 1 mg/l. However, Zn2+ concentration can be elevated by the effects of galvanized pipes, and this can inform cadmium elevation from older pipes. Overall, the concentration of cations has been greater in the Illo aquifer. Chloride and SO42− were outstanding anions in Illo and Gwandu aquifers respectively (Table 4, Fig. 5). While excessive Cl consumption is not related to serious health risks, at a level above 250 mg/l, a salty taste is noticed. Variations in Cl level (~ 5 mg/l), at a sampling site compared to another sampling point, may suggest contamination of groundwater from sewage, particularly if the NH4 level is also raised. Sulfate is mainly derived from rock minerals; excessive ingestion in drinking water can be connected with emetic effects especially if considered in conjunction with Mg2+ and/or Na+. Carbonate and bicarbonate concentrations differ significantly. When CO32− and HCO3 are joint with Ca2+ and Mg2+, they form carbonate hardness [69]. Similarly, if soil distillates under dry conditions, it advances as CaCO3 or MgCO3. Consequently, Ca2+ and Mg2+ concentrations decrease relative to Na+ concentration and the sodium adsorption ratio (SAR) rises [107, 108]. This causes an alkalizing effect and elevated pH levels in aquifers. When groundwater analysis shows a high pH level, it indicates a high amount of carbonate/bicarbonate ions [44].

Nitrate and PO43− concentrations differ significantly. High NO3 concentration in groundwater can be linked to past anthropogenic activities, such as manure slurries, other organic wastes, and artificial fertilizers. Nitrate is primarily derived from the application of fertilizers and oxidation of NH4. Also, the origin of nitrate can originate from the nitrogen of soil, the NO3 of precipitation and fuel combustion [63, 68, 112]. Similarly, the presence of PO43− in groundwater aquifers can also be linked to anthropogenic activities, since PO43− is increasingly derived from municipal sewage and household chemicals such as detergent. The significance of PO43− is mostly linked to eutrophication of surface water bodies. High PO43− and NO3 in water help plant and algal growths which can lead to a variation of diurnal dissolved oxygen, blooms, and littoral slimes [51, 99]. Groundwater is “Fresh” in Gwandu aquifer based on chloride concentration. However, groundwater from the Illo aquifer falls into the “Brackish Salt-Hyper Saline” class. No severe nitrate pollution was noticed in the study area (Table 5), except in the sampling location (Sp17) under Illo formation.

4.3 Groundwater evolution

4.3.1 Rock weathering and ion exchange process

The relationship between dissolved elements in aquifers indicates the source of solutes and the processes that produced the detected groundwater properties. It is assumed that the dissolution of carbonate produces substantial parts of HCO3, through the action of recharge waters enriched in CO2 derived from the atmosphere [108, 109]. During infiltrating through the unsaturated zone, the rainwater with little dissolved CO2 from air mainly dissolve CO2 from soil which initially derived from air. Thus, the recharging water enriched in CO2 directly deriving from soil [28, 67]. Consequently, a Ca–HCO3 water type is formed once Ca2+ is freed by the disbanding of carbonate ions. Correlations between Ca2+, HCO3, Mg2+, and Na+ provide vibrant evidence relating to the process of the stoichiometry. Table 6 presents a correlation matrix between hydrochemical elements. There is a positive but weak correlation between Ca2+ and HCO3 in Gwandu aquifer (r = 0.25), suggesting Ca2+ was not derived from calcite mineral; in Illo aquifer, the two ions correlate significantly (r = 0.53). However, a very weak positive correlation between Ca2+ and SO42− indicate that groundwater samples are far from 1:1 line, further suggesting that Ca2+ was not derived from gypsum [19]. Calcium is derived naturally from many solid rocks, mainly limestone, dolomite, and gypsum [108, 109]. A charge balance is expected to occur between cations and anions when HCO3, SO42−, Ca2+, and Mg2+ are derived from calcite. Groundwater in the Sokoto basin is deficient of [Ca2+ + Mg2+] relative to [HCO3 + SO42−], and [HCO3 + SO42−] relative to [Ca2+ + Mg2+] suggesting possible leaching of these ions from landfills, municipal sewage, and industrial effluents. Thus, excess positive charge between Ca2+ and Mg2+ must be balanced by Cl, the only anion. Significant correlations between TDS and Mg2+ (r = 0.70), TDS, and NO3 (r = 0.57) in Gwandu aquifer, suggest that TDS in Gwandu aquifer is derived from dissolution of Mg2+ and NO3 ions.

Table 6 Pearson’s correlation (r) of physicochemical data (a) Gwandu formation and (b) Illo formation

Likewise, TDS correlates significantly with Ca2+ in the Illo aquifer and correlates weakly but positively with CO32− (r = 0.39), HCO3 (r = 0.40), and NO3 (r = 0.34), suggesting TDS was derived from dissolution of Ca2+, CO32−, and SO42− ions. A significant correlation between TDS and Ca2+ explained the hard water (20%) in Illo and moderately hard water (30%) in Gwandu aquifers. The TH correlates significantly with Ca2+ in Gwandu (r = 0.91) and weakly correlated with Mg2+ (r = 0.41) and Fe3+ (r = 0.34). Hardness is controlled by many factors such as a geochemical evolution of groundwater, outflow from adjacent formations, and sediment/rock composition. Possible anthropogenic control on hardness includes saltwater intrusion induced by pumping and irrigation return flows [52].

4.3.2 Sodium-chloride ratio

The mechanism for obtaining salinity in arid and semiarid environments can be identified using the relationship between Na+ and Cl to evaluate the process of silicate weathering [75]. A uniform concentration of Na+ and Cl in groundwater aquifer is obtained through the dissolution of halite. The positive correlation between the two ions suggests that Na+ is derived from halite. Basic Na+ is correlated to class 2 water hazard, i.e., elevated Na+ concentrations in potable water are linked to health hazards. Nevertheless, NaCl poses slight or no danger and is linked to a Class 1 water hazard. The implication of regulating Na+ in water is its joint impact with SO42−. Usually, Na+ levels in aquifers depend on the attending anion [100]. Accordingly, 60% of water samples derived from Gwandu aquifer have molar ratios greater than 1. Correspondingly, 75% of groundwater samples derived from Illo Formation have a molar ratio greater than 1, suggesting silicate weathering as the basis for Na+. It is important to understand that cation exchange between Na+ and Ca2+ or Mg2+ may cause high levels of Na+ in aquifers. If an aquifer has a molar ratio above 1, it signposts absence of Mg2+ + Ca2+ which is equivalent to Ca2+–Na+ cation exchange process. Thus, soft water can be formed. Aquifers having clay mineral and Na+ resulting from the exchangeable sites can exchange with Ca2+ and Mg2+ and initiates higher Na+ levels.

The ion exchange process between rock mineral and groundwater during recharge or transit and residence time was further evaluated using the Schoeller index (Si) [94]. The Si values tend to be positive if Na+ and K+ exchange with Ca2+ and Mg2+, suggesting chloro-alkaline equilibrium. The computed values of Schoeller indices are presented in Table 2. Chloro-alkaline disequilibrium is indicated by the negative Schoeller index. The indices were positive in both Gwandu and Illo aquifers, indicating overall base-exchange reaction. In groundwater aquifers having chloro-alkaline equilibrium, the alkaline earths are exchanged with Na+ ions(HCO3 > Mg2+  + Ca2). These types of aquifers are classified as base exchange soft water. However, aquifers in which Na+ ions are exchanged with alkaline earths (Mg2+  + Ca2+  > HCO3) are classified as hardened water [108, 109].

4.3.3 Hydrogeochemical facies

The evolution of groundwater is largely dependent on the geological properties of the aquifer rock minerals in the absence of anthropogenic inputs [109]. Piper trilinear diagram is used to classify groundwater base on the basic geochemical properties of the ionic concentrations. Results showed that the alkaline earth (Ca + Mg) exceeds alkalis (Na + K) in three sampling sites over Gwandu formation; the alkalis exceed alkaline earth in 17 sampling locations (Table 7). The strong acids exceed weak acids in all the 20 sampling locations. However, the alkalis exceed alkaline earth in the Illo aquifer; the strong acids exceed weak acids in 16 sampling locations.

Table 7 Groundwater characterization following Piper [87] trilinear diagram

The Piper [87] trilinear diagram (Fig. 6) revealed a Ca–Mg–HCO3 water type with mixed Na–Mg–Cl water type in Gwandu aquifer; Na–Cl–HCO3 and mixed Cl–CO3–HCO3 in the Illo aquifer. Groundwater in the Sokoto basin is chiefly of two facies: Ca–Mg–HCO3 and Ca–Mg–SO4–Cl. The facies conceivably are resultant of the dissolution of Ca2+ and Mg2+ carbonates ions [12].

Fig. 6
figure 6

Piper trilinear diagram showing hydrogeochemical facies of groundwater

4.3.4 Gibbs diagram

The mechanism controlling groundwater chemistry was also assessed using Gibbs's plot. The model is a plot of weight ratio of TDS versus [Cl]/[Cl + HCO3] and [Na + K]/Na + K + Ca] for anions and cations (Fig. 7). Rock weathering is the major mechanism controlling the hydrochemistry of aquifers in both Gwandu and Illo aquifers. Current findings concur with Gibbs [45]. Water bodies in semiarid regions of the world drive their salts from soils and rocks of their basins. Their outlook in this group is dependent on climate and topography and the configuration of the rock material in their respective basins [45, 73]. The lithology of the study area is mainly comprised of sands with interbedding of clay layers of diverse textural classes superimposing a Crystalline Basement Complex formation [59, 83].

Fig. 7
figure 7

Gibbs plot showing major natural mechanisms controlling groundwater chemistry

4.3.5 Saturation index of rock minerals

The supersaturation of primary minerals or secondary mineral precipitation is indicated by positive SI values. In contrast, negative SI values indicate the dissolution of minerals or undersaturation. An equilibrium condition is indicated by SI of ± 0.5 [2, 27]. Table 3 summarized saturation indices (SIs) derived from geochemical modeling using PHREEQC (version 3.5.0.14000). The SI values for minerals in the study area are characterized by significant differences in chrysotile, goethite, gypsum, H2(g), H2O(g), H2S(g), illite, and sepiolite.

4.3.5.1 Carbonate minerals

Precipitation of CaCO3 is derived from variation in pH since carbonate mineral dissolution occurs consequent of changes in HCO3 and pH. Carbonic acid is taken up and in a closed system not replaced as the dissolution continues in the outside system. The SIs for Gwandu and Illo aquifers for the carbonate minerals showed values for dolomite and calcite are in a state of equilibrium. However, the SI values for aragonite are undersaturated (Fig. 8a). Significant differences in the SIs values for the carbonate minerals aid in identifying the potential discharge/recharge zones [2, 27].

Fig. 8
figure 8

Saturation index of carbonate minerals, a aragonite, calcite, and dolomite, b saturation index of silicate minerals chalcedony, quartz and SiO2, and saturation index for aluminosilicates, c Ca-montmorillonite, gibbsite, K-feldspar, K-mica, and kaolinite

4.3.5.2 Silica

Dissolved silica can reach amorphous [SiO2(a)], cryptocrystalline (Chalcedony: CHAL), or crystalline (quartz: QTZ) form. The SI values for Gwandu and Illo aquifers (Fig. 8b) showed that the amorphous form is undersaturated with slight saturation of crystalline form. The SI values for cryptocrystalline form and mineral quartz (SIQTZ) show undersaturation. The SI values for the silica mineral are in the following order: \({\text{SI}}_{{{\text{SiO}}_{{2}} ({\text{a}})}}\) > SICHAL > SIQTZ (crystalline > cryptocrystalline > amorphous) in the Gwandu aquifer; \({\text{SI}}_{{{\text{SiO}}_{{2}} ({\text{a}})}}\) > SIQTZ > SICHAL (amorphous > crystalline > cryptocrystalline >) in the Illo aquifer. At the higher limit of dissolved silica content of natural groundwater aquifers, a metastable phase can be found for most low-temperature processes [19, 27]. The high solubility of silica at low temperatures is limited by amorphous silica instead of quartz.

4.3.5.3 Aluminosilicates minerals

The consistent dissolution of amino-silicate minerals in aquifers is one of the primary weathering reactions. The secondary mineral is derived from the conversion of primary mineral. The release of cation and silicic acid is consequent of the structural breakdown of amino silicates. Consequently, alkalinity is divulged to the dissolved phase derived from the bases of the minerals. The Al is typically preserved at the time of reaction; the solid deposit tends to have an elevated Al content greater than the primary silicates. Amino-silicate mineral dissolution in aquifers is significantly affected by the chemically hostile nature of groundwater [27]. The SI values for secondary minerals (Fig. 8c are in the following order: K-mica > K-felspar > kaolinite > Ca-montmorillonite > gibbsite in the Gwandu aquifer; K-mica > kaolinite > K-Feldspar > gibbsite > Ca-montmorillonite in the Illo aquifer, respectively. The SI values for gibbsite are more variable than K-feldspar suggesting the discrepancy of rock weathering [27].

4.4 Detection of potential discharge and recharge zones

Sampling sites having positive SI values for gibbsite show the initial phases of rock weathering, indicative of recently recharged waters [27]. However, sites having positive SI values for K-feldspar show severe phases of rock weathering, which is typically reached by the prolonged residence time of the water in the aquifer. This can be used as an indicator of the discharge zones (Table 8). Sampling locations Sp2, Sp4, Sp8, Sp10, Sp11, and Sp13 as well as Sp7, Sp10, Sp11, Sp15, and Sp19 showed positive SI values for gibbsite, indicative of potential recharge zones over Gwandu and Illo formations. All the sampling locations in both Gwandu and Illo aquifers showed positive SI values for K-feldspar, indicative of groundwater discharge. Aquifers of Sokoto basins received recharge from the outcrop areas and discharges water at some locations particularly along with the floodplain areas of rivers draining the Sokoto basin or deep valleys.

Table 8 Identification of recharge/discharge sites by saturation indices

4.5 Multivariate analysis

4.5.1 Factor analysis

The result of FA comprising of the loading scores, percentages, and eigenvalues of the total variance is presented in Table 9. The abstraction of five Factors was based on the percentage of variance accumulated. It included a percentage above 70% [65, 66]. The five factors explained 71.62% and 77.62% of the total variance in Gwandu and Illo formations, respectively. Based on the scree test, the five factors having typical factor loadings implied five different noticeable contributions were involved in governing the hydrochemistry of aquifers in the study area. Factor 1 explained 19.70% of the total variance in Gwandu aquifer. It had high positive loadings on EC, Cl, Mg2+, and PO42−, suggesting a strong geological and anthropogenic influence on groundwater. Substantial amounts of PO42− can be derived from household chemicals (e.g., detergents). Chloride is increasingly being added to the environment from sewage contamination and water softeners [36, 57, 62, 113]. Similarly, in the Illo aquifer, Factor 1 explained 21.10% of the total variance. It had high positive loadings on Na+ and Cl. Thus, it can be associated with both geological and anthropogenic effects. Factor 1 had eigenvalues of 3.35 and 3.59, respectively, indicating the greatest percentage relative to the remaining factors (Fig. 9).

Table 9 Factor analysis scores (Varimax rotation) of physicochemical parameters
Fig. 9
figure 9

Scree plot a Gwandu formation and b Illo formation

Factor 2 explained 14.97% and 20.87% of the total variance in Gwandu and Illo aquifers, respectively. It had significant loading on K+ in Gwandu aquifer and hardness, K+, and CO32− in the Illo aquifer. This factor can be linked to rock weathering. However, the observed negative loading on pH in this factor is deemed realistic since pH attained a converse relationship with ions of carbonate origin [65, 104]. The third factor explained 13.12% and 14.33% of the total variance. It had strong positive loadings on Ca2+ and TH in Gwandu aquifer and EC and TDS in Illo aquifer. Factor 4 had high positive loadings on HCO32− in Gwandu aquifer and Zn2+ and SO42− in Illo aquifer. These components are supposed to be divided by the two fractional contributions. The first (Ca2+ and Zn2+) was connected to rock weathering. The second was connected to derivatives from anthropogenic sources, since SO42+ can be derived from both geologic and anthropogenic sources.

Using a scatter plot, groundwater parameters showed a marked spatial variability and cluster well along with the bands of the two geologic environments. Factors 1 and 2 joined together explained 34.67% and 41.97% of the total variance in Gwandu and Illo aquifers, respectively (Fig. 10a). Despite the differential in geological settings, groundwater is primarily controlled by rock weathering. The results are notable since the parameters formed a relatively tight cluster around the geological environments. All the analyzed variables (or physicochemical parameters) are visible on the biplots, even though the parameters were chosen based on their absolute size(s) (i.e., high elemental concentrations). It is established by reference to the raw data matrix. So, the importance or otherwise of these elements can be recognized from this biplot. Though a good grouping is observed in the biplot of Factors 1 and 2, the biplot of Factors 2 and 3 (Fig. 10b) indicates a wide dispersity of groundwater parameters especially under Illo formation, making pattern identification difficult.

Fig. 10
figure 10

Principal component analysis a biplot of PC 1 and b PC 2 and PC2 and PC3

4.5.2 Hierarchical cluster analysis

The use of HCA in the hydrochemical analysis was confirmed to be logical by discerning hydrogeochemical data that behaves inversely. Using HCA, the sampling boreholes having similar hydrochemical properties were grouped into a separate cluster [19, 20, 37]. The graphics collections of the grouping process were offered as a dendrogram (Fig. 11a, b). Figure 11a is comprised of boreholes under Gwandu formation. The first cluster (or group) contained boreholes with analogous concentrations of elements such as temperature, Na+, NO3, SO42−, pH, and PO43−. Group 2 is comprised of the borehole with comparable concentrations of EC, TDS, and Mg2+.

Fig. 11
figure 11

The dendrogram was produced from cluster analysis based on the sampling wells to recognize the major hydrogeochemical physiognomies in the western Sokoto Basin

Group 3 is comprised of wells with the similarity of TH, Ca2+, K+, Fe3+, Cl, Zn2+, CO32−, Cu2+, and HCO3. Likewise, in the Illo aquifer, boreholes with comparable concentrations of temperature, pH, EC, and TDS constituted Group 1. Group 2 is comprised of boreholes having similar concentrations of TH, Ca2+, K+, Cl, Na+ Cu2+, Mg2+, and Fe3+. Group 3 is comprised of boreholes having similarities of Zn2+, SO42−, CO32−, HCO3, PO43−, and NO3. This has further confirmed the impact of geological variability on the hydrochemical composition of groundwater. The clustering of hydrochemical parameters corresponded to geological variability.

4.6 Suitability for irrigation use

The USSL diagram (Fig. 12) showed that 40% of groundwater samples from Gwandu aquifer fall in low sodium-low-salinity class, 5% fall in low sodium-medium-salinity class, 35% fall in low-sodium high-salinity class, and 20% fall in low sodium-very-high salinity class. Ninety percent (90%) of water samples from the Illo aquifer fall in low sodium-low-salinity class, 5% fall in low sodium-high-salinity class, and 5% fall in high sodium-high-salinity class. Groundwater in the study area can be used for irrigation with little or no risks of salinity hazard to crops. It has no risk of exchangeable Na+ [105]. However, very low SAR and low salinity irrigation water (less than 200 µS m−1) disturbs the rates of water permeation into soils [48]. Thus, an evaluation of the permeability index may be required.

Fig. 12
figure 12

Irrigation water classification based on USDA diagram

5 Conclusion

The literature is concordant on the implication of understanding the hydrochemistry of groundwater aquifers. Evaluation of the hydrochemistry of Gwandu and Illo aquifers showed a significant difference in physicochemical parameters of water quality and mineral facies of rock weathering. Results obtained from this study increased one’s knowledge of how geological variability can influence the hydrochemistry of groundwater aquifers. The study found that the physicochemical parameters showed a significant difference between Gwandu and Illo formations. Groundwater classification based on physicochemical parameters revealed water of acceptable quality for drinking. The dominance of rock weathering is apparent as revealed by geochemical modeling and statistical analysis. Chrysotile, goethite, gypsum, H2(g), H2O(g), H2S(g), illite, and sepiolite minerals differ significantly between Gwandu and Illo formations. However, the SAR level was generally low. Thus, serious environmental problems might be expected with prolonged applications of these waters in irrigation fields. This study highlights the importance of understanding groundwater chemistry over different geological environments, using combined statistical techniques and geochemical modeling to show how geological variability can influence the hydrochemistry of aquifers. Hence, we hope that the findings from this study will stimulate others to an analogous method in a future study, especially those in arid and semi-arid environments.