Introduction

Groundwater is the most abundant and pristine source of drinking water for both rural and peri-urban populations in Sub-Saharan Africa (SSA). In many cities of SSA, the rapid expansion of impoverished settlements, deriving from the influx of rural-urban migrants in search of better livelihoods, has engendered acute water access challenges (O’Brien et al., 2017). These settlements often lack access to potable water because many households are not connected to city supply networks. Even where connected, the supplies are often intermittent and, therefore, unreliable. For many cities, this situation is not limited to poorer neighborhoods. Consequently, households lacking access, or underserved by city supply networks regardless of location, resort to groundwater exploitation. Because SSA is mostly tropical, groundwater is often shallow and easily exploitable. Whereas a privileged few can afford a borehole in their homes, the majority utilize hand-dug wells (Liddle et al., 2016). Equally bedeviling the peri-urban communities of SSA is the lack of or limited access to improved sanitation facilities, resulting in a proliferation of unimproved (on-site) sanitation facilities such as septic tanks and pit latrines (Lapworth et al., 2017). The unintended consequence is that on-site sanitation systems often exist in close proximities to domestic wells, heightening the risk of groundwater cross-contamination (Graham & Polizzotto, 2013). This constitutes a serious water and sanitation challenge, which is the focus of this research.

From the human health perspective, the close co-location of drinking wells and sanitation facilities poses a threat of groundwater contamination with serious human health implications. In the USA, for example, a study by Bremer & Harter (2012) found that shallow domestic wells are highly prone to contamination by leachate from septic tanks. Further, Naftz & Spangler (1994) observed that contamination of groundwater and surface water from sewage leakages is a common occurrence in growing urban areas. Studies elsewhere in Ireland (Keegan et al., 2014), Mexico (Metcalfe et al., 2011), and Sri-Lanka (Ravi et al., 2016) have reached similar conclusions. In SSA, an investigation by Arwenyo et al., (2017) in Uganda, highlighted the impacts of septic system density on shallow groundwater quality, and reported that groundwater contaminant load increased in proportion to the density of septic systems. Other investigations, including those from Nigeria (Ikem et al., 2002; Adetunji & Odetokun, 2011), Zimbabwe (Dzwairo et al., 2006; Misi et al., 2018), and Uganda (Bakyayita et al., 2019; Nyenje et al., 2014), have similarly reported findings of urban groundwater pollution relating to sanitation practices, including septic systems, open refuse dumping, and or open defecation. In Ghana, Aboagye and Zume (2018) found evidence of peri-urban groundwater pollution due to the prevalent use of pit latrines and open refuse dumping in the city of Kumasi. A useful compilation of the impacts of pit latrines on groundwater quality in Africa and elsewhere can be found in Graham and Polizzotto (2013). From personal knowledge, the locals constructing septic systems in most communities barely understand such site-specific conditions as geology, soil properties, and groundwater flow patterns that may control contaminant migration. This may be a contributing factor to the fate of groundwater quality in SSA. Further, there are scarcely any enforceable regulations on the construction and maintenance of septic systems that safeguard against groundwater cross-contamination. Hence, there is widespread vulnerability of shallow groundwater systems regionally. Lapworth et al., (2017) undertook a comprehensive review of the major groundwater quality-sanitation research done so far in SSA. The authors concluded that fewer systematic urban/peri-urban groundwater quality studies have been carried out in SSA relative to other parts of the world. They recommend more focused, high-frequency temporal studies that can yield more generalizable results for aiding groundwater protection policy and improved health outcomes for dependent populations.

The need for sustained investigations of groundwater quality in peri-urban communities of SSA becomes more urgent given the estimated growth trends in Africa’s urban population (United Nations, Department of Economic and Social Affairs, Population Division, 2019), and the comparatively slower pace of infrastructural developments and service provisioning. It is highly unlikely that the prevailing water quality and sanitation issues will abate without measured and sustained efforts. It is in the context of the current and impending challenges that the United Nations’ (UN) Sustainable Development Goals (SDGs) is framed. SDG Goal 6 specifically targets the critical need for providing access to safe drinking water and improved sanitation for all populations. For SSA, gains made have been modest. Only 24% of SSA’s population has access to safe drinking water, and 28% to basic sanitation facilities that are not shared with other households (UNESCO-WWAP, 2019).

Lastly, for coastal locations, it is well established that saltwater intrusion poses the risk of coastal groundwater contamination for millions of inhabitants worldwide (Shin et al., 2020). The current study is of great significance not just for the study area but throughout Ghana. Only 18% of the country’s population has access to improved sanitation (UNICEF & WHO, 2019), with 22% still practicing open defecation in both urban and rural areas. It has been estimated that about 70% of diseases in the country are related to poor access to water and sanitation (Water.org, 2017 report). Regardless, very few studies in Ghana have comprehensively explored the linkage between peri-urban groundwater quality and on-site sanitation facilities. For the Cape Coast Metropolitan Area in particular, this study is the first of its kind. The city of Cape Coast is one of Ghana’s bigger metropolitan areas and hosts the country’s 3rd largest university. It has a growing population, including fast-growing peri-urban communities. Most of the city depends as much on groundwater as on on-site sanitation facilities. Moreover, being a coastal city, the possibility of saltwater intrusion from the coastline into adjoining shallow groundwater exists. In fact, there have been recent unofficial accounts by some well owners, of their well water tasting saltier. Despite obvious challenges, not even a cursory exploration of the city’s groundwater quality has been undertaken. The goal of this study is to address the knowledge gap by comprehensively evaluating the quality of shallow groundwater across five peri-urban communities of the city. Although the major focus of the research is on assessing the impacts of on-site sanitation facilities on the shallow groundwater quality, a secondary goal of examining the impacts of saltwater encroachment was also pursued.

Materials and methods

The study area

This research was conducted in Cape Coast, one of the six metropolitan areas in Ghana. The city’s metropolitan area is approximately 122 km2, with a 2010 population of 169,894, comprising 48.7% males and 51.3% females (Ghana Statistical Service, 2013). The city is flanked on its southern end by the Gulf of Guinea, and it is bounded by the following latitudes and longitudes: 5° 5′48″ and 5° 8′ 30″ N, and 1° 15′ 35″ and 1° 18′ 35″ W (Fig. 1). Physiographically, the landscape within the study area is generally undulating, with an average elevation of 75 m above mean sea level. The area is drained by the Kakum River, together with its smaller tributaries. Within the city, a network of drainage ditches (locally called gutters) serves as flood control structures that help drain inner-city areas following rainfall events. The climate of Cape Coast is the dry equatorial, characterized by a bimodal rainfall distribution, with peaks in June and September, respectively. The total annual rainfall is between 750 and 1000 mm. Temperatures are moderately high (21 to 32 °C) throughout the year, with the warmest period being between February and May, while the coolest between June and August (Ghana Statistical Service, 2013). Our study specifically focused on five peri-urban communities, namely, Akotokyir, Kwaprow, Amamoma, Apewosika, and Duakor (refer to Fig. 1).

Fig. 1
figure 1

Map of study area

Geologically, the study area is largely underlain by the Birimian Supergroup, made up of metamorphic rocks such as gneisses, schists, amphibolites, and migmatites. This older Birimian Supergroup has been deformed, metamorphosed, and intruded into by the younger Granitoid Complex, composed of rocks such as biotite, muscovite, silicates, feldspar, and others. Part of the study area is underlain by the Sekondian Group, composed mostly of sandstones, conglomerates, and shales, with interbedded limestones. Lining the area closer to the coastline are the modern coastal sediments (Eisenlohr & Hirdes, 1992; Leube et al., 1990). Several parts of the area are intruded into by wetlands. Depths to groundwater below the surface in the study area fluctuate with season. During the rainy season, the water table in most hand dug wells is less than a meter from the surface. Even in the dry season, the water table is still generally shallow, with average depths of less than 5 m in wells. Although there are no data on sea-level rise near the study area to gauge elevation changes between the coastline and adjoining communities, the risk of saltwater encroachment into wells, particularly for the communities closer to coastline (e.g., Apewosika, Duakor, and Amamoma) cannot be ruled out.

