Introduction

As it is in Tanzania, so is the fact in the rest of world that groundwater forms alternative sources of water for domestic, industrial, and agricultural uses owing to the progressively worrisome levels of contamination and pollution of surface water resources (Egbueri 2019a). Hydrogeochemical signatures and facies are powerful tools for gathering hydrogeological and hydrological information for unravelling the nuances of groundwater uses and water resources management challenges (Calmels et al. 2011; Kim et al. 2014; Marc et al. 2016). Groundwater chemical composition represents hydrogeochemical facies and signatures which can be used to decipher hydrogeological and hydrological processes taking place in any aquifer basin. Reportedly, the hydrogeochemical signatures can be useful for identifying varying groundwater flows in a basin (Bonzanigo et al. 2001; Cervi et al. 2012; Marc et al. 2016; Mussa et al. 2020a). The signatures can as well be used for water quality appraisal to evaluate their suitability for drinking and other purposes (Egbueri 2019a, b; Mgbenu, and Egbueri 2019). Such studies, albeit scanty, constitute an integral part of modern groundwater investigation techniques. Arguably, groundwater passing through hard consolidated (e.g., Igneous) rocks usually dissolve very little amount of minerals and thus the mineral constituent is expected to be low. On the contrary, sedimentary rocks provide more ions to groundwater because they are relatively more soluble than the hard rocks (Vallet et al. 2015). The processes in the two different geological settings can also be amplified by the respective climate.

Studies on hydrogeochemical analyses, spatial and temporal variations, and their relationships with the atmospheric and geological environments through which it circulates are thus scientifically imperative in unravelling hydrological and hydrogeological processes in water basins. To that effect, this study applied hydrogeochemical facies and signatures to inform short-term and long-term groundwater management actions and strategies. Hydrogeochemical characterization and assessment of groundwater quality is equally imperative for understanding water types and classifying groundwater uses (Mussa et al. 2019, 2020b). It is also important in fostering policy formulation for water resources management and groundwater pollution abatement strategies.

Interest on the use of hydrogeochemical facies and signatures for groundwater classification has increased as evidenced by previous hydrogeochemical studies in Africa and elsewhere in the world (Koh et al. 2005; Liu et al. 2015; Madhav et al. 2018; Marandi and Shand 2018; Sheikhy Narany et al. 2014; Srinivas et al. 2017; Tay et al. 2017; Varol and Köse 2018). In addition to assessing water quality for groundwater monitoring and pollution abatement, hydrogeochemical signatures and facies are useful tools for prospecting the origin of groundwater, groundwater provenance and recharge and the source of groundwater mineral constituents (Marc et al. 2016). Groundwater evolution and chemical constituents are influenced by a multitude of factors. As water moves through the soils and sediments its composition is altered by processes such as weathering, dissolution, leaching, precipitation, and ion exchange. Agricultural activities and urbanization also affect the quality of groundwater (Al-Ahmadi 2013). Further to that, chemical composition of groundwater is related to soluble products of rock weathering and decomposition, and can reveal changes of those processes with respect to time and place (Guglielmi et al. 2000; Guglielmi et al. 2002; Vallet et al. 2015). Inevitably, the use of a combination of hydrogeochemical facies and signatures is needed to disband this information utilizing aquifers with contrasting climate and geology in Tanzania as case studies because different groundwater systems result into occurrence of different water types and hydrogeological facies and signatures.

One type of water based on hydrogeochemical facies and signatures may be suitable for one purpose but unsuitable for another. However, excessive concentration of dissolved ions in groundwater is undesirable for many uses. It does not favour crop irrigation as it affects plants and agricultural soils physically and chemically through lowering of osmotic pressure in the plant’s structural cells. It is neither recommended for human and animal consumption due to associated health risks (Srinivas et al. 2017). While it is ostensibly clear that a multitude of factors control groundwater chemistry, it has always been difficult to single out which among physical disposition of the aquifer, bedrock mineralogy, anthropogenic activities and the climate are peculiarly vital for determining groundwater evolution and hydrogeochemical processes (Narany et al. 2014). To that effect, the hovering knowledge and inadequacy of empirical and scientific evidence forms one of the drivers for the hydrogeochemical investigation of groundwater in the two basins with contrasting climate and geology using hydrogeochemical facies and signatures.

This study therefore sought to update the existing information and fill in the hovering knowledge gaps on groundwater, the occurrence, evolution, paths and movement utilizing two aquifers with contrasting climate and geology. The findings of this study seek to deduce information on sources of groundwater recharge, discharge and residence time using hydrogeochemical facies and signatures. This study further sought to unravel the mechanisms and processes controlling groundwater quality and assess the origin of water using hydrogeochemical signatures to inform short-term and long-term sustainable groundwater management actions and strategies.

Description of the study area

Kimbiji aquifer is part of the Wami/Ruvu Basin (WRB), one of the nine water basins in Tanzania (Fig. 1). With relatively higher long-term mean annual evapotranspiration (approximately 1400 mm/year) than mean annual rainfall (1100 mm/year), the Kimbiji aquifer (Fig. 1b), located in the eastern part of Tanzania towards the Indian Ocean (Fig. 1b and c) is characterized by a humid climate. The Kimbiji aquifer can only experience slight semi-arid conditions from June to October, and then around January. The air temperatures, both maximum and minimum indicate that the area is generally warm. Mean monthly maximum temperatures can be as high as 32 °C, while the lowest mean monthly minimum temperature is 19 °C. This aquifer really occurs in a warm and humid climate as reported recently (Mussa et al. 2020a).

Fig. 1
figure 1

Maps showing the position of study areas relative to the Country and the Water basins

The Singida aquifer, found in the Internal Drainage Basin (IDB), central Tanzania (See Fig. 1a, and c) receives an average rainfall of 500–800 mm annually, and it experiences a unimodal rainfall season, beginning in November until May. The annual evapotranspiration can be as high as 1800 mm per year. Although there are humid months, generally the area is typically semi-arid, with an average aridity index of 0.49 (Mussa et al. 2020b).

Due to a complete absence of rainfall in some months, there can be hyper-arid conditions in the Singida aquifer. The area experiences very high evapotranspiration rates, usually above 100 mm/month throughout the year (Mussa et al. 2020b). Day temperatures range between 25 and 30 °C, while night temperatures may go down to 12 °C. The months of June, July, August and September are the driest of all. Generally, the area falls within the driest zone of the Internal Drainage Basin (IDB), and hence the main source of water is groundwater (deep and shallow wells).

Geology and hydrogeology of the Singida semi-arid fractured aquifer

The Singida aquifer is made up of six major geological units. The units include small lakes denoted as Lk, lineaments extending north–south, north-east, south-west with some branching to south-east and north-west. Other geological units include plutonic rocks consisting of granite and granodiorite, foliated, gneissose or migmatitic. There are also some massive porphiyroblastic, including intimately related regional migmatite. Lithologically, these are of two types, (i) those with topographic rough texture (gs) and strongly weathered granite with smooth topographic texture (gs-b). There is a Nyanzian system (Z) which occupies the central part of the study area, and extends east west, and north-east, which is made up of banded ironstone; metavolcanics; chlorite schist and pseudo-porphyry (Fig. 2). Patches of Cenozoic sediments classified into (N), which are mostly alkaline volcanics in the north, north-eastern central western parts of the Singida aquifer were observed. These are characterized by olivine basalt, alkali basalt, phonolite, trachyte, nephelinenite and pyroclastics and (NI), made up of lacustrine; sand, silt, limestone and tuff, which can be observed in the southern, western and north-western parts of the study area (Fig. 2) and as described in Mussa et al. (2020a, b).

Fig. 2
figure 2

The geology of the Singida aquifer and the lineament system distribution

Hydrogeologically, groundwater occurs in weathered shallow layers and in fissures and fractures of basement rocks. Groundwater occurring in weathered shallow layers has low capacity due to small saturated aquifer thickness and low permeability too. Moreover, a hard pan layer has covered most parts, which considerably decreases infiltration rate, thereby preventing the formation of aquifers. Groundwater occurring in fissures and fractures of basement rocks characterizes long, narrow and isolated reservoirs, which are basically filled up with gravel, sand and other particles with good permeability. In some places of the Singida aquifer, fractures act as expanded water conduits across long distances. Groundwater occurring in joints and cracks of basement rocks in the study area is mostly in confined conditions due to hardpan layer (pressure reaches up to 100 m). Surrounding lands cannot contribute to recharge these aquifers and they are mostly recharged in hilly distant areas as opined by Mussa et al. (2020a, b); Haitjema and Mitchell-Bruker (2005) and Gleeson et al. (2011). The Singida semi- arid fractured basement aquifer is made of complex water sources and this is reflected in the acquired water quality data as it will be discussed in the forthcoming sections.

