1 Introduction

Groundwater contamination stands as a critical concern in coastal aquifers worldwide. The primary culprits behind this issue are seawater intrusion, as well as anthropogenic pollution stemming from agricultural, industrial, and domestic waste [1,2,3,4,5,6,7]. Additionally, natural processes such as mineral interactions, dissolution, ion exchanges, atmospheric precipitation, and recharging water quality play pivotal roles in shaping the ion composition within aquifers [8, 9]. The field of hydrogeochemistry becomes indispensable in both tracing the origins of groundwater chemical constituents and assessing its appropriateness for drinking and irrigation usage [10,11,12,13,14,15]. In addition to its vital role in sustaining human, animal, and plant life, groundwater contains trace amounts of heavy metals. Yet, it is crucial to acknowledge that concentrations exceeding permissible levels can pose severe health risks [16,17,18,19]. Elevated lead levels, for instance, are known to have detrimental effects on youngsters' brain growth [7, 20]. Similarly, prolonged exposure to high iron concentrations in drinking water may inflict damage to the liver, kidneys, and cardiovascular system [21]. Trace metals, being non-biodegradable, toxic, and stable in the environment, pose a significant threat to both groundwater quality and human health [22, 23]. Various factors, including specific rock weathering, atmospheric deposition, and human activities, contribute to the levels of heavy metals in groundwater [24]. The intrusion of volcanic materials and their contact with pre-existing country rocks can further introduce trace metals into fractured aquifers [25]. The solubility of heavy metals in rock or soil is influenced by parameters such as pH, heavy metal content, chemical constituents, organic carbon content, and the mechanisms of ion exchange [26,27,28]. With the growing population and increasing tourist activities, the dependence on groundwater for potable water has surged. Previous research has primarily focused on iron contamination, major ion composition, and groundwater levels within the region [29].

Several research has been conducted on coastal water quality issues, particularly in the Andaman Islands and adjacent regions. Studies have shown various concern such as heavy metals, salinity, and the impacts of pollution from both natural events and human activities. Jha et al. investigated the impact of land runoff, agricultural runoff and tidal submergence in Rangat Bay, finding that the effect of pollutants was moderated to some extent by oceanic flushing [30]. Similarly, the research by Sahu et al. [31], Dheenan et al. [32], and Dheenan et al. [33] into the effects of land runoff, sewage outfall, tidal flow, and fecal pollution has highlighted the significant impacts of human activities on bacterial concentration and overall water quality.

Salinity levels in coastal waters have been impacted by various factors, including natural disasters like tsunamis, as discussed by Raja et al. [34], and human activities. Velmurugan et al. [35] assessed water quality in Middle Andaman and reported moderate salinity levels, with Mayabunder showing the highest salinity compared to other regions. Furthermore, Kumar and Mukherjee [36] used ionic ratios to estimate seawater intrusion, revealing moderate to slightly saline water in most areas of their study, pointing to the nuanced challenges of managing water quality amid changing environmental conditions.

Investigations into heavy metal concentrations have revealed concerning levels of contaminants like chromium (Cr) and cadmium (Cd) in marine ecosystems. Studies by Nobi et al. highlighted that heavy metals in seagrass and seaweeds in the Andaman Islands were higher than background values, with a concentration order of manganese (Mn) > lead (Pb) > cadmium Cd [37]. Mahajan et al. also found that, aside from heavy metals, other physicochemical parameters were within acceptable standards, underscoring the significant threat posed by heavy metal pollution to marine life and potentially to human health through the food chain [38]. The presence of heavy metal causes a serious problem in aquatic biota due to its toxicity, non-biodegradable, biomagnification and bioaccumulation in the food chains, reported by Duman et al. [39]. The concentration of trace metals such as Cu, Mn, Zn, Fe, Co, and Ni were found in liver tissues of tuna fish [40,41,42].

However, a comprehensive investigation into the hydrogeological processes governing groundwater chemistry and quality risk assessment is crucial for detail understanding of Hydrogeochemistry and processes influencing the water quality of the region. Hence, this present study is focused on exploring the sources of heavy metal contamination of groundwater, assessing hydrogeochemical processes, and considering the effects of seawater intrusion, evaporation, precipitation, limestone dissolution, and earthquake-induced lineaments. Furthermore, it evaluates water quality indices for both drinking and agricultural purposes, utilizing geostatistical and geographic information system (GIS) tools.

The findings of this research are expected to provide a foundational dataset that can be valuable for the Ministry of Water Resources, stakeholders, and decision-makers in regional and local governance. This information will enhance their understanding of aquifer conditions and enable them to take proactive measures to mitigate health risks associated with groundwater consumption.

1.1 Study area

