Next Article in Journal
Online Sparse Sensor Placement with Mobility Constraints for Pollution Plume Reconstruction
Previous Article in Journal
Application of Double-Chamber Airbags as Ship Fenders in Ship Collision Scenarios
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Simplified Model for Coastal Pollution Forecasting Under Severe Storm and Wind Effects: The Besòs Wastewater Treatment Plant Case Study

1
Automatic Control Department, Technical University of Catalonia UPC, 08034 Barcelona, Spain
2
Department of Computer Science (CUCEI), University of Guadalajara, Guadalajara 44430, Mexico
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2025, 13(10), 1994; https://doi.org/10.3390/jmse13101994
Submission received: 21 June 2025 / Revised: 12 October 2025 / Accepted: 15 October 2025 / Published: 17 October 2025
(This article belongs to the Section Marine Environmental Science)

Abstract

This study focuses on the impact of wastewater discharges from the Besòs treatment plant on the coastal water quality of Barcelona, particularly under adverse weather conditions. A simplified mathematical model was developed to predict, in real time, the concentration of bacterial indicators (Enterococci and E. coli) along nearby beaches. This model aims to quickly detect contamination events and trigger alerts to evacuate swimming areas before water quality tests are completed. The simulator uses meteorological data—such as wind direction and speed, rainfall intensity, and solar irradiance, among others—to anticipate pollution levels without requiring immediate water sampling. The model was tested against real-world scenarios and validated with historical meteorological and bacteriological data collected over six years. The results show that bacterial pollution occurs mainly during intense rainfall events combined with specific wind conditions, particularly when winds blow from the southeast (SE) or east–southeast (ESE) at moderate to high speeds. These wind patterns carry under-treated wastewater toward the coast. Conversely, winds from the north or northwest tend to disperse the contaminants offshore, posing little to no risk to swimmers. This study confirms that pollution events are relatively rare—about two per year—but pose significant health risks when they do occur. The simulator proved reliable, accurately predicting contamination episodes without producing false alarms. Minor variables such as water temperature or suspended solids showed limited influence, with wind and sunlight being the most critical factors. The model’s rapid response capability allows public authorities to take swift action, significantly reducing the risk to beachgoers. This system enhances current water quality monitoring by offering a predictive, cost-effective, and preventive tool for beach management in urban coastal environments.

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]:
Mass   in Mass   into Mass   out Mass C V   increase = C V   entry of C V   exit ± gain / loss   in   C V speed speed speed speed
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].
d C d t = λ C
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.
λ = l n 10 T 90
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:
T 90 = S a 60 1 0 . 65 C % 2 1 S s 800 + 0 . 02 10 T w 20 / 35 1
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).
C t = U C x V C y W C z + x K x C x + y K y C y + z K z C z + λ C + I
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).
U a C x + y K y C y + λ C = 0
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.
C m ( x ) = C 0 S e λ x U a e r f 3 / 2 1 + 8 K y x / U a B 2 3 1
b ( x ) = ( 1 + 8 K y x U a B ) 3 2 B
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:
K y = 0 . 00487 B 4 3
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. U0 is calculated by solving Equations (10) and (11):
10 3 C D N = 0 . 1168 ( U 10 U 0 ) + 0 . 3967
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)):
10 3 C D N = 0 . 0947 ( U 10 ) +   0 . 4733
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)):
C m a x C = C m a x x + C c o a s t
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 CmaxC 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. R2 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 R2 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.

Supplementary Materials

The simulator can be download from Github at https://github.com/antonigrau1965/Stormysim, accessed on 14 October 2025, (see reference [31]).

Author Contributions

The contribution of each author is as follows: conceptualization, R.M. and A.G.; methodology, R.M. and Y.B.; software, Y.B. and E.G.; validation, R.M., E.G. and A.G.; investigation, Y.B. and E.G.; resources, A.G.; writing—original draft preparation, A.G.; writing—review and editing, R.M. and A.G.; visualization, E.G.; supervision, R.M. and A.G.; funding acquisition, A.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Vision and Intelligent Systems research group, funded by agreement SGR-1048, Catalan Government.

Data Availability Statement

The original data presented in the study are openly available in the Meteorological Service of Catalonia, Catalan Government at [28].

Acknowledgments

The authors would like to thank the collaborators for their support and the Meteorological Service of Catalonia for their collaboration on data collection.

Conflicts of Interest

The authors declare no conflicts of interest.

Glossary