Methodology

Data collection targeted five urban communities with varying demographic and physical characteristics, as well as varying densities and ages of settlements. The following factors were expected to reflect directly or indirectly on the quality of shallow groundwater in the study communities, hence, were instrumental to the selection of sites for sampling: (1) proximity to the University of Cape Coast campus (see Fig. 1). The communities that are closer to the campus are more densely populated due to the addition of off-campus student population, which invariably, increases the pressures on groundwater sources and on-site sanitation facilities; (2) the density of settlements was assumed to correlate with septic system density, although the later was not directly determined, and (3) the distance of a community from the coastline (see Fig. 1) was considered important to gauge any influence on groundwater quality from saltwater intrusion. A common denominator with all the communities is the prevalent use of shallow domestic wells alongside on-site sanitation facilities.

A total of 40 domestic wells were randomly sampled in the communities based on availability and access. However, the number of wells per community is reflective of the community’s size. Each well was sampled only once between August 7 and 8, 2019. All the wells sampled were located within 120 m of a septic tank/toilet facility, with the closest well just 2.4 m from a point source. Figure 2 shows the locations of the sampled wells relative to septic tanks/pit latrines. At each well, a set of in-situ measurements were made, including measuring depth-to-water in wells, recording GPS coordinates of wells and septic tanks, pH, electrical conductivity (EC), total dissolved solids (TDS), turbidity, color, and total suspended solids (TSS). The hand-held Oakton PC450 meter was used for the in-situ measurements. Next, water samples were collected from the wells for further laboratory analyses. The samples were analyzed for the simple quality-indicator parameters including alkalinity, total hardness (TH), calcium hardness, and magnesium hardness. More in-depth testing focused on the following chemical parameters: nitrate (NO3), nitrite NO2), ammonium (NH4+), orthophosphate (PO43−), sulfate (SO42−), bicarbonate (HCO3), calcium (Ca2+), magnesium (Mg2+), chloride (Cl), sodium (Na+), potassium (K+), fluoride (F), iron (Fe2+), and manganese (Mn+). Because pH readings overwhelmingly indicated mild acidity, there was no need testing for the carbonate (CO32) ion. Lastly, each sample was tested for total coliform (TC), fecal coliform (FC), and E. coli.

Fig. 2
figure 2

Map showing locations of sampled wells and septic tanks/pit latrines

Quality assurance procedures were strictly followed in the collection, handling, and testing of field samples to ensure the integrity of the results. For the water chemistry, the collected samples were properly labeled, preserved, and delivered (within holding times) to the laboratory of the Water Research Institute of the Council for Scientific and Industrial Research (CSIR) in Accra, Ghana for testing. Highly trained and experienced personnel at the laboratory assisted with the laboratory testing. All the reagents used for testing were of high quality, and determination of the water chemistry parameters conformed to the standard methods for water and wastewater analyses contained in the 23rd edition of the American Public Health Association (APHA, 2017). Concentrations of Na+ and K+ were determined using the Jenway Research Flame Photometer, while Ca2+ and Mg2+ were obtained using the EDTA Titrimetric method. Argentometric titration was used to determine the concentration of the Cl ion, while HCO3 was calculated. SO42− was obtained by the turbidimetric method. NO3 was obtained by hydrazine reduction, NO2 by the diatization method, while the stannous chloride method was used for obtaining the PO43− concentration. The ammonium cation was determined separately by colorimetry, whereas the trace ions (Fe2+ and Mn2+) were analyzed with the Atomic Absorption Spectrophotometer (AAS)-Agilent 200 Series AA, which was properly calibrated. Percentage error for the cation-anion balances for all the water chemistry results were within ±20%.

The bacteriological analyses were done using the membrane filtration method. Aliquots of 100 ml for each of the water samples were separately filtered through 0.45-µm pore size membrane filters. Chromocult Agar medium was used for the determination of total coliform and E. coli bacteria. Total coliform and E. coli parameters were incubated at 37 °C for 24 h. MFC medium was used for the determination of fecal coliform and incubated at 44 °C for 24 h. The bacteria colonies were determined using a colony counter and were expressed as Coliform Forming Units per 100 ml (cfu/100 ml). As a quality assurance measure, all samples for the bacteria analyses were delivered to the lab within 12 h of collection.

Data handling and analyses

Several approaches were used to explore the acquired groundwater quality data, ranging from simple statistical summaries to multivariate statistics. Similarly, steps were taken to assess the samples for potential impacts of on-site sanitation facilities and saltwater encroachment on the groundwater quality. To ensure the integrity of our ultimate interpretations, several pre-processing steps were taken to screen the data for all measured variables before embarking on statistical analyses. First, censored data had to be fixed. Some of the parameters (e.g., Fe2+, Mn2+, NH4+) contained “less than” (<0.01) values, indicating concentrations below the detection limit of the instrument used. However, “less-than” values cannot be used for multivariate statistical analyses. Therefore, all such readings were replaced by multiplying the lower detection limit by 0.55 (Güler et al., 2002). The next step was to evaluate the statistical distribution of each variable to help decide on the use of appropriate hypothesis testing method (i.e., whether parametric or non-parametric). Data for each variable were first tested for normality using the Shapiro-Wilks test at the 0.05 significance level, and by visual inspection of histograms and Q-Q plots. This screening revealed that apart from pH, which was slightly negatively skewed, the rest of the parameters were positively skewed to varying degrees. Thus, non-parametric tests were used instead of the parametric, i.e., the Mann-Whitney U test in place of the T-test, and the Kruskal-Wallis H test in place of the one-way ANOVA. This was the case because most of the parameters still failed the normality test after log transformation.

Statistical summaries for analyzed parameters are presented and interpreted. Further exploration of the data was undertaken using two multivariate statistical techniques—hierarchical cluster analysis (HCA) and principal component analysis (PCA). Because both methods make assumptions about equal variances (homoscedasticity) and normal distribution of data variables, data for all parameters except pH were log-transformed and further standardized by calculating their standardized z-scores. By this approach, each variable receives equal weights in the analyses, and for HCA particularly, it ensures the calculated Euclidean distances are not too strongly influenced by the variable with the greatest magnitude (Güler et al., 2002). HCA was used to classify the analyzed parameters into groups, or clusters based on their similarity to each other (Güler et al., 2002). Typically, members of the same cluster can be expected to be distinct from those of other clusters, with the effect that they may be traceable to a common origin. In this study, HCA was accomplished using Originlab 2020b. Ward’s linkage method, proven to form smaller, distinct similarity clusters than those of other methods (Güler et al., 2002), was used as the agglomeration technique. The squared Euclidean distance was used for determining the similarity linkage distances. The following parameters were used in the analysis: total coliform (TC), fecal coliform (FC), E. coli, electrical conductivity (cond.), turbidity, color, TSS, Ca2+, Cl, HCO3, K+, Mg2+, Na+ NO3, NO2, pH, SO42−, F, NH4+, PO43−, Fe2+, and Mn+. Note that because TDS is highly correlated with conductivity, alkalinity with HCO3, and total hardness (TH) with Ca2+ and Mg2+, the trio of TDS, alkalinity, and TH were dropped from the HCA input to reduce unnecessary redundancies. Both the Q-mode (i.e., classification by measured parameters) and the R-mode (classification by samples) clustering approaches were used to comprehensively evaluate the water quality data. Indeed, the R-mode classification helped to identify a cluster with samples adjudged to represent background parameter values in the study area. Hence, it facilitated our inferences of contaminated sample locations. Results of HCA are typically presented on a dendrogram showing the different clusters or groups.