The geological and hydrogeological setting of the Kimbiji aquifer

On the other hand, the Kimbiji aquifer comprises of Beach sand dune (b) and fluvial deposits (r1), which are younger (Quaternary) than any other geological units in the Kimbiji aquifer. Further, The Kimbiji aquifer is also made up of Terrace deposits (Nt) and Fluvial marine sand (Nf), which are of tertiary time scale. There are also fringes of continental and marine sandstone (C) in the Cretaceous age (Fig. 3).

Fig. 3
figure 3

The geology of the Kimbiji aquifer

Generally, the geology of the Kimbiji humid, coastal Neogene aquifer is made up of heterogeneous and layered Neogene (Miocene) sands, overlying an assumed geological basement of Lower Tertiary (Eocene) carbonates. From Dar es Salaam and northwards, the Neogene is overlain by thick Holocene deposits, but to the south, Neogene sands are exposed over an area of approximately 10,000 km2 (Kent et al. 1971).

Hydrogeologically, the Kimbiji is covered by an unconfined aquifer in the upper parts and a confined aquifer in the lower parts, with strong artesian flow characteristics of more than 3 l s−1 (Ruden 2007). Based on a recent drilling report of six deep wells in the study area, alluvium and granular materials comprise the upper, unconfined freshwater aquifer, consisting of fine to medium sand that contains varying amounts of silt and clay. The unconfined aquifer is shallow in its southwestern part, with an average thickness of 10 m, but around 50 m deep in the eastern part of the study area. The depth of the water table in the unconfined aquifer ranges from at/or near the land surface in low-lying areas close to the ocean to tens of meters below the surface in areas of higher elevation like Pugu, Chanika and Kisarawe. Arguably, the upper aquifer is of special significance for the present water supply because most of the groundwater used in the study area is withdrawn from this zone.

The lower confined aquifer is comprised mainly of medium to coarse sands, and sometimes gravels and pebbles occur, interbedded with clayey-rich material. There is no obvious lithological boundary between the two aquifer units, apart from the numerous and nearly cyclic sand and marl beds. Consequently, a gradual transition from upper unconfined to lower confined conditions is expected. The average saturated thickness of the aquifer system is around 1,000 m, and the overall flow direction is from west to east, driven by artesian pressure arising from the western hinterland (Bakari et al. 2011). The hydraulic parameters for the Kimbiji aquifer were reported by Mjemah et al. (2011). The upper, unconfined aquifer has average transmissivity and hydraulic conductivity of 34 m2d−1 and 1.58 m/d.

The lower, semi-confined aquifer has an average value of 63 m2d−1 for transmissivity and 2.14 md−1 for hydraulic conductivity. Reportedly, an average elastic early-time storativity for the unconfined is 0.01, while the lower aquifer has an average storativity of 3 × 10−4. These hydraulic parameters reasonably represent the geological formation of the aquifers, as deduced from borehole descriptions, reported in Mjemah et al. (2011).

Materials, methods and approaches

(a) Fieldwork and sampling procedure

Fieldwork was carried out in the two aquifers involving water sampling from precipitation, groundwater (deep), groundwater (shallow), groundwater (spring) and surface water (rivers) for hydrogeochemical analyses to decipher hydrogeochemical facies and signatures in the two aquifers. Physical water quality parameters [i.e., pH, electrical conductivity (EC) and total dissolved solids (TDS)] were measured in situ using HANNA HI 9829 Multiparameter Analyser. pH colour-coded buffer solution (NIST-traceable) of 4.01 ± 0.02, 7.00 ± 0.02, and 10.01 ± 0.02 were used to calibrate the meter before sample reading. Direct measurement method enabled the EC of water samples to be analysed after calibration with 180 ± 10 μS/cm, 1000 ± 10 μS/cm, 1990 ± 20 μS/cm, and 18,000 ± 20 μS/cm Sodium Chloride Standard Solution.

(b) Water sampling and preservation

Standard procedures for water sampling, preservation, transportation, and chemical analyses were conducted as suggested in previous studies (Bakari et al. 2011). Immediately after filtering using 0.45 μm syringe filters, water samples for hydrogeochemical investigation were collected in 0.5L air-tight high-density polyethylene (HDPE) bottles thoroughly washed and cleansed before being rinsed thrice by the sample water. Samples were carried and stored at 4 °C prior to their shipping and analyses at Water Analysis and Testing in Environmental Regions (WATER) laboratory in Iringa, Tanzania. For major ions (cations and anions), samples were collected from deep wells, shallow wells, rivers and springs. Major cations (Sodium, Potassium, Calcium, and Magnesium) and major anions (Chloride, Sulphate, bicarbonate, Nitrate, and Carbonate) were analysed. It was established that for groundwater signatures and facies, the influence of seasons on the same is infinitesimally small (Kammoun et al. 2018b). Arguably, seasons can only affect ion concentrations but not the water type and groundwater hydrogeochemical signature and facies.

Analysis of major ions

Chloride was measured using Ion-Selective Electrode (ISE) Method. An HQ440D Laboratory Chloride (Cl) Ion Meter was used to assess Chloride levels in all test water samples. In either low or high range Chloride measurements, the Chloride Ionic Strength Adjustment (ISA) Buffer was added to samples and standards for minimization of associated errors/interferences. Nitrate analyses were accomplished using Cadmium Reduction Method. Hach DR1900 Portable Spectrophotometer was used to realize Nitrate assessment with NitraVer 5 Nitrate Reagent Powder Pillow. NitraVer 5 Reagent contains Cadmium metal that reduces nitrates present in the sample to nitrite. The nitrite ion reacts in an acidic medium with sulfanilic acid to form an intermediate diazonium salt which couples to gentisic acid to form an amber-coloured product. Sulfate analyis followed SulfaVer 4 Method. Hach DR1900 Portable Spectrophotometer served the analytical activity with SulfaVer 4 Sulfate Reagent Powder Pillows. The method employs reaction of Sulfate ions in the sample with barium in the SulfaVer 4 Sulfate Reagent to form insoluble barium sulfate. The amount of turbidity formed is proportional to the sulfate concentration. The SulfaVer 4 also contains a stabilizing agent to hold the precipitate in suspension.

Calcium analyses involved Flame Emission Photometry using a JENWAY PFP7 Flame Photometer Instrument. Calcium was measured by using the calcium hydroxide band emission at 622 nm and usually give an Orange-coloured flame. Potassium analyses involved Flame Emission Photometry using a JENWAY PFP7 Flame Photometer Instrument. Potassium was measured by using an emission band at 766 nm and gave a Violet-coloured flame. The instrument principle of operation is similar to that of Calcium assessment. As for Sodium, the measurement employed Flame Emission Photometry using a JENWAY PFP7 Flame Photometer Instrument. Sodium was measured by using an emission band at 589 nm and gave a Yellow-coloured flame. Magnesium analyses were based on Calculation Method. Magnesium was estimated as the difference between Total hardness (analysed using Titrette® Bottle-top Burette, a class A robust digital burette, 0.01N EDTA Standard solution with Eriochrome Black-T Indicator, and Ammonia Buffer of pH 10.0 ± 0.1), and Calcium. Equation 1 was used to deduce the amount of Magnesium in a water sample.

$${\text{Magenesium }}\left( {{\text{mg}}/{\text{L}}} \right) = \left[ {{\text{Total}}\;{\text{hardness }}\left( {{\text{mg}}/{\text{L}}} \right) - {\text{Calcium }}\;{\text{hardness }}\left( {{\text{as}}\;{\text{ CaCO}}_{3} \;{\text{mg}}/{\text{L}}} \right)} \right]{ } \times { }0.243$$
(1)

In order for the laboratory results to be reliable, they were checked by Ionic Balance Error (%IBE) as shown in Eq. 2 where concentrations are in milliequivalent per litre (meq/l) and was found to be < 10. This suggests that the analyses are scientifically acceptable.

$$\%\mathrm{IBE}=\left[\frac{\sum \mathrm{Cations}-\sum \mathrm{Anions}}{\sum \mathrm{Cations}+\sum \mathrm{Anions}}\right]x100$$
(2)

Characterization of hydrogeochemical facies using piper (trilinear) diagram