Variables and parameters used in equations:
CoInitial value for pollutant concentration [mg/L]
SParameter related with pollutant dispersion [-]
λConcentration decay rate [-]
xLength of plume, or variable direction of concentration [m]
UaAdvection velocity of water [m/s]
Kx, Ky, KzTurbulence diffusion coefficients on x, y, and z axis [m2/s]
bEffective width of plume [m]
BWidth of surface pollutant spot in dumping zone [m]
CPollutant component concentration [mg/L]
CmEstimated biological pollutant concentration [mg/L]
U0Wind velocity at water surface [m/s]
U10Wind velocity at 10 m above surface [m/s]
SaSun altitude [degrees]
TwWater temperature [Celsius degrees]
C%Cloud-covered sky fraction [-]
SsConcentration of solids in suspension [mg/L]
T90Time for 90% death of pollutant bacteria [h]
CDNNeutral drag coefficient [-]

References

  1. Rangel-Buitrago, N.; Galgani, F.; Neal, W.J. Addressing the global challenge of coastal sewage pollution. Mar. Pollut. Bull. 2024, 201, 116232. [Google Scholar] [CrossRef] [PubMed]
  2. Su, J.; Fan, J.; Ming, H.; Guo, G.; Fu, Y.; Zhao, X.; Zhao, S.; Chen, Q.; Guan, D.; Jin, Y.; et al. The Municipal Sewage Discharge May Impact the Dissemination of Antibiotic-Resistant Escherichia coli in an Urban Coastal Beach. Water 2022, 14, 1639. [Google Scholar] [CrossRef]
  3. Bartram, J.; Rees, G. Monitoring Bathing Waters—A Practical Guide to the Design and Implementation of Assessments and Monitoring Programmes; CRC Press: Boca Raton, FL, USA, 1999; ISBN 0-419-24390-1. [Google Scholar]
  4. Halpern, B.S.; Walbridge, S.; Selkoe, K.A.; Kappel, C.V.; Micheli, F.; d’Agrosa, C.; Bruno, J.F.; Casey, K.S.; Ebert, C.; Fox, H.E.; et al. A global map of human impact on marine ecosystems. Science 2008, 319, 948–952. [Google Scholar] [CrossRef]
  5. Islam, M.S.; Tanaka, M. Impacts of pollution on coastal and marine ecosystems including coastal and marine fisheries and approach for management: A review and synthesis. Mar. Pollut. Bull. 2004, 48, 624–649. [Google Scholar] [CrossRef]
  6. Pintó, R.M.; Alegre, D.; Dominguez, A.; El-Senousy, W.M.; Sanchez, G.; Villena, C.; Costafreda, M.I.; Aragonès, L.; Bosch, A. Hepatitis A virus in urban sewage from two Mediterranean countries. Epidemiol. Infect. 2007, 135, 270–273. [Google Scholar] [CrossRef] [PubMed]
  7. Metcalf & Eddy, Inc. Wastewater Engineering: Treatment and Reuse, 4th ed.; McGraw-Hill: Columbus, OH, USA, 2002. [Google Scholar]
  8. Tsanis, I.K.; Hurdowar-Castro, D. A wind driven three-dimensional pollutant transport model. Environ. Model. Softw. 2005, 20, 1323–1333. [Google Scholar] [CrossRef]
  9. Bergerona, P.; Oujatib, H.; Catalán Cuencac, V.; Huguet Mestred, J.M.; Courtois, S. Rapid monitoring of Escherichia coli and Enterococcus spp. in bathing water using Reverse Transcription-quantitative PCR International. Hyg. Environ. Health 2011, 214, 478–484. [Google Scholar] [CrossRef] [PubMed]
  10. Water Modelling System. Available online: https://www.mohid.com/ (accessed on 15 October 2025).
  11. ADCIRC Simulator. Available online: https://adcirc.org/ (accessed on 15 October 2025).
  12. HEC_EFM Simulator. Available online: https://www.hec.usace.army.mil (accessed on 15 October 2025).
  13. MIKE Simulator. Available online: https://www.dhigroup.com/technologies/mikepoweredbydhi (accessed on 15 October 2025).
  14. Charlton, J. Sea outfalls. In Developments in Hydraulic Engineering-3; Novak, P., Ed.; Elsevier Applied Science Pub.: London, UK, 1985. [Google Scholar]
  15. Carr, M.M.; Gold, A.C.; Harris, A.; Anarde, K.; Hino, M.; Sauers, N.; Da Silva, G.; Gamewell, C.; Nelson, N.G. Fecal Bacteria Contamination of Floodwaters and a Coastal Waterway from Tidally-Driven Stormwater Network Inundation. GeoHealth 2024, 8, e2024GH001020. [Google Scholar] [CrossRef] [PubMed]
  16. Franklin, E.B.; Alves, M.R.; Moore, A.N.; Kilgour, D.B.; Novak, G.A.; Mayer, K.; Sauer, J.S.; Weber, R.J.; Dang, D.; Winter, M.; et al. Atmospheric Benzothiazoles in a Coastal Marine Environment. Anthropog. Impacts Atmos. 2021, 55, 15705–15714. [Google Scholar] [CrossRef] [PubMed]
  17. Pangaud, T.; Fourrie, N.; Guidard, V.; Dahoui, M.; Rabier, F. Assimilation of AIRS Radiances Affected by Mid- to Low-Level Clouds. Mon. Weather. Rev. 2009, 137, 4276–4292. [Google Scholar] [CrossRef]
  18. Carreras, P.E.; Menéndez, A.N. Mathematical simulation of pollutant dispersion. Ecol. Model. 1990, 52, 29–40. [Google Scholar] [CrossRef]
  19. Zima, P.; Sawicki, J. Numerical Analysis of the Influence of 2D Dispersion Parameters on the Spread of Pollutants in the Coastal Zone. Water 2024, 16, 3637. [Google Scholar] [CrossRef]
  20. Chow, V.T. Open-Channel Hydraulics; McGraw-Hill: New York, NY, USA, 1959. [Google Scholar]
  21. Chapra, S.C. Surface Water-Quality Modeling 2008; Waveland Press, Originally Prentice Hall: Long Grove, IL, USA, 1997. [Google Scholar]
  22. Zhou, X.; Liu, Y.; Wang, D. Modeling the fate and transport of feacal coliform in coastal waters. Mar. Pollut. Bull. 2014, 82, 66–73. [Google Scholar] [CrossRef]
  23. Samper, Y.; Espino, M.; Liste, M.; Mestres, M.; Alsina, J.M.; Sánchez-Arcilla, A. Study of Atmospheric Forcing Influence on Harbour Water Renewal. Water 2023, 15, 1813. [Google Scholar] [CrossRef]
  24. Gould, D.J.; Munro, D. Relevance of Microbial Mortality to Outfall Design; Telford, T., Ed.; Coastal Discharges: London, UK, 1981; pp. 45–50. [Google Scholar]
  25. SoED—State of the Environment and Development in the Mediterranean, PNUMA/MAP. 2020. Available online: https://planbleu.org/en/soed-2020 (accessed on 15 October 2025).
  26. Jukic, D.; Margeta, J. Model of bacterial pollution of sea water discharged by submarine outfall. In Water Pollution IV; Brebbia, C.A., Ed.; Wessex Institute of Technology: Ashurst Lodge, UK; University of Ljubljana: Ljubljana, Slovenia, 1997. [Google Scholar] [CrossRef]
  27. Fairall, C.W.; Bradley, E.F.; Hare, J.E.; Grachev, A.A.; Edson, J.B. Bulk parameterization of air–sea fluxes: Updates and verification for the COARE algorithm. J. Clim. 2003, 16, 571–591. [Google Scholar] [CrossRef]
  28. Agència Catalana de l’Aigua ACA, Catalan Agency for Water. Available online: https://aplicacions.aca.gencat.cat/platgescat2/front/landing (accessed on 15 October 2025).
  29. Royal Decree 1341/2007 from Spanish Government. Available online: https://www.boe.es/buscar/act.php?id=BOE-A-2007-18581 (accessed on 15 October 2025).
  30. EU Directive 2006/7/CE fron European Parliament and Council. Available online: https://www.boe.es/buscar/doc.php?id=DOUE-L-2006-80413 (accessed on 21 June 2025).
  31. Stormysim 2.3 Simulator. Available online: https://github.com/antonigrau1965/Stormysim (accessed on 15 October 2025).
  32. Easy Java Simulations. Available online: https://fem.um.es/Ejs/ (accessed on 15 October 2025).