PCA is a tool for reducing the dimensionality of multivariate data (Güler et al., 2002). Given a multivariate set of parameters, n1, n2, n3, …, ni, obtained from m samples, in an m × n matrix, the goal of PCA is to reduce the m × n matrix to a smaller n × k matrix, obtained from the linear combinations of the original parameters (n1, n2, n3, …, ni). In the final matrix, n represents the number of parameters and k represents the extracted components with factor loadings that best describe the overall variability in the original data. For this study, PCA was implemented in the IBM SPSS statistic 26 version on a 40 × 22 matrix (i.e., 40 samples × 22 variables). Both the Kaiser-Meyer-Olkin (KMO) measure of sampling adequacy (= 0.630) and the Bartlett’s test of sphericity (P = 0.000) supported the use of the PCA method. Parallel analysis was performed to retain only the significant principal components (O’Connor, 2000). Although several studies applying PCA to hydrogeochemical data routinely use the Kaiser criterion (KC), which extracts all PCs with eigenvalues >1, investigations involving Monte Carlo simulations have demonstrated that the KC often over-extracts PCs because the components are not subjected to significance testing (Kanyongo, 2005; O’Connor, 2000). The PCs extracted based on parallel analysis are tested for statistical significance; hence, they are more accurate. The resulting component score matrix was rotated using the orthogonal varimax rotation to produce the final factor loadings (Güler et al., 2002). PCA was used alongside HCA to assess the relative contribution of individual parameters or groups of parameters to the groundwater quality state.

Results and discussion

Bacteria

Our study found wide-spread contamination of domestic wells with fecal bacteria throughout the study area. Table 1 presents the mean counts and ranges (minimum to maximum counts) for the analyzed bacteria, total coliform (TC), fecal coliform (FC), and E. coli, in each community. Of the 40 wells tested, 97.5% contain high counts of TC, while FC and E. coli counts in 87.5% (35/40) and 67.5% (27/40), respectively, were far above the WHO thresholds of 0 cfu/100 ml (WHO, 2017). In the entire area, only one well (Kwapraw well 8) registered no bacteria count. We have provided evidence that the massive infestation of groundwater in the study area with fecal bacteria is due to the influence of on-site sanitation facilities. Contamination of groundwater with enteric bacteria has been widely reported across Ghana (e.g., Aboagye & Zume, 2018; Boateng et al., 2013). Moreover, multiple investigations in SSA suggest that fecal waste is the dominant source of groundwater contamination with bacteria in urban areas where high-density housing exist alongside unimproved sanitation facilities (Graham & Polizzotto, 2013; Lapworth et al., 2017).

Table 1 Summary of the microbiological test results

The physicochemical parameters

Summary statistics for the physicochemical parameters are shown in Table 2. Overwhelmingly, groundwater in the study area is acidic, with 67.5% of the wells having a pH below 7.0 pH units. The values ranged from 4.41 to 8.26 pH units (mean pH = 6.75). However, 72% of the wells have pH values within the World Health Organization (WHO) limit for drinking water of 6.8–8.5 (WHO, 2017). Only 11 wells (28%) fall below this limit. Electrical conductivity and TDS values range from 403 to 6667 µS/cm and 242 to 4000 mg/L, with means of 1853 µS/cm and 1112 mg/L, respectively. These two parameters are highly correlated and indicate the degree of mineralization in the water due to the presence of inorganic salts. The WHO has a desirable TDS limit of 1000 mg/L for drinking water, although this limit is based on the palatability of the water rather than on human health concerns. In the study area, 65% of the wells had conductivity values above 1000 µS/cm and 35% return TDS values above the WHO limit. Samples with conductivity/TDS values above 1000 units are suspected of contamination and have been investigated further. Total hardness (TH) of the water samples ranged from 51 to 2360 mg/L CaCO3. TH in water is caused by dissolved calcium and to a lesser extent magnesium. The Ghana National Drinking Water Quality Management Framework (NDWQMF) has stipulated a TH limit of 500 mg/L for drinking water sources (Ghana MWRWH, 2015). Overall, 20% of the water samples were above this limit. Further classification of the TH was done using the US Geological Survey’s (USGS) water hardness classification scale. On this basis, there is no soft water in the study communities. Roughly, 2.5%, 25%, 15%, and 55% of the water samples are classified as slightly hard, moderately hard, hard, and very hard, respectively. Except for one community (Akotokyir), with only a handful of moderately hard waters, groundwater in the rest of the communities is overwhelmingly very hard. The spatial pattern of water hardness seemed correlated with that of conductivity/TDS and is likely driven by sanitation-related contamination. Relatedly, alkalinity ranged from 0 to 675 mg/L CaCO3, with wells at Duakor showing the highest alkalinity signatures overall. Turbidity and TSS are strongly correlated (R2 =0.92) and ranged from 0.5 to 96.7 NTU, and 0.5 to 75 mg/L, respectively. Compared to the Ghana water quality (GWQ) turbidity limit of 5 NTU, 35% of samples exceeded the threshold. Lastly, color ranged between 1.25 and 50 Hz, with 38% of samples exceeding the GWQ limit of 5 Hz. Collectively, these aesthetic parameters are much more likely to be mobilized by anthropogenic factors than natural causes in the study area. Investigators in other parts of SSA have linked anomalous groundwater hardness, alkalinity, TSS, turbidity, and color readings with on-site sanitation contamination (Dzwairo et al., 2006; Jimmy et al., 2013).

Table 2 Statistical summaries of the analyzed physicochemical parameters

The results for the major cations and anions show the concentration for Na+ ranging from 45.5 to 880 mg/L, with a mean of 242.5 mg/L. Half of the samples (50%) exceeded the WHO taste threshold of 200 mg/L for sodium, indicating a high level of sodium enrichment. The concentration ranges for Ca2+ and Mg2+ were 9.3 to 381 mg/L and 2.5 to 342 mg/L, respectively. The K+ ion concentration ranged from 2.4 to 290 mg/L. For the major anions, most of the samples were unusually enriched in Cl, with concentrations ranging from 66.2 to 2383 mg/L. Those for HCO3 ranged from 0 to 824 mg/L, and SO42− from 5 to 320 mg/L. Both Cl and SO42− have a WHO threshold of 250 mg/L. The Cl threshold is exceeded by 60% of the samples and that for SO42− is exceeded by 12.5% of the samples. The order of dominance of the major cations and anions in the study area is as follows: Na+ > Ca2+ > K+ > Mg2+ and Cl > HCO3 >SO42−, respectively. This order is the same as reported by two other studies in the broader Central Ghana area (e.g., Affum et al., 2015; Asare et al., 2016).

For the minor ions, the concentration of F ranged from < 0.00 to 2.28 mg/L. A total of 17 samples (42.5%) did not have detectable F concentrations and only one sample (Duakor Well 6) exceeded the WHO limit of 1.5 mg/L. The concentrations of NO2 and NO3 varied from < 0.001 to 16.4 mg/L and < 0.001 to 12.6 mg/L, respectively. These have the WHO limits of 3 mg/L and 50 mg/L, respectively. Regionally, four samples, Duakor Well 4, Kwapraw Well 43, Amamoma Well 25, and Amamoma Well 16, had concentrations of NO2 at roughly 5×, 4×, 3×, and 2× the WHO limit, respectively. The spatial distribution of NO2 is highly correlated with NO3, although the concentration of NO3 in all samples was far below the WHO limit, with a maximum concentration of 12.6 mg/L. The concentration of NH4+ ranged from < 0.001 to 10.3 mg/L. Its occurrence is limited to fewer samples, with 42.5% of the samples having values below the detection limit. Phosphate (PO43−) concentration ranged from 0.059 to 3.97 mg/L. Lastly, the concentration of Fe2+ ranged from < 0.01 to 2.75 mg/L, but 80% of the samples had non-detectable concentrations. Of the eight wells with measurable values, three (Akotokyir W 7, Amamoma W 18, and Kwapraw Well 29) had concentrations above the GWQ limit of 0.3 mg/L. Mn2+ concentration ranged between < 0.005 and 0.78 mg/L, with measurable values in only 6 wells (15%), and one well (Kwapraw Well 34) having a concentration above the GWQ limit of 0.4 mg/L.