The geochemical evolution of groundwater in the two aquifers was explained by plotting the concentrations of major cations and anions in the piper trilinear diagram as suggested by Piper (1944). The nature and distribution of hydrogeochemical facies was determined by providing insights into how groundwater chemical composition changes within and between the two aquifers. The Trilinear (piper) diagram was also used to graphically demonstrate the relationships between the most important dissolved chemical constituents in a set of groundwater samples. A total of 15 and 9 samples were collected from the Kimbiji and Singida aquifer respectively, with a representative distribution in each study area.

Identification of mechanisms controlling groundwater chemistry

Gibb’s ratios and diagrams were used to identify factors and processes controlling groundwater chemistry, which can be related to the physical situation of the aquifer, bedrock mineralogy and weather/climatic condition. Gibbs (1970) suggested two indices, (i) TDS versus Na+/ (Na+  + Ca2+) for cations and (ii) TDS versus Cl/(Cl + HCO3) for anions to illustrate the natural mechanisms controlling groundwater chemistry. The mechanisms include the rainfall dominance, rock weathering dominance, and evaporation dominance. Gibb’s Indices were calculated using Eqs. 3 and 4.

$${\text{Gibb}}^{\prime } {\text{s}}\;{\text{ratio}}\;{\text{I}}\;({\text{Cations}}) = \frac{{[{\text{Na}}^{ + } ]}}{{[{\text{Na}}^{ + } + {\text{Ca}}^{2 + } ]}}$$
(3)
$${\text{Gibb}}^{\prime } {\text{s}}\;{\text{ratio}}\;{\text{II}}({\text{Anions}}) = \frac{{[{\text{Cl}}^{ - } ]}}{{[{\text{Cl}}^{ - } + {\text{HCO}}_{3}^{ - } ]}}$$
(4)

Assessment of groundwater residence time using hydrogeochemical facies

Determination of groundwater residence time in the Singida and Kimbiji aquifers was carried out using the hydrogeochemical facies proposed by Schoeller (1967). The facies explain the distribution and genesis of principal groundwater types along the water flow paths in the aquifers. These facies also provided important information on the progressive ion enrichment during stay of groundwater on the basis of residence and transit times. They equally provided information on the rock–water interaction. The facies were arranged by taking the ionic percentages in relative decreasing order of their abundances.

The chloro-alkaline indices for assessing cation exchange in the groundwater system

Chloro-Alkaline indices (CAIs) were used to study cation exchange processes between the groundwater and its host environment at stagnancy and/or during groundwater travel (Schoeller 1965; 1977; Liu et al. 2015). The CAIs were also used to understand the changes in chemical composition of groundwater along its flow path. Schoeller (1965, 1977) proposed two CAIs, (CAI-1 and CAI-2). A rule of thumb is, a positive CAI indicates the exchange of Na+ and K+ from the water with Mg2+ and Ca2+ of the rocks (host environment), whereas a negative CAI connotes an exchange of Mg2+ and Ca2+ of the water with the Na+ and K+ of the rocks. The following equations (Eqs. 5 and 6) were used to calculate the CAIs with concentrations expressed as meq/L.

$$\frac{\mathrm{CAI}-\mathrm{I}=[{\mathrm{Cl}}^{-}-\left({\mathrm{Na}}^{+}+{\mathrm{K}}^{+}\right)] }{{\mathrm{Cl}}^{-}}$$
(5)
$$\mathrm{CAI}-\mathrm{II}=\frac{[{\mathrm{Cl}}^{-}-\left({\mathrm{Na}}^{+}+{\mathrm{K}}^{+}\right)] }{{[\mathrm{SO}}_{4}^{2-}+{\mathrm{HCO}}_{3}^{-}+{{\mathrm{CO}}_{3}^{2-}+\mathrm{NO}}_{3}^{-}]}$$
(6)

Assessment of geochemical processes using geochemical signatures

The following geochemical signatures were used to assess the origin of groundwater in the two aquifers as shown in Eq. 7 through 12.

$${\mathbf{HCO}}_{3}^{ - } :{\mathbf{Cl}}^{ - } \left\{ {\begin{array}{*{20}c} { > {\mathbf{1}}{\mathbf{.0}}:\user2{ }{\text{recharge}}\;{\text{upper}}\;{\text{water}}\;{\text{flow}}\;{\text{course}}\;{\text{of}}\;{\text{carbonate}}\;{\text{rocks}}} \\ { < {\mathbf{1}}{\mathbf{.0}}:\user2{ }{\text{Lower}}\;{\text{water}}\;{\text{flow}}\;{\text{course}}\;{\text{of}}\;{\text{carbonate}}\;{\text{rocks}}} \\ { < {\mathbf{0}}{\mathbf{.2}}:\user2{ }{\text{Saline}}\;{\text{water}}\;{\text{and}}\;{\text{brines}}} \\ \end{array} } \right\}$$
(7)
$${\mathbf{Na}}^{ + } :{\mathbf{Cl}}^{ - } \left\{ {\begin{array}{*{20}c} { = {\mathbf{0}}{\mathbf{.876}}:\user2{ }{\text{Seawater}}} \\ { < {\mathbf{0}}{\mathbf{.876}}:\user2{ }{\text{Replacement }}\;{\text{of}}\;{\text{Na}}\;{\text{by}}\;{\text{Ca}}\;{\text{or}}\;{\text{Mg}}} \\ { > {\mathbf{0}}{\mathbf{.7}}:\user2{ }{\text{Loss}}\;{\text{of}}\;{\text{Na}}\;{\text{through}}\;{\text{precipitation}}\;{\text{of}}\;{\text{evaporate}}\;{\text{rocks}}} \\ { > {\mathbf{1}}{\mathbf{.0}}: {\text{Water}}\;{\text{flow}}\;{\text{through}}\;{\text{crystalline}}\;{\text{or}}\;{\text{volcanic}}\;{\text{rocks}}} \\ \end{array} } \right\}$$
(8)
$${\mathbf{Mg}}^{2 + } :{\mathbf{Ca}}^{2 + } \left\{ {\begin{array}{*{20}c} { = {\mathbf{0}}{\mathbf{.5}} - {\mathbf{0}}{\mathbf{.7}}: {\text{Calcium}}\;{\text{carbonate}}\;{\text{rocks}} } \\ { = {\mathbf{0}}{\mathbf{.71}} - {\mathbf{0}}{\mathbf{.9}}: {\text{CaMg}}\left( {{\text{CO}}3} \right)2\;{\text{ rocks}} } \\ { > {\mathbf{0}}{\mathbf{.9}}: {\text{Mg}} - {\text{rich}}\;{\text{rocks}}\;{\text{or}}\;{\text{sea}}\;{\text{water}}\;{\text{mixture}}} \\ { < 0.5: {\text{Ca2}} + {\text{rich}}\;{\text{water}} } \\ \end{array} } \right\}$$
(9)
$${\mathbf{Na}}^{ + } :{\mathbf{K}}^{ + } \left\{ {\begin{array}{*{20}c} { < {\mathbf{15}}:{\text{ Na}} {\text{depleted water}}} \\ {{\mathbf{15}} - {\mathbf{25}}:{\text{Natural recharge area }}} \\ {{\mathbf{50}} - {\mathbf{70}}:{\text{Lower water flow course}}} \\ { > {\mathbf{70}}: {\text{Volcanic rocks}}} \\ \end{array} } \right\}$$
(10)
$${\mathbf{Mg}}^{2 + } + {\mathbf{Ca}}^{2 + } :{\mathbf{Na}}^{ + } + {\mathbf{K}}^{ + } \left\{ {\begin{array}{*{20}c} { > {\mathbf{1}}{\mathbf{.0}}:\user2{ }} & {\user2{*}{\text{Upper}}\;{\text{water}}\;{\text{flow}}\;{\text{course}}} \\ {} & {{\text{*Precipitation}}\;{\text{of}}\;{\text{NaCl}}\;{\text{from }}\;{\text{brine}}} \\ {} & {{\text{*Base}}\;{\text{ion}}\;{\text{exchange}}} \\ { < {\mathbf{1}}{\mathbf{.0}}:} & {\user2{*}{\text{Lower}}\;{\text{water}}\;{\text{flow}}\;{\text{course}}} \\ {} & {*{\text{Reverse}}\;{\text{ion}}\;{\text{exchange}}} \\ \end{array} } \right\}$$
(11)
$${\mathbf{Ca}}^{2 + } :{\mathbf{SO}}_{4}^{2 - } + {\mathbf{HCO}}_{3}^{ - } \left\{ {\begin{array}{*{20}c} { > {\mathbf{1}}{\mathbf{.0}}:\user2{ }{\text{Ca}} - {\text{Cl brines }}} \\ { < {\mathbf{1}}{\mathbf{.0}}:\user2{ }{\text{Normal}}\;{\text{hydrologcal}}\;{\text{cycle}}} \\ \end{array} } \right\}$$
(12)