Figure 1. Barcelona and Besòs wastewater plant location.
Figure 1. Barcelona and Besòs wastewater plant location.
Jmse 13 01994 g001
Figure 2. Barcelona beaches around the wastewater treatment plant: (a) north and (b) south location.
Figure 2. Barcelona beaches around the wastewater treatment plant: (a) north and (b) south location.
Jmse 13 01994 g002
Figure 3. The location of Besòs wastewater treatment plant submarine outfall, with its dumping zone at 3 km approximately from the coast.
Figure 3. The location of Besòs wastewater treatment plant submarine outfall, with its dumping zone at 3 km approximately from the coast.
Jmse 13 01994 g003
Figure 4. Real meteorological data for a 5-year period. The red dots indicate the days with beach pollution. Blue dots represent the amount of precipitation, green dots represent the wind direction every day in degrees. From the Catalan Agency for Water, Autonomous Government [17].
Figure 4. Real meteorological data for a 5-year period. The red dots indicate the days with beach pollution. Blue dots represent the amount of precipitation, green dots represent the wind direction every day in degrees. From the Catalan Agency for Water, Autonomous Government [17].
Jmse 13 01994 g004
Figure 5. Simulator screens from editor and views. (a) EJS ODE editor with high-grade equation solver. (b) Screenshot of view in STORMYSIM v2.3 simulator.
Figure 5. Simulator screens from editor and views. (a) EJS ODE editor with high-grade equation solver. (b) Screenshot of view in STORMYSIM v2.3 simulator.
Jmse 13 01994 g005
Figure 6. Different cases of beach pollution depending on the model’s variables. (a) Case 1. Northern wind at medium/high speed (left) and at low speed (right). No alert episode with this wind direction. (b) Case 2. Southeast wind at medium/high speed (left) and at low speed (right). Alert episode depending on wind speed in this direction. (c) Case 3. East–southeast (ESE) winds. Alert episode depending on wind speed in this direction. (d) Case 4. East–northeast (ENE) wind. Alert episode depending on wind speed in this direction.
Figure 6. Different cases of beach pollution depending on the model’s variables. (a) Case 1. Northern wind at medium/high speed (left) and at low speed (right). No alert episode with this wind direction. (b) Case 2. Southeast wind at medium/high speed (left) and at low speed (right). Alert episode depending on wind speed in this direction. (c) Case 3. East–southeast (ESE) winds. Alert episode depending on wind speed in this direction. (d) Case 4. East–northeast (ENE) wind. Alert episode depending on wind speed in this direction.
Jmse 13 01994 g006
Figure 7. (a) The simulation results and (b) a zoomed version of the details at the limit of 2900 m, which is the length of the outfall. Case 1 and 2 will not cause a pollution episode because the amount of CFU/100 mL reaching the coast is under the alert threshold. For Cases 3 and 4, there is an alert because the CFU/100 mL is over the limit.
Figure 7. (a) The simulation results and (b) a zoomed version of the details at the limit of 2900 m, which is the length of the outfall. Case 1 and 2 will not cause a pollution episode because the amount of CFU/100 mL reaching the coast is under the alert threshold. For Cases 3 and 4, there is an alert because the CFU/100 mL is over the limit.
Jmse 13 01994 g007
Figure 8. Sensibility analysis of Ua, the advection velocity of water; for high values of this input variable, the concentration decreases slowly, creating an alert at the coast. When the values are low, the concentration of pollutants that reach the coast is low or null, generating no alerts.
Figure 8. Sensibility analysis of Ua, the advection velocity of water; for high values of this input variable, the concentration decreases slowly, creating an alert at the coast. When the values are low, the concentration of pollutants that reach the coast is low or null, generating no alerts.
Jmse 13 01994 g008
Table 1. The location of north and south Barcelona beaches with respect to the wastewater plant.
Table 1. The location of north and south Barcelona beaches with respect to the wastewater plant.
South beachesCoordinatesNorth BeachesCoordinates
Nova IcàriaE2.2038421
N41.3920896
Parc Nord-EstE2.2316090
N41.417103
BogatellE2.2086973
N41.3961314
Parc LitoralE2.2363405
N41.4238271
Mar BellaE2.2134989
N41.3997043
La MoraE2.2400456
N41.4314179
Nova Mar BellaE2.2170375
N41.4038899
Pati de VelaE2.2461099
N41.4400239
LlevantE2.2189271
N41.4059384
Rambla del MarE2.2528405
N41.4480844
ForumE2.2262349
N41.4089583
IrisE2.25403001
N41.4493202
Table 2. A study of the most relevant coastal pollution incidences detected in Nova Icària beach related to outfall dumps with average wind direction and speed. Error is computed between the experimental values and simulated ones. All days are known to have registered heavy rain conditions.
Table 2. A study of the most relevant coastal pollution incidences detected in Nova Icària beach related to outfall dumps with average wind direction and speed. Error is computed between the experimental values and simulated ones. All days are known to have registered heavy rain conditions.
Date
dd/mm/yy
Wind
Direction (°)
Wind Speed (m/s)Simulated
Enterococci CFU/100 mL
Real
Enterococci CFU/100 mL
Enterococci CFU/100 mL Error %Simulated E. coli CFU/100 mLReal
E. coli CFU/100 mL
E. coli CFU/100 mL Error %
04/09/1912910.563596.77%7037506.27%
15/10/198012.46837009.11%151414554.05%
23/09/2015513.149458.89%7197706.62%
18/05/21609.23283105.81%8678274.84%
02/10/217810.71311417.09%4514207.39%
16/05/2316311.3565012.00%4985204.23%
02/10/23969.81962158.84%4424552.86%
23/07/2411410.33694007.75%5895458.07%
Table 3. A summary of the predictions and results from the model for wind speed, wind direction, and precipitation intensity, noting the origin of biological pollution to be studied and the ranges of prediction.
Table 3. A summary of the predictions and results from the model for wind speed, wind direction, and precipitation intensity, noting the origin of biological pollution to be studied and the ranges of prediction.
Wind OriginWind
Velocity *
Heavy
Rain
Pollution
Danger
Case
West **anyyes/nono
Southanyyes/nono
SSE, SElowYesno2a
SSE, SEmid/highYesyes2b
SSE, SEanyNono
ESElowYesno3a
ESEmid/highYesyes3b
ESEanyNono
East, ENElowYesno4a
East, ENEmid/highYesyes4b
East, ENEanyNono
NE, NNEanyyes/nono
Northanyyes/nono1a, b
* Low-speed wind is under 9 m/s; mid-speed is between 9 and 15 m/s; high-speed winds are over 15 m/s. ** West: this direction includes NNW, NW, WNW, W, WSW, SW, and SSW.
Table 4. Cost functions to validating the proposed model.
Table 4. Cost functions to validating the proposed model.
MAE (%)RMSE (%)R2Covariance
R Pearson
Enterococci CFU/100 mL2.082.470.9940.997
E. coli CFU/100 mL3.703.960.9830.993
Table 5. Descriptive comparison of most used simulation models against the proposed model.
Table 5. Descriptive comparison of most used simulation models against the proposed model.
Simulation ModelAccuracyComputational TimeFeatures
MOHID [10]Medium–highHighPure hydrodynamic model, but with high computational cost when submodules are enabled
ADCIRC [11]HighMediumHigh accuracy in coastal area with non-structured mesh, parallelization is required.
EFMSim [12]LowLowNon-hydrodynamic model, ecological modeling in aquatic systems.
MIKE 21 [13]Very highLowGPU recommended to achieve low computational cost, non-structured mesh, commercial license needed.
STORMYSIM, our proposalLowVery lowResponse practical in real time but with low accuracy.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bolea, Y.; Guerra, E.; Munguia, R.; Grau, A. A Simplified Model for Coastal Pollution Forecasting Under Severe Storm and Wind Effects: The Besòs Wastewater Treatment Plant Case Study. J. Mar. Sci. Eng. 2025, 13, 1994. https://doi.org/10.3390/jmse13101994

AMA Style

Bolea Y, Guerra E, Munguia R, Grau A. A Simplified Model for Coastal Pollution Forecasting Under Severe Storm and Wind Effects: The Besòs Wastewater Treatment Plant Case Study. Journal of Marine Science and Engineering. 2025; 13(10):1994. https://doi.org/10.3390/jmse13101994

Chicago/Turabian Style

Bolea, Yolanda, Edmundo Guerra, Rodrigo Munguia, and Antoni Grau. 2025. "A Simplified Model for Coastal Pollution Forecasting Under Severe Storm and Wind Effects: The Besòs Wastewater Treatment Plant Case Study" Journal of Marine Science and Engineering 13, no. 10: 1994. https://doi.org/10.3390/jmse13101994

APA Style

Bolea, Y., Guerra, E., Munguia, R., & Grau, A. (2025). A Simplified Model for Coastal Pollution Forecasting Under Severe Storm and Wind Effects: The Besòs Wastewater Treatment Plant Case Study. Journal of Marine Science and Engineering, 13(10), 1994. https://doi.org/10.3390/jmse13101994

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop