Hydrodynamic and ecological 3D modeling in tropical lakes

Conservation and improvement of water quality in water bodies is an important matter to maintain all of its uses as well as other human necessities like microclimate regulation and leisure. Lakes and reservoirs have a complex circulation behavior with vertical temperature profiles changes along the time, resulting in differences in water density and a vertical stratification condition. This characteristic can directly affect the water quality conditions perturbing its main indicators. This study aims to evaluate the quasi-3D models' capacity to represent the hydrodynamic behavior of a tropical lake and its effects on the main variables that characterize its water quality. To achieve this objective, high-frequency monitoring data were collected, the lake was represented in a quasi-3D model, and the accuracy of the result was evaluated by applying statistical indices. The evaluation showed good agreement between field measures and simulated results when compared with other applications. The connections between hydrodynamic behavior and water quality were seen with the simulations results analysis, which showed that mixing events and long stratification periods perturb the water quality, the first with re-suspended bed material and the second blocking the surface and bottom exchanges. The application of a 3D model gives the capacity to reproduce the reservoir spatial variability and its vertical profiles, which is necessary to study the constituents' distributions across the water column. Therefore, the hydrodynamic and water quality behavior of lakes was accurately represented by the model, as well as the importance of improving high-frequency monitoring techniques.


Introduction
Reservoirs have different uses, such as hydropower generation, water supply, irrigation, and flood hazard mitigation. Conservation and improvement of water quality in such water bodies is an important matter for all of those uses as well as other human necessities like microclimate regulation and leisure. Some aspects in terms of water quality are affected by catchment area such as soil proprieties, green cover, land use, and wastewater generation. Local climate, hydrology, and residence time play effective roles in reservoir hydrodynamics, forming a very complex physical and chemical network of interactions [15,21,27].
Lakes and reservoirs have some differences from rivers that make the understanding and modeling its water quality condition more difficult. Some of them are the lower flow velocities, longer retention time, vertical stratification, and being a sink of nutrients, sediments and toxins [20,26].
Lakes and reservoirs have a complex circulation behavior which varies depending on morphometry, wind, radiant energy, cloud cover, rain, air temperature, to mention some. The combination of all mentioned variables dictates how the vertical temperature profiles change along the time, resulting in differences in water density and a vertical stratification condition. The vertical stratification characteristics (onset, duration, strength and turnover) can directly affect the water quality conditions perturbing its main indicators such as algae, nutrients, organic matter, and dissolved oxygen (DO) [19].
The upper layer (epilimnion) has a strong mixing movement, which keeps algae in suspension and registers higher temperatures. The middle layer (metalimnion) is characterized by a high temperature gradient, limiting the exchanges between bottom and surface's layers. At deeper depths (hypolimnion), the colder waters present higher levels of organic matter and low levels of oxygen. Once the mixing occurs, the poor water quality in deeper layers tends to rise, reducing DO and increasing nutrients [19,21].
Long retention time is also an important characteristic of water quality management. It collaborates with the particles' sedimentation, due to the low water velocity, which causes the accumulation of those particles in the bed material. Usually, these particles include high loads of nutrients and organic matter, which are the main source of the lakes' eutrophication. This accumulation can provide algal bloom episodes, which are harmful to fishes and humans [12,15].
Therefore, the knowledge of the lake's hydrodynamic behavior and the capacity to manage the variables that can compromise its water quality is a key factor to maintain the reservoir available for all its environmental services [27]. This discussion points to the necessity of monitoring, analysis and establishment of auxiliary tools that can represent external variables, environmental interactions, and physical local proprieties [7,34].
Numerical models are an alternative to study lakes' thermal behavior and water quality. They have been developed to simulate a wide variety of pollutants, coupled with watersheds, groundwater, and bottom sediments. Those representations provide comprehensive frameworks predicting the impact of human activities on water quality. However, for expressive and trustful results, input data with high quality are needed [7,9,34].
The interest in understanding lakes' hydrodynamics and its effects on the water quality grew, aiming at an appropriated management of the reservoirs and contributing areas. Tracing a timeline to the lakes' water quality in the twenty-first century, the first papers highlighted are the ones published by Hodges, Imberger, Laval and Bonnet, Poulin, Devaux in 2000 [14]. Those two works explained items like the difficulty of modeling vertical stratification and getting accurate results with a scale smaller than monthly or weekly, the wind role on the hydrodynamics, and the importance of a hydrodynamic model as input to the water quality simulations.
Keeping with the modeling timeline, in 2001 Ambrosetti and Barbianti [1] described the physical process on the lake and advanced on the occurrence of the mixing event. In 2003 the eddy turbulence was observed on small scale [39], and in 2008, it was correlated with phyto spring bloom by Peeters, Straike, Lorke, and Ollinger [29]. Another important contribution on this period was the books from Chapra (2008) and Ji (2008); they presented the basis of the theory of water quality modeling.
Since 2010, the research changed to another level with the improvement of the computation capacity, and models are now capable of representing the global warming impacts on the lakes mixing regime [22]. Across the years, indices were created, aiming to describe the power of lakes' stratification, and in 2011, they were compiled and automatically calculated by a numerical code proposed by Read et al. [31].
The lakes' research field kept on improving with the equipment development, reducing the frequency measures and producing even more accurate results [2,21,25,34]. Also, the attempts to model the effects between the lakes' physical characteristics and process on the water quality are improving with development of coupled systems [12,24,30,37,38].
An important part of the water quality modeling is to be able to represent the algal role in the ecosystem, and this segment still needs model development and improvement. Some researchers have published relevant material, trying to show how to use biomass indicators to measure and model the algal organisms [32], also the role of algal blooms on the public health [4].
Based on the context here discussed, some questions were identified. This paper focuses on the reservoir management theme, intending to improve the operator's capacity to forecast situations that can compromise its uses, by applying the quasi-3D mathematical modeling tool. To do, a quasi-3D model was used to represent the thermal changing and its consequences in the hydrodynamics and the water quality.