Collectively, the levels of both the basic physicochemical parameters (EC, TDS, TH, and alkalinity) and the cations/anions (except for Na+) obtained in this study are dramatically higher (from 2.5 to 8×) than those reported by Affum et al., (2015), for a similar coastal setting in Sekondi/Takoradi, which is about 80 km away from the study area. The significance of this comparison is that the Affum et al., (2015) study barely found any contaminants in the groundwater, including zero bacteria counts. Therefore, the highly elevated readings in this study are suggestive of influences from on-site septic systems. Further elaboration on the implications of the elevated measurements is provided in the sections that follow.

Variation of major parameters by community

Figure 3 provides a quick view of the general pattern of variation in the analyzed parameters by community. Conductivity, shown in Fig. 3a, is a good indicator of contaminated groundwater. It reveals a pattern, with Duakor having the highest conductivities on the average, and Akotokyir the lowest. The general order is Duakor > Kwapraw > Apewosika > Amamoma > Akotokyir. Individually, however, the four highest conductivity values (6667, 6308, 4515, and 4414 µS/cm) recorded in the study area are at Apewosika Well16 (W16), Kwapraw (W8), Duakor (W6), and Duakor (W4), respectively. All four wells are also very close to septic tanks/toilets in their respective communities, suggesting influences of on-site sanitation facilities on the conductivity as further elaborated in subsequent sections. The conductivity pattern is mimicked by those of the major cations (average of Na+, Ca2+, K+, and Mg2+) and the major anions (average of Cl, HCO3, and SO42−) in Fig. 3b, c, respectively. This is expected since the conductivity of water increases with dissolved solutes. Lastly, the bacteria counts (average of TC, FC, and E. coli), in Fig. 3d, show a more balanced spread among the communities. Even so, Akotokyir still stands out as the community with the least bacterial-infested groundwater. Note that the communities as arranged on Fig. 3 are ordered in terms of the distance away from the coastline. Thus, Duakor is closest to the coastline, and Akotokyir is the farthest out. The high concentrations of solutes in the Duakor and Apewosika communities may be influenced by a combination of effluents from on-site sanitation facilities and saltwater intrusion. We found evidence for saltwater intrusion in a few wells within the three communities closer to the coastline. However, it is difficult to separate such from sanitation-related contamination where both exist in a well. The density of settlement may also be a factor in the observed contamination pattern. Apewosika, Kwapraw, and Amamoma are the oldest and most densely settled of the five communities. Their proximities to the Cape Coast University campus attract huge, off-campus student and staff populations into them, adding to the pressures on groundwater resources and sanitation facilities. Duakor is the smallest of the communities, but it is located closest to the coastline, and has the worst sanitary conditions. Thus, it is not surprising that it has the overall worst groundwater quality in the study area. Akotokyir is the newest and least densely settled community, and this is manifested in its better groundwater quality. The nutrients (NO2, NO3, and PO43−) show the highest concentrations in Duakor, followed by Amamoma and Kwapraw, with the least contents in Akotokyir. More details are discussed in subsequent sections.

Fig. 3
figure 3

Pattern of variation in the analyzed parameters by community. a conductivity, b major cations (averaged), c major anions (averaged), and d bacteria counts (averaged)

Assessing anthropogenic impacts on shallow groundwater quality

We hypothesized that shallow groundwater quality in the study area is impacted by effluents from on-site sanitation facilities. To assess this hypothesis, the proximity of domestic wells to toilet facilities was considered important. The expectation is that with toilet facilities as point sources, a well in closer proximity to a point source would contain higher contaminant loads compared to one that is further away. This assumes that contaminants radiate outwards from the point source. Note however that in some cases, this expectation may be marred by site-specific soil/geologic conditions that may alter contaminant migration pathways. Such conditions were not specifically explored in this study at this time. Secondly, we examined the samples for any differences in contaminant loads between wells at a cutoff water table depth. In this case, it is expected that because wells with shallower water tables are more likely to interface with depths of septic tanks/toilets, they will have higher contaminant loads. Typical septic tank/latrine depths in the study area range from 1.5 to 2.5 m, and average water table depth in hand-dug wells was 1.99 m at the time of data collection. Hence, the wells were separated into two groups (DTW ≤ 2 m vs. DTW > 2m). Details follow.

Examining effects of well-septic tank proximity

This assessment was accomplished in two ways. First, we picked two samples from each community: one for the well closest to a septic tank/toilet (point source) and the other for a well with no septic tank within 25 m of its location. All the analyzed parameters were compared between the two samples. In the second approach, all 40 samples in the study area were divided into two groups; those for wells located within 25 m of a point source and those with no point source within 25 m.

The outcomes for the first approach are shown in Fig. 4a–d. There is a consistent pattern in all but one community (Duakor), where the well closer to the point source is characterized by higher microbial and physicochemical loads. Figure 4a shows the case for bacteria counts. Noticeably, at three of the five communities, there is clear indication that the closer a well is to a septic tank, the higher the microbial load. This finding is consistent with that reported by Dzwairo et al., (2006), who found fecal and total coliforms to be reduced drastically beyond 5 m away from pit latrines in Zimbabwe. Sangodoyin (1993) also reported a similar finding from a study conducted in Abeokuta, Nigeria. A departure from the dominant pattern is observed for two communities (Kwapraw and Duakor). At Kwapraw, the closer well to a septic tank records zero counts for all bacteria types. In fact, it is the only well in the entire study area with no bacteria contamination, although showing very high mineralization. The reason for this occurrence is not immediately clear but might be related to site-specific conditions. For Duakor, the dominant pattern is reversed, with the control sample indicating higher bacteria counts than the well located close to a septic tank. In fact, the observed differences in the water quality of the two Duakor wells do not follow the general pattern of the other communities. The reason for this is discussed at the end of this section.

Fig. 4
figure 4

Comparison of water quality parameters for the closest well to a septic tank vs. a well with no septic tank within 25 m for each community: a bacteria counts, b conductivity/total hardness/alkalinity, c major cations/anions, and d nutrients

Figure 4b shows results of the proximity criterion applied to electrical conductivity, total hardness, and alkalinity signatures. The water quality indicator parameters are routinely used for assessing groundwater contamination from anthropogenic sources related to sewage (Dzwairo et al., 2006; Tijani & Onodera, 2005). Again, in all the communities except Duakor, the wells in closer proximities to the point sources register considerably higher readings, suggesting that contaminants may be radiating from the point sources into domestic wells. Note that for the study area, conductivity anomalies may also result from saltwater encroachment, particularly in any of the three closer communities to the coastline. This effect is further explored in a later section.

It was similarly observed that the concentrations of the major ions (Na+, Ca2+, Mg2+, K+, Cl, HCO3, and SO42) were disproportionately higher in the community wells closest to septic systems, except in Duakor. This is exemplified in Fig. 4c, with emphasis on the Na+ and Cl ion concentrations. Notice the high concentrations of Na+ and Cl ions which, according to Lapworth et al., (2017), are among the chemical species most indicative of excreta disposed of in on-site sanitation systems. Keegan et al., (2014) similarly suggest that Cl is particularly a good indicator of sanitation-induced pollution. Therefore, it is reasonable to conclude that the observed pattern is due to effluents migrating from sanitation facilities into wells. Again, it is acknowledged that elevated concentrations of some of these solutes in a coastal setting like ours may be contributed by the intrusion of saltwater from the coast. An attempt has been made to assess this source. However, where this natural source acts in concert with anthropogenic sources in the same well, it is difficult to separate one from the other. This is a limitation that was encountered in this study.

Lastly, the pattern for nutrients (NO2, NO3, and PO43−) is shown in Fig. 4d. High concentrations of the nutrients in urban groundwater can be tied directly to sewage effluents. For our study area, Fig. 4d clearly shows higher nutrient concentrations at Amamoma and Duakor. Overall, the pattern for nutrients is similar to the other parameters, where the wells closer to the point sources are more enriched. Notice that Duakor has been a constant outlier, exhibiting a reversed pattern from the other communities for all parameters. The two Duakor wells, while showing high contaminant loads, show less obvious differences between them. This is probably because the control well with no septic tank near it, while satisfying our proximity criterion, serves a piggery farm, and also lies within 10 m of a marshy refuse dump, making it equally susceptible to anthropogenic pollution. Thus, the little difference observed in the water qualities of the two wells is understandable. Note that Duakor is the smallest of the communities studied, and we only had access to three wells in it, which limited our choice of a control well. Overall, both wells are characterized by very hard waters, very high conductivities, and high concentrations of the major ions, as well as higher enrichment with nutrients. Collectively, the Duakor wells have the worst groundwater quality in the study area, which by itself, suggests evidence for groundwater cross-contamination from anthropogenic sources. An attempt to test the statistical significance for differences between the groups was problematic because of the very small sample size (paired n=5) and the high variability of the groups’ differences of means. Hence, a statistical significance of the observed differences could not be established.

The pattern of contaminant loading obtained from the second approach, i.e., by comparing all analyzed parameters between wells within 25 m of a point source, and those located farther away, were like those from the first approach. Figure 5 exemplifies the results with the pattern for the nutrients, NO3, NO2, NH4+, and PO43−, which are major tracers of sewage pollution in groundwater (Lapworth et al., 2017). This clearly indicates that effluents radiating from on-site sanitation facilities are contaminating groundwater in the study area. The Mann-Whitney U test (α = 0.05) indicated a statistically significant difference for the nutrients, between the two groups, with the following P-values:NO2 (0.04), NO3 (0.043), PO4 (0.02), and NH4 (0.014). Overall, the above results provide evidence that the proximity of domestic wells to on-site sanitation facilities is an important factor in accounting for shallow groundwater cross-contamination in the study area.

Fig. 5
figure 5

source and those with no point source within 25 m

Comparison of nutrient concentrations in wells located within 25 m of a point

Assessing for changes in contaminant load with depth

To assess whether contaminant loads likewise varied by depth from a point source, we took all the hand-dug wells located within 25 m of point sources and divided them into two groups, based on the depth to the water table (i.e., DTW ≤ 2 m vs. DTW > 2 m). We found that the bacteria counts (i.e., TC, FC, and E. coli), pH, turbidity, color, TSS, and alkalinity readings, as well as the concentrations of HCO3, Ca2+, K+, SO42−, NO2, NO3, PO43−, F, and NH4+, were all higher in the wells with shallower water tables (i.e., DTW ≤ 2 m). On the other end, conductivity/TDS, total hardness, Mg2+, Na+, Cl, Fe2+, and Mn2+, SO42− were higher in samples for the wells with DTW > 2m. The results are pictured in Fig. 6 by taking the difference for each parameter, between the two well groups, i.e., {(DTW ≤ 2 m) − (DTW > 2 m)}. Positive differences (labeled B) show the parameters that are higher in the wells with DTW ≤ 2 m (shallower), and negative differences (labeled A) indicate the parameters that are higher in the wells with DTW > 2 m (deeper). The observed patterns are physically plausible. Owing to contaminant travel times in porous media, impacts from on-site sanitation structures will more readily manifest in wells with shallower water tables where the groundwater surface could easily interface with septic tank/toilet depths. In the study area, those depths typically range between 1.5 and 2.5 m, while the average depth to the water table in hand-dug wells was 1.99 m during the time of data collection. The described finding is consistent with reported patterns of groundwater pollution from on-site sanitation structures elsewhere in Sub-Saharan Africa (e.g., Sangodoyin, 1993; Tijani & Onodera, 2005). Lastly, the observed pattern for the wells with relatively deeper water tables is also reasonable given that mineralization of groundwater is generally expected to increase with depth owing to longer residence times of water in the deeper zone. Thus, it is not surprising that conductivity, and the associated solutes that drive it, have higher concentrations at depth.

Fig. 6
figure 6

Plot showing differences in parameter readings between wells with shallower water tables (Group 1: DTW ≤ 2m) and those with deeper water tables (Group 2: DTW > 2 m). a Parameters with higher values in Group 2. b Parameters with higher values in Group 1

To ascertain whether the observed differences between the two groups (i.e., DTW ≤ 2 m vs. DTW > 2 m) were statistically significant, the Mann-Whitney U test (α = 0.05) was used. The result showed significant differences between the mean ranks of the following parameters: Total coliform, fecal coliform, E. coli, turbidity, TSS, alkalinity, HCO3, K+, and NO2, with the p-values 0.037, 0.049, 0.038, 0.024, 0.045, 0.028, 0.028, 0.048, and 0.017, respectively. Thus, as the above results indicate, there is evidence that the closer a well is to a septic tank/toilet, the higher the contaminant load, and that, wells with shallower water tables are more easily contaminated from nearby toilet facilities. This finding is similar to those reported by Bremare and Harter (2012) and Sangodoyin, (1993). More specifically, we showed that wells located within 25 m of toilet facilities are at a higher risk of cross-contamination than those farther away. Similarly, wells with shallower water tables (< 2m) can be more easily contaminated from on-site sanitation facilities. Nonetheless, there is need to follow up these conclusions with an exploration of site-specific soil/geologic conditions that might influence contaminant migration pathways.

Assessment of analyzed parameters using multivariate statistical techniques

Hierarchical cluster analysis

The goal of using HCA was to group the analyzed parameters that may have similar properties together. It is expected that parameters within the same cluster may most likely have similar origins (Gular et al., 2002). The resulting clusters for the Q-mode classification (i.e., classification by the measured parameters) are shown on the dendrogram in Fig. 7. Interpretation of the dendrogram was done by visual inspection, aided by the phenon line (dashed horizontal line). All parameters whose calculated Euclidean distances fall below the phenon line are grouped in the same cluster (Güler et al., 2002). Accordingly, the observed parameters were classified into six major clusters (C1 – C6), with 16 subgroups (shown in color and labeled S and SS).

Fig. 7
figure 7

HCA Q-mode dendrogram. Dotted line is the phenon line

Cluster C1 groups the bacteria family into two subgroups (S1 and S2). In subgroup S1, the total coliform (TC) bacteria stands alone, while S2 contains fecal coliform (FC) and E. coli. As shown in the preceding sections, the fecal bacteria most likely originate from on-site sanitation facilities. Cluster C2 also has two subgroups (S1 and S2). In S1, pH and HCO3 are closely linked, while F stands alone in S2. This clustering makes sense because both HCO3 and F are strongly influenced by pH. Typically, acidic groundwaters facilitate the dissolution of carbonate rocks, releasing HCO3 in the process (Rattray, 2015). Similarly, F concentration in groundwater is often mobilized by the pH. Naturally, F may enter groundwater when water interacts with fluoride-bearing minerals such as fluorspar, cryolite, and fluorapatite. Anthropogenically, its abundance in foodstuffs, vegetation, and tea, alongside its uses in dental preparations and water treatment, may explain its occurrence in groundwater, possibly where cross-contamination of groundwater from septic systems occurs. Nonetheless, the origins of the parameters in cluster C2 may be related to both on-site sanitation facilities and geologic factors. In cluster C3, turbidity and TSS in subgroup S1 are separated from color in S2. Again, this is plausible as turbidity and TSS are highly correlated in the measured samples (r2 = 0.92), and both influence water color. As reported earlier, the variation of these aesthetic parameters in shallow wells suggests that they may be more strongly influenced by anthropogenic rather than geologic factors in the study area. Cluster C4 also starts out with two subgroups (S1 and S2). S1 is further divided into two parts (SS1 and SS2), with SS1 pairing K+ and PO43−, while SS2 has NH4+ standing alone. This suggests that the trio share some commonalities in their origin. S2 pairs NO2 and NO3. Clearly, C4 is a cluster of the nutrients, made up of nitrogen and phosphorus compounds, with K+, a cation that is frequently associated with anthropogenic pollution in groundwater (Graham & Polizzotto, 2013). Hence, the compounds grouped in this cluster are most likely sourced from on-site sanitation facilities. Cluster C5 groups the trace metals Fe2+ and Mn2+ together. Fe2+ is an essential element in human nutrition, particularly in the iron (II) oxidation state. Thus, its presence may be linked to human wastes from septic systems. However, the limited occurrence of Mn2+ in the samples is more likely to result from geogenic than anthropogenic sources. Both Fe2+ and Mn2+ only occur in a few samples within the study area. Lastly, cluster C6, also has two subgroups (S1 and S2), with S1 further dividing to where electrical conductivity is more closely connected to the Na+ and Cl ions (in SS1), and with Mg2+ at a further distance in SS2. Subgroup S2 pairs the Ca2+ and SO42− ions. Ultimately, this cluster has isolated the major cations/anions that have enriched the groundwater samples in the study area. Additionally, the linkage distance in SS1 clearly suggests that the high conductivity/TDS signatures in the groundwater samples are more strongly driven by the Na+ and Cl ions. As discussed in the preceding section, there is evidence that these ions largely enter the groundwater system from on-site sanitation facilities. However, as will be discussed later, the same ions may be partly sourced from saltwater intrusion, particularly for wells located closer to the coastline.

Further clustering of the samples was achieved using the HCA (R-mode). In this mode, the sample locations (i.e., the actual wells), rather than the analyzed parameters, are the ones linked by similarity. By grouping wells with similar characteristics together, the R-mode clustering can reveal spatial patterns of contamination that make it easier to speculate on the sources of the contaminants. Figure 8 shows the R-mode dendrogram. Like the Q-mode classification, the R-mode clustering also identified six major clusters (D1–D6), with all but one having subgroupings. Table 3 shows the mean parameter values for the clusters. In the discussion that follows, the actual names of the wells in each subgroup of note are indicated in parentheses. The reader should refer to Table 3 for the number of wells per subgroup.

Fig. 8
figure 8

HCA R-mode dendrogram. Dotted line is the phenon line

Table 3 Means of the physico-chemical parameters for the clusters and subgroups from HCA (R-mode). Units are as contained in Table 2. na = number of samples in a subgroup. The boxed subgroup values were averaged to represent background parameter readings for the study area

Cluster D1: This is composed of three subgroups (s1–s3). Of these, subgroups s1 (Akotokyir W1, W3, W5, Amamoma W28, and Apewosika W1) and s2 (Akotokyir W7 and Kwapraw W29) assemble wells with the lowest physicochemical readings in the study area. Given the grouping by similarity, and the lack of baseline data for the area, the wells in these subgroups are assumed to be the least impacted anthropogenically in the study area. Thus, the physicochemical parameter values for the subgroups, comprising seven wells, spread over four of the five communities, were averaged and used as background values for evaluating the physicochemical quality of the other samples. The only excluded parameter was Fe2+, having an elevated concentration in Akotokyir W7 (in subgroup s2). Subgroup s3 has a single well (Akotokyir W 9) and stands out with the lowest pH (4.41) in the entire study area, and it is also slightly more mineralized than the rest of the wells in cluster D1, suggesting some anthropogenic impacts on it. It is noteworthy that of the seven wells with the least impacted groundwater, four are from Akotokyir, which is the youngest, least dense, and farthest community from the coastline. Cluster D2 samples are classified into four subgroups (p1–p4). This is the cluster with the second highest average bacteria contamination in the study area. Its most bacteria counts are found in the wells of subgroup p1 (Akotokyir W6, Apewosika W13 and Kwapraw W18). Additionally, both p1 and p2 (Apewosika W21 and W11, and Kwapraw W30) also show moderately elevated measures of the aesthetic parameters (turbidity, color, and TSS) and the major cations and anions, about 2 to 3 times the background values. The microbial and physicochemical signatures in the remaining two subgroups (P3 and P4) are all within acceptable limits. Overall, cluster D2 shows evidence of moderate anthropogenic pollution at the locations grouped in p1 and p2, possibly related to some influence of on-site sanitation facilities. Next, cluster D3 is made up of three subgroups (b1–b3). Of these, b1, made up of Amamoma wells 10 and 16, and Kwapraw W38, together with b2 (Apewosika W10), are characterized by high mean conductivity/TDS values (between 1000 and 3000 units) and matched by moderately high concentrations of the Na+ and Cl ions. Altogether, these readings are 4 to 6 times the background values in the study area, suggesting anthropogenic impacts. Additionally, the b1 subgroup shows slightly elevated NO2 +NO3 levels (sum = 3.55 mg/L) though generally within acceptable WHO limits. Still, the NO2 levels are roughly 8 times the background levels. Further, bacteria count, while lowest overall in this cluster, are nonetheless present in all subgroups, with the highest loads in b3 (Amamoma wells 8, 27, 30 and Kwapraw well 27). Overall, this cluster mainly contains wells within the Apewosika, Amamoma, and Kwapraw communities. As indicated earlier, these are largest and densest communities in the study area, also hosting most of the off-campus student population due to their closer proximities to the Cape Coast University campus. Therefore, the high contaminant loads in the wells of this group are most likely driven by effluents from the higher septic system densities in the communities. Samples in cluster D4 are also classified broadly into three subgroups (k1 – k3). The two wells in subgroup k3 (Duakor W6 and W4), collectively, have the worst quality in the cluster, and indeed, the entire study area. They are characterized by very high conductivity/TDS, total hardness, turbidity, color, and TSS readings; very highly elevated solute concentrations; the most elevated K+, NO2+NO3, PO43−, NH4+ and F levels in the entire study area, as well as high bacteria contamination. As discussed earlier, we found evidence for influence of septic systems and a piggery farm operation on these wells. Besides, Duakor, though the smallest community, is also closest to the coastline. However, its uphill location relative to the coastline makes its wells unlikely to be impacted by saltwater encroachment. Nonetheless, there is a slight possibility of this happening. Ranking next to k3, in nearly all the above constituents, is k1 (Amamoma wells 25 and 15, Kwapraw wells 43 and W41, Duakor W3). Lastly, the wells in subgroup k2 (Amamoma W6, Apewosika W22, & Kwapraw W37), though lagging behind k1 and k3 in contaminant load levels, are likewise characterized by high readings. Collectively, the wells in cluster D4 have the poorest groundwater quality in the study area. Like indicated in the preceding paragraph, this cluster is composed largely of wells within the three largest and densest communities. That the larger number of wells from these communities are the most contaminated, is an indication that septic system density may be an important factor in explaining the poor groundwater quality in the study area. Note however that actual septic system densities were not calculated. Cluster D5 only has one group (q), with two wells in it (Amamoma W18 and Kwapraw W34). The cluster is likely isolated mainly on its enrichment in the trace metals, Fe2+ and Mn2. The wells are also characterized by very high turbidity, color, and TSS readings suggesting that the trace metals may be affecting the aesthetic quality of the groundwater in those wells. It is likely that the origins of these metals are more geogenic than anthropogenic. Lastly, cluster D6 is made up of two subgroups (a1 and a2). Subgroup a1 has two wells (Apewosika 16 and Kwapraw 14), while a2 is made up of a single well (Kwapraw W8). The wells in a1 pose very high conductivity/TDS (9× the background), with Apewosika W16 having the highest conductivity (6667 µs/cm) measured in the study area. However, these wells have low total hardness, turbidity, color, and TSS readings. Additionally, they are very highly enriched in the major cations and anions, particularly the Mg2+, Na+, and Cl ions, in addition to moderately high bacteria content. These, coupled with very low K+ content in this subgroup, may suggest that the source of the major ions may be more from saltwater intrusion than from on-site sanitation facilities. For the single well in subgroup a2 (Kwapraw W8), it stands out with the second overall highest conductivity (6308 µs/cm) in the study area. It is also highly enriched in the major cations and anions, with the highest Cl concentration (2382 mg/L) in the study area. Additionally, it is characterized by very high total hardness, turbidity, color, and TSS readings. Strangely, this is the only well in the study area with zero bacteria counts. Regardless, wells without microbial pollution can still be chemically contaminated from anthropogenic sources. Overall, the wells in cluster D6 are the most mineralized but, notably containing very low nitrogen and phosphorus compounds. Hence, it is highly likely that the wells in this cluster, except subgroup a2, are most likely influenced by saltwater intrusion from the coastline than anthropogenic factors. In fact, the location of Apewosika W16 closer to the coastline makes this possibility stronger. On the other hand, because the Kwapraw wells are located further inland, the indication that saltwater may be encroaching into them requires further investigation. A Cl ion classification (Mtoni et al., 2013) likewise indicates that the three wells in cluster D6 are the only ones in the brackish-salt category, in the study area. A further evaluation of the saltwater intrusion impacts is discussed in a later section.

The distinctiveness of parameter groupings in the R-mode clusters (D1–D6) was tested for statistical significance using the Kruskal Wallis H test (α =0.05). We found the differences in the ranked means for all parameters but Fe2+ and PO43− to be statistically significant as shown, with the P-values in parentheses: TC (0.025), FC (0.007), E. coli (0.033), pH (0.002), Cond. (0.000), TDS (0.000), turbidity (0.018), color (0.004), TSS (0.006), ALK (0.003), T. Hard. (0.000), HCO3 (0.003), Ca (0.001), Mg (0.000), Cl (0.001), Na+ (0.001), K (0.000), Fe (0.165), Mn (0.005), NO2 (0.000), NO3 (0.008), PO4 (0.223), SO4 (0.002), F (0.082), and NH4 (0.081).

Principal component analysis

PCA was used to assess the relative contribution of individual parameters or groups of parameters to the overall variability in groundwater quality. It reduced our 40 × 22 matrix (i.e., 40 samples × 22 variables) to a 22-variable × 4-component output. The four principal components (PCs) were retained following a parallel analysis for significance (Kanyongo, 2005; O’Connor, 2000). Collectively, the 4 PCs explained approximately 68% of the total variance observed in the water quality data. PC 1 explained 30.3%, PC 2—15.1%, PC 3—12.2%, and PC 4—10.1%, respectively. Table 4 presents the rotated component matrix with the loadings on each component highlighted. Variable loadings are classified based on their absolute loading values as Strong (> 0.75), Moderate (0.75–0.50), or Weak” (<0.50–0.30) (Vadde et al., 2018). Thus, PC 1, explaining the most variation in the data (30.3%), is characterized by strong positive loadings for electrical conductivity (Cond.), Mg2+, Cl, Na+, Ca2+; moderate loadings for K+ and SO4; and weak loadings for pH, HCO3, and F. In essence, PCA suggests that the observed variation in water quality within the study area is predominantly explained by the concentrations of the Cl, Na+, Mg2+, and Ca2+ ions, which account for the very high conductivities of the water samples. On average, the concentrations of the major ions observed in this study are considerably higher than those reported for other locations within the broader coastal corridor of Central Ghana (e.g., Asare et al., 2016; Affum et al., 2015; Ganyaglo et al., 2012). As discussed in the sections above, on-site sanitation facilities are the predominant sources for the solutes in the groundwater. A secondary source is saltwater intrusion from the coast, for locations that are within 2 km of the coastline (discussed in a later section). Elsewhere also, in Sub-Saharan Africa, high concentrations of Cl, Na+, Ca2+, K+, and SO42−, alongside high conductivity/TDS values, have been associated with sanitation-related shallow groundwater contamination (Lapworth, 2017). The weak loadings of pH, HCO3, and F on PC 1 may suggest the secondary influences or interactions of these parameters to enhance the contents of the strongly loaded parameters. PC 2 explains 15% of the total variation in the water quality, and it is strongly correlated with turbidity, TSS, and color, and moderately correlated with NH4+, Fe2+, HCO3, pH, and PO43−. It is highly likely that the strong positive loadings of the aesthetic parameters are largely explainable by anthropogenic forcing, related to on-site sanitation facilities. As discussed previously, these aesthetic parameters were disproportionately higher in wells located closer to sanitation facilities. Again, we note that aesthetic signatures also may originate from geogenic sources. The moderate loadings on this PC with NH4+ and PO43− are likely related to impacts of human/animal wastes, while those with Fe2+, HCO3, and pH may have resulted from geogenic or anthropogenic sources. Explaining 12.2% of the overall variation in the water quality data is PC 3. It indicates strong positive loadings for fecal coliform (FC), E. coli, and total coliform (TC); weak positive loadings with pH, PO43−, and HCO3; and a weak negative correlation with Mn2+. This PC predominantly highlights the microbiological quality of the groundwater samples. The very strong correlation with the enteric bacteria (FC and E. coli) that are excreted by humans and animals, suggests that bacteria may be migrating from septic tanks and or pit latrines into groundwater. In fact, the mechanisms for this have been well documented by Graham and Polizzotto, (2013) and similarly reported in Lapwoth et al. (2017). According to Keegan et al., (2014), without a biomat formation, which prevents bacteria attenuation in the free-draining subsoil, enteric bacteria can migrate up to several meters after excretion into pit latrines. This is found to be the case in the study area. The weak factor scores on pH, PO43−, HCO3 may represent other interactions between natural and anthropogenic forces that are less prominent. Lastly, PC 4 shows strong positive loadings for NO2 and NO3, moderate positive associations with K+ and PO43−, and a weak positive loading with NH4+. This PC clearly highlights the nutrients in the samples, explaining roughly 10% of the observed variability in the water quality data. As shown in earlier sections, these nutrients enter the groundwater medium as effluents migrating from on-site sanitation facilities. Although not exceeding thresholds in many samples, NO2, NO3, and PO43− are nutrients that commonly enter the water system from anthropogenic sources. Note that, pH, HCO3, and PO43− have loaded unto at least, three PCs. This suggests their importance in mobilizing or supporting the major factors driving the water quality of the study area. The concentration of PO43− particularly, was anomalously high in a piggery farm well at Duakor, suggesting its major source there, but was also present in significant amounts in wells at Amamoma and Apewosika. We conclude that it enters the groundwater from three possible sources-human/animal wastes, detergents in septic tanks, and possibly, from saltwater intrusion.

Table 4 Rotated principal components extracted. Bold numbers on each PC are the significant factor loadings

Examining effects of saltwater intrusion

Two prior studies in the broader Central Ghana Region assessed the geochemical evolution of the major ions in groundwater wells (Gyanyaglo et al., 2012; Asare et al., 2016). Both attributed their findings to natural geologic factors and saline water intrusion (for wells closer to the coastline). None, however, specifically considered possible effects of anthropogenic pollution. While an assessment for geogenic factors is outside the scope of the present study, effects of saltwater intrusion are considered important owing to the coastal location of our study area. Three basic approaches were combined for this exploration: the Cl ion classification and the molar ratios of Na+/Cl and Cl/HCO3. Note that none of these methods can lead to firm conclusions by itself. Hence, the results were examined collectively, and gauged against those from the R-mode HCA clusters, to draw conclusions. Even so, the challenge remains that it is difficult to clearly separate impacts of saltwater intrusion from those of sanitation-induced pollution based on molar ratios, at locations where both impacts co-exist.