Statistical analyses

(a) Correlation and principal component analyses

Using correlation and multivariate statistical analysis (e.g., PCA) helped to identify hydrogeochemical processes affecting the major ion chemistry of the two study areas as it was applied in other studies (Wu et al. 2014, 2015). Correlation and principal component analyses were carried out to disclose the relationship between each pair of the physicochemical parameters. In this study, correlation and principal component analyses and other statistical parameters were carried out using R and Excel software.

The linear correlations between hydrogeochemical parameters were assessed by correlation coefficients ranging between − 1 and 1. Arguably, large coefficients reveal the significance of the relationship between two parameters. According to previous researchers (Hamzaoui-Azaza et al. 2009), a positive coefficient articulates similarity and agreement between the correlated parameters, and a negative coefficient exhibits that variables are developing in opposite directions. A correlation analysis for pH, EC, TDS and major ions was performed to describe the relationship between hydrogeochemical parameters in the two aquifers. Correlation analysis was also useful in understanding the chemical reactions occurring in groundwater system (Wu et al. 2014). A correlation coefficient of r ≥ 0.5 is considered a significant threshold.

Principal component analysis of 12 and 11 variables for Singida and Kimbiji aquifers, respectively, was performed. This statistical method has been used frequently in hydrogeochemical and water quality studies (Helena et al. 2000; Adams et al. 2001; Stamatis et al. 2011). The variables for executing PCA were pH, TDS, EC, Na+, K+, Mg+2, Ca+2, HCO3, CO32−, Cl, SO4−2, NO3. The PCA method allows a large dataset of variables, physical and chemical parameters in water samples to be compressed into a smaller number of uncorrelated orthogonal factors by interpreting the correlation matrix (Jackson 1991; Meglen 1992; Cloutier et al. 2008). The varimax rotation was adopted to augment the contribution of higher significant variables by keeping only the important information and decreasing the variables with smaller contributions. The PCA also produced eigenvectors of a variance covariance or correlation matrix from a raw dataset (I observations and J variables) (Davis 1973, 1986; Hamzaoui-Azaza et al. 2009).

Principal component analysis was specifically carried out for a better understanding of the origin and evolution of groundwater chemistry as it has been applied in previous studies (Abou Zakhem et al. 2017; Sheikhy Narany et al. 2014). The Kaiser Criterion varimax rotation was applied and helped in dropping the PCs with eigenvalues less than 1. This resulted into a simpler structure of components as discoursed in previous studies (Al-Tamir 2008). The eigenvalue contains the information accounted for by an average single item in PCA. The PCA method decomposes the original matrix X with I observations of J variables into factor scores and factor loading matrices, as shown in Eq. (13).

$$X=T{P}{\prime}+E$$
(13)

where the variables of the matrix X are standardized; T (I, J) corresponds to the matrix of J principal components; P′ is the transpose of the original data; and E is the residual matrix.

(b) Assessment of data dispersion

Quartile analyses were carried out to determine outliers in the hydrogeochemical data. The interquartile range (IQR), which is usually the difference between the third quartile (Q3) and the first quartile (Q1) was used to find out the outlying data points. The rule of thumb was that, the observations which fall below Q1 − 1.5(IQR) or above Q3 + 1.5(IQR) were regarded as outliers. Further to that, descriptive statistics such as mean, median, maximum and minimum values of the physico-chemical parameters and major ions were calculated to aid in the interpretation of data dispersion from the central tendency.

Results

Physico-chemical parameters and major ions

The EC in the groundwater samples from Kimbiji aquifer ranges from 211 µS/cm (S21) to 8584 µS/cm (S19) while TDS ranges from 105 mg/L (S21) to 4290 mg/L (S19) as shown in Table 1. The observed large difference between the average and median values is an indication that there are extreme values of EC in the Kimbiji aquifer. This is also explained by the higher extreme boundary values (which is 3546 µS/cm). This actually means any value above 3546 µS/cm is an outlier. The TDS also suffers from the extreme values. This is because there is a linear relationship between TDS and EC as explained by previous studies (Emenike et al. 2018; Rusydi 2018). On the other hand, HCO3 in the Kimbiji aquifer also suffers from extremes albeit to a lesser degree as compared to EC and TDS (Table 1). In the Kimbiji aquifer, K+, Ca2+, Mg2+, Cl and NO3 are affected by outliers while the rest of the parameters are not.

Table 1 Concentration of hydrogeochemical parameters for the Kimbiji Aquifer

The EC values from the Singida aquifer range between 216 and 4910.0 µS/cm, indicating a range of varying groundwater quality and mineralization processes. As it was for the Kimbiji aquifer, EC and TDS in the Singida aquifer are also affected by outliers as can be seen from Table 2. However, the degree of variation between the mean and the median is not significantly huge. Nevertheless, Na+, Cl and NO3 are affected by outliers, with higher maximum values than the higher extreme boundary. The other parameters in the Singida aquifer are not affected by outliers as it can be seen from Table 2.

Table 2 Concentration of hydrogeochemical parameters for the Singida Aquifer

Hydrogeochemical facies using the Piper (trilinear) diagram approach

In the Kimbiji aquifer (Fig. 4), the trilinear approach grouped the water samples into mixed type, Na–Cl type, Ca–Cl type, Ca–HCO3 type and Na–HCO3 type. Samples S11, S16, S17, and S18 from Mkuranga Mizani, Pugu Kajiungeni, Kazimzumbwi, Kisarawe and Pugu Kinyamwezi are dominated by Cl as the major anion. This tells that there is a huge likelihood that human activities are already influencing groundwater quality in this part of the Kimbiji aquifer. Moreover, this also signifies a possibility of long transit times of groundwater, thereby hinting on a possibility of regional/sub-regional recharge. However, dissolution of chloride -containing mineral in the groundwater is equally a possible source of raised Cl ions in the groundwater.

Fig. 4
figure 4

Piper diagram for Kimbiji aquifer

To that effect, major cations for the Kimbiji aquifer are Ca2+ and Na+ and the dominant water types are Ca–Cl for S11 and S16 and Na-Cl for S17 and S18. Samples S1, S10, S12, S13 and S21 exhibit a mixture of Cl and HCO3. The mixed water types are Na-Cl-HCO3. For samples S2, S4, S6, S8, S11, S14, S19 exhibit bicarbonate as the major anion while Ca2+ is the major cation for S2, and S11, Na being the major cation for S8, S14, a mixture of Ca–Mg dominates S6, S19, and S4 is dominated by Ca-Na mixture. The water types are therefore of four hydrogeochemical facies. Ca-HCO3 (S2, S11), Na-HCO3 (S8, S14), Ca–Mg–HCO3 (S6, S19) and Ca–Na–HCO3 for S4.

In addition to the hydrogeochemical facies, this study has also identified ionic sequences, which are Na+ > Ca2+ > Mg2+ > K+: HCO3 + CO32− > Cl- > SO42− for S1, S2, S4, S21; Ca2+ > Na+ > Mg2+ > K+: HCO3 + CO32− > Cl > SO42− for S6, S13; Na+ > Mg2+ > Ca2+ > K+: HCO3 + CO32− > Cl > SO42− for S8; Na+ > K+ > Ca2+ > Mg2+: HCO3 + CO32− > Cl > SO42− for S10, S12; Ca2+ > Na+ > Mg2+ > K+: Cl > HCO3 + CO32− > SO42− for S11, S16, S19; Na+ > Ca2+ > K+ > Mg2+: HCO3 + CO32− > SO42− > Cl for S14; and Na+ > Ca2+ > K+ > Mg2+: Cl > SO42− > HCO3 + CO32− for S17, S18.

For the Singida aquifer, the piper diagram (Fig. 5) shows that sodium is the major cation for all samples while chloride is the major anion for S53, S59, S60, S61 and bicarbonate is the major anion for Samples S52, S54, S56, S57, and S58. To that effect, the water type in the former groups is Na-Cl while the latter group exhibits Na–HCO3 water type. The major ions sequence is Na+ > Ca2+ > Mg2+: HCO3 + CO32− > Cl > SO42− for S52, S54, S56, S57. The sequence is Na+ > Ca2+ > Mg2+: HCO3 + CO32 >  SO42− > Cl for S58 and it is Na+ > Ca2+ > Mg2+: Cl > HCO3 + CO32 >  SO42− for S53, S59, S60, and S61. However, there is an observed similarity between the groundwater samples S54 (Mwankoko borehole) and the three surface water bodies (lakes). Samples S53, S54, S59 and S60 are all Na-Cl water type. In all these samples, Na is the major cation while Cl is the major anion. This is possibly an ostensible indication that there is likelihood of interaction between groundwater and surface water in the Singida aquifer. Further, the dissolution of chlorite schist in the Singida aquifer is responsible for the observed high chloride content in groundwater.

Fig. 5
figure 5

Piper diagram for Singida aquifer

Moreover, the similarity of hydrogeochemical signatures between a distant surface water body, S60 (Inkhanoda lake) and sample S54 (Mwankoko borehole) is an indication that the Singida aquifer is fed by sub-regional to regional groundwater flow systems. Generally, there are two hydrogeochemical facies in the Singida semi-arid fractured aquifer. The first group shows that alkalis and strong acids predominate (S53, S56, S59, S60). The sample S54 hovers around the balance between carbonate and chloride ions. The other group where carbonate hardness exceeds 50% is made up of S52, S57, S58, and S60.

Mechanisms controlling groundwater chemistry

Identification of the mechanisms controlling groundwater chemistry and quality (i.e., Precipitation, Rock-water interaction, Evaporation) using Gibb’s approach was carried out. Table 3 presents the Gibbs ratios which were used to identify the dominant mechanisms controlling groundwater evolution and quality. In samples that TDS was below 100 mg/L (Table 3), the water in all samples is of geogenic origin, mainly being controlled by rock-water interaction mechanism. This is a manifestation of dissolution with rock forming minerals as reported by other studies (Marandi and Shand 2018). Such type of water where TDS is less than 100 mg/L is regarded as fresh water. The ratio of cations (Na+/Na+ + Ca2+) varies from 0.5 to 0.9 while that of anions varies from 0.06 to 0.17 (Table 3). This is an indication that the water is devoid of chloride ions, but very rich in bicarbonate ions which further signifies freshness of the water in this study area.

Table 3 Gibbs ratios for the Kimbiji aquifer

For samples that are rich in Sodium ions, there is a greater possibility of exchange between Na+ of the aquifer material with Ca2+ and Mg2+ from the groundwater. In this mechanism, more sodium is released into the groundwater from the aquifer hosting environment while Ca2+ and Mg2+ are being deposited into the aquifer materials. Moreover, for samples with TDS between 100 and 1000 mg/L there is a dominance of Sodium and bicarbonate ions over Ca2+ and Cl ions. This type of water falls in the precipitation domain, indicating a meteoric origin.

Mechanism controlling groundwater geochemistry have been revealed by assessing the reaction between groundwater and aquifer minerals. This has a significant role in water quality which is useful to understand the origin and provenance of groundwater (Gibbs 1970). The Gibbs ratio 1 values were found to range from 0.26 to 0.94 and Gibbs ratio 2 values ranging from 0.11 to 0.95. The majority of the samples irrespective of the geological formation fall in the rock-water interaction zone. The dissolution of rock forming minerals can be attributed to the observed scenario. This can be explained by the Gibbs diagrams (Figs. 6 and 7), which further revealed that the hydrochemistry of groundwater in the Kimbiji aquifer falls mainly in the rock weathering region.

Fig. 6
figure 6

Cationic Gibb’s diagram for the Kimbiji aquifer

Fig. 7
figure 7

Anionic Gibb’s diagram for the Kimbiji aquifer

The cationic Gibb’s ratios for the Singida aquifer (Na+/Na+ + Ca2+) range from 0.55 (S61) to 0.99 (0.99) (Table 4). The anionic Gibb’s ratio (Cl/Cl + HCO3) lies between 0.03 (S58) and 0.81 (S59). Gibb’s diagrams (Figs. 8 and 9) indicate that the main mechanism that controls groundwater chemistry in the Singida aquifer is rock–water interaction. This is due to the fact that the depth of boreholes in this particular aquifer are around 100 m and above. In addition, most groundwater is found below a semi-confined aquifer where evaporation cannot easily affect the water.

Table 4 Gibbs ratios for the Singida aquifer
Fig. 8
figure 8

Cationic Gibb’s diagram for the Singida aquifer

Fig. 9
figure 9

Anionic Gibb’s diagram for the Singida aquifer

Understanding the changes in the chemical composition of groundwater along the flow paths using the chloro-alkaline indices

The CAIs were used to understand the changes in the chemical composition of groundwater along its flow path in the Kimbiji aquifer (Table 5). They were useful in interpreting ion exchange between groundwater and its host environment. The observed positive CAI (S11, S13, S16, S19) indicated that there was an exchange of Na+ and K+ from the water with Mg2+ and Ca2+ of the rocks. A negative CAI (S1, S2, S6, S8, S10, S12, S14, S17, S18, S21) implied that there is an exchange of Mg2+ and Ca2+ of the water with the Na+ and K+ of the rocks. The former being cation exchange while the latter process is referred to as a reverse ion exchange.

Table 5 Chloro-Alkali Indices of the Kimbiji aquifer

It was therefore revealed that in the largest part of the Kimbiji aquifer, there is a progressive exchange of Ca2+ and Mg2+ in groundwater with Na+ and K+ from the aquifer materials. This is possibly one of the major reasons as to why most samples are Na+ rich in the Kimbiji aquifer. It was further revealed that apart from anthropogenic activities, aquifer materials release Na and K ions in groundwater. Therefore, there is a possibility that groundwater residence time is large, and water could be recharged from a distant sub-basin from which it is discharged, signifying the presence of sub-regional to regional flow systems in the Kimbiji aquifer. Such scenario has been reported by other previous studies (Marc et al. 2016).

The CAIs were also used to realize changes in the chemical composition of groundwater along its flow path in the Singida aquifer. With all the indices being negative (Table 6) in the Singida aquifer, this explains that there is an exchange of Ca2+ or Mg2+ in groundwater with Na+ or K+ from the aquifer materials. It also illustrates that there is an indirect base-exchange reaction. Literally, Ca2+ and/or Mg2+ are constantly being removed from the groundwater and Na+ and/or K+ are released into the groundwater in the Singida aquifer. This corresponds well with what has been observed in the piper diagram, and thus confirms the dominance of Sodium as the major cation in the Singida aquifer.

Table 6 Chloro-Alkali Indices of the Singida aquifer

Hydrogeochemical signatures for determining geochemical processes

The geochemical signatures (ratios) were used to assess the origin of groundwater in the Kimbiji and Singida aquifers (Tables 7 and 8). Where the HCO3: Cl was more than 1, (S1, S2, S4, S6, S8, S10, S12, S13, S14, and S21) in the Kimbiji aquifer, it indicates that the groundwater has an interaction with the aquifer materials, and it is related to recharge water. This implies that, most of the surveyed shallow wells in the Kimbiji aquifer are locally recharged while the ratio less than 1 implies a low water flow course (S11, S16, S17, S19), possibly of carbonate rocks. Moreover, S18 indicates saline water. This is a water with high levels of TDS and EC around Chanika area. Since it is not proximal to the ocean, human activities have most likely influenced this type of water quality.

Table 7 Hydrogeochemical signatures and ratios for determining geochemical processes in the Kimbiji aquifer
Table 8 Hydrogeochemical signatures and ratios for determining geochemical processes in the Singida aquifer

On the other hand, some samples have exhibited replacement of Na+ by Ca2+ or Mg2+ (S18), loss of Na+ through precipitation of evaporate rocks (S11, S13, S16, S19), and water flowing through crystalline rocks (S1, S2, S4, S6, S8, S10, S12, S13, S14, S21). The ratio Na+: Ca2+  > 1.0 (S1, S4, S8, S10, S12, S14, S17, S18, S19, S21) explains a base ion exchange while the ratio < 1 implies a reverse ion exchange (S2, S6, S11, S13, S16). Moreover, the Ca2+: SO42− + HCO3 ratio < 1.0 connotes groundwater flowing through a normal hydrological cycle (S1, S4, S8, S10, S12, S14, S17, S18, S2, S6, S11, S13, S21) and a ratio greater than 1 is an indication of Ca2+—Cl brines (S16, S19) (See Table 9).

