1. Introduction
Most countries worldwide have seen an accelerating pattern of economic growth coupled with a strong trend of unplanned urbanization, leading to a series of impacts associated with the discharge of pollutants across several environmental matrices that include the aquatic environment [
1]. Superficial bodies of water widely used for commercial, industrial and sewerage purposes receive a significant volume of wastewater, the majority of which is not adequately treated, thus severely polluting and negatively impacting aquatic ecosystems [
2]. Most of the residual water treatment systems in developed countries focus on removing suspended solids and organic matter; however, some nutrients such as nitrogen, phosphorous, trace metals and emerging contaminants may still be present in the discharge, thus contributing to the eutrophication process and posing various environmental risks [
3]. Primary treatment of wastewater entails physical processes such as sieving and sedimentation, which eliminate approximately 30% of the BOD, 50–70% of the total suspended solids (TSS) and 65% of the oil and grease, while secondary treatment uses microorganisms to remove up to 90% of the organic matter and suspended solids remaining after primary treatment [
4]. Lack of proper sanitation infrastructure to treat wastewater contaminates the environment and increases the burden on human health, leading to economic activity loss and a decrease in potential general growth. The United Nations estimates that, for every US
$ spent on sanitation, there is an estimated return of 5.5 US
$; however, feasible, financially viable wastewater treatment continues to be a significant challenge in developing countries [
5].
Costa Rica is no stranger to this reality. The Costa Rican Institute of Aqueducts and Waterways estimated that, by 2015, the daily wastewater generation rate per capita would reach 0.2 m
3/day, a total of 966,455 m
3/day, of which only 14.43% is treated. For that same year, 1946 industrial and commercial generators in Costa Rica produced 82,980 m
3/day in wastewater [
6]. In 2018 alone, a total 27,749 t/year chemical oxygen demand (COD) and 22,354 t/year total suspended solids (TSS) were discharged into several river basins in Costa Rica by generators formally registered in the Ministry of Environment and Energy. Sanitary sewer systems represent the largest input to COD, at 47%, while the trade and services sectors contributes the most, at 62.1% of the TSS discharges. In terms of river basins, the Grande de Tarcoles River receives 48.3% of the total COD mass discharged, rising from 12,203 t/year in 2017 to 13,412 t/year in 2018 [
7].
In 1995, Costa Rica introduced legal instruments establishing the maximum allowable limits of physicochemical and microbiological parameters for wastewater discharge and reuse. These standards must consider the assimilation capacity, that is, the maximum quantity of pollutants that can be diluted or degraded in a receiver body without compromising better designated use, defined as objectives in corresponding basin management plans. Discharge standards are based on either load or on concentration; the former is more common than the latter. One limitation of the standards based on concentration is their failure to promote effective water treatment, given that they imply dilution for final disposal. These standards were first developed in Great Britain and assume a minimum 8-fold dilution factor upon discharge in the receiver body [
8].
Load regulations, as applicable in the United States, harmonize the concepts of water quality in the receiver body and effluent discharge with a specific risk model to establish total maximum daily loads (TMDL) that ensure compliance with a quality standard as per required use. The criteria for preventing ecotoxicity in this model consider both the short-term and long-term effects. TMDL values are determined by monitoring and modeling the water quality of the receiver body; this data is then utilized as criteria to grant permissions to discharge in the basin. The risk model implemented takes into consideration the lowest daily flow rate every 10 years (for acute effects) and the average lowest value every 10 years for 7 consecutive days (for chronic effects) [
9].
Other countries set regulations according to wastewater characteristics, considering the presence of organic matter as reference indicators for the biological oxygen demand (BOD). Once the desired maximum discharge value is determined, technology is selected according to the quality of treatment required, considering two possible approaches: best available technology (BAT), utilized for the most part in developed countries, and best viable technology (BVT), predominant in developing nations [
10].
International wastewater effluent standards have progressively settled in the last 100 years. Up until the 1970s, wastewater management contemplated biological oxygen demand (BOD), pathogens and suspended solids (SS). In the 1970s, it started to target nitrogen and phosphorous due to their role in waterway eutrophication. New contaminants have been added since then, and the standards have become stricter [
11].
Decree 33601-MINAE-S, “Wastewater discharge and reuse regulation”, establishes the maximum limits that wastewater produced by Costa Rican generators must comply with to be discharged in the sewage system. It contemplates wastewater generated by human household activities (toilets, showers, bathroom and kitchen sinks, laundry water, etc.), as well as special activities (any other activity). It sets standards based on concentration and include differentiated COD, BOD and TSS values according to wastewater characteristics, mainly those derived from industrial processes. This instrument makes it mandatory for wastewater generators to report their operations to the Ministry of Health, with frequency periods varying depending on the flow rate discharged. Reports must include the physicochemical and microbiological properties of the effluent, among other aspects. The decree also states that the Ministry of Health may perform at least one of the yearly mandatory sampling and analysis cross-checks on a generator when it sees fit.
Bayesian networks are graphical models that allow a precise representation of the probabilities among a random set of variables, using an acyclic directed graph [
12]. These models allow the analysis of causal effects among several variables in the observed data, the construction of hierarchical models of interrelated components and the assessment of the optimal probability distribution for each case. One of the advantages of Bayesian networks is the fact that it renders algorithms to learn the local probability distributions (parameters), as well as the causal structure among variables, using a given dataset. As such, the model may be adjusted, updated and self-improved to perform analyses and inferences with the required data. The Bayesian network helps identify which of the variables in the dataset have higher relevance probability (marginal, conditional or joint) considering the results of the physicochemical profile performed on the wastewater samples. The latter will provide data-supported evidence regarding the areas that should be prioritized in the decision-making process.
This study analyzed a database assembled with data from a cross-check performed by the Ministry of Health on reports from a representative sample of generators, and data from their operational reports from 2016 to 2020. Bayesian networks and an environmental risk estimation provided input on the pertinence and effectivity of these regulations to aid the relevant government agencies in the decision-making process.
3. Results and Discussion
To study the variability of the data obtained, an ANOVA analysis of the BOD, OG, COD and TSS was performed for every planning region, considering the mechanism of final disposal (receiver body, reuse and sewage) and the wastewater sample type (ordinary and special) where the subclassification of both the mechanism of disposal and sample type comes from Decree 33601-MINAE-S, which regulates the disposal and reuse of wastewaters in Costa Rica.
Table 4 shows the mean values for these variables and their respective standard deviation according to planning region, disposal type and sample type, as well as the global mean for each planning region. Data analysis according to the final disposal type by generators according to planning region shows a significant mean difference for BOD, COD and TSS (
p < 0.05), both according to planning region, disposal type and interaction levels of both factors. For oil and grease specifically, a mean difference according to disposal type can be observed. Regarding BOD and COD, the Central and Brunca regions record the highest mean concentrations with no significant differences between them, while the Huetar Norte and Chorotega regions show the lowest concentrations. When it comes to disposal type, the lowest values for BOD and COD are for wastewater discharged into receiver bodies, which are statistically different from the means for reuse and sewerage. The latter is evidenced in
Figure 4, which shows the pairs that are statistically equal or different according to a Tukey comparison analysis for both planning regions and disposal type, where the pairs that do not contain zero, have statistically different means. An analysis of the interactions between the different BOD and COD factors shows that, in both cases, the reuse means for the Central and Brunca regions are not significantly different. The same is observed for the Huetar Norte, Pacifico Central and Huetar Caribe regions, as well as the Chorotega and Huetar Caribe in this same level. Likewise, no significant differences between regions for discharged wastewater was found.
Finally, regarding the receiver body, the Brunca and Pacifico Central regions show no significant differences, much like the Pacifico Central, Huetar Norte, Central and Chorotega regions.
When it comes to TSS, the ANOVA analysis shows that none of the plan-ning regions have any significant means except for the Brunca region, with a mean concentration of 87.6 mg/L. Furthermore, the same ANOVA analysis for TSS shows that all disposal types have differences, where the highest mean concentration observed is for sewage (80.8 mg/L), followed by that of reuse (58.3 mg/L), and, lastly, receiver body (40.5 mg/L). Regarding interaction levels for both factors, the reuse mean in the Brunca region is different than for the other regions in the same level, while the means for sewerage discharge for all the re-gions are not significantly different. Finally, regarding oil and grease, sewage concentration is highest, at 20.1 mg/L, differing from the reuse and means for receiver body.
On the other hand, results (
Figure 5) show that the central region has the greatest data variation for all parameters according to disposal type. It also has greater data density and dispersion in the fourth quartile for the remaining planning zones, pointing to a larger concentration of the discharge parameters analyzed.
Data according to sample type and planning region, as well as the interaction between both factor levels, were also studied. The analysis revealed statistically significant differences in the BOD and COD means per planning region and per factor interactions; however, no differences between the means for these sample types and those two parameters were found. TSS and ANOVA reveal different means for both factors, as well as for their interaction. For oil and grease, only planning regions show significant mean differences. Regarding BOD and COD, the Brunca, Central and Pacifico Central regions revealed the highest means, which the Tukey comparison analysis revealed were equal. The Huetar Norte, Chorotega and Huetar Caribe regions, on the other hand, show the lowest means, which are also equal amongst themselves. When it comes to BOD interactions, the Brunca and Central regions are equal at the ordinary level. The same is true for the Pacifico Central, Huetar Caribe and Huetar Norte regions. Likewise, the Chorotega, Huetar Norte and Huetar Caribe regions are equal for that same level. At the special type, all regions are equal, except for the Caribe region. COD interactions show that, at the ordinary level, the Brunca region is different from all the others, while the Central and Caribe regions are statistically equal. The same is evidenced for the Caribe, Pacifico Central and Huetar Norte regions, as well as the Huetar Norte and Chorotega regions. In terms of special level, all the regions are statistically equal, except for the Caribe region, which differs regarding all of the previous means except for the Brunca region. Regarding the TSS parameter, assessment of the planning region factor renders three large groups; the Brunca region, with the highest and statistically different means in comparison to the other regions, followed by the Central and Pacifico Central regions, which are equal, and lastly the Norte, Chorotega and Caribe regions, whose means are the lowest and at the same time equal amongst themselves.
When assessing sample type factors, ordinary and special samples show mean differences, with an ordinary type concentration (51.4 mg/L). When it comes to interactions for the levels of both TSS factors, the mean for the ordinary type for the Brunca region is different from that of the other regions; furthermore, the Central, Caribe and Pacifico Central regions have statistically equal means. The same can be said for the Huetar Norte, Chorotega, Caribe and Pacifico Central regions. At the special level, all regions are equal, except for the Caribe region. Lastly, regarding oil and grease, only the planning regions shows significant differences, present in the Central region, with the highest mean (13.2 mg/L) and the Caribe and Chorotega regions, with the lowest means, 8.8 mg/L and 7.8 mg/L respectively. On the other hand, if the data are analyzed according to sample type—ordinary or special—for each planning region (
Figure 6), once again the central region shows the largest data dispersion toward high concentrations. Furthermore, the Pacifico Central region shows moderate BOD and COD dispersion, and there are a considerable number of generators with elevated ordinary concentrations in the Central region.
Special sample types in the Huetar Norte and Huetar Caribe regions show greater generator variety and density toward higher concentrations, as is the case for BOD and COD, which have concentrations of up to 1000 mg/L and 2000 mg/L, respectively.
3.1. Behavior of Probability of Compliance
Bayesian networks were utilized to obtain the marginal probability of compliance for each of the basic physicochemical parameters in the wastewater samples at a national level, according to all three scenarios proposed.
Table 5 shows that BOD and COD are the variables with the lowest values. It is worth noting that these parameters are directly related to the organic material content, resulting in the reduction of the concentration of dissolved oxygen in surface bodies of water due to biological degradation. Positing two reduction scenarios of the maximum discharge limits shows that the probability of compliance decreases to 0.871 and 0.830, respectively, for BOD, while COD decreases to 0.882 and 0.845, respectively. As for the remaining parameters, the decrease in maximum allowable levels will cause small impacts, given the high compliance level. It is worth pointing out that, for BOD and COD, although the decrease is not drastic in terms of compliance, it does represent the prevention of 397 and 811 t/year, respectively.
An analysis of the spatial distribution of the probability of compliance for DOB, COD and TSS shows that there are important differences between the results obtained for the central region (BOD = 0.914, COD = 0.927 and TSS = 0.945) with respect to the others (
Figure 7), particularly for the Brunca (BOD = 0.879, COD = 0.839 and TSS = 0.873) and Pacifico Central (BOD = 0.842, COD = 0.853 and TSS = 0.886) regions. This may be due to the predominant agricultural activities involving livestock, a productive sector with lower probabilities of compliance when compared to other special wastewater generators.
The conditional probabilities show smaller variability according to wastewater type (
Table 6), given that, at a national level, all ordinary waters record lower compliance values than special waters for all parameters except settleable solids. This situation may be explained by the fact that it includes both gray waters originating from washing, cooking, bathrooms, gardens and floor cleaning, as well as blackwater coming from toilets. Thus, chemical products, organic matter and nutrients come mainly from detergents, soaps, cleaners and human feces and urine. Given the absence of municipal wastewater treatment plants in most of the cantons, generators utilize primary removal technologies with low effectiveness, such as grease traps. Nevertheless, an analysis of the spatial variation of the probability of compliance per sample type for BOD, COD and TSS (
Figure 8) shows three distinct patterns; the central region records no significant difference between categories, whereas a second segment made up of the Brunca, Huetar Norte and Caribe regions have lower values for ordinary waters, and a third segment that includes the Chorotega and Pacifico Central regions displays a different behavior with lower probabilities of compliance in special wastewater. In rural zones, ordinary water from economic activities usually receives the minimum treatment. An analysis of scenarios 2 and 3 allows the inference that BOD and COD are the most impacted, with a similar decline for both types of wastewaters.
The wastewater discharge disposal mean (
Table 7) shows that reuse has the lowest national probabilities of compliance, followed by receiver bodies and sewerage for most of the physicochemical parameters assessed, except for pH and methylene blue active substances. Again, BOD, COD and TSS are the variables that record the largest differences. An analysis at a national level (
Figure 9) reveals probabilities of compliance for reuse in the Chorotega region, where some parameters are superior to other disposal types, given that, in this area, wastewater is a highly developed practice in the hospitality and agribusiness industries. The Central, Pacifico Central and Huetar Norte regions, on the other hand, follow the same data pattern as the national level. When the current maximum values are reduced to 90% and 80%, a significant decrease in the probability of compliance for BOD (0.852 and 0.805), COD (0.862 and 0.818) and TSS (0.893 and 0.858) is observed. A revision of the predominant wastewater reuse scheme is of vital importance, given that, in the context of climate change, wastewater reuse may represent a potential adaptation measure to water shortage problems. Water reuse in agriculture offers several additional advantages, as they may supply nutrients for fertigation due to its nitrogen and phosphorous content, which greatly depends on the type of wastewater treatment [
14]. Thus, the environmental efficiency of wastewater reuse will greatly depend on the type of regeneration employed and to what degree it is fit for the purpose, as set forth in the Costa Rican legal framework.
The conditional probabilities of compliance for special wastewater generated in the economic activities contemplated according to ISIC code were also analyzed (
Table 8). BOD, COD and TSS show lower probabilities for codes 3821 (treatment and disposal of non-hazardous waste) < 1040 (manufacture of vegetable and animal oils) < 145 (raising of swine). Code 3821 includes all leachate discharges originating from soluble matter obtained from solid waste in landfills after contact with percolated rainwater. It comprises several types of complex organic and inorganic matters, including heavy metals, natural organic matter and xenobiotic contaminants [
15].
Likewise, discharged wastewater from pig farming is high in organic matter, contains elevated nutrient contents, suspended solids and a high level of microorganisms [
16]. Although there are many types of treatment systems for pig farms, in Costa Rica the two most common ones are anaerobic and aerobic treatment. In these systems, the first stage involves an anoxic tank where anaerobic bacteria hydrolyze suspended contaminants such as starch, fiber, carbohydrates and organic matter soluble in organic acids, which decompose the larger organic matter into smaller molecular organic matter. The second stage entails an anoxic tank where heterotrophic bacteria convert contaminants such as proteins and fats into ammonia (NH
3-N) [
17]. The low probability of compliance in these three categories must be considered to develop a set of intervention strategies to reduce the environmental impact of this type of discharge. This is especially true for those associated to the eutrophication processes of receiver bodies, given that applying scenarios 2 and 3 for these categories is counterproductive without establishing a cleaner production program that will improve the environmental efficiency of water use.
The scenarios for the reduction of the maximum discharge values for all physicochemical parameters are highly applicable for codes 122, 1030, 1071, 2100, 4711, 4720, 5210 and 6810, given that they show no significant decreases in the probability of compliance. Codes 472, 1010, 1050, 1072, 1079, 3700, 4719, 5610 and 8411 show significant decreases for BOD and COD for scenarios 2 and 3; however, the other variables do not follow the same pattern.
3.2. Environmental Risk Analysis Associated with Discharges
The integrated method was utilized to assess the impact associated with wastewater discharge from generators in the database. The probability of occurrence (p) of impacts were determined using Equation (4) as a discharge event frequency exceeding the maximum allowable value of 70%.
Table 9 shows a comparison of the impact and risk associated for each parameter assessed at the national level, expressed as the average of the total samples included in the database.
BOD and COD are the largest risk values among the parameters assessed, given their rate of probability of occurrence, as well as the magnitude of the environmental impact, surpassed only by settleable solids. The Pacifico Central and Brunca regions record the highest comprehensive environmental risk value for BOD, COD and TSS when compared to other areas in the country (
Figure 10), which may reveal a lag in environmental technologies that foster proper depuration before final discharge. Variability becomes more complex when residual water type is contemplated, since, for the Chorotega and Pacifico Central regions (
Figure 11), special wastewater discharges are the main contributor to environmental risk for all the assessed parameters, while, for the rest of the country, the risk focuses significantly on ordinary water discharges, except for the central region, where no significant differences among categories was noted. As previously mentioned, most of the efforts to consolidate sanitary sewerage infrastructure and wastewater treatment plants are focused on the central region of Costa Rica. The important aggregation of activities in urban centers with sanitary sewerage and wastewater treatment plants in both the Chorotega and Pacifico Central regions may explain their low ordinary water contribution to the overall environmental risk.
The geographic distribution by municipality of the environmental risk values shown in
Figure 12, where the areas with the highest risk values are located in some cantons of the Central, Huetar Norte and Brunca regions, with the Central region concentrating the largest amount of wastewater discharges, which is reflected in the high environmental risk values. On the other hand, the Huetar Caribe, Chorotega and Central Pacific regions have the lowest environmental risk values.
The distribution of tons of COD discharged by canton is shown in
Figure 13, where the Huetar Caribe, Huetar Norte and Chorotega regions have the highest amount, in tons, compared to the Central region, which may be due to the low sanitary controls and lack of adequate infrastructure in the wastewater treatment systems. It should be noted that some of the urban cantons that make up the metropolitan region that are in the central region have high COD levels; however, the peripheral cantons of the central region have lower levels.
In the central zone of the country, there is a greater environmental risk even though the tons of COD discharged are lower than in other zones. However, this may be because, in the central zone, there is a high number and diversity of industries and businesses that generate wastewater with a greater variety and quantity of pollutants, as well as a higher population density in the cantons of the metropolitan area that generate a greater amount of wastewater, increasing the environmental risk due to the impact of other parameters, such as OG, MBAS and TSS.
The Huetar Caribe region corresponds to a rural region with low population density and therefore, a lower amount of discharges and therefore, a low risk; however, due to the lack of resources to improve the treatment systems, as well as a lower availability of personnel to carry out state controls, there is a higher amount of COD discharged. For the Brunca, Huetar Norte and Chorotega regions, the amount of COD discharged corresponds to the risk levels observed in
Figure 12, which show intermediate concentrations of contamination in discharges, associated with areas of moderate population density. This shows the areas of greatest risk and contamination in the cantons with the most tourist or commercial activity
4. Conclusions
Over 91% of the generators comply with the maximum allowable limits for the parameters established in decree 30661-S-MINAE, where BOD and COD are the lowest-compliance parameters associated with organic matter contamination. Furthermore, if the universal maximum allowable limits for wastewater were reduced by 20%, an estimated 83% of the generators would comply, leading to a reduction in wastewater discharged into surface waters, a direct contribution to environmental improvement without significantly impacting the number of businesses and industries that would comply with the new maximum allowable limits. However, compliance with the discharge parameter shows important variations depending on the final disposal type, where reuse is the most lacking in all regions except Chorotega This situation must be carefully analyzed by regulatory bodies, given that safe wastewater places critical importance on its reuse in productive processes as a possible adaptation measure to climate change. There is a high feasibility for environmental agencies in the country to revise the maximum allowable values in the law to reduce the contaminant emission rates in receiver bodies, as an intermediate step to move from a regulatory system according to concentration to a more equitable system that regulates discharge per contaminant mass with respect to time to avoid dilution.
Additionally, differences in compliance behavior for the Central region in comparison with the peripheral area—particularly the Brunca and Pacifico Central regions, which show no significant variability between wastewater types (ordinary or special). This situation may evidence the need to develop management strategies that address the possible management deficiencies in adopting wastewater depuration technologies in rural areas of the country.
Reducing the current maximum allowable limits established in decree 30661-S-MINAE by 80% and 90%, would impact generators in activities relating to non-hazardous residue treatment, animal and vegetable fats manufacturing, and swine farming the most, with a BOD probability of compliance of at least 38% and 25% COD. Thus, it would be inadvisable to implement this reduction before addressing wastewater treatment measures for those generators. For the remaining categories, the results for scenarios 2 and 3 indicate that there is a high feasibility for environmental agencies in the country to revise the maximum allowable values in the law to reduce the contaminant emission rates in receiver bodies, as an intermediate step to move from a regulatory system according to concentration to a more equitable system that regulates discharge per contaminant mass.
Given their environmental impact and the frequent non-compliance with legislation, BOD, COD and TSS are the largest contributing parameters to environmental risk according wastewater discharge type in Costa Rica. It is worth pointing out that risk assessment considers compliance with the maximum permissible values but not the contaminant emission rate, which is a key parameter to determine possible aquatic ecosystem damage. Hence, although rural zones show high risk values, its rivers have larger self-depuration capacity, despite larger chemical quality than surface mater bodies in the central region of Costa Rica.