The 3D hydraulic modeling
Numerical models are needed to describe nonhydrostatic flows, in which the water surface slope variations are rapid, and the waves are short, invaliding the use of simpler methods of approximations. In 3D simulation cases, it is necessary to have a numerical scheme that can minimize problems with stability, due to the time step dependence from the special discretization, wave velocity, or the Courant number [7,40].
The solution proposed by Leendertse (1967) and Stelling (1983) [23,35] is a way of factorizing the barotropic pressure and the continuity equation. It was extended to the 3D models by using the Reynolds-averaged Navier-Stokes equations (RANS) continuity (1) and momentum (2) equation. In this model, the hydrostatic and the hydrodynamic components of the pressure are considered separately.
In the above equations, x i is the position at coordinates axes i,j, and k, ρ is the temperature-dependent water density, u i is the time averaged velocity component at direction i, p is the hydrostatic pressure, μ is the water dynamic viscosity, δ ij is the Kronecker delta, and u ′ i u ′ j is the Reynolds stress [25]. Considering that vertical acceleration and diffusion can be neglected, the motion equation in vertical direction can be well simplified as shown in (3), resulting in the so-called quasi-3D model Several numerical solutions for this approach are available as the ones proposed by Casulli et al. and Ji [2,3,6,11] and consider using a staggered grid as shown in Fig. 1. A reference water elevation h is considered, and η is the depth above the reference. The Reynolds stress terms require closure equations to be determined, and different models can be employed [36]. Water temperature and salinity concentration influence directly the water density, and those alterations can be represented by a transport Eq. (5), which describes the variations (c) in the temperature or the salinity depending on the time, velocity components (u, v, w), and the eddy diffusivity coefficients (horizontal v h c and vertical v v c ) [7,26].

The 3D water quality modeling
Directly depending on the hydrodynamics is the water quality. A water quality model is based on the mass balance Eq. (6) associated with the hydrodynamic process. The base flow information (water depth, currents, turbulence mixing, temperature, and sediment concentration) is provided by the hydrodynamic and sediment models and is used to characterize the laws governing chemical, biochemical, and biological processes, besides boundary and initial conditions [8,20,25].
In the above equation, C represents the state mass concentration per volume unit of a desired variable, U i is the component velocity in x i direction, D x i is the dispersion coefficient in x i direction, S is the settling function, R is the reactive function, and Q is the loading function [20].
The main processes in pollutant interactions with the environment are the advection and dispersion term. The first one considers the inputs and outputs and the pollutant downstream movement, while the dispersion term describes how the pollutant spreads in the water [10]. The reactivity term refers to the chemical and/or biological processes, and the loading term describes the influence of external forces. Other involved processes are the bed particle deposition and resuspension, represented by the settling term [20].
Numerical models that use this type of expression represent the concentration variation in time, and in the three directions, the velocities, due to the turbulent diffusivities, and sources-sinks per unit volume [25,34].

Methods and materials
To achieve the research objective and improve the knowledge of hydrodynamics behavior of tropical lakes, this work performed the steps of getting high-frequency monitoring data, lake representation in a quasi-3D model, including its calibration and validation, and the results accuracy evaluation. The specification of each phase is explained below.

Software of 3D modeling
The software chosen to model the described phenomenon in water bodies in this research was the Delft3D, which is a mathematic model based on the resolution of the Navier-Stokes equations, using the finite difference method. The main reasons for this choice were the model capacity of quasi tri-dimensional modeling, which applies to the research objective, the widespread and known reliability of the software, and for being an open-source system. Still, there are also some disadvantages in using the Delft3D model; among them, the major is the processing time [13].
The Delft3D has a set of modules covering a range of aspects, and each module can be executed independently or in combination with other modules. All of them are dynamically interfaced to exchange data and results when the simulated process requires. The information exchanged between modules is provided automatically; each module writes its results in a communication file and reads from it the required information [13].
In this research, the modules used are FLOW and Water Quality. The first represents the lake's hydrodynamic behavior, while the second focuses on the ecosystem relationships evaluations. Both modules count with ways of introducing the initial and boundary conditions, physical, numerical and process parameters, the domain representation, time frame, external in/out discharges through a user interface.

Model configuration
This research applied the Delft3D model to simulate hydrodynamic and water quality processes in a small tropical lake, Hedberg Lake. An orthogonal grid with 13-m cells was used to represent the spatial variations in the surface area, while the water column was described in 30 layers, with 0.2 m thickness, in the z-model.
The boundary conditions were defined using the collected data. Physical and hydraulic parameters used were the lake's bathymetry, upstream input, and the spillway rating curve. In the heat model, variables such as the radiation, wind's direction and velocity, air temperature, precipitation, humidity, and evaporation were used as models' driving forces. Those data were collected from the local and nearby weather stations, as explained in The Monitoring System section.

Accuracy evaluation
The model's calibration and validation were done by comparing the modeled results with the field measures, especially the temperature profile. This comparison is the first indication that the model represents a hydrodynamic and water quality system. Traditionally, the correlation coefficient and standard error of estimate have been used to measure the efficiency of the model calibration. The most common indices to analyze time-dependent variables are the mean absolute error-MAE (7), Nash-Sutcliffe index (8), root mean square error-RMSE (9), and normalized mean absolute error-NMAE (10) [8,28]: In the above equations, n points to the sample size, e is the error, Ŷ i is the predicted value of the criterion, Y i is the measured value of the criterion, and Y i is the mean of the measured values.
The root mean square error (RMSE) has been used as a standard statistical metric to measure model performance in meteorology, air quality, and climate research studies. Another useful and widely used coefficient in model evaluations is the MAE. The difference between them is that the MAE gives the same weight to all errors, while the RMSE penalizes variance, giving to errors with larger absolute values more weight than errors with smaller absolute values. When both metrics are calculated, the RMSE is never smaller than the MAE [8].
Researches about the use of metric indices conclude that RMSE is more appropriate to use than the MAE when model errors follow a normal distribution. The sensitivity of the RMSE to outliers is the most common concern, in practice; it might be justifiable to throw out the outliers that are several orders larger than the other samples, especially if the number of samples is limited. Finally, NMAE is normalized to the mean, enabling like comparisons between variables, and is absolute so that under-and overestimations do not cancel each other [9].
An important aspect of the error metrics used for model evaluations is their capability to discriminate it among model results. The more discriminating measure that produces higher variations in its model performance metric among different sets of model results is often the more desirable. In this regard, the MAE might be affected by a large amount of average error values without adequately reflecting some large errors. Giving higher weighting to the unfavorable conditions, the RMSE usually is better at revealing model performance differences [8].
Recognizing the limitations of the correlation coefficients, Nash and Sutcliffe (1971) proposed an alternative goodness-of-fit index, which is often referred to as the efficiency index (E f ). The advantage of the Nash-Sutcliffe index is that it can be applied to a variety of model types; for linear models, the efficiency index will lie in the interval from 0 to + 1. For biased models, the efficiency index may be algebraically negative. For nonlinear models, which most hydrologic models are of, negative efficiency can result even when the model is unbiased [28].
As well as RMSE and MAE, the Nash-Sutcliffe is a useful index; however, it can be sensitive to several factors, including sample size, outliers, magnitude bias, and time-offset bias. So, it is better to use a combination of those index to assess model [8,9,21].

Study case
The Hedberg dam was built in 1811 in the Ipanema River and was used to provide water for a small village and a steel and metallurgic industry. The old constructions and equipment, still present, are symbol of the colonial heritage in the area, and the reservoir is still used as a water supply source, besides flow regulation, recreation, and landscape element. The former village and part of the catchment area are now part of Ipanema National Forest. The catchment has a land use that is a mix of urban and rural areas covering 234.86 km 2 (Fig. 2) [16].
Experimental site is located at coordinates of 23° 25′ 44" S and 47° 35′ 39" W, State of São Paulo, Brazil, about 10 km from the City of Sorocaba. It is in tropical zone, with an annual rain depth of 1400 mm and the temperature range of about 18 and 22 °C [17].
The lake has 0.26 km 2 of surface, a maximum depth of 5 m, and the assessments about water quality in the catchment show problems with low levels of dissolved oxygen and excess of nutrients, especially phosphorus [17,33].

The monitoring system
A set of thermistors was positioned in the deepest point of the lake, to study its thermal behavior. It has four probes fixed in a rope and a plummet, with a float in the upper end. The time between measures was 1 min and the accuracy of the equipment is ± 0.2 °C. The monitoring campaign was from July 2016 through November 2017, and the Secchi depth was measured monthly.
The monitoring system still counted with a meteorological station that was placed at the banks. Air temperature, solar radiation, water level, wind's velocity and direction, atmospheric pressure, relative humidity, and precipitation were measure each 10 min. Solar radiation was taken in a 5-min interval to provide accurate representation of incident energy (Fig. 3). The lake bathymetry was taken from former studies.
To ensure the consistency of the measured data, they were compared with the data from the closest (1 km far) weather station from INMET-Meteorology National Institute [18]. Collected data showed good agreement with the INMET data, enabling its use.
Water quality indicators were used to calibrate and validate the model. They were the field measures of dissolved oxygen, biogeochemical organic matter, nitrate, ammonium, phosphorus, and chlorophyll-a, as an index for algae presence.

Hydrodynamic model
The hydrodynamic model was calibrated and verified through the comparison of water temperature measured and simulated values. The period chosen for the calibration was from July 07 until August 19, and for the validation, it was September 27 to October 27 both from 2016.
Parameters must be set up in the model's calibration to adjust the simulated process to the local characteristics ( Table 1). The graphics in Fig. 4 represent simulation results compared to field measurements. As can be seen, the stratification and mixing events are simulated with consistency, as well as the oscillations in surface and bottom temperature, and the gradient between them.
The accuracy of the model was evaluated by applying the indices described in the previous chapter ( Table 2). The evaluation showed good agreement between field measures and simulated results when compared with literature values; for example, a study that modeled 34 lakes has an NMAE mean of 0.11, a maximum of 0.25, and a minimum of 0.04 [5].
This elevated level of trust is only possible because of the quality reached in the input data, which is an example of how the model trustful results depend on input data. The statistic evaluation results are an effect of the improvement in the input data with the high-frequency monitoring.
After the calibration and validation was performed a simulation of an extended period (April-September 2017), which includes drought (July and August) and flood events (May and June). The hydrodynamic behavior (Fig. 5) confirms the reservoir polymictic bias with several stratifications and mix events along the semester. On the warm periods, the stratification events have a higher amplitude between the epilimnion and hypolimnion layers, reaching almost 10 °C, while in the winter the difference stays close to 5 °C.
This result shows how the external variables influence the lake hydrodynamic behavior. The balance between solar radiation and the wind energy commands the thermal stability of the lake, determining if it is stratified or mixed.
The external variables assessment demonstrates that the predominant wind direction is the same as the lake flow, which increases its influence. The combination of the decreasing radiation with the increasing wind velocity, raises the possibility of mixing events.    Fig. 4 Graphs that compare the measures from field probes and the model, being calibration (a) and validation (b), respectively Hedberg Lake has a polymictic characteristic, which means several mixing events throughout the year, and the model was successful in representing it. Because of its effects on the lake's thermal behavior and consequently in its water quality, a good simulation of the hydrodynamic behavior was possible to implement the ecological module.
One example of this influence is demonstrated in Fig. 6, with the temperature and density profile in a stratified and a mix situation. A stratified condition means separated layers across the water column, where the warm and so lighter water stays upper of the colder and heavier bottom layer, avoiding exchanges between them. In the exposed example, a stratified condition implicates in a proximally 3.3 °C and 1.3 kg m-3 difference between the lake's bottom and surface. On the other hand, the mixing event is characterized by having a minimum difference across the water column, with no layer segregation. This dynamic has a serious impact on water quality and was simulated in sequence.

Water quality
Water quality models provide a wide view of the ecosystem, describing its components, interactions, and mass transport along the watercourse. In this work, the objective goes beyond demonstrating that lakes and reservoirs water quality can be well represented by 3D mathematical models, and the goal is to evaluate the effect of the water column thermal behavior on the water quality, especially in small and shallow lakes with faster responses to the external influences.
The month of July of 2017 was used to verify the model performance, crossing model results with the statics analyses produced by the box plots of the historical measures time series. The simulation results are described in Fig. 7. The model's purpose is to be able to reproduce the environmental bias, the low and high peaks of each component. So the results show that the model can represent the behavior of all control variables in the environmental, and so the model is well calibrated and validated.
The water quality simulation includes different hydrologic situations (droughts and floods) and typical hydrodynamic behavior, with strong stratification moments and mixing events on the lake, which showed direct effects on its water quality (Fig. 8). Using the algae mass as a proxy to the biological activity, it can be noted that the mixing event causes a reduction in the biomass, while the stratification promotes its development. Thus, the algae maximum values (0.001 gC m −3 -using 1 gC: 30 gChl a [9,10]) were registered in the stratification period, with propitious external conditions (high radiation and low wind speed) and available nutrients. The nutrient consumption performed by the algae balances the NO3 and PO4 budget; as can be seen in Fig. 8, algae peaks provoke a nutrient decrease (July). The algae development also affects the DO concentration; as this organism can produce oxygen, the algae peak is followed by higher DO concentrations.
The main addition to the organic matter concentration is the basin input, which enters the lake by the wash load and the river contribution. It is also affected by the algae behavior; once at the end of its life cycle, they will contribute to the organic matter load. The low water velocity promotes the organic matter particle decay, accumulating it on the deeper layers. This material can be resuspended after strong mixing events.
Biochemical organic demand has an inverse relationship with dissolved oxygen, and high values of BOD mean that the DO is being consumed in the organic matter transformation. As the bottom layers are accumulating organic matter, the oxygen demand increases, reducing the DO availability in these areas.
Exchanges between the epilimnion and the hypolimnion are needed to renew the DO on the deeper waters. This communication is blocked by the density difference in a stratified condition, which causes a DO vertical profile with high concentrations on the surface and very low at the bottom (Fig. 9). The longer the reservoir stays stratified, the worse the water quality on the bottom gets which is the explanation for the whole column have bad water quality results after a mixing event (Fig. 8: 20 May; 10 June; 20 August).
The oxygen depletion on the deeper layers is one of the major water quality problems. It makes possible the anaerobic organisms to develope, resulting in greenhouse gases production [16].

Discussions
In this article, we demonstrate the performance of a numerical tool to simulate the hydrodynamic and water quality behavior in small tropical lake under stratifying and mixing conditions. The quasi-3D model, coupled with appropriate boundary conditions and forcing data, showed good results in representing accurately the temperature along the water column in tropical lakes.
The consequences of the thermal behavior over the water quality can be investigated with the model to explain the evolution of the state variables. A gain of the 3D model is to be able to reproduce the reservoir spatial variability and vertical profiles, which was useful in the proposed research.
The connections between hydrodynamic and water quality can relate to the analyses of simulations results in the z-dimension. The studied lake has a polymictic Fig. 6 Graphs that compare the temperature (left) and density (right) profile between mixed and stratified condition behavior, with several events of mixing along the simulated period. This hydrodynamic particularity is more often found on tropical lakes and perturbs the water quality each time the column overturns.
This is an example of how the lake's thermal condition can determine its water quality. An "intense" lake's mixing regime has higher upward vertical velocities, which refeed the water column frequently with constituents and nutrients, which were adsorbed on the sediments. The water enrichments with nutrients can lead to eutrophication and algal blooms, causing damage to the water quality and limiting its uses.
Analyzing specifically the algae component, stratified periods mean better conditions to its development, with the turbidity reduction and consequential increase in the light penetration in the water. Apart from that, the mixing event is also important for the algae, and it represents the process of the nutrients to be recycled and become available again.  The simulation also showed the reflection of the hydrodynamic behavior on the OD. Long periods of stratification are also problematic to the water quality, once they drop DO levels down at the deeper layers, enabling anaerobic organisms to develop and increasing greenhouse gas generation.
Hence, the influence of the temperature gradient in the hydrodynamic and water quality of lakes is verified, as well as the importance of improving monitoring techniques. The high-frequency monitoring used showed that it can create a good database for 3D hydrodynamic modeling, providing a better quality of its results.

Conclusions
It is necessary to understand lakes' hydrodynamics and water quality, due to its intense relationship with society's development. Limnology field studies are evolving to improve the management of the reservoirs, but still has gaps to fill. These are mostly concentrated in representing the algal role in the ecosystem by coupled models, and the interaction between sediments, hydrodynamics, and water quality.
In this context, this research applied a quasi-3D model to represent the lake's hydrodynamic and water quality. This work, based on previous experiences, was able to demonstrate this tool capacity to represent accurately the change in the lakes' thermal regime. A gain of this type of tool was to be able to reproduce the reservoir spatial variability and vertical profiles.
Those relations make the tool even more important because it shows that lakes' hydrodynamics affects the water quality also in other aspects, beyond the ones already known, such as the water turbidity. The linking between climate change impacts and the state of the water quality is showed with the content of this research, such as the importance of capacity to forecast and know the lake's thermal condition.
The hypothesis here discussed demonstrated the mathematical model can be applied in lakes' management, improving its efficiency, the knowledge of its dynamics, and operator's capacity to prevent harmful events.

Compliance with ethical standards
Conflict of interest On behalf of all authors, the corresponding author states that there is no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/. Fig. 9 Hedberg Lake water quality simulation results of the dissolved oxygen (DO) profile in stratified and mix condition. Each color line means a different day of an event