Table 9 Hydrogeochemical facies of the Kimbiji aquifer in relation to Residence time of groundwater

Further to that, the HCO3: Cl hydrogeochemical signatures divided the Singida aquifer into upper water flow course, where groundwater recharge occurs (S52, S54, S56, S57, and S58) and the discharge zone, (S53, S59, S60, S61) which is a lower groundwater flow course. Nevertheless, the Mg2+ + Ca2+: Na+  + K+ ratios (Table 8) as well confirmed that the Singida aquifer is a lower groundwater flow course (discharge zone). The greater than 1 Na+: Ca2+ ratios confirm the dominance of base ion exchange in the Singida as it has been explained by the CAIs and the Piper diagram. Literally, apart from the hydrogeochemical signatures indicating that the Singida aquifer has upper and lower groundwater flow courses, the greater information derived here is that groundwater in the Singida aquifer is from both, regional and local flow systems, where regional flows indicated a high travel and residence time.

The relationship between Na+ and Cl was used to establish the mechanisms which contribute to groundwater salinity as well as establish the atmospheric contribution as it has been carried out by previous studies (Emenike 2018; Tiwari and Singh 2014). The average Na+/Cl ratio of 1.4 suggests limited contribution from the atmospheric precipitation and reveals that the high levels these ions are most likely from weathering of rocks and anthropogenic pollution. Five (S11, S13, S16, S18, S19) out of the 15 samples (33%) (Fig. 10) in the coastal Kimbiji aquifer showed that Na+/Cl < 1.0, indicating limited role of ion exchange from Ca2+ and Mg2+. However, the 10 samples (67%) which had the Na+/Cl > 1.0, underscore the importance of ion exchange as it has been discussed with respect to CAIs. However, this is also an indication that Na+ and Cl are constantly being introduced into groundwater system from such sources as municipal solid waste leachate, septic tank effluent, industrial effluent, and animal and agricultural waste. This takes into account the fact that shallowest wells in the Kimbiji aquifer are dug in the vicinity of residential areas. With regard to the Singida aquifer, only two (S52, S61) samples out of 9 (Fig. 11) had the Na+/Cl < 1.0, indicating a possibility of local recharge from precipitation. However, 7 samples (71%) indicated the influence of ion exchange and rock weathering as the mechanisms controlling groundwater chemistry in the Singida aquifer. Nevertheless, there could be a possibility of the influence of anthropogenic activities to groundwater chemistry in the Singida aquifer as well.

Fig. 10
figure 10

Na/Cl plot for groundwater samples for the Kimbiji Aquifer

Fig. 11
figure 11

Na/Cl plot for groundwater samples in the Singida Aquifer

Groundwater residence time in the Kimbiji aquifer using hydrogeochemical facies

As per the classification of hydrogeochemical facies in relation to residence time in the Kimbiji aquifer, samples S1, S2, S4, S6, S8, S10, S12, S13, S14, S21 come under type I, relating to recharge water while samples S11, S16, S17, S18, S19 represent discharge water (Type IV) as they exhibit more enrichment of chloride and Sodium, indicating a long residence time and possibly the interference of anthropogenic activities (Table 9). The latter are possibly a representation of regional to sub-regional flows, with the exception of samples drawn from shallow wells that are highly affected by anthropogenic activities in the vicinity of the recharge zones. However, the second group shows a progressive enrichment of minerals along the flow path.

Identification of groundwater residence time in the Singida aquifer has revealed that all the lakes are discharge zones, located in low topography with groundwater having travelled long distances as depicted in samples (S53, S59, S60, S61). The other samples (S52, S54, S56, S57, S58) depicted the presence of young water, having travelled short distances. However, that is a glimpse of the groundwater mixing. This also indicates that there is a recharge zone within the vicinity of the wellfield. However, samples drawn from shallow boreholes (S57) are highly affected by anthropogenic activities. This is manifested by high level of nitrate concentration in water, followed by bicarbonate ions, indicating that the well is locally recharged. Therefore, the water in the Singida aquifer falls in two groups (i.e., group I and group IV) as depicted in Table 10. However, the progressive enrichment of Sodium in surface and groundwater in the Singida aquifer indicates a possibility of long travels as well as a strong base ion exchange between the aquifer materials and the groundwater.

Table 10 Hydrogeochemical facies of the Singida aquifer in relation to Residence time of groundwater

Correlation analysis of hydrogeochemical parameters for the Kimbiji aquifer

The correlation analysis of hydrogeochemical parameters summarized in Table (11) suggests that EC and TDS are positively correlated with Cl and NO3. Moreover, NO3 occurs together with Ca2+, Mg2+ and Cl. It is also evident that Na and K occur together (r = 0.9) while Cl, SO42− are negatively correlated with pH as shown in Table 11. In addition, NO3 has not shown any correlation with pH altogether but there is slightly weak positive correlation (r = 0.4) between HCO3 and pH. It can as well be observed that Cl and NO3 are correlated, suggesting possible anthropogenic pollution of groundwater in some areas of the Kimbiji aquifer. It has further been observed that NO3, HCO3, SO42− and Cl are responsible for the salt concentrations observed in the groundwater in the Kimbiji aquifer. That is explained by their relatively strong positive correlations with TDS (Table 11), which are statistically significant at p < 0.05.

Table 11 Correlation matrix of hydrogeochemical parameters for the Kimbiji aquifer

As for the Singida aquifer, Na and Cl are strongly correlated, indicating that the two chemical groundwater constituents occur together. The correlation between Cl and pH explains the possible anthropogenic contamination of water in the Singida aquifer. Whenever Mg2+ occurs in groundwater in the Singida aquifer, it does so in tandem with HCO3. This has been shown by a strong positive correlation between the two ions (r = 0.8), significant at p < 0.05. This trend has also been observed between Ca2+ and HCO3 (r = 0.7). Generally, SO42− and Cl are responsible for the salt concentrations observed in the groundwater in Singida aquifer. That is explained by their relatively strong positive correlations with TDS (Table 12) unlike NO3, HCO3 and CO32− which have relatively weak correlation with TDS.

Table 12 Correlation matrix of hydrogeochemical parameters for the Singida aquifer

Four main principal components influence the water chemistry of groundwater within the Kimbiji aquifer, which accounted for 89% of the total variance in the hydrogeochemical data (Table 13). Five principal components influence the water chemistry in the Singida aquifer, and they account for 98% of the total variance (Table 14). For the Kimbiji aquifer, PC1 delineates the main natural processes (water–rock interactions) through which groundwater within the basin acquires its chemical characteristics, with some glimpse of anthropogenic activities interfering the groundwater system. Component 3 delineates the inputs of agricultural activities into the groundwater system as discussed elsewhere (Koh et al. 2007; Al-Ahmadi 2013), while Component 4 delineates the prevalence of natural recharge as bicarbonates predominate. However, PC1 in the Kimbiji aquifer depicts Ca and Mg as the most important cations as compared to Na and K. It should be noted that for the Kimbiji aquifer PCA, PC3 has a greater explanatory strength than PC2, as explained by the high eigenvalue variance (1.45) as presented in Table 13.

Table 13 Principal components analysis of the Kimbiji aquifer hydrogeochemical parameters
Table 14 Principal components analysis of the Singida aquifer hydrogeochemical parameters

As for the Singida aquifer PCA, PC5 has a higher explanatory strength (1.12 eigenvalue variance) than PC 3 and PC4. The ss loadings reflect the contribution of each component into the variables. It can be shown that Na and Cl are delineated by PC1, being responsible for groundwater mineralization in the aquifer (Table 14). PC2 and PC5 delineate natural mechanisms while PC4 portrays the contribution of anthropogenic activities in groundwater mineral constituents.

Discussion

The use of a mixture of hydrogeochemical facies and signatures revealed that a mixture of processes is responsible for the predominant hydrogeochemistry observed in the two study areas irrespective of their difference in climate and geology. Such process includes mineral-rock weathering, ionic exchange processes and anthropogenic activities. These findings are in line with what was opined by Egbueri et al. (2021, 2022).

