1. Introduction
Pollution of coastal waters may arise from various sources, such as the discharge of sewage and industrial waste through coastal outfalls, the dumping of waste at sea, the discharge of sewage and garbage from ships, cargo handling, exploration and exploitation of the seabed, accidental oil spills, and the transport of pollutants from land by air. Pollutants often reach the sea through river basins and other routes. The most common cause of coastal pollution is the discharge of municipal sewage and industrial waste into coastal waters or estuaries via inadequate disposal systems [
1,
2]. If these wastes contain persistent pollutants, even discharges far upstream can contribute significantly to marine contamination.
The major classes of pollutants affecting coastal waters include biodegradable organic matter, heavy metals, toxic substances, dissolved and suspended non-toxic inorganic materials, and pathogenic organisms. Self-purification in the sea depends on various factors such as dilution, temperature, adsorption, sedimentation, and nutrient levels. Although the marine environment is generally hostile to pathogenic organisms, certain conditions—particularly in temperate and warm coastal areas near major cities—may allow these agents to persist near shorelines and estuaries [
3,
4,
5].
In the Mediterranean, it is estimated that 85% of sewage enters the sea untreated, raising the risk of diseases such as viral hepatitis, dysentery, poliomyelitis, and typhoid—all of which are endemic in the region [
6].
Submarine outfalls help reduce coastal pollution, but storms can overload treatment plants, lowering efficiency and causing recurrent polluted discharges that affect sensitive coastal areas during extreme weather events [
7]. High-intensity rainfall can overload systems, returning excess untreated water—often containing suspended solids and other pollutants—back to the outfall. Cold seawater and low solar irradiation can further reduce the bacteriological treatment efficiency. These conditions must be carefully considered in the design and operation of treatment facilities, particularly under extreme weather scenarios. Given the cyclic nature of such weather events, performance failures are expected to recur periodically [
8].
This paper investigates the effects of wind and storm conditions on outfall dispersion, focusing on the Besòs wastewater treatment plant outfall. Various scenarios of biological contamination are analyzed, assuming reduced treatment efficiency during adverse weather.
Coastal pollution may also stem from damage to wastewater infrastructure due to extreme events like floods or hurricanes. Beach water quality is monitored using bacterial indicators such as
Escherichia coli (in freshwater) and
Enterococci (in marine environments) to protect swimmers from exposure. Regulatory bodies (WHO, USEPA, EU) have established increasingly stringent compliance values. Traditional detection methods, like culture-based techniques, require 18–24 h, delaying necessary health actions. Rapid tools like quantitative real-time PCR (qPCR), which can produce results in under 3 h [
9], are promising but not yet widely implemented by local health authorities. Numerical simulators represent an alternative to laboratory techniques, providing real-time estimates of bacterial transport and concentrations.
Outfall discharges are usually modeled with two components: a hydrodynamic model for water movement and a dispersion model for pollutant transport and fate. Some of the most used models do not work in real time or do not give an answer in a short time. Here, we mention some of those models: MOHID [
10] is a 3D finite-volume model for hydrodynamics, water quality, and sediments, suitable for estuaries and coastal zones; ADCIRC [
11] applies finite differences on a staggered grid, including tides, wind, and pressure, and couples with contaminant models; HEC-EFMsim [
12] is a 1D model for rivers and estuaries, combining flow and water quality when cross-sectional detail is less important; MIKE 21 [
13] is a 2D depth-averaged model widely used for wave–current and sediment interactions. Here, only its hydrodynamics are applied.
In this work, point source discharges are considered the main contributors to coastal contamination. These sources release effluents at specific, identifiable locations with variable flow rates. The primary focus is on bacterial pollution from wastewater treatment outfalls, evaluating its spread under different weather and hydrodynamic conditions. A more detailed classification of outfall systems can be found in [
14], which serves as a reference for understanding the operational diversity of marine disposal systems.
The main contribution of this paper is the development of a simplified mathematical model and its implementation to forecast in a very short period of time the bacterial concentration, aiming to prevent the risk of pollution in swimming areas and the need to evacuate the beaches. This contribution is especially relevant because, as far as the authors know, in the literature, there is no tool that generates an alert in real time. This model has been applied to different scenarios generated by climatological phenomena such as wind and rainfall (storms) affecting various beaches in the Barcelona area impacted by the outflow of the wastewater treatment plant of Besòs.
2. Description of Besòs Wastewater Treatment Plant and Its Outfall
Barcelona is a city located in the northeast of Spain, as shown in
Figure 1. It has a population of approximately 1.7 million people, with around 3.4 million residents in its metropolitan area. The city is served by two main wastewater treatment plants, each located near one of the two rivers that border the city: the Llobregat River to the south and the Besòs River to the north. In the south, the Barcelona Free Port is home to numerous industrial and logistics companies. This area does not have beaches for swimming, as the shoreline is occupied exclusively by the industrial and commercial harbor.
This study focuses on the northern part of Barcelona and, specifically, the wastewater treatment plant near the Besòs River. On both sides of the Besòs River estuary, there are recreational areas that attract thousands of visitors throughout the year—not just in summer—thanks to Barcelona’s mild climate. Many visitors swim and practice water sports on the beaches located both north and south of the wastewater plant.
The six northern beaches of Barcelona are Iris, Rambla Mar, Pati de Vela, La Mora, Parc Litoral, and Parc Nord-Est. The six southern beaches are Fòrum, Llevant, Nova Mar Bella, Mar Bella, Bogatell, and Nova Icària. All twelve beaches are located within a 9 km stretch of the coastline (see
Figure 2 and
Table 1). The location of the wastewater treatment plant, along with the distribution of beaches and harbors, is shown in
Figure 3.
The Besòs wastewater treatment plant is located between Sant Adrià de Besòs and Barcelona. It is one of the largest covered treatment plants integrated into an urban area in the world and the one with the highest processing capacity in Catalonia. The facility follows a typical and well-established wastewater treatment scheme. Upon arrival, wastewater is screw-pumped to the highest point of the plant, where it undergoes screening and grit removal by means of gravitational potential energy. To enhance the sedimentation process, flocculation agents are added in a mixing tank before the wastewater enters the primary sedimentation tanks. After primary settling, the resulting sludge—containing up to 30% of the initial organic matter—is removed. The partially treated water is then pumped into aeration tanks, where the activated sludge process is carried out. Once this secondary treatment is complete, the water is pumped to the submarine outfall, while the secondary sludge—containing up to 60% of the initial organic matter—is removed, dewatered, and transported to a sludge treatment facility located in the nearby town of Montcada.
As a result, the wastewater discharged through the outfall contains approximately 92–95% less organic matter than the influent received by the plant. The outfall studied in this work discharges wastewater processed by the Besòs sewage treatment plant.
Critically, if the volume of wastewater reaching the plant exceeds its treatment capacity, the outfall may discharge untreated wastewater, dramatically increasing the risk of coastal contamination due to high levels of biological pollutants.
This facility has the capacity to treat up to 525,000 m3 of wastewater per day. On average, more than 400,000 m3 are treated daily, with approximately 80% of this volume originating from the population living in the Barcelona Metropolitan Area. About 65% of the treated wastewater is generated in the northern half of the city of Barcelona, while the remainder comes from the surrounding municipalities of Badalona, Montgat, Santa Coloma de Gramenet, and Sant Adrià de Besòs.
The remaining treated wastewater originates from industrial sources. After undergoing both physical and biological treatment, this water is discharged into the Mediterranean Sea at a depth of 50 m. The discharge takes place in the diffuser section, located at the end of a 2900 m long underground outfall. The diffuser section contains 15 discharge outlets, spaced 50 m apart, each equipped with four horizontal nozzles.
Thanks to the outfall, treatment can be considered a continuous process, further aided by the marine environment—specifically diffusion and predation processes acting on organic material. Thus, pollutant dispersion begins at the discharge point with an initial concentration C0 for Enterococci and coliform CFUs. As the wastewater is transported and diluted by marine currents, its concentration diminishes and spreads throughout the area.
In most cases, organic and bacterial pollutants reach the coastline in very low, often negligible concentrations. In fact, on most days [
15], this diluted pollution is carried mainly southward by prevailing northern winds and local coastal currents. However, under southern or particularly eastern wind conditions, there is a risk of bacterial contamination drifting toward the coast [
16]. This risk increases under certain weather conditions, such as cloudy skies that reduce solar radiation (which usually helps suppress bacteria), or cold water temperatures that inhibit the microbiota responsible for the predation of bacterial pollutants—conditions that often occur during storms [
17].
3. Simplified Concentration Transport and Diffusion Model
The pollutant components’ concentration decreases along the trail formed by water currents due to transport and transformation processes which affect each pollutant component differently [
18,
19].
To study these processes, a mathematical simplified model based on physical laws is proposed. The law that represents the behavior of these processes is the mass conservation equation [
20]:
This equation accounts for the mass of any component present within a stationary volume of fixed dimensions, known as the control volume (
CV). There are two basic transport processes: advection and diffusion. Advection refers to the transport of pollutant components by the movement of water, in which the components are diluted or suspended and carried along by the flow. Diffusion, on the other hand, corresponds to the mixing phenomena caused by turbulence. In general, the rate of mass transport is proportional to the concentration gradient. Transformation processes affect all pollutant components. In this study, only pollutants of biological origin are considered. The concentration of biological pollutants is assumed to follow a first-order kinetic equation, as described in [
21,
22].
C is the pollutant component concentration and
λ is the process constant rate. For biological pollution,
λ is usually related to
T90 [
23], with
T90 being the time needed in hours to allow for the death of 90% of the originally present pollutant bacteria.
The Spanish regulation for all matters regarding the characteristics and previous treatment of effluents, projects and engineering of marine outfalls, and sea water quality in general uses the following equation, from [
24], to estimate the fecal coliform decay rate in waters with a salinity higher than 30 g/L:
For
T90 computation (in hours), several meteorological and oceanographic variables are considered, namely the sun altitude in degrees (
Sa), the cloud-covered sky fraction (
C%), water temperature in Celsius degrees (
Tw), and the concentration of solids in suspension in mg/L (
Ss). The UN report for the Mediterranean, in [
25], considers Enterococcus faecalis
T90 to be about 2.5 to 3.5 h.
Introducing transport and transformation processes and external gain/loss into Equation (1) results in a general form of the mass conservation equation, or a convection–diffusion–reaction equation (Equation (5)). In addition to
C as the pollutant component concentration (mass/volume),
U,
V, and
W are considered water speed vector components (length/time) on the
x,
y, and
z axis, respectively;
Kx,
Ky, and
Kz denote turbulent diffusion coefficients (area/time) on the
x,
y, and
z axis respectively; and finally
I refers to external gain/loss contribution speed (mass/volume·time).
This differential equation, which includes second-order partial derivatives, leads to complex calculations in the general case. Therefore, several assumptions based on empirical data and contextual conditions are made to simplify the equation. It is assumed that water currents induce a constant-speed horizontal advection process, which, together with turbulence, generates a dilution plume. This plume extends along the
x-axis, with depth represented by the
z-axis and the
y-axis perpendicular to both. Vertical diffusion is neglected under the assumption that the diffusion plume will fully extend throughout the sea depth, treating the sea as a well-mixed body of uniform density. These assumptions allow Equation (5) to be simplified into Equation (6).
According to field work, turbulent diffusion grows with plume size, with its variation being a function of plume width raised to the power of 4/3 [
23]. Thus, Equation (6) is solved for the central plume axis, resulting in Equations (7) and (8). These equations are used to compute an estimation of the biological pollution concentration,
Cm, at a given point of the coast at a distance
x from the wastewater outfall spot.
These equations consider that the diffusion plume is formed starting on the dumping zone, with a length
x and width
b at the end of the plume, where the pollution concentration is equal or lower than
Cm at any point. Thus, only dilution and diffusion due to water current turbulence and bacteriological treatment are accounted for. In order to calculate
Cm for the diffusion plume, the width of the surface pollutant spot on the dumping zone in meters,
B, is required. The calculation of mass transport through water currents is seen as the advection velocity
Ua, while
Ky is described as follows:
While most of the meteorological and oceanographic data can be obtained from several sources, there are no compiled measurements available for water current speeds in this zone. As no previous works dealing with currents in conditions of mid- to high-speed winds and stormy weather are found for the studied zone, data obtained from [
26] on analogous locations are used. Current surface velocity
U0 is used as an approximated value of
Ua. U
0 is calculated by solving Equations (10) and (11):
Knowing the neutral drag coefficient,
CDN, and wind speed at a height of ten meters above the sea,
U10, allows us to estimate an accurate enough
U0 through a best fit regression equation (Equation (10)). To obtain the
CDN value, several of the seven drag coefficients wind speed regression equations cited in [
27] were studied, with the North Sea regression case giving the highest correlations with our data (Equation (11)):
Once Ua is estimated, the solution of the mass conservation equation for axis x, Equation (6), can be computed. Essentially, as the plume grows, the dilution coefficients also grow, similar to the turbulence elements. Ua velocity also increases turbulence, intensifying the dilution process, but at the same time lowers the bacteriological treatment process, because pollutant bacteria travel a distance of x from the mixture zone to the far-field point studied. Thus, pollutant bacteria are exposed to lethal solar radiations for less time.
As the proposed equations only allow us to model bacteriological pollution originating in the outfall, a systematic bias impossible to model is introduced due the randomness of the CFU values measured at the coast.
The proposed equations only allow us to model pollutant concentration dumped through the outfall. This means that to contrast the model with collected data, the bacteriological pollution present at the coast without considering the outfall effect must be introduced. Thus, a new pollutant bacterial concentration value must be estimated and added to the calculation (Equation (12)):
Thus, CmaxC is corrected by adding an estimation of the pollution considered to be present at the coast without outfall interference under wind or rainstorm conditions. The estimation is based on a heuristic approach using the collected real CFU values for E. coli and Enterococci during previous periods, with values ranging up to 45 CFU/100 mL for Enterococci and up to 120 CFU/100 mL for E. coli. This CmaxC value is obtained by using a learning scheme (in our case a trained multilayered perceptron) which relates dates with weather and oceanographic conditions to give an estimation; to do so, the learning system relates the days of alert and the concentration of pollutants at the coast to give an initial value for CmaxC.
4. Data Collection and Experimentation
The meteorological data studied were obtained from a weather station operative since September 2005, located on the coast of the neighboring city Badalona, north of Sant Adrià de Besòs. This station allowed our research team to study storm weather conditions during summertime on the Barcelona coast for a period comprising 6 years (June 2019 to September 2024). The data were collected on daily basis, giving account for accumulated rainfall, average and maximal wind speed, wind direction, atmospheric temperature, pressure, and solar irradiance, as well as several others. Coastal pollution data were obtained for 17 weeks each summer on a weekly basis at several points of the Barcelona coast. Data for other oceanographic variables were collected through a set of stations along the Catalonia coast, especially the Pantalà station from Badalona in the same area. The governmental meteorological service keeps historical and up-to-date data on rain, snow, temperatures, and coastal bacteriological factors. The latter source of information is key to ensure an accurate measurement of coastal pollution, which will be the ground truth of reference in our research [
28].
The authors would like to note that under general performance conditions, the plant reduces BOD5 significantly, but increases the count of dangerous bacteria (CFU/100 mL) dramatically. But fortunately, the sea effect reduces the pollutant biota concentration significantly. Even in harsh weather conditions, dilution, predation, and irradiation processes usually reduce CFU/100 mL to below values of 100 for
Enterococci and 250 for
E. coli, which is considered excellent for human activities. However, the same data show several incidences of dangerous biological pollution concentration levels, reaching and surpassing the 200 for
Enterococci and 500 for
E. coli CFU/100 mL threshold, making the water unsuitable for any human activity. These thresholds are defined according to Royal Decree 1341/2007 [
29] and EU Directive 2006/7/CE [
30], in compliance with Catalonian and Spanish laws. In any case, further study of the meteorological data related these incidences during the period studied with especially intense and windy storms. The considered storms showed common relevant characteristics, one of them being heavy rains, most of them concentrated over short periods of time, and the other a mid- to high-speed wind from the sea to the coast. These storms, with simultaneous coastal pollution, have a frequency of around two incidences per year during the considered period, taking place in late summer, autumn, and winter, as shown in
Figure 4.
Taking into consideration the values mentioned previously, the plant has a treatment capacity of 525,000 m3 of sewage per day. This gives an average volume of 21,875 m3 per hour. Considering uniform sewage production all day, 400,000 m3 would mean 16,667 m3 per hour. This would leave around 5208 m3 per hour of free treatment capacity, this value is easily reached by intense precipitation when is higher than 7.6 mm per hour. This becomes even more feasible considering a basin of about 100 km2 which is serviced by the plant, forcing the pumping of under-treated water to the outfall. For the water containing significant concentration pollution values to reach the coast, the under-treated water has to be dragged by SSE to ENE wind-induced advection currents.
5. Simulation and Software Development
A new version of the custom coastal pollution simulator, STORMYSIM 2.3, has been released by the authors [
31] to help wastewater plant managers analyze, study, and forecast coastal pollution hazards. This simulator makes it easier to predict potential alarm situations and prevent harm to the population. It is designed as a user-friendly tool, requiring no advanced computer skills for effective use. To study the collected data and validate the proposed model for the dilution, dispersion, and reach of wastewater discharged through the Besòs outfall, a computer simulation known as STORMYSIM, version 2.3, was implemented. The simulation core is based on JAVA technologies, allowing for the integration of custom tools and mathematical libraries and enabling multi-platform software development. The main development platform used was Easy Java Simulations (EJS) [
32], a JAVA-based tool designed for building scientific and educational simulations.
EJS allows users to focus on high-level conceptual design by handling many technical aspects of the simulation process. While some JAVA programming skills are still necessary—particularly when integrating custom libraries or developing features not provided by default—JAVA’s multi-platform capability ensures that simulations, once compiled, can be executed on nearly any computer, regardless of architecture or operating system.
Computer simulations developed with EJS can compete with professional or commercial alternatives. It produces sophisticated and efficient code, especially for simulating ordinary differential equations, offering a powerful editing tool with various solver algorithms—including adaptive methods up to the 8th order and advanced techniques for scientific research (see
Figure 5a). Moreover, EJS supports the development of visually advanced, professional-grade software, featuring multimedia integration, real-time 3D capabilities, and the ability to interact through any JAVA-enabled device. As shown in
Figure 5b, the computational and graphical standards provided by EJS make tools like STORMYSIM suitable for professional use in fields such as wastewater treatment management and meteorological analysis.
The simulator can be found in Github in open source (See the
Supplementary Materials). To run the simulator, Java needs to be installed in the user’s computer followed by file execution. Once the simulator program is running, the user can find several tabs with the equation’s editors, the different parameters of the model, and the execution button. For the simulator to run smoothly, users can find a reset button to initialize all the parameters with suitable values. From this point, all the parameters can be modified, using sliders to change their values. By pressing the reset button again, all the parameters are set to their initial values.
6. Experimental Results and Validation of Model
The simulator provides a forecast of pollution levels at the beaches in question based on meteorological data, which can be obtained in real time. Therefore, beach water pollution levels can be predicted without the need for water sample analysis. This feature allows valuable time to be saved when issuing alerts about bathing water quality. It is important to remember that chemical and bacteriological analyses take time to produce results and require considerable effort in collecting and transporting samples to a laboratory.
To ensure the simulator is sufficiently reliable, its results must be validated under various conditions. Naturally, the more scenarios tested, the more accurate and trustworthy the simulator becomes. In this study, we aimed to cover as many different situations as possible conditions that do not all occur simultaneously, but rather require waiting for the right environmental circumstances to arise. These include varying wind speeds and directions, as well as differing sunlight conditions and cloud cover. To capture this variety, we had to wait for these situations to occur naturally. For each scenario, the corresponding data were input into the simulator to generate a pollution forecast. These results were then compared with official data collected by authorities during the same time periods.
Table 2 presents some of the distinct environmental situations that were studied. On average, there are only two beach pollution events per year, fortunately. The scenarios include different wind directions and speeds. The table shows actual CFU/100 mL data for
Enterococci and
E. coli, alongside the simulator’s predicted values. In general, the margin of error is relatively small—usually just a few units. Real data have been acquired from the daily analyses taken by the chemical laboratory at the Catalan Agency for Water [
28].
Table 3 presents the results in another format. Regardless of the specific day on which data were gathered, they are classified based on whether pollution conditions were present or whether such conditions would never occur. Wind direction is expressed in cardinal points, which may be easier to interpret. Additionally, wind speed and rainfall levels are provided. It is worth noting that during rainfall, cloud cover blocks sunlight, reducing its ability to help eliminate biological contaminants.
Interesting and potentially hazardous pollution scenarios can be observed. Given the orientation and layout of the beaches, whenever winds blow from the northeast to the southwest (NE, NNE, N, NNW, NW, WNW, W, WSW, SW, and SSW—counterclockwise from NE to SSW), there is no risk of contaminated water from the outfall reaching the shore. These wind patterns push water offshore or parallel to the beach, about 2.9 km out to sea, regardless of wind speed or rainfall. Other wind directions, however, can pose a pollution risk. Indeed, the table includes confirmed pollution episodes identified both in the study and by the simulator. These cases all share the same wind direction but also require moderate to high wind speeds to carry contaminants to the shore (see the “Pollution Danger” column). These events are often accompanied by heavy rainfall, which limits sunlight exposure and reduces its disinfection effect.
Next, the analysis of the simulator’s predictions for different scenarios can be found, as listed in
Table 3. Specifically, they correspond to what the authors refer to as Cases 1, 2, 3, and 4, with variations:
Case 1: Northern winds at various speeds. Regardless of rainfall, there is never beach pollution (see
Figure 6a).
Case 2: Winds from the south–southeast or southeast. If the wind speed is low, contamination does not reach the beach because seawater dilutes it, even without sunlight. However, with moderate or high wind speeds, pollution does reach the beach, triggering a health alert (see
Figure 6b).
Case 3: Winds from the east–southeast. In rainy (low sunlight) conditions, the level of contamination again depends on wind speed. Moderate to high speeds result in a pollution episode; low speeds do not, as contaminants do not reach the beach (see
Figure 6c).
Case 4: Winds from the east and east–northeast. These follow the same patterns as Cases 2 and 3. Pollution depends on wind speed and rainfall. Low-speed winds do not cause pollution; medium- to high-speed winds do, prompting a contamination alert (see
Figure 6d).
According to data from the monitoring station, coastal waters showed
Enterococci concentrations exceeding 200 CFU/100 mL and
E. coli levels above 500 CFU/100 mL. In all recorded cases, heavy rainfall was observed—confirmed qualitatively, as no hourly precipitation data were analyzed. Therefore, only the total accumulated rainfall over a 24 h period is provided as a reference. The simulated CFU/100 mL values correspond to the C
maxC results, as defined in Equation (7). As a result of the simulations, several variable settings were tested. The graphs in
Figure 7 display cases 1a, b, 2a, 3b, and 4b (according to
Table 3) overlaid under different assumptions. These variations include the following:
Sun altitude (Sa) in degrees.
Cloud cover percentage (C%).
Water temperature (Tw) in °C.
Suspended solids concentration (Ss) in mg/L.
All variations stayed within relatively small ranges, and the results clearly show that the dominant factors are wind direction, wind speed, and a lack of sunlight. Temperature plays a minimal role, as the Mediterranean Sea experiences little variation during the months when pollution episodes typically occur. Wind direction and its speed are also noteworthy, as several cases show all the necessary circumstances for producing dangerous coastal pollution, but a without a concrete wind profile, this shall not take place. Experimental data suggest that winds with velocities under 9 m/s, or not in a direction greater than 260°, can hardly endanger the coast, despite heavy rain and other circumstances.
A study about the error in the model prediction can be seen in
Table 4. MAE measures the average magnitude of errors between predicted and actual values by averaging the absolute differences between each prediction and its true value; in both cases (
Enterococci and
E. coli), the values are lower than 10% of the representative value (usually the mean) of the real values, and therefore, we can consider that the proposed model is good. RMSE measures the differences between predicted values and actual observed values, quantifying the average magnitude of errors in the model; both values are suitable, because they are smaller than the real values. R
2 has good values, explaining most of the alarms, and the model is not overfitted because a cross validation procedure is performed so that the sample for training and the sample for validation had a similar R
2 value. Pearson’s covariance is very close to 1, and this means that the real and predicted variables are very similar, resulting in a very good model.
To ascertain the importance of model variables, the authors performed a sensibility analysis for one of the most important variables,
Ua, the advection water velocity. This variable changes with wind speed and is responsible for most of the coastal pollution events, together with wind direction. Regarding wind direction,
Figure 6 shows the different cases and how this variable affects the coast alert. In
Figure 8, the importance of the variable
Ua is assessed by changing its value as the input variable and observing the behavior of the output variable, pollution concentration
Cm, keeping constant the direction of the wind towards the coast. As can be seen, when the advection velocity is high, the pollutants reach the coast more quickly, maintaining high concentration values. In contrast, when the velocity of water is slow, the bacteria in the water are killed and the concentration of the pollutants that reach the coast does not represent any danger nor are the alerts activated.
To complete the results, the authors have prepared a descriptive table (
Table 5) to compare standard and more commonly used simulators with our proposed simulator. Those methods, which have been mentioned in the first section of this paper, have different properties and each one is optimal for the working environment.
Observing the results in
Table 5, it can be deduced that in our case study, it is interesting to use a simple model like ours because we do not care about precision in the estimation, but we are looking for a binary response at high speed. We are seeking the worst case even if there is an error in the precision, as we value false positives in the detection of alarm cases.
7. Conclusions
This study demonstrates the effectiveness of a simplified, real-time model for predicting coastal bacterial contamination caused by wastewater discharges, particularly under adverse meteorological conditions. By integrating key environmental parameters—such as wind direction and intensity, solar irradiance, and rainfall—the model accurately forecasts the dispersion of pollutants from the Besòs wastewater treatment plant’s submarine outfall. The validation of the model against real-world data confirmed its reliability, with low prediction error and no false alarms. The simulator, STORMYSIM 2.3, emerges as a practical and user-friendly tool that enables rapid decision-making and beach management without the delay of traditional water quality analyses.
This model has been applied to different scenarios generated by climatological phenomena such as wind and rainfall (storms) affecting various beaches in the Barcelona area impacted by the outflow of the wastewater treatment plant of Besòs, validated with real data. Alarms were correctly triggered without generating any false positives, enabling beach evacuations to be carried out without posing any risk to bathers.
The model reveals that biological contamination events are infrequent but potentially hazardous, especially during southeast or east winds combined with intense rain. In contrast, northern and western winds tend to carry pollutants away from the coast. The absence of tertiary treatment at the plant underscores the importance of environmental factors in further reducing bacterial loads. The findings suggest that forecasting systems like STORMYSIM can enhance public health protection, optimize emergency responses, and complement laboratory-based monitoring. Its adaptability and scientific rigor make it a valuable tool for urban coastal areas, particularly in the Mediterranean context, where weather-driven pollution dynamics are critical.