The Cl ion concentration is typically classified as follows (Mtoni et al., 2013): < 150 mg/L (Fresh), 150–300 (Fresh-brackish), 300–1000 (Brackish), 1000–10,000 (Brackish-salt), and > 10,000 (Salt). Our samples had concentrations between 66 and 2382 mg/L, with 3 samples (8%) falling in the “Brackish-salt” category, 17 (42.5%) in the “Brackish”, 13 (33%) in the “Fresh-brackish,” and 7 (18%) in the “Fresh” categories. Again, it will be misleading to attempt to interpret this classification by itself. For example, pollution-induced Cl ion content may place a sample in the “brackish” category as much as saltwater intrusion would at certain locations. Similarly, high groundwater recharge rates may dilute the salt content in a well and place it in a different category even if it were impacted by saltwater intrusion.

The Na+/Cl molar ratio is another approach commonly used for assessing saltwater intrusion into coastal aquifers. This ratio is usually compared with that for seawater (0.86). Typically, ratios < 0.86 indicate saltwater influence, while ratios > 1 suggest anthropogenic impacts (Mtoni et al., 2013). For our study area, seventeen samples (42.5%) had Na+/Cl molar ratios < 0.86. Theoretically, this might suggest that all 17 wells are impacted by saltwater intrusion. However, this molar ratio alone is limited because ionization of water samples from septic systems may also produce Na+/Cl ratios of less than 0.86.

Lastly, the molar ratio of Cl/HCO3 was used (Narany et al., 2014; Shin et al., 2020). This was computed for our samples and classified as in Shin et al., (2020); i.e., ratios of <0.5 indicate no seawater influence; ratios between 0.5 and 2.8 indicate slight to moderate influence, while ratios between 2.8 and 6.6 are considered to have severe influence. Ratios > 6.6 are considered very severe. By this classification, 13 samples (32.5%) fall into the range for “very severe” influence, and 11 samples (27.5%) in the “severe” group, while the remaining 40% are the less likely to be impacted by saltwater intrusion, or impacted only slightly. Again, interpreting this classification alone may yield misleading results for the study area. However, when the Cl/HCO3 molar ratio was graphed against that of Na+/Cl, a more physically plausible pattern emerged (Fig. 9). The salinity ranges of the resulting well clusters are better aligned with their possible causative factors (see indicated blocks on the figure). For example, six wells end up in the block considered to be the likeliest impacted by saltwater intrusion. Nonetheless, after examining the attributes of the six against the results of the R-mode clustering (HCA), one well was dropped from the block. This leaves five wells, considered to be most likely impacted by saltwater intrusion in the study area (Apewosika W10, W11, W16, Amamoma W10, and Kwapraw W8). While the physical locations of the first four make them stronger candidates, because they are all within 2 km of the coastline, Kwapraw W8 is roughly 4 km further inland. Hence, it is doubtful whether saltwater intrusion is a factor at that location. This will be more comprehensively investigated in a future study. The attributes of the clusters in Fig. 9 were transferred into ArcGIS to produce the spatial map in Fig. 10. The map classifies the wells into three groups. Group 1 are identified as the likeliest to be impacted by saltwater intrusion. Again, we acknowledge the limitation that it is impossible to separate effects of saltwater intrusion from those of on-site sanitation facilities in a well where both are at play. Group 2 is composed of wells that are interpreted to be predominantly influenced by on-site sanitation facilities, while the wells in group 3 are ones whose water quality is the least impacted in the study area, by any of the factors.

Fig. 9
figure 9

A semi-log plot of the Cl/HCO3 vs. Na+/Cl molar ratios

Fig. 10
figure 10

Map of the study area categorizing wells by water quality status

Summary and conclusion

This study investigated the impacts of on-site sanitation facilities and saltwater intrusion on shallow groundwater quality in five peri-urban communities of Cape Coast, Ghana. The study makes a significant contribution in the study area, being the first to comprehensively evaluate the quality of the shallow groundwater systems that the peri-urban populations overwhelmingly depend on. As such, its findings will be valuable for guiding groundwater development, protection, and mitigation policy by local authorities. Additionally, the data obtained provides critical baseline information to aid future investigations in the area.

Utilizing both in situ measurements and laboratory testing of water samples, and various statistical analyses on the data, the study has shown that shallow groundwater is widely contaminated with fecal bacteria and dissolved solutes throughout the study area. The dissolved solutes including major cations (Na+, Ca2+, K+, and Mg2+), major anions (Cl, HCO3, SO42), nutrients (NO2, NO3, NH4+, and PO43−), and other minor compounds, are in anomalously high concentrations, producing highly conductive waters in the majority of the domestic wells. Specifically, we found that domestic wells located within 25 m of septic tanks/toilet facilities contained higher contaminant loads than those without such facilities within 25 m of their locations. Similarly, for domestic wells in close proximities to on-site sanitation facilities, the closer the water table is below the surface (within 2 m of the surface), the higher the contaminant loads. Among the communities, patterns of contamination suggest that, wells in the older and densest communities (Apewosika, Amamoma, and Kwapraw) are more polluted with both enteric bacteria and physicochemical constituents, suggesting the influence of septic system density, which needs to be further evaluated specifically. Another source of influence on the groundwater quality, although more limited in scope, is saltwater intrusion from the coastline. Our results indicate that 5 of the 40 wells sampled are most likely experiencing effects of saltwater encroachment from the coast. Four out of the five are within 2 km of the coastline, but the 5th is located roughly 4 km inland, hence, may need further examination. Overall, there is need to examine the scope of the saltwater intrusion effect more comprehensively in a future study. Nonetheless, the decrease of average conductivity by community, away from the coastline, suggests that any effects of saltwater intrusion are limited to areas within 2 km of the coastline. A limitation worth acknowledging is the difficulty to separate effects of saltwater intrusion from those of on-site sanitation facilities in a well where both are active.

Overall, we conclude that the close co-location of domestic wells and on-site sanitation facilities in the study area, is the leading cause of groundwater cross-contamination. This has resulted to high enteric bacteria counts and high mineralization of the shallow groundwater system.

Policy implications

The problem of sanitation-driven groundwater quality degradation is endemic throughout Sub-Saharan Africa. Across Ghana, several studies have identified groundwater quality impairments in areas where it is the main source for drinking. Results of this investigation have similarly established groundwater contamination resulting from the use of unimproved sanitation facilities. In pursuit of the United Nations’ Sustainable Development Goal 6 (SDG 6), Ghana’s current vision for the water, sanitation, and hygiene (WASH) sector, as expressed in the Water Sector Strategic Development Plan (2012–2025) is that, by 2025, “All persons living in Ghana have access to adequate, safe, affordable, reliable and sustainable water services, and practice safe sanitation and hygiene” (Ghana MWRWH, 2015). Pursuant to this, the government, working with its development partners and non-governmental organizations (NGOs) has introduced some intervention measures that involve building or supporting the building of communal and household toilets (Mariwah et al., 2017), and the adoption of the Community-led Total Sanitation (CLTS) as a national approach to improve access to sustainable basic sanitation in the country. While CLTS adopts the behavior change communication (BCC) approach to educate communities on the utilization of hygiene facilities, there are no national standards for the construction of sanitation facilities. Further, only basic guidelines are prescribed for toilets and septic tank construction, aimed to reduce pollution of ground and surface water systems by sanitation facilities. Without the possibility of engineering centralized sewage collection systems in the near future, our research has revealed the need for sustained stakeholder engagements toward the development of national, but locally-sensitive standards for constructing toilet facilities, with the goal of mitigating impacts of unimproved sanitation facilities on groundwater quality. For example, keeping domestic wells at least 25 m away from septic tanks/toilets can become a mitigation strategy for new housing development areas. We also encourage better containment standards for the construction of septic tanks and toilet facilities in densely populated areas.