Groundwater in the Kimbiji aquifer falls in the first 3 types (Type I to III) because the maximum recorded EC was below10,000 µS/cm. Samples which fall in Group I based on EC values are S1, S2, S4, S8, S10, S12, S14, and S21(EC < 700 µS/cm). The water in this group is non-saline. The second type (Type II) EC lies between 700 and 2000 µS/cm. This constitutes S6, S11, S13, S17, and S18. The water in this group is slightly saline. The third type, which is characterized by moderate salinity because the EC is higher than 2,000 and less than 10,000 µS/cm. The samples in the Kimbiji aquifer falling in this type are S16 and S19. From TDS point of view, the Kimbiji groundwater falls in two types, type I and II. Only two samples S16 and S19 fall in the second type (brackish) whose concentrations are 1838 and 4290 mg/L, respectively. The other 13 samples are type I (freshwater) with TDS < 1000 mg/L. Samples S57 and S60 fall in the third type, which is characterized by moderate salinity with EC values ranging between 2,000 and less than 10,000 µS/cm. The samples have 4910 and 2400 µS/cm. The type II water constitutes of S52, S53, S54, S56 and S58, whose EC (µS/cm) concentrations are 936, 1511, 1555, 1615 and 1432, respectively. The other samples (S57 and S61) are in type I water, (non-saline water) whose EC values are 216 and 316 µS/cm, respectively.

The groundwater in the Singida aquifer also falls in two groups of TDS classification. Type I and II, and only two samples S59 and S60 fall in the second group with TDS values (mg/L) of 2456 and 1160, respectively. The other samples (S52, S53, S54, S56, S58, S61) fall in the first group (Type I), which is fresh water. According to previous studies (Rhoades et al. 1992; Todd and Mays 2005; Rusydi 2018), water classification based on EC is divided into 6 types, namely, type I, which is non-saline (EC < 700 µS/cm); type II is slightly saline, (700 and 2,000 µS/cm); type III is moderately saline, if EC is higher than 2000 and less than 10,000 µS/cm; type IV is highly saline with EC value from 10,000 till 25,000 µS/cm; type V is very highly saline, if EC value between 25,000 and 45,000 µS/cm; and type VI is brine water with EC more than 45,000 µS/cm. Moreover, according to other researchers (Rusydi 2018), TDS is classified into four types: type I is freshwater with TDS < 1,000 mg/L; type II is brackish water with TDS between 1000 and 10,000 mg/L; type III is saline water with TDS from 10,000 till 100,000 mg/L; and type IV is brine water with TDS > 100,000 mg/L.

In all the areas where the values of TDS are below 1000 mg/L, with the dominance of Sodium and bicarbonate ions over Ca and Cl ions, the water falls in the precipitation domain, indicating a meteoric origin. The two aquifers have principally exhibited this characteristic. Further to that, samples with TDS approaching 1000 mg/L are of geogenic origin. These groundwater locations explain the importance of rock–water interaction as the principal mechanism that controls groundwater quality. This behaviour has been exhibited by the Singida and Kimbiji aquifers. On the other hand, samples with above 1000 mg/L confirm that evaporation is one of the major mechanisms controlling groundwater quality. This is possibly so in shallow wells of sandy aquifer materials as it is generally known for the coastal aquifer like Kimbiji. In the Kimbiji aquifer, there are mixed old and young water. This explains the presence of local, sub-regional and regional flows systems which influence groundwater recharge in the aquifer. Moreover, anthropogenic influence on groundwater system has been observed.

As for Singida aquifer, anthropogenic activities influence groundwater quality. Nonetheless, a mixture of young and old water, with high residence time which is highly mineralized as depicted by EC and TDS was observed too. Generally, the groundwater in the Singida aquifer is highly rich in Sodium ions. This is due to the exchange between Na+ and K+ of the aquifer materials, with Ca2+ and Mg2+ from the groundwater (Base ion exchange). This signifies that more sodium is released into the groundwater from the hosting environment which is rich in sodium-containing minerals. Further to that, for samples with TDS between 100 and 1000 mg/L there is a dominance of Sodium and bicarbonate ions over Ca2+ and Cl ions, the water falls in the precipitation domain, indicating a meteoric origin. Generally, mineral dissolution through water–rock interactions, anthropogenic activities such as agriculture and waste management, and ion exchanges have been found to be the major sources of hydrogeochemical variations in the two study areas. The processes have been reported elsewhere by other researchers (Emenike et al. 2018).

Trilinear diagram proved instrumental in delineating the hydrogeochemical facies by graphically demonstrating the relationships between the most important dissolved constituents in a set of groundwater samples. The hydrogeochemical evolution of groundwater in the Kimbiji aquifer was divulged and understood by plotting the concentrations of major cations and anions in the piper trilinear diagram (Piper 1944, 1953). The nature and distribution of hydrogeochemical facies was determined by providing insights into how groundwater quality changes within the Kimbiji aquifer system.

All the samples with the Ca2+ and HCO3 over Na+ and Cl indicate a meteoric origin as they fall in the precipitation domain. In this situation, rock-water interaction is responsible as the main source of dissolved ions in groundwater. However, a progressive abundance of Na+ in some areas of the Kimbiji aquifer (Pugu and Chanika areas), and the areas close to the ocean has been observed, and it goes hand in hand with increasing TDS. An increase in Na+ and Cl in water raises the levels of TDS as observed in several samples (i.e., S16, S19). Generally, samples with TDS approaching 1000 mg/L are of geogenic origin. These groundwater samples explain the importance of rock-water interaction as the principal mechanism that controls groundwater quality, while samples with above 1000 mg/L exhibit evaporation as the major mechanism controlling groundwater quality. This is possibly so in shallow wells of sandy aquifer materials as it is generally known for the coastal aquifer like Kimbiji. However, evaporation is not a common mechanism which controls groundwater chemistry in the Kimbiji aquifer.

Sodium was observed to be the major cation in all samples in the Singida aquifer while there are varying cationic dominance for the Kimbiji aquifer. Sodium dominates the upper section of the Kimbiji aquifer while the middle and the lower part of the aquifer is dominated by Ca2+ and Mg2+. This to a certain degree explains the influence of the oceanic environment on the groundwater systems in lower parts of the Kimbiji coastal aquifer. In the Singida aquifer, SO42− is not a common anion in the groundwater. Cl and HCO3 are the most common anions. In the Kimbiji aquifer, there has been an exchange between Sodium and Calcium as the major cationic constituents of groundwater, with HCO3 being the most dominant anion, except for S11, S16, S17, S18 and S19 where Cl ion has been dominant. Groundwater in the two study areas can be classified into two types, the HCO3 type and the Cl type. The bicarbonate type indicates intensive groundwater flushing due to good drainage conditions, while the Chloride type indicates inadequate water flushing as a result of quasi stagnant conditions as opined by other researchers (Chebotarev 1955). The Sulphate type, which indicates the intermediate conditions ranging between the bicarbonate type and the chloride type is not a common type in the two study areas. However, with progressive anthropogenic interferences, no sooner the sulphate will be one of the common water types in either of the study areas. This is because, the bicarbonate and chloride ions are gradually being replaced with sulphate type water due to expanding anthropogenic influences. This scenario has also been reported by other previous studies elsewhere (Gao et al. 2020). Nitrate pollution as a result of anthropogenic activities is also attributed to groundwater quality degradation in this study, as it has been reported by other researchers (Gao et al. 2020).

The CAIs helped in the interpretation of ion exchange between groundwater and its host environment during travel. While a positive CAI indicates the exchange of Na+ and K+ from the water with Mg2+ and Ca2+ of the rocks, it is negative when there is an exchange of Mg2+ and Ca2+ of the water with Na+ and K+ of the rocks. Dissolution of soluble materials which contribute to mineralization of groundwater in both aquifers. NaCl dissolution is most likely responsible for the mineralization of groundwater in the Singida aquifer as well as part of the Kimbiji aquifer. This is supported by other previous studies (Lachaal et al. 2016; Re et al. 2017; Kammoun et al. 2018a). The mixed water types are mainly characteristic of the shallow wells (Kammoun et al., 2018a). This is peculiarly characteristic in the Kimbiji aquifer. The Singida aquifer has no many cases of mixed water types due to the nature and depth of the boreholes in that area.

The Ca2+ excess and Na+ deficiency scenario is only characteristic in the Kimbiji aquifer. The Singida aquifer is mainly characterized by Na+ excess in all collected samples. The major variation has been on the anions in the Singida aquifer, as it has been in the Kimbiji aquifer as well. This suggests the significance of ion exchange reactions as a key mineralization process, where in the Singida aquifer, the Na+ of the aquifer materials is exchanged with Ca2+ in the water. On the contrary, in the Kimbiji aquifer, in the lower parts of the study area (Kimbiji, Mkamba, Kigamboni, Kisarawe 2), Na+ of the water is exchanged with Ca2+ from the aquifer materials and the reverse reaction also occurs in the middle and upper parts of this Kimbiji aquifer (i.e., Pugu, Chanika and Kisarawe). This is supported by previous studies (Kammoun et al. 2018; Ahmad et al. 2018; Wang et al. 2023). While in the Kimbiji aquifer, Ca2+ and Na+ have been the two major competing cations, in the Singida aquifer, only Na+ has been the most dominant cation. Just like in other recent studies (Li et al. 2018), ion exchange between Ca2+ and Na+ is a fundamental process controlling groundwater chemistry in the two aquifers.

Similarities of groundwater and Lake water in the Singida aquifer suggests a high likelihood of groundwater-surface water mixing in the aquifer. Variations of chemical composition and hydrogeochemical signatures and facies in the two aquifers (Kimbiji and Singida) can be attributed to the geological nature of the groundwater basin as well as the anthropogenic influences on the groundwater systems. This calls for a set of tailored management actions and strategies which take into account the variation in geology and the nature of human activities around the groundwater reservoirs.

Dominance of Sodium in groundwater in the Singida aquifer has been attributed to Cation exchange mechanism, where there is a progressive loss of Ca and Mg ions from the groundwater to the aquifer materials at the expense of Na and K ions, which are constantly being fed into the groundwater. This is partly different in the Kimbiji aquifer where Cation exchange and reverse ion exchange mechanisms have been observed through the CAIs. This justifies the geological contrast between the two aquifers. The enrichment of Na+ in the Singida aquifer and part of the Kimbiji aquifer can be explained by the contribution of Na-containing minerals dissolution and/or cation exchange as opined by other researchers in other study areas (Gao et al. 2020).

Correlation between TDS and pH was used to explain the geological contrast between the Kimbiji and the Singida aquifers. The former exhibited a negative correlation while the latter revealed a strong positive correlation between TDS and pH. These scenarios explain two different mechanisms with regard to salt concentration in groundwater, dissolution of the aquifer materials, and acidic environment as the main mechanisms in the Singida aquifer. The two scenarios are supported by the difference in the aquifer materials constituting the two study areas, one being consolidated, fractures aquifer (Singida) and the other one (Kimbiji) being a porous, unconsolidated sedimentary aquifer. This is supported by the findings of previous studies (e.g., Oyem et al., 2014).

The observed negative correlation between TDS and pH (r = − 0.1) in this study explains the fact that the salt concentration in the groundwater in the Kimbiji aquifer is mainly due to dissolution of the most soluble aquifer materials and not necessarily from the acidic environment. Moreover, the strong correlation between TDS and pH (r = 0.8) is an indication that groundwater salt is not possibly related to dissolution of the aquifer materials, but rather are a result of the acidic environment in the Singida aquifer. The two scenarios are supported by the difference in the aquifer materials constituting the two study areas, one being consolidated, fractures aquifer (Singida) and the other one (Kimbiji) being porous, unconsolidated sedimentary aquifer.

The hydrogeochemistry of groundwater in the Kimbiji and Singida aquifers was evaluated using the concentrations of major cations (Ca2+, Mg2+, Na+ and K+) and anions (HCO3, SO42+ and Cl). The piper diagrams indicate that in some areas of the Kimbiji aquifer, sodium is the major cation and chloride is the major anion while in others Calcium and bicarbonate are the major cations and anions, respectively. This diversity of water type in the Kimbiji aquifer illustrates a variety of sources of recharge and influence of various factors in the Kimbiji aquifer system. In the Singida aquifer, Na+ was found to be the most dominant cation but there has been a variation of anions, ranging from chloride to bicarbonate. Na ions were the most dominant, nonetheless. Water sources dominated by Ca2+ and HCO3 indicate young and recently recharged water, and those dominated by Na+ and Cl indicate a possible long transit times as well as the influence of anthropogenic activities and sea water intrusion, thus leading to a progressive change in the ionic composition of groundwater, thereby affecting the water chemistry and quality at large.

A mixture of recharge mechanisms has been identified using hydrogeochemical signatures. While both aquifers exhibit local to regional mechanisms of recharge, the Kimbiji aquifer is dominated by local recharge, especially for shallow boreholes while deep aquifers exhibited sub-regional to regional recharge mechanisms. The Singida aquifer has equally exhibited pockets of locally recharged water. However, the most dominant mechanism is regional flow. This is supported by the type of climate, especially the amount of annual precipitation received. The hydrogeochemical facies and signatures have revealed the connection between shallow and deeper aquifers in the two study areas. This is manifested by groundwater mixing and dominance of hydrogeochemical and mineralization processes. The higher Na+ concentrations coupled with low Ca2+ concentration suggest that Na and Ca ion exchange process in the Singida aquifer is the most important geochemical process and part of the Kimbiji aquifer. These findings re supported by Cao et al. (2018) and Tafrount et al. (2023). However, in the Kimbiji aquifer, reverse ion exchange reactions occur and there are areas where the concentration of Ca ions is higher than Na ions. This is another a manifestation of the importance of cation exchange mechanism in the Kimbiji aquifer.

Conclusions

The origin and evolution processes of the groundwater mineralization of the two aquifers with contrasting climate and geology using major ions as indicators were established. The dissolution of evaporated minerals, precipitation of carbonates, evaporation, and ion exchange reactions have been identified as the primary processes of mineralization.

The findings of this study have provided the scientific insights and extensive knowledge of hydrogeological regimes of water resources in the two basins taking into account the difference in climate and geology. The facies and signatures were fundamentally useful for revealing information on progressive ion enrichment based on the groundwater residence times in the two aquifers. The hydrogeochemical facies in both study areas explained well the distribution and genesis of principal groundwater types, groundwater flow paths and residence times, depicting recharge and discharge zones as well.

The study further revealed the extent of rock–water interaction in the two aquifers as the main mechanism controlling groundwater quality and ion concentrations. This was aided by the Gibbs diagrams which equally confirmed that rock–water interaction is a predominant mechanism controlling groundwater chemistry in the two study areas.

Further, it was established that all the areas that are dominated by bicarbonate water types have intensive groundwater flushing due to good to excellent drainage conditions. These were depicted to be recharge, high topography areas, with a subsequent likelihood of being modified by the saline and brackish water due to the influence of anthropogenic activities as the water travels downstream.

The Chloride water type indicated inadequate water flushing as a result of stagnant conditions and these were identified to be discharge, low topography areas with high human settlements and agricultural activities with high agrochemical input usage. The Sulphate water type, which usually manifests the intermediate conditions, ranging between the bicarbonate type and the chloride type was not very common in the two study areas. This is because sulphate was not observed as a dominant anion anywhere in the two aquifers using the number of samples collected. However, depending on the nature of human activities, there is a possibility of progressive enrichment in sulphate, especially in those areas whose ionic sequences exhibited the likelihood of progressive enrichment of sulphate. Apart from that, progressive enrichment of chloride is a possibility in both aquifers, being influenced by sea water intrusion as well as upcoming processes in the Kimbiji, while in the Singida aquifer, geogenic sources as a result of extensive rock-water interaction and weathering processes are of high likelihood without forsaking anthropogenic influences as well.

This study further concludes that, the Kimbiji aquifer has complex and multiple sources of recharge. It has pockets of local recharge areas, distributed throughout the aquifer owing to its humid climate. The aquifer is also characterized by sub-regional to regional groundwater flow systems with discharge points located in the upper, middle and lower parts of the Kimbiji aquifer. On the other hand, the Singida aquifer is dominated by regional to sub regional flows as indicated by the hydrogeochemical signatures, especially the dominance of Sodium and Chloride. However, there are signs of locally-recharged water, albeit scanty, where bicarbonate was observed to dominate the groundwater samples, with progressive Calcium and Magnesium enrichment.

The difference in climate and geology of basins can be attributed to the difference in hydrogeochemical facies and signatures. However, there are similarities in hydrogeochemical facies and signatures as a result of similarities in anthropogenic pressures in the upper unconfined aquifer in each study area. Human activities which exert pressure in the aquifers are more or less similar. The major difference in hydrogeochemical signatures was observed in the deep boreholes, where the difference in geology was a key influencing factor. More models for hydrogeochemical signatures and possibly isotopic studies can further extend this work and improve the findings in this research niche. Further, a validation study in the potential enrichment to sulphate and chloride ions can combine water with land use/cover change analyses. These future insights form the basis of the limitations of this study.