Study area is a part of middle Andaman of A&N islands series, situated in the southeastern part of the India within the Arabian Sea (Fig. 1). These islands boast an extensive 1962 km-long coastline and form a lengthy, fragmented chain that spans over 700 km in a predominantly north–south direction. They are equidistant from the cities of Chennai and Kolkata on the Indian mainland, accessible via both water and air routes [29]. The research area's geographical coordinates fall within the latitude range of 12° 24′ 19.9836′′ E to 12° 55′ 38.7876′′ E and the longitude range of 92° 48′ 15.4116′′ N to 92° 58′ 49.854′′ N. The islands experience an annual rainfall of ~ 3000 mm, but their steep slopes hinder effective groundwater recharge. Moreover, the region predominantly comprises sedimentary rocks, which cover over 70% of the area. These sedimentary rocks, along with clay minerals prevalent in the region, impede rainfall from percolating into the groundwater. Consequently, aquifer conditions in both shallow and deep horizons are unfavorable. Approximately 15% of the region features prominent coral rags or limestone formations, while the remaining 15% is dominated by igneous rock formations [29]. Hydrogeologically, the CGWB (2021) has categorized aquifers into three classes, namely: (a) porous formations encompassing shale and coral rags, (b) alluvium covering both valleys and connecting foothills, and (c) colluvium in narrow intermountain valleys, which represent potential aquifer zones [29]. The selection of the study area was guided by a comprehensive assessment of the geological features, geomorphology, and watershed development within the region.

Fig. 1
figure 1

Study area map with sampling points

1.2 Geology

The islands are situated within the outer arc of the Arakan Yoma Mountain range, which constitutes the primary geological formation of the A&N Islands. The islands in the North-Middle Andaman district primarily consist of “thick Eocene sediments” that overlay “Pre-Tertiary sandstone, siltstone, and shale, with intrusions of igneous rocks” known as Ophiolites. This region also comprises sedimentary rocks, primarily derived from marine deposits [30,31,32,33]. Based on existing geological data, it is suggested that the Islands may have once formed a land bridge connecting Burma and Sumatra. This land bridge, in conjunction with the Preparis and Cocos Islands, created a continuous hilly terrain linking the Andamans to Burma (Myanmar) [43, 44]. The Tertiary strata in this region, dating from Upper Cretaceous to Upper Eocene, are known as the Mithakhari and Andaman Flysh Group (Fig. 2). These strata consist of thinly bedded alternations of siltstones, sandstones, conglomerates, grit, shales, limestones, and more. The Archipelago Group, Nicobar Group, and Quaternary Holocene Group overlay the Tertiary Group with nonconformity. The islands are predominantly covered by marine inorganic sedimentary rocks, including limestone, coralline atolls, sandstone, grit, and conglomerate (Flysch and Mithakhari Groups), as well as extrusive and intrusive igneous rocks [45]. Given the islands' location in a tectonically active zone, all these rock formations are subject to tectonic forces, evidenced by both shallow and deep focal earthquakes occurring on the islands. The most recent instances of earthquake and tsunami damage in this region can be attributed to its geological positioning on a converging plate edge. Tectonism has led to fractures in both igneous and sedimentary rock groups, creating pathways for groundwater flow in deeper horizons. The geological composition of the islands exhibits remarkable diversity and can change significantly over short distances [46, 47].

Fig. 2
figure 2

Geology map of the study area [34]

1.3 Geomorphology

The topography of Middle Andaman features a series of structurally low-range hills and narrow valleys that form an undulating landscape encompassing steep slopes leading to coastal plains. The area can be further classified into various subregions, including high to low-dissected hills and valleys, moderately dissected upper plateaus, offshore islands, and young coastal plains. These extensive hill ranges are enveloped by dense forests, while the coastal margin includes saline marshes, salt-affected patches, and undulating uplands [48, 49]. The predominant rock types in this region consist of sandstone, breccias, or conglomerates, with varying proportions of siliciclastic and cemented calcium carbonates [43, 48]. The major geomorphic units in the area encompass “low to moderately high steep hills, intermontane narrow valleys, and gently sloping narrow to moderately wide coastal plains” (https://bhuvan-app1.nrsc.gov.in/thematic/thematic/index.php) (Fig. 3).

Fig. 3
figure 3

Geomorphology map of the study area (Bhuvan-app1.nrsc.gov.in/thematic/thematic/index.php)

2 Materials and methods

2.1 Methodology for cations, anions, and heavy metals analysis

Sampling methods- 25 water samples, including seawater, were collected in two polypropylene bottles (150 ml and 250 ml) for cations and anions separately from various locations within the study area based on the availability of borewells and accessibility of the sampling site. The bottles were properly rinsed before collecting the water samples. The samples collected for cations and heavy metals analysis were acidified with a few drops of concentrated HNO3 to preserve the heavy metal concentration in the water. Groundwater was filtered using a Whatman filter with a pore size of 0.45 μm.

Groundwater analysis: Some of the parameters such as pH, electrical conductivity (EC), total dissolved solids (TDS), and temperature were assessed using a “multiparameter 35 series” instrument directly at the sampling sites. Subsequently, the analysis of major anions, major cations, and heavy metals was conducted in a laboratory setting, adhering to the methods outlined by APHA [50] and, Diatloff and Rengel [51] (Fig. 4). The analytical tools employed included the Elico flame photometer (Elico CL-378), UV–Vis spectrophotometer, titration, and Inductively Coupled Plasma Optical Emission spectroscopy (ICP-OES) (Agilent 5110) for major cations (Na+, K+, Ca2+), major anions (\({\text{NO}}_{3}^{ - }\), \({\text{PO}}_{4}^{3 - }\), \({\text{SO}}_{4}^{2 - }\)), F as well as \({\text{CO}}_{3}^{2 - }\), \({\text{HCO}}_{3}^{ - }\) and Cl) and, Mg2+ along with heavy metals (Al, As, Ba, Cd, Co, Cr, Cu, Fe, Mn, Ni, Pb, Se, Tl, Zn), respectively (Fig. 4). The ion balance error was found (0.02 ± 0.19) in range of ± 0.05 of all the water samples.

Fig. 4
figure 4

Methodology for cations, anions, and heavy metals analysis

Statistical Analysis- A binary plot was generated using MS Excel 2019 to compare Ca2+  + Mg2+ vs. \({\text{SO}}_{4}^{2 - }\) + \({\text{HCO}}_{3}^{ - }\), K+ + Na+ vs. Cl, \({\text{HCO}}_{3}^{ - }\) vs. Na+, Ca2+ vs. Na+, Ca2+ vs. \({\text{HCO}}_{3}^{ - }\), Ca2+  + Mg2+ vs. \({\text{HCO}}_{3}^{ - }\), and total cations vs. Na+  + K+. Principal Component Analysis, correlation matrix, Piper plot, and Chadha plot were generated using SPSS software. Rock and soil sample analysis—X-ray diffraction (XRD) was utilized to conduct mineralogical analysis of rock and soil samples collected from the region using Xpert high score version 1.0a software.

Water quality index: The methodology adopted by Ramakrishanaiah [52] was used to analyse the drinking water quality. It classifies water into 5 categories as “excellent, good, poor, very poor and unsuitable for drinking purposes”. This classification takes into account various parameters, including pH, Total Hardness (TH), TDS, concentrations of Ca2+, Mg2+, \({\text{HCO}}_{3}^{ - }\), \({\text{SO}}_{4}^{2 - }\), \({\text{NO}}_{3}^{ - }\), Cl, F, Fe, and Mn. Each parameter was chosen a weight (wi) (1–5) based on its relative importance in assessing drinking water quality (Table 1). Notably, fluoride received the highest weight, while magnesium was assigned the lowest weight.

Table 1 The relative weight of the water parameters

Additionally, the relative weight of each parameter was calculated by determining the ratio of the weight assigned to that specific parameter to the sum of the weights of all the parameters.

$$Wi= wi/{\sum }_{i=1}^{n}wi,$$
(1)

where Wi is the relative parameter for the ith parameter, wi is the weight assigned to that parameter and n is the number of parameters.

Then, a quality rating scale was calculated for each parameter by using the below formula

$$qi=\left(\frac{Ci}{Si}\right)*100,$$
(2)

where ci is the concentration of the parameter, and si is the standard value as per BIS, 2012.

In the next step, SIi was calculated using the following formula

$$SIi=Wi.qi.$$
(3)

The final water quality index is calculated by summation of all the SIi values

$$WQI= \sum SIi.$$
(4)

The interpolation map of WQI was generated from ArcGIS 10.8.

Irrigation water quality (IWQ) indices – IWQ indices were computed using the following formulas:

  1. 1.

    Sodium adsorption ratio (SAR) [53].

    $${\text{SAR}}=\frac{{Na}^{+}}{\sqrt{\frac{\begin{array}{cc}{Ca}^{2+}+& {Mg}^{2+}\end{array}}{2}}}.$$
    (5)
  2. 2.

    Soluble Sodium percentage (%Na) [54].

    $$\mathrm{\%}Na=\frac{{Na}^{+}}{\begin{array}{cc}\begin{array}{ccc}{Na}^{+}+& {K}^{+}+& {Ca}^{2+}+\end{array}& {Mg}^{2+}\end{array}}.$$
    (6)
  3. 3.

    Residual sodium carbonate (RSC) [55].

    $$RSC= {(HCO}_{3}^{-}+ {CO}_{3}^{2-})-\,({Ca}^{2+} {Mg}^{2+}).$$
    (7)
  4. 4.

    Magnesium hazard (MH) [56].

    $$MH= \frac{{Mg}^{2+}}{\begin{array}{cc}{Ca}^{2+}+& {Mg}^{2+}\end{array}}\times 100.$$
    (8)
  5. 5.

    Kelly’s Index (KI) [57].

    $$KI=\frac{{Na}^{+}}{\begin{array}{cc}{Ca}^{2+}+& {Mg}^{2+}\end{array}}.$$
    (9)
  6. 6.

    Total hardness [58].

    $$TH=\begin{array}{cc}{Ca}^{2+}+& {Mg}^{2+}\end{array}.$$
    (10)

Note: All ion units are expressed in meq/L.

Software tools used in the analysis included ArcGIS 10.8, ERDAS 14, SPSS 16.0, Aqua 1.1.1, and ENVI 5.2.

3 Result and discussion

3.1 Groundwater chemistry

Table 2 shows the descriptive statistics of groundwater parameters. The mean values for major cations, anions, and heavy metals were found to be in the following order: Ca2+  > Na+  > Mg2+  > K+ for cations and Cl > \({\text{HCO}}_{3}^{ - }\) > \({\text{CO}}_{3}^{2 - }\)  > \({\text{SO}}_{4}^{2 - }\) for anions, while for heavy metals: Cu < Cd < Cr < Co < Ni < Tl < As < Se < Pb < Ba < Zn < Al < Mn < Fe (Table 2).

Table 2 Distributions of physiochemical parameters of the subsurface Aquifer

Furthermore, it was observed that the concentrations of the following ions—Na+, K+, Ca2+, \({\text{CO}}_{3}^{2 - }\), \({\text{HCO}}_{3}^{ - }\), and Cl, exceeded the permissible limits in 16%, 4%, 8%, 72%, and 4% of the sub-surface water samples, respectively, according to the Bureau of Indian Standards (BIS) [53]. Conversely, Mg2+, F, \({\text{SO}}_{4}^{2 - }\), \({\text{NO}}_{3}^{ - }\), and \({\text{PO}}_{4}^{3 - }\) were found to be within permissible limits in all the water samples.

3.2 pH, EC, and TDS

The spatial distribution maps for pH, EC, and TDS can be seen in Fig. 5. The pH ranges from 6.20 to 8.50, with a mean value of 7.44 (Table 2). Only 2 samples were found to be below the permissible pH limit (6.5–8.5) given by BIS [53]. The lower pH values in interconnected zones can be ascribed to rainwater percolation through aquifer zones. Furthermore, it was observed that the highest EC and TDS values are in the upper-middle part of the region, with the northern region exhibiting higher values compared to the southern region. Interestingly, proximity to the seashore did not significantly influence either EC or TDS levels, and all samples were found to be within permissible limits as per BIS standards [53]. The elevated TDS in the middle region of the study area are attributed to interconnected lineaments that undergo erosion due to seismic disturbances, subsequently dissolving into the groundwater through rainwater infiltration. Heavy rainfall, deeper aquifers and topography of the region prevent seawater contamination in upper middle and southern region of middle Andaman.

Fig. 5
figure 5

pH, EC, and TDS map of the study area

3.3 Spatial variation of major ions

Spatial variations in major ions (Ca2+, Na+, Mg2+, K+, Cl, \({\text{HCO}}_{3}^{ - }\), \({\text{CO}}_{3}^{2 - }\), \({\text{SO}}_{4}^{2 - }\), \({\text{NO}}_{3}^{ - }\), \({\text{PO}}_{4}^{3 - }\))were analyzed statistically and are presented in Table 2 and Fig. 6. Spatial mapping was accomplished using the inverse distance weighting (IDW) tool within ArcGIS 10.8, which assumes the proximity rule. The distribution of alkali metals (Na+ and K+) was observed to be higher in the northern region, likely due to fractures opening to the sea, with some patches of Na enrichment also found in the southern region. The prevalence of Ca2+, along with carbonate and bicarbonate, exhibited a similar spatial pattern to Na+, indicating ion exchange processes with limestone minerals due to the presence of Na+. High concentrations of Magnesium and Carbonate were found in the middle and southern regions of Middle Andaman. Fluoride exhibited a similar distribution pattern to Calcium and Bicarbonate, suggesting rock–water interactions within the aquifers. Elevated Chloride levels in the northern region indicated seawater influences in the groundwater. The high solubility of chloride or selective absorbance of sodium ions may facilitate its advancement in the aquifer compared to other ions such as carbonate and sulphate, and the influx of freshwater likely fails to flush out chloride ions, may indicate a potential retention mechanism within the aquifer system (Ledford et al. 2016). The investigation into the impact of seawater intrusion, as indicated by the combination of 10 ionic ratios of major ions, demonstrated a moderate to slightly affected state in 98% of the samples, as reported by Kumar and Mukherjee [36]. Likewise, higher concentrations of \({\text{SO}}_{4}^{2 - }\), \({\text{NO}}_{3}^{ - }\), and \({\text{PO}}_{4}^{3 - }\) may be indicative of anthropogenic activities such as irrigation, tourism, or domestic waste.

Fig. 6
figure 6figure 6

Spatial maps of sodium, potassium, calcium, magnesium, carbonate, bicarbonate, chloride, fluoride, sulphate, nitrate, and phosphate

3.4 Heavy metals

The statistical distribution and spatial variation of heavy metals are presented in Table 2 and Fig. 7. The enrichment of heavy metals is attributed to rock–water interactions in the aquifers. The northern region of the study area is dominated by heavy metals such as As, Ba, and Se, while the southern region is characterized by heavy metals like As, Cr, Mn, and Se. The interconnected fractures in the middle portion of the study area, formed by ophiolite formations, exhibit higher concentrations of Fe, Cu, Pb, As, Zn, Ni, Co, Se, and Al. Movement within these interconnected fractures appears to be influenced by earthquakes, which expose the surface layer to groundwater in the aquifers.

Fig. 7
figure 7figure 7

Spatial maps of iron (Fe), copper (Cu), lead (Pb), arsenic (As), chromium (Cr), manganese (Mn), zinc (Zn), nickel (Ni), cobalt (Co), barium (Ba), selenium (Se), and aluminium (Al)

It's important to note that Iron, Lead, Arsenic, Manganese, Nickel, Selenium, and Aluminium were found to exceed permissible limits in 40%, 100%, 96%, 56%, 4%, 100%, and 80% of the samples, respectively, based on BIS standards [53]. However, Copper, Chromium, Zinc, Cobalt, and Barium ions were found to be within permissible limits according to the same standards.

3.5 Hydrogeochemical processes

3.5.1 Binary diagrams

The scatterplot diagrams are shown in Fig. 8. The scatterplot of Ca2+ + Mg2+ vs \({\text{SO}}_{4}^{2 - }\) + \({\text{HCO}}_{3}^{ - }\) is employed to differentiate the weathering process (Fig. 8a). Samples positioned above the equiline represent carbonate weathering, while those below represents silicate weathering, as per Rajmohan and Elango [59]. Most of the samples exhibited carbonate weathering, signifying the dissolution of limestone minerals. The prevalence of calcium and magnesium further signifies the enrichment of alkaline earth metals due to the reverse ion exchange process within the aquifer system.

Fig. 8
figure 8

The binary plot of (a) Ca + Mg vs SO4 + HCO3, (b) Na + K vs Cl, (c) HCO3 vs Na, (d) Na vs Ca, (e) HCO3 vs Ca, (f) HCO3 vs Ca + Mg, and (g, h) total cations vs Na + K, respectively

In the scatterplot between (Na+ + K+) vs Cl (Fig. 8b), most samples are situated below the equiline. This suggests an excess of chloride compared to alkali metals, demonstrating carbonate weathering in the presence of seawater intrusion and the reverse ion exchange process.

The scatter plots of Na+ vs \({\text{HCO}}_{3}^{ - }\) (Fig. 8c) and Na+ vs Ca2+ (Fig. 8d) reveal the enrichment of calcium and bicarbonate probably due to reverse ion exchange process in the region. The substitution of calcium with sodium and an excess of calcium over sodium may indicate either the simple dissolution of limestone in groundwater or silicate weathering.

Similarly, the scatterplot of Ca2+ + Mg2+ vs \({\text{HCO}}_{3}^{ - }\) also supports the possibility of both calcium and magnesium being present in the aquifer.

In the scatterplot of Total cations vs Na+ + K+, a few samples are positioned close to the Na+ + K+ = 0.5TZ+ line, suggests that silicate weathering played a minor role in enriching alkali metals in groundwater [60, 61]. Conversely, the scatterplot of Total cations vs Ca2+ + Mg2+ reveals that silicate weathering caused the enrichment of alkaline earth metals in only a few samples (those close to Ca2+ + Mg2+  = 0.6 TZ+) [62].

3.5.2 Mineral analysis of soil samples

A total of 6 rock samples, 16 soil samples, 2 core samples (Fig. 9) were collected from different part of middle Andaman. The XRD examination of soil samples revealed the presence of various minerals, including aragonite, with intensity peak values at 3.396, 2.870, 2.484, 2.481, and 2.410, as well as calcite, which exhibited an intensity peak value of 3.030, 2.495 (Fig. 10). Chlorite was detected with intensity peak values of 7.150, 2.870, 2.550, 2.475, and 2.390, while chromite displayed intensity peak values at 2.950, 2.520, and 2.400. Dolomite was identified with common intensity peak values of 4.030, 3.690, 2.886, and 2.405, and Pyrite with 2.709, 2.423, and 2.212. Similarly, Magnetite was discovered with a common intensity peak value of 2.530 and 2.419. Furthermore, rock samples also exhibited the presence of carbonate minerals in the rock samples, as reported by Kumar and Mukherjee [36]. The analysis of core samples namely 9 (at depth 5 cm, 6 cm, and 4) and CR1 (4 cm) revealed the presence of minerals described above.

Fig. 9
figure 9

Spatial map of rock, soil and core samples of Middle Andaman

Fig. 10
figure 10

XRD plots of Soil sample (a) (SS1 to SS8) (b) (SS9 to SS16), (c) Soil profile (CR2-1, CR2-2 and SS9A-SS9D) and (d) Rock Sample (RS1-RS5), and labelled XRD peak of minerals present in middle Andaman

3.5.3 Ion exchange

Chloro-alkaline indices (CAI) serves as a valuable tool for comprehending the chemical processes responsible for the ion exchange between sub-surface water and the aquifer setting during both residency and mobility phases (Eqs. 11 and 12) [61]. This index, originally developed by Schöeller, is designed to detect ion exchange phenomena that transpire as groundwater traverses the aquifer [63].

CAI values can assume either positive or negative characteristics depending on the exchange of sodium and potassium ions in water with magnesium and calcium ions in the rock, and vice versa. A positive CAI value indicates the exchange of sodium and potassium ions in water with calcium and magnesium ions in the rocks, while a negative CAI value signifies the exchange of Ca and Mg ions in water with Na and K ions in the rocks (Eqs. 13 and 14) [64, 65].

More than 76% of the water samples exhibited a negative CAI value. This observation suggests that a significant portion of the region experiences the dissolution of limestone minerals due to interactions with saline intrusion (Fig. 11).

$${\text{CAI}} - {\text{I }} = \, \left( {{\text{Cl}}^{ - } - \left( {{\text{Na}}^{ + } + {\text{K}}^{ + } } \right)} \right)/{\text{Cl}}^{ - }.$$
(11)
$${\text{CAI}} - {\text{II }} = \, ({\text{Cl}}^{ - } - \left( {{\text{Na}}^{ + } + {\text{K}}^{ + } } \right)/ \, \left( {{\text{HCO}}_{{3}}^{ - } + {\text{SO}}_{{4}}^{{{2} - }} + {\text{CO}}_{{3}}^{{{2} - }} + {\text{NO}}_{{3}}^{ - } } \right) .$$
(12)
Fig. 11
figure 11

CAI-I and CAI-2 index of groundwater

All units are measured in meq/l.

The following Eqs. (13) and (14) describe the interpretation of the CAI value

$${\text{Negative CAI}}:{\text{ Ca}}^{{{2} + }} \left( {{\text{Mg}}^{{{2} + }} } \right)\, + \,{\text{2NaX}}\, \to \,{\text{2Na}}^{ + } \, + \,{\text{Ca }}\left( {{\text{Mg}}} \right)\, - \,{\text{X}}_{{2}} \left( {\text{Ion exchange}} \right).$$
(13)
$${\text{Positive CAI}}:{\text{ 2Na}}^{ + } \, + \,{\text{Ca }}\left( {{\text{Mg}}} \right)\,{\text{X}}_{{2}} \, \to \,{\text{Ca}}^{{{2} + }} \left( {{\text{Mg}}^{{{2} + }} } \right)\, + \,{\text{2Na}}\, - \,{\text{X }}\left( {\text{Reverse ion exchange}} \right).$$
(14)

3.5.4 Gibbs plot

Gibbs plots were used to illustrate the processes governing major sub-surface water chemistry. The graph plots TDS on the X-axis and the ratios Na+/(Na+ + Ca2+) and Cl/(Cl + \({\text{HCO}}_{3}^{ - }\)) on the Y-axis (Fig. 12). These plots categorize groundwater chemistry into three domains in which rock–water interaction is a predominant process influencing groundwater chemistry [66]. Study area exhibit lies near to equation and experiences high rainfall and evaporation. The presence of evaporation-crystallization or seawater influence was evident in some groundwater samples shown in upper centre part of the diagram.. The presence of elevated levels of heavy metals and TDS along lineaments suggests a correlation with seismic activity and the infiltration of rainwater through these geological features. The enrichment of ions in other parts of the study area is likely attributable to phenomena such as due to seawater intrusion/ sea salt spray or the leaching of surface salts into groundwater via soil. Additionally, some samples exhibited rock–water dominance alongside precipitation influences shown in lower centre of the diagram (Fig. 12).

Fig. 12
figure 12

Gibbs plot of water samples

3.6 Hydrochemical facies for groundwater

3.6.1 Piper plot and Chadha diagram

The Piper plot is a trilinear diagram used to classify the water type and hydrochemical facies of both surface and subsurface water bodies based on the of milli-equivalents percentage of major ions [53]. The structure consists of threedistinct fields: two triangular fields with cations on the left and anions on the right, and one projected as diamond-shaped field (Piper) [67] (Fig. 13a). Out of the 25 samples, 18 samples of Ca-HCO3 and 2 samples to Mg-HCO3 categories show the dominance of alkaline earth metals over alkali metals and weak acidic anions over strong acidic anions belongs to carbonate lithology. Furthermore, 1 samples in the Ca–Cl category indicates the prevalence of alkaline earth metals over alkali metals with strong acidic anions belongs to seawater. Four samples in the Ca–Cl (mixed type) category demonstrate the presence of alkaline earth metals with an increased portion of alkalies, along with a prevailing chloride content accounts seawater intrusion in the aquifers.

Fig. 13
figure 13

Piper diagram (a) and Chadha plot (b) of the study area

The Chadha plot comprises eight fields, with four on the axes and four in the quadrants [68] (Fig. 13b). Among the 22 samples in field 5, the representation is of recharging water (HCO3-Ca-Mg; HCO3-Ca; HCO3-Mg). In field 1 on the axis, there are 2 samples indicating that alkaline earth metals exceed alkali metals, while field 6 contains 1 sample representing the reverse ion exchange process (Cl-SO4-Cl-Mg; Cl-Ca-Mg; SO4-Ca-Mg) occurring in the water. The influence of limestone dissolution is evident in groundwater chemistry, with calcium, magnesium, and bicarbonate ions showing high dominance over other ions in the aquifer. The influence of seawater can also be observed in the ion exchange process, as depicted in the Piper plot. Furthermore, the Chadha plot depicts the predominance of alkaline earth metals over alkali metals, aligning with the Piper plot's findings of alkaline earth metal dominance in 20 samples. Table 3 presents the hydrochemical facies of groundwater.

Table 3 Hydrochemical facies for groundwater samples

3.6.2 Correlation matrix

The correlation matrix (Table 4) of the samples reveals several strong correlations, including TDS-EC, K+-Na+, Ca2+-Na+, Ca2+-K+, Co-Al, Cu-Co, Ni–Al, Ni-Co, Zn-Al, Zn-Co, Zn-Ni, \({\text{CO}}_{3}^{2 - }\)-Mg2+, \({\text{SO}}_{4}^{2 - }\)-EC, \({\text{SO}}_{4}^{2 - }\)-TDS, Cl-Na+, Cl-K+, Cl-Ca2+, F-Na+, F-K+, F-Ca2+, and F-Cl. These strong positive correlations suggest that the ions are interconnected, either mutually supporting each other or originating from the same source. Notably, the correlations of Na+-Ca2+, Ca2+-K+, Cl-Na+, and Cl-Ca2+ indicate interactions between seawater and limestone minerals. Similarly, the correlations among heavy metals Co–Al, Cu–Co, Ni–Al, Ni–Co, Zn–Al, Zn–Co, and Zn–Ni imply the intrusion of igneous rock with a higher fracture density. This intrusion may be exacerbated by seismic activity with a higher Richter scale, intensifying rock movement at fracture zones and subsequently releasing heavy metals into groundwater. In addition to these strong correlations, weak positive correlations were observed in Mg2+-EC, Cr-Mg2+, Cu-Al, Mn-Ba, Ni-Cu, \({\text{CO}}_{3}^{2 - }\)-pH, \({\text{CO}}_{3}^{2 - }\)-EC, \({\text{CO}}_{3}^{2 - }\)-TDS, \({\text{HCO}}_{3}^{ - }\)-EC, \({\text{HCO}}_{3}^{ - }\)-TDS, F-EC, and F-TDS. Conversely, a weak negative correlation was identified between Fe-pH and Fe-\({\text{CO}}_{3}^{2 - }\), suggesting the potential corrosion of iron in environments with higher pH and carbonated water.

Table 4 Correlation matrix of ions in groundwater

3.7 Principal component analysis (PCA) of major ions

PCA is a statistical technique employed to derive a new set of independent variables from an original dataset [69]. Each principal component condenses the variable information while reducing dimensionality, preserving the initial relationships between parameters [70, 71]. PCA has found applications in various environmental contexts, including groundwater hydrographs, monitoring wells, and the spatial and temporal analysis of heavy metals. The scree plot (Fig. 14) of PCA described the 5 significant components with eigen value greater than 1 to retain for further analysis. Table 5 presents the principal components, eigenvalues, and their corresponding variances (%), with five components having eigenvalues greater than 1, cumulatively explaining 78.088% of the variance.

Fig. 14
figure 14

Scree plot of the major ions and heavy metals

Table 5 Principal components analysis of water samples with factor loading, eigenvalue (> 1), total variance (%), and cumulative variance (%) of middle Andaman

The first component, accounting for 6.24% of the variance, exhibits a strong positive correlation (greater than 0.7) with Na+, K+, Ca2+, Cl2+−, and F. This component signifies the dissolution of limestone minerals influenced by seawater interaction along the coastline. The ion exchange process leads to calcium dissolution, replaced by sodium and potassium [36]. The region experiencing oceanic flushing and surface runoff interacting with limestone exhibits a low to moderate impact on groundwater, yet displays elevated levels of calcium and bicarbonate in seawater at Mayabunder, a finding corroborated by VishnuRadhan et al. who similarly observed high surface runoff in the middle to south Andaman region [72].

The second component, responsible for 32.86% of the variance, displays a strong correlation with pH, EC, TDS, \({\text{CO}}_{3}^{2 - }\), and Mg2+. This component indicates aquifer recharge from rainwater and carbon dioxide dissolution as carbonic acid, percolating and interacting with magnesium in groundwater.

The third component, with 8.09% variance, correlates with EC, TDS, and \({\text{SO}}_{4}^{2 - }\). This component likely signifies the contribution of sulphur minerals and/or sand volcano to groundwater. Additionally, sand volcanoes may contribute to the sulphate content in groundwater.

The fourth component, explaining 8.62% of the variance, correlates with \({\text{NO}}_{3}^{ - }\), \({\text{PO}}_{4}^{3 - }\), and As. This component reflects human activities such as tourism and the leaching of agricultural and domestic waste into the study area. Agricultural fertilizer usage may also contribute to subsurface water contamination.

The fifth component, with 6.204% variance, correlates with Se, Fe, and \({\text{HCO}}_{3}^{ - }\), possibly indicating rock weathering along lineaments due to earthquake activity. Frequent earthquakes in the region may shake the lineaments, leading to rock weathering and subsequent enrichment in groundwater.

3.8 Groundwater suitability for drinking and agricultural purposes

3.8.1 Water quality index for drinking purpose

The groundwater quality map showed that most of the region has groundwater in the “Good water” followed by the excellent category along with some patches of poor and very poor groundwater (Fig. 15). Only 8% of samples were found unsuitable for drinking water purposes (Table 6). Water quality index is found good near interconnected fracture zones but have heavy metal concentration such as Iron, Lead, Arsenic, Manganese, Nickel and Selenium. The effect of seawater intrusion can be seen in the deteriorating water quality as well as removing the pollutants during seawater flushing near the coastal area of the Rangat region. The lineament opening near Mayabunder was found to have a recharging zone balancing the pressure gradient toward seawater intrusion. The heavy rainfall, land runoff, and oceanic flushing have been deteriorating seawater quality, posing a potential threat to marine biota and leading to bioaccumulation in the food chain.

Fig. 15
figure 15

Water quality index map of the area (seawater not included)

Table 6 Water quality index of the samples

3.9 Water quality for irrigation purposes

3.9.1 Total hardness

Hardness is defined as the “sum of calcium and magnesium ion concentrations” in water. It serves as an indicator to assess water suitability for domestic, irrigation, and industrial purposes [62, 73]. TH in the area ranged from 52.16 to 586.14 as CaCO3. High hardness levels were predominantly observed in the northern region, with some patches in the southern region (refer to Fig. 16f and Table 7). The region observed temporary hardness in all water samples except seawater taken at the Mayabunder coast.

Fig. 16
figure 16

Sodium adsorption ratio (a), Soluble Sodium percentage (b), Residual sodium carbonate (c), Magnesium hazard (d), Kelly’s index (e), Total hardness of the study area (f)

Table 7 Water quality indices for irrigation for each sample

3.9.2 Kelly’s Index (KI)

KI is employed to assess alkali hazards to soil in the context of irrigation. An index value exceeding 1 describe unsuitability for irrigation [74]. All the samples were found to be suitable for agricultural use, as depicted in Fig. 16e and Table 7.

3.9.3 Magnesium hazard (MH) or magnesium adsorption ratio

The amount of magnesium content relative to the total divalent cations in irrigation water is examined to assess its adverse impact on agriculture [75]. High magnesium absorption can affect the physical properties of soils. Harmful effects become apparent when the ratio falls below 50. Figure 16d and Table 7 provide a spatial map and statistical data illustrating that only 8% of the samples exceeded desirable limits, primarily in the coastal area of the Rangat district.

3.9.4 Residual sodium carbonate (RSC)

The concentration of carbonate and bicarbonate is assessed to determine groundwater suitability for irrigation [76]. The empirical measurement of carbonated water is based on the assumption of the precipitative nature of calcium and magnesium carbonates [77]. RSC quantifies the detrimental effects of carbonated water on crops, with values less than 1.25 meq/l considered safe for irrigation [78]. Figure 16c and Table 7 reveal that only 16% of the samples, primarily in the southern region, exceeded the 1.25 meq/l threshold and are thus unsuitable for irrigation purposes.

3.9.5 Soluble sodium percentage (Na%)

Elevated sodium levels are also deemed hazardous for irrigation. The excess of sodium can be associated with alkalinity or salinity, depending on its interaction with carbonate/bicarbonate or chloride/sulphate [79]. It adversely affects both soils and vegetation and can impede the germination of seeds. Sodium levels are quantified in terms of the soluble sodium percentage, with a permissible limit of 66 for irrigation. None of the samples were found to beyond the permissible limit, as illustrated in Figure 16b and Table 7.

3.9.6 Sodium adsorption ratio (SAR)

Sodium adsorption ratio is an indicator used to evaluate the suitability of water for agricultural practices. It measures the extent to which absorbed calcium and magnesium can be replaced by sodium through cation exchange processes in soil. A high SAR can damage soil structure and the agricultural ecosystem [79]. According to Raghunath [70], water is suitable for irrigation if it has a SAR value of less than 10. In this study, all the samples in the area had SAR values below 10. Spatially, higher SAR values were observed in the northern and some parts of the southern regions, as depicted in Fig. 16a. Notably, seawater (Sample no. 25) had a SAR value well below 10 due to natural limestone interaction with seawater. As per the USSL, all the samples except seawater exhibiting low sodium levels (< 10) with salinity ranging from very good (20) to medium (4 samples) have been observed, suggesting their suitability for irrigation purposes [80, 81].

4 Conclusion

The hydrogeochemistry of Middle Andaman is significantly influenced by various factors, including oceanic flushing, limestone weathering, evaporation, rock-water interaction, and seawater intrusion. The geomorphology of the region comprises undulating terrains and steep slopes, resulting in ~ 75% of precipitation being lost as runoff to the sea [48]. The impact of seawater on surface runoff, oceanic flushing of pollution has been deteriorating the marine pollution and unpolluted aquifers in many parts of the study area. Elevated levels of major ions such as Na+, K+, Ca2+, \({\text{CO}}_{3}^{2 - }\), \({\text{HCO}}_{3}^{ - }\), and Cl depicted a considerable change in groundwater chemistry. Additionally, the presence of heavy metals including Iron, Lead, Arsenic, Manganese, Nickel, Selenium, and Aluminium above permissible limits highlight a critical issue of contamination in groundwater. The intrusion of igneous rock (Ophiolite) within sedimentary formations, characterized by higher fracture density, contributed to the enrichment of heavy metals in the middle region of the study area. Moreover, the water quality index indicated unsuitability for drinking purposes in 8% of the water samples. Salma Begum has reported that the inaccessibility of treated drinking water supply and poor hygiene conditions cause communicable diseases such as diarrhea [82]. Regarding irrigation indices, Total Hardness (TH), Residual Sodium Carbonate (RSC), and Magnesium Adsorption Ratio (MAR) were found unsuitable for irrigationin significant portion of area may adversely affect soil health and crop productivity, respectively. Conversely, no samples were deemed unsuitable for irrigation based on indices such as the Permeability Index (PI), Kelly’s Index (KI), Soluble Sodium Percentage (Na+ %), and Sodium Adsorption Ratio (SAR). Analysis using the Piper plot revealed that mixed water types in different parts of the region indicate initial stage of seawater intrusion. Meanwhile, the Chadha diagram indicated processes like "Recharging water in most samples, with instances of alkaline earth metals exceeding alkali metals and reverse ion-exchange water occurring in some parts of the region. The dominance of calcium carbonate and magnesium carbonate is confirmed by the presence of an ion exchange process and seawater intrusion, resulting in the limestone dissolution near coastal area. Lastly, the Gibbs plots demonstrated that rock-water interaction in the evaporation-crystallization domain explained the presence of elevated concentrations of lead, selenium, and manganese in groundwater. Although, research paper depicts a lot of aspect of Hydrogeochemistry of middle Andaman still time series analysis tides, sea wave, sediment cycle and biochemistry will give a holistic idea. Latest tools like machine learning, isotope studies and geophysical methods would improve the research dealing with system of systems.