Acessibilidade / Reportar erro

A coupled 2D-3D catchment-lake model with a parallel processing framework

Um modelo acoplado 2D-3D de bacia hidrográfica-lago com uma estrutura de processamento paralelo

ABSTRACT

Modeling catchment-lake interactions is computationally demanding, usually requiring coupled numerical models and parallel processing capabilities. However, models with these requirements are still rare. In this paper, we developed a coupled 2D-3D model for lake catchments using a parallel scheme that leverages processing power of GPU and multiple CPUs. The model allows for hydrodynamic simulation applications considering diffuse water flows at the interface between the catchment and the lake. We coupled the Environmental Fluid Dynamics Code (EFDC) with a two-dimensional shallow water model and test it on the Peri Lake Catchment in southern Brazil. The results revealed the ability of the model simulate lake water levels as well as the diffuse inputs of water and solutes, providing the possibility of its use in lake and reservoir water management.

Keywords:
Hydrologic-hydrodynamic modeling; Lake modeling; Coupled model; Parallel computing

RESUMO

A modelagem das interações entre bacia hidrográfica e lago é computacionalmente exigente, e geralmente requer modelos numéricos acoplados e recursos de processamento paralelo. No entanto, modelos com esses requisitos ainda são raros. Neste trabalho, desenvolvemos um modelo 2D-3D acoplado para bacias de lagos usando um esquema paralelo que aproveita o poder de processamento de GPUs e de várias CPUs. O modelo permite aplicações de simulação hidrodinâmica considerando fluxos de água difusos na interface entre a bacia hidrográfica e o lago. Acoplamos o Código de Dinâmica de Fluidos Ambiental (Environmental Fluid Dynamics Code - EFDC) com um modelo bidimensional de águas rasas e o testamos na bacia da Lagoa do Peri, no sul do Brasil. Os resultados revelaram a capacidade do modelo de simular os níveis da água do lago, bem como entradas difusas de água e solutos, proporcionando a possibilidade de seu uso no gerenciamento da água de lagos e reservatórios.

Palavras-chave:
Modelagem hidrológica-hidrodinâmica; Modelagem de lago; Modelo acoplado; Computação paralela

INTRODUCTION

Physical, chemical, and biological aspects of lake circulation are determined by the interaction of lake and catchment water flows (Rueda & MacIntyre, 2010Rueda, F. J., & MacIntyre, S. (2010). Modelling the fate and transport of negatively buoyant storm-river water in small multi-basin lakes. Environmental Modelling & Software, 25(1), 146-157. http://dx.doi.org/10.1016/j.envsoft.2009.07.002.
http://dx.doi.org/10.1016/j.envsoft.2009...
; Lopes et al., 2018Lopes, V. A. R., Fan, F. M., Pontes, P. R. M., Siqueira, V. A., Collischonn, W., & Motta Marques, D. (2018). A first integrated modelling of a river-lagoon large-scale hydrological system for forecasting purposes. Journal of Hydrology, 565, 177-196. http://dx.doi.org/10.1016/j.jhydrol.2018.08.011.
http://dx.doi.org/10.1016/j.jhydrol.2018...
). Point water inputs are important to represent the contributions from main rivers into the lake. Diffuse water inputs consider the distributed contributions from the catchment that enter the lake along the entire shore (Janssen et al., 2019Janssen, A. B. G., van Wijk, D., van Gerven, L. P. A., Bakker, E. S., Brederveld, R. J., DeAngelis, D. L., Janse, J. H., & Mooij, W. M. (2019). Success of lake restoration depends on spatial aspects of nutrient loading and hydrology. The Science of the Total Environment, 679, 248-259. PMid:31082598. http://dx.doi.org/10.1016/j.scitotenv.2019.04.443.
http://dx.doi.org/10.1016/j.scitotenv.20...
). These point and diffuse water inputs can be simulated using coupled hydrological and hydrodynamic models (Huang et al., 2016Huang, J., Yan, R., Gao, J., Zhang, Z., & Qi, L. (2016). Modeling the impacts of water transfer on water transport pattern in Lake Chao, China. Ecological Engineering, 95, 271-279. http://dx.doi.org/10.1016/j.ecoleng.2016.06.074.
http://dx.doi.org/10.1016/j.ecoleng.2016...
). While most coupling approaches generally consider point inlets between the lake and the main rivers, diffuse water inputs that occur at the catchment-lake boundaries are more challenging to model (Xie et al., 2012Xie, Z. T., Yang, F. L., & Fu, X. L. (2012). Mathematical model for flood routing in Jingjiang River and Dongting Lake network. Water Science and Engineering, 5(3), 259-268. http://dx.doi.org/10.3882/j.issn.1674-2370.2012.03.002.
http://dx.doi.org/10.3882/j.issn.1674-23...
; Li et al., 2014Li, Y., Zhang, Q., Yao, J., Werner, A. D., & Li, X. (2014). Hydrodynamic and hydrological modeling of the poyang lake catchment system in China. Journal of Hydrologic Engineering, 19(3), 607-616. http://dx.doi.org/10.1061/(ASCE)HE.1943-5584.0000835.
http://dx.doi.org/10.1061/(ASCE)HE.1943-...
).

Hydrological processes within catchments are highly variable in space and time and influence the hydrodynamics of water bodies such as lakes and reservoirs (Zhang et al., 2019Zhang, J., Huang, T., Chen, L., Liu, X., Zhu, L., Feng, L., & Yang, Y. (2019). Water-exchange response of downstream river-lake system to the flow regulation of the Three Gorges reservoir, China. Water, 11(11), 2394. http://dx.doi.org/10.3390/w11112394.
http://dx.doi.org/10.3390/w11112394...
). To insert the hydrological components of the catchment into the lake hydrodynamics, most studies use data from flows gauged in the main rivers of the catchment (Bocaniov et al., 2016Bocaniov, S. A., Leon, L. F., Rao, Y. R., Schwab, D. J., & Scavia, D. (2016). Simulating the effect of nutrient reduction on hypoxia in a large lake (Lake Erie, USA-Canada) with a three-dimensional lake model. Journal of Great Lakes Research, 42(6), 1228-1240. http://dx.doi.org/10.1016/j.jglr.2016.06.001.
http://dx.doi.org/10.1016/j.jglr.2016.06...
; Umgiesser et al., 2016Umgiesser, G., Zemlys, P., Erturk, A., Razinkova-Baziukas, A., Mezine, J., & Ferrarin, C. (2016). Seasonal renewal time variability in the Curonian Lagoon caused by atmospheric and hydrographical forcing. Ocean Science, 12(2), 391-402. http://dx.doi.org/10.5194/os-12-391-2016.
http://dx.doi.org/10.5194/os-12-391-2016...
). However, in many catchments this procedure is seriously restricted by the limited availability of gauged data and human and financial resources to carry out field monitoring (Lopes et al., 2018Lopes, V. A. R., Fan, F. M., Pontes, P. R. M., Siqueira, V. A., Collischonn, W., & Motta Marques, D. (2018). A first integrated modelling of a river-lagoon large-scale hydrological system for forecasting purposes. Journal of Hydrology, 565, 177-196. http://dx.doi.org/10.1016/j.jhydrol.2018.08.011.
http://dx.doi.org/10.1016/j.jhydrol.2018...
). In addition, this approach generally disregards diffuse water and nutrient inputs that may occur through hillslope and groundwater transport. This limitation can be overcome by coupling catchment with lake hydrodynamic models (Hwang et al., 2021Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911.
http://dx.doi.org/10.3390/app11093911...
; Shin et al., 2019Shin, S., Her, Y., Song, J. H., & Kang, M. S. (2019). Integrated sediment transport process modeling by coupling Soil and Water Assessment Tool and Environmental Fluid Dynamics Code. Environmental Modelling & Software, 116(1), 26-39. http://dx.doi.org/10.1016/j.envsoft.2019.02.002.
http://dx.doi.org/10.1016/j.envsoft.2019...
).

The coupling of models has some limitations related to the simulation time, as it solves the equations of the two models and exchanges data between them with conventional programming methods that perform sequential calculations (Lopes et al., 2018Lopes, V. A. R., Fan, F. M., Pontes, P. R. M., Siqueira, V. A., Collischonn, W., & Motta Marques, D. (2018). A first integrated modelling of a river-lagoon large-scale hydrological system for forecasting purposes. Journal of Hydrology, 565, 177-196. http://dx.doi.org/10.1016/j.jhydrol.2018.08.011.
http://dx.doi.org/10.1016/j.jhydrol.2018...
). Besides, input data pre-processing usually requires advanced knowledge of a programming language and manual procedures with the application of several software (Shin et al., 2019Shin, S., Her, Y., Song, J. H., & Kang, M. S. (2019). Integrated sediment transport process modeling by coupling Soil and Water Assessment Tool and Environmental Fluid Dynamics Code. Environmental Modelling & Software, 116(1), 26-39. http://dx.doi.org/10.1016/j.envsoft.2019.02.002.
http://dx.doi.org/10.1016/j.envsoft.2019...
). Performing each steps of the coupling manually is time-consuming and prone to data manipulation errors, in addition to limiting real-time modeling (Gregersen et al., 2007Gregersen, J. B., Gijsbers, P. J. A., & Westen, S. J. P. (2007). OpenMI: open modelling interface. Journal of Hydroinformatics, 9(3), 175-191. http://dx.doi.org/10.2166/hydro.2007.023.
http://dx.doi.org/10.2166/hydro.2007.023...
).

Simulation time can be shortened by using hydrological and hydrodynamic models prepared to use high performance computing and parallel processing methods in multiprocessor clusters, supercomputers, or in massively parallel devices such as General Purpose Graphics Processing Units - GPGPU (Ahn et al., 2021Ahn, J. M., Kim, H., Cho, J. G., Kang, T., Kim, Y. S., & Kim, J. (2021). Parallelization of a 3-dimensional hydrodynamics model using a hybrid method with MPI and OpenMP. Processes, 9(9), 1548. http://dx.doi.org/10.3390/pr9091548.
http://dx.doi.org/10.3390/pr9091548...
; Carlotto et al., 2018Carlotto, T., Silva, R. V., & Grzybowski, J. M. V. (2018). A GPGPU-accelerated implementation of groundwater flow model in unconfined aquifers for heterogeneous and anisotropic media. Environmental Modelling & Software, 101, 64-72. http://dx.doi.org/10.1016/j.envsoft.2017.12.004.
http://dx.doi.org/10.1016/j.envsoft.2017...
, 2019Carlotto, T., Silva, R. V., & Grzybowski, J. M. V. (2019). GPGPU-accelerated environmental modelling based on the 2D advection-reaction-diffusion equation. Environmental Modelling & Software, 116, 87-99. http://dx.doi.org/10.1016/j.envsoft.2019.02.001.
http://dx.doi.org/10.1016/j.envsoft.2019...
, 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
; O’Donncha et al., 2014O’Donncha, F., Ragnoli, E., & Suits, F. (2014). Parallelisation study of a three-dimensional environmental flow model. Computers & Geosciences, 64, 96-103. http://dx.doi.org/10.1016/j.cageo.2013.12.006.
http://dx.doi.org/10.1016/j.cageo.2013.1...
). As an example, the EFDC model is one of the most used and technically defensible hydrodynamic model for hydrodynamic simulation (Lai et al., 2016Lai, G., Wang, P., & Li, L. (2016). Possible impacts of the Poyang Lake (China) hydraulic project on lake hydrology and hydrodynamics. Nordic Hydrology, 47(S1), 187-205. http://dx.doi.org/10.2166/nh.2016.174.
http://dx.doi.org/10.2166/nh.2016.174...
). It is open source and can simulate one, two and three-dimensional flows, sediment transport, thermal and biological processes in rivers, lakes, reservoirs and estuaries (Hwang et al., 2021Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911.
http://dx.doi.org/10.3390/app11093911...
). The EFDC model is capable of simulating the wetting and drying process in lakes and can deal with transient and intermittent events of water, nutrients and sediments coming from rivers or hillslopes (Hamrick, 1992Hamrick, J. (1992). A three-dimensional environmental fluid dynamics computer code: theoretical and computational aspects. Virginia: Virginia Institute of Marine Science. https://doi.org/10.21220/V5TT6C.
https://doi.org/10.21220/V5TT6C...
). Recently, parallelized versions of the EFDC model were developed by O’Donncha et al. (2014)O’Donncha, F., Ragnoli, E., & Suits, F. (2014). Parallelisation study of a three-dimensional environmental flow model. Computers & Geosciences, 64, 96-103. http://dx.doi.org/10.1016/j.cageo.2013.12.006.
http://dx.doi.org/10.1016/j.cageo.2013.1...
and Ahn et al. (2021)Ahn, J. M., Kim, H., Cho, J. G., Kang, T., Kim, Y. S., & Kim, J. (2021). Parallelization of a 3-dimensional hydrodynamics model using a hybrid method with MPI and OpenMP. Processes, 9(9), 1548. http://dx.doi.org/10.3390/pr9091548.
http://dx.doi.org/10.3390/pr9091548...
to provide fast and efficient simulations in high-performance computing structures such as clusters with multiple processors and massively parallel devices. The SW2D-GPU is another recently parallelized model that runs in GPU in order to provide fast and efficient simulations of surface water flows in catchments (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
). It was implemented in CUDA C language which greatly improved its performance compared with the sequential CPU processing with Fortran language.

Regarding limitations in preprocessing and data sharing, they can be improved with the automation of the coupling process of the hydrological and hydrodynamic models for applications in lake ecosystems modeling (Alarcon et al., 2014Alarcon, V. J., Johnson, D., McAnally, W. H., van der Zwaag, J., Irby, D., & Cartwright, J. (2014). Nested hydrodynamic modeling of a coastal river applying dynamic-coupling. Water Resources Management, 28(10), 3227-3240. http://dx.doi.org/10.1007/s11269-014-0671-6.
http://dx.doi.org/10.1007/s11269-014-067...
; Gregersen et al., 2007Gregersen, J. B., Gijsbers, P. J. A., & Westen, S. J. P. (2007). OpenMI: open modelling interface. Journal of Hydroinformatics, 9(3), 175-191. http://dx.doi.org/10.2166/hydro.2007.023.
http://dx.doi.org/10.2166/hydro.2007.023...
; Hwang et al., 2021Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911.
http://dx.doi.org/10.3390/app11093911...
; Shin et al., 2019Shin, S., Her, Y., Song, J. H., & Kang, M. S. (2019). Integrated sediment transport process modeling by coupling Soil and Water Assessment Tool and Environmental Fluid Dynamics Code. Environmental Modelling & Software, 116(1), 26-39. http://dx.doi.org/10.1016/j.envsoft.2019.02.002.
http://dx.doi.org/10.1016/j.envsoft.2019...
; Zhang et al., 2017Zhang, L., Lu, J., Chen, X., Liang, D., Fu, X., Sauvage, S., & Sanchez Perez, J.-M. (2017). Stream flow simulation and verification in ungauged zones by coupling hydrological and hydrodynamic models: a case study of the Poyang Lake ungauged zone. Hydrology and Earth System Sciences, 21(11), 5847-5861. http://dx.doi.org/10.5194/hess-21-5847-2017.
http://dx.doi.org/10.5194/hess-21-5847-2...
). For example, Huang et al. (2016)Huang, J., Yan, R., Gao, J., Zhang, Z., & Qi, L. (2016). Modeling the impacts of water transfer on water transport pattern in Lake Chao, China. Ecological Engineering, 95, 271-279. http://dx.doi.org/10.1016/j.ecoleng.2016.06.074.
http://dx.doi.org/10.1016/j.ecoleng.2016...
coupled a 2D hydrological model (Xinanjiang) and the Environmental Fluid Dynamics Code (EFDC) in which the Xinanjiang model simulates inflow discharges for the boundary conditions of the hydrodynamic model of Lake Chao, China. Zhang et al. (2017)Zhang, L., Lu, J., Chen, X., Liang, D., Fu, X., Sauvage, S., & Sanchez Perez, J.-M. (2017). Stream flow simulation and verification in ungauged zones by coupling hydrological and hydrodynamic models: a case study of the Poyang Lake ungauged zone. Hydrology and Earth System Sciences, 21(11), 5847-5861. http://dx.doi.org/10.5194/hess-21-5847-2017.
http://dx.doi.org/10.5194/hess-21-5847-2...
coupled the Soil and Water Assessment Tool (SWAT) and the Delft3D model to simulate the interactions between water flows in ungauged zones of the catchment and Lake Poyang in China. Hwang et al. (2021)Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911.
http://dx.doi.org/10.3390/app11093911...
used SWAT-EFDC to evaluate the water quality improvement scenarios considering the agricultural system and nonpoint source pollution of the upper Ganwol estuarine reservoir catchment located in South Korea. The models used in these studies are good alternative options, their coupling schemes disregard diffuse inputs and they are not implemented considering high-performance computing.

The objective of this paper is to couple the parallelized version of the EFDC model (O’Donncha et al., 2014O’Donncha, F., Ragnoli, E., & Suits, F. (2014). Parallelisation study of a three-dimensional environmental flow model. Computers & Geosciences, 64, 96-103. http://dx.doi.org/10.1016/j.cageo.2013.12.006.
http://dx.doi.org/10.1016/j.cageo.2013.1...
) with the SW2D-GPU model (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
) for the simulation of catchment-lake interactions considering the diffuse inputs between the catchment and the lake shores. The resulting coupled model (SW2D-EFDC) uses parallel computing with hybrid processing in which water flows in the catchment are calculated on the Graphics Processing Unit (GPU) and the 3D simulation of the lake hydrodynamics is performed on a computer cluster using Message Passing Interface (MPI). The SW2D-EFDC model can be used to answer important questions such as: what are the relationships between water levels in the lake and water flows from the catchment? How do changes in hydrological regimes influence lake hydrodynamics? We test the developed SW2D-EFDC model using the Peri Lake catchment case study to simulate diffuse water inflows across the interface between the catchment and the lake, considering atmospheric forcing (wind on and wind off scenarios) and the transport of a virtual tracer (dye) to visualize the inlets and movement of water in the lake during a rainfall event.

MATERIAL AND METHODS

Here we present the development of a fully automated framework for: (i) application of a hydrological model; (ii) selection of the variables to be used in the hydrodynamic model; (iii) definition of the positions in which the variable will be inserted in the boundary between catchment and lake (boundary conditions); (iv) creation of the input files, and (v) execution of the hydrodynamic model.

Two-dimensional shallow water model accelerated by GPGPU (SW2D-GPU)

The SW2D-GPU model is based on the 2D shallow water equations (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
; Noh et al., 2016Noh, S. J., Lee, S., An, H., Kawaike, K., & Nakagawa, H. (2016). Ensemble urban flood simulation in comparison with laboratory-scale experiments: impact of interaction models for manhole, sewer pipe, and surface flow. Advances in Water Resources, 97, 25-37. http://dx.doi.org/10.1016/j.advwatres.2016.08.015.
http://dx.doi.org/10.1016/j.advwatres.20...
). In this formulation, the viscosity terms, wind resistance and Coriolis resistance are neglected. The equations of the two-dimensional shallow water model are written as follows:

Continuity equation:

h t + M x + N y = r e + q ex E , (1)
r e = r 1 INF + INT + LWL (2)

Momentum equations:

M t + u M x + v M y = g h H s x f 1 , (3)
N t + u N x + v N y = g h H s y f 2 , (4)

Frictions terms:

f 1 = g n 2 M u 2 + v 2 h 4 3 , (5)
f 2 = g n 2 N u 2 + v 2 h 4 3 , (6)

where t is the time; Hs=h+zb, where ℎ is the water depth and zb is the topographic elevation; M=uh and N=vh, where u and v are the velocities in the x and y directions respectively; re is the effective rainfall; r is the rainfall rate; INT is the percentage of rainfall interception loss; INF is the percentage of rainfall infiltration loss; LWL is the lake water losses (only in the cells in the lake area and water bodies); qex is the term that defines the flow into the drainage network; E is the potential evaporation; f1 and f2 are the friction components, g is the gravitational acceleration and n is Manning's roughness coefficient.

The space-time discretization uses a finite difference scheme and the Leapfrog method in which water depths are calculated at the cell centers and fluxes are calculated at the boundaries of adjacent cells. The numerical solution of the momentum and continuity equations in the spatial dimension is processed in the parallel in the GPU. The temporal evolution is performed iteratively with a sequential code processed in the CPU (Figure 1). More details on the numerical and computational formulation of the model can be found in (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
).

Figure 1
Flowchart of the SW2D-EFDC model. The SW2D-GPU model, the coupling module and a single time step of the EFDC-MPI model are illustrated. t is time, Δt is time step, tmax is simulation time, tout is output time, u and v are velocities in x and y directions and h is water depth. In the SW2D-GPU model, the momentum equations are solved in the step of calculating the flow components and the solution of the continuity equation is carried out in two intermediate steps according to the Leapfrog method (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
).

Environmental Fluid Dynamics Code (EFDC-MPI)

The EFDC-MPI model is based on the Reynolds-averaged Navier-Stokes equations. The model has an extensive mathematical formulation that includes a water quality model, a particle tracking model, temperature, sediment transport, among others. More details about the model and its formulation can be found in Hamrick (1992)Hamrick, J. (1992). A three-dimensional environmental fluid dynamics computer code: theoretical and computational aspects. Virginia: Virginia Institute of Marine Science. https://doi.org/10.21220/V5TT6C.
https://doi.org/10.21220/V5TT6C...
. The continuity and momentum equations use the Boussinesq approximation for a variable density fluid (Hamrick, 1992Hamrick, J. (1992). A three-dimensional environmental fluid dynamics computer code: theoretical and computational aspects. Virginia: Virginia Institute of Marine Science. https://doi.org/10.21220/V5TT6C.
https://doi.org/10.21220/V5TT6C...
). The three-dimensional continuity equations are:

m η t + x m y H u + y m x H v + z m w = 0, (7)
m η t + x m y H 0 1 u d z + y m x H 0 1 v d z = 0, (8)

The momentum equations are:

t m H u + x m y H u u + y m x H v u + z m w u m f + v m y x u m x y H v = m y H x g η + p m y h b x z H x p z + z m H 1 A v u z + Q u , (9)
t m H v + x m y H u v + y m x H v v + z m w v m f + v m y x u m x y H u = m x H y g η + p m x h b y z H y p z + z m H 1 A v v z + Q v , (10)
p z = g H ρ ρ 0 ρ 0 1 = g H b , (11)

where the vertical velocity w is related to the physical vertical velocity w* by:

w = w * z η t + m x 1 u η x + m y 1 v η y + 1 z m x 1 u h b x + m y 1 v h b y , (12)

where H is the total depth of water column, defined as (η+hb); hb and η are the water depth below the vertical reference level and the water surface elevation above the vertical reference level, respectively; w is the vertical velocity in the z direction; f is the Coriolis parameter; Av is the vertical diffusivity; mx and my are the square roots of the diagonal components; m=mxmy is the root of the Jacobian; p is the pressure; Qu and Qv, are the affluent–effluent movement terms and g the gravitational acceleration. Figure 2 shows a scheme of the vertical coordinate system.

Figure 2
The EFDC vertical coordinate system. (a) In the physical space; (b) In the sigma space (adapted from DSI LLC, 2022DSI LLC (2022). EFDC+ theory, version 10.3. Retrieved in 2021, July 1, from https://www.eemodelingsystem.com/wp-content/Download/Documentation/EFDC_Theory_Document_Ver_10.3_2022.05.03.pdf
https://www.eemodelingsystem.com/wp-cont...
).

The EFDC model uses a time variable stretching transformation to provide uniform resolution in the vertical direction. The stretching transformation is given by:

z = z * + h b x , y / η x , y , t + h b x , y , (13)

where z* denotes the original physical vertical coordinates.

To solve the equations of motion, the EFDC model uses a second order finite difference method in a staggered or orthogonal curvilinear grid (Hamrick, 1996Hamrick, J. (1996). User’s manual for the environmental fluid dynamics computer code (Special Reports in Applied Marine Science and Ocean Engineering (SRAMSOE), No. 331). Virginia: Virginia Institute of Marine Science. http://dx.doi.org/10.21220/V5M74W.
http://dx.doi.org/10.21220/V5M74W...
). A three-time Leapfrog numerical integration scheme with periodic trapezoidal corrections is used for the temporal integration of the model (Hamrick, 1992Hamrick, J. (1992). A three-dimensional environmental fluid dynamics computer code: theoretical and computational aspects. Virginia: Virginia Institute of Marine Science. https://doi.org/10.21220/V5TT6C.
https://doi.org/10.21220/V5TT6C...
, 1996Hamrick, J. (1996). User’s manual for the environmental fluid dynamics computer code (Special Reports in Applied Marine Science and Ocean Engineering (SRAMSOE), No. 331). Virginia: Virginia Institute of Marine Science. http://dx.doi.org/10.21220/V5M74W.
http://dx.doi.org/10.21220/V5M74W...
). The finite difference scheme is divided into external mode (barotropic mode) and internal mode (baroclinic mode). The external mode solution is semi-implicit and calculates the two-dimensional field of water surface elevations with the pre-conditioned conjugate gradients method. The new surface elevation field is used to calculate the depth averaged barotropic velocities. In external mode it is possible to simultaneously define surface elevations, wave characteristics, or volumetric flow to be used as boundary conditions. The internal scheme for solving the momentum equations uses the same time step as the external solution and is implicit with respect to vertical diffusion (Hamrick, 1996Hamrick, J. (1996). User’s manual for the environmental fluid dynamics computer code (Special Reports in Applied Marine Science and Ocean Engineering (SRAMSOE), No. 331). Virginia: Virginia Institute of Marine Science. http://dx.doi.org/10.21220/V5M74W.
http://dx.doi.org/10.21220/V5M74W...
).

Coupling

The SW2D-EFDC model uses hybrid parallel processing that leverages the processing power of the GPU and multiple CPUs (cluster). The structure of the codes implemented in CUDA C and MPI is illustrated in Figure 1. The coupling module is implemented in the SW2D-GPU model, comprising functions to map lake-catchment boundaries and automate the creation of the computational domain grid and the inputs for coupled simulations.

The coupling scheme contains functions that automate the process of creating EFDC-MPI model inputs while running the SW2D-GPU model. Inputs that do not depend on the solution of the shallow water equation or the identification of the lake-catchment boundary (i.e., files that define the grid, the computational domain decomposition and the initial conditions of temperature, salinity and dye concentrations) are created at the initialization of the SW2D-GPU model. The boundary conditions applied at the lake-catchment boundaries (i.e., salinity, temperature, and dye concentration time series) and the flow time series that depend on the solution of the shallow water equations are created at the end of the SW2D-GPU model run. This computational code enables efficient communication between models and can be the basis for the development of new coupling strategies using Open Modelling Interface (OpenMI) tools (Gregersen et al., 2007Gregersen, J. B., Gijsbers, P. J. A., & Westen, S. J. P. (2007). OpenMI: open modelling interface. Journal of Hydroinformatics, 9(3), 175-191. http://dx.doi.org/10.2166/hydro.2007.023.
http://dx.doi.org/10.2166/hydro.2007.023...
; Harpham et al., 2019Harpham, Q. K., Hughes, A., & Moore, R. V. (2019). Introductory overview: the OpenMI 2.0 standard for integrating numerical models. Environmental Modelling & Software, 122, 104549. http://dx.doi.org/10.1016/j.envsoft.2019.104549.
http://dx.doi.org/10.1016/j.envsoft.2019...
).

The main input data to initialize the calculations of water flows in the catchment with the SW2D-GPU model are:

  • Topographic data: a file containing the digital elevation model (DEM) [m] is a mandatory entry, bathymetry must be included in areas where there are lakes;

  • Hydrometeorological data: rainfall [mm], temperature [°C], solar radiation [Wm2], inflow and outflow time series [m3s-1] (monitored data of the water inlet or outlet). Temperature and solar radiation data are needed when the evaporation process is considered. The evaporation is computed by the model using energy balance method;

  • Initial and boundary conditions: initial water level [m] in the lake, Boundary condition of known value [m] (points of interest with a known fixed value);

  • Parameters: Manning roughness coefficient, albedo (value in the range between 0 and 1), lake water losses [%], rainfall interception loss [%] and infiltration [%].

The functions that make up the coupling module and the main automatically generated files for data sharing in the SW2D-EFDC model are described below (Figure 1).

Computational grid

In the SW2D-GPU model, the computational domain is discretized with square cells and a Cartesian grid, therefore, the EFDC-MPI model is also configured to use a grid that maintains the same characteristics.

Grid specification files: The grid generating pre-processor code, gefdc.f, is used to generate the horizontal grid and the DXDY.INP and LXLY.INP files. This code is provided with the original version of the EFDC model. However, to use gefdc.f the input files CELL.INP, DEPDAT.INP, GRIDEXT.INP, GEFDC.INP are required. Here we developed a code called make_grid_inputs.c to automate the creation of these files using the digital elevations model with bathymetry coupled from the SW2D-GPU model and a mask that defines the lake region, both are files in Esri ASCII raster format.

  • CELL.INP: file containing computational domain definition and horizontal cell type identifier;

  • CELLLT.INP: file containing horizontal cell type identifier for saving mean mass transport. The file CELLLT.INP may be equal CELL.INP file or define a subset of the water cells in the computational domain;

  • DEPDAT.INP: file containing depth or bottom topography (based on lake bathymetry);

  • GRIDEXT.INP: file of water cell corner coordinates;

  • GEFDC.INP: master input file for gefdc.f.

When running gefdc.f the following files are created:

  • DXDY.INP: provides the spatial resolution Δx and Δy, the initial water depth, the bottom elevations, and the roughness coefficient;

  • LXLY.INP: provides geometric properties of the computational domain (cell center coordinates and the components of a rotation matrix).

Domain decomposition file: The computational domain grid is decomposed into Locally Optimal Rectilinear Partition (LORP) using an optimal partition calculation code (O’Donncha et al., 2014O’Donncha, F., Ragnoli, E., & Suits, F. (2014). Parallelisation study of a three-dimensional environmental flow model. Computers & Geosciences, 64, 96-103. http://dx.doi.org/10.1016/j.cageo.2013.12.006.
http://dx.doi.org/10.1016/j.cageo.2013.1...
). The LORP code runs automatically in the SW2D-EFDC coupled model, requiring only the information on the number of processors and the CELL.INP file as input. In this step, the LORP.INP file is generated containing the information for domain decomposition with load balanced among a defined number of processors.

The initial conditions and time series input files

Dye, salinity and temperature initial conditions: these files contain values corresponding to all cells of the lake domain, distributed in the horizontal (x, y) and in each vertical layer.

  • DYE.INP: initial concentrations of a dye;

  • SALT.INP: initial salinity values;

  • TEMP.INP: initial temperature values.

Atmospheric forcing:

  • ASER.INP: contains the time series of atmospheric pressure, air temperatures, rainfall, evaporation and solar radiation. It also includes unit conversion parameters;

  • WSER.INP: time series of wind velocities and wind directions. It can be used to specify the convention used for wind directions.

Time series forcing and boundary condition files: Each file can contain multiple time series. In the SW2D-EFDC model these files contain a time series for each lake-catchment boundary cell:

  • QSER.INP: volume flows time series;

  • SSER.INP: water salinity time series;

  • TSER.INP: water temperatures time series;

  • DSER.INP: time series of dye concentrations.

General parameters and run control files:

  • EFDC.INP: run control parameters and information about model domain, external forcing and output controls. Run control parameters define the functioning of the model in relation to the duration of the simulation, temporal and spatial discretization, definition of the types of processes and variables that will be considered (solute transport, thermal stratification, water quality variables, meteorological variables, among others), definition of model outputs and saving intervals, choice of output data format and file types, definition of model constants, and general settings;

  • SHOW.INP: control screen writing of information (i.e., water surface elevation, surface and bottom salinity) at the horizontal location specified by the horizontal cell indexes.

Mapping lake-catchment boundaries

The flows calculated by the SW2D-GPU model are inserted in the EFDC-MPI model through the catchment-lake boundaries. The determination of the i and j positions of the cells that belong to the lake-catchment boundary is determined with a mapping algorithm that uses as input a lake mask composed of values 1 in the lake region and 0 elsewhere (Figure 3a). The code in Figure 3c identifies the differences in lake mask values whenever a lake-catchment boundary cell is reached. At the boundary positions belonging to the catchment domain, the values of flows in the south (S), north (N), east (E), and west (W) directions are calculated. These values are used as boundary conditions written in the QSER.INP file to be applied to the boundary cells (BC) belonging to the lake domain (i.e., BC cells in Figure 3b). Flow values are grouped according to the directions from which they enter the lake and recorded along with simulation times and BC positions (Figure 3b). The values of u, v and h are dynamically updated with the results of the SW2D-GPU model at each time interval of the simulation and the water velocities in BC are internally calculated by the EFDC-MPI model with the values of h of the boundaries belonging to the lake domain.

Figure 3
Mapping of lake-catchment boundaries. (a) Mask in which the cells belonging to the lake region are set to 1 and the other cells to 0; (b) Illustrates lake-catchment boundary cell positions where boundary cells (BC) belong to the lake domain and catchment cells are identified with directions from which flows entering the lake are coming (South - S, North - N, East - E, and West - W). On the right, the records of times (t), flows (Qyn, Qys, Qxe, and Qxw) and x and y positions are presented, grouped according to the direction from which the flows come; (c) Code for mapping the i and j coordinates of lake-catchment boundaries and calculating volume flows. Where s_bc, n_bc, w_bc and e_bc store the coordinate values at the south, north, west, and east boundaries, respectively. s_val, n_val, w_val and e_val store the calculated flow values at the south, north, west and east boundaries, respectively. N is the number of time intervals in the simulation.

Flow coupling

The SW2D-EFDC model couples the water flows from the catchment into the lake (Figure 4a) and establishes a link with the heat exchange (Figure 4b) and transport processes.

Figure 4
Illustration of the SW2D-EFDC coupled model. (a) Illustration of the Catchment-Lake coupling; (b) 3D model of the lake showing the distribution of simulated temperatures; (c) Vertical temperature profiles; (d) Illustration of the horizontal coupling in which the arrows indicate the direction of the flows Qyn, Qys, Qxe and Qxw (flows from north, south, east, and west, respectively); (e) 3D view of the coupling interface in a section in which the 3D lake model has 3 vertical layers that receive flows QL1, QL2 and QL3. Where k is the number of layers.

The SW2D-EFDC model simulates the 2D-3D hydrodynamics of the lake system and provides a detailed view of the vertical profiles of velocity, temperature and chemical composition of water in the lake (Figure 4c). In the lake domain, a vertical Sigma Stretch Grid is used in which the vertical resolution is distributed according to the number of layers and the height of the water above the lake bottom in each cell. In this scheme, the number of layers remains fixed regardless of the water level, but the vertical resolution is variable in space depending on water depth (Figure 1a). The calculation to determine the vertical resolution of each layer is performed internally by the EFDC model based on the number of layers and proportions defined in the EFDC.INP file. For the coupling of the SW2D-GPU and EFDC-MPI models, the vertical resolution of each lake cell is divided equally between the layers. Likewise, the water flows entering the lake are divided by the number of layers and distributed evenly in each layer of cells at the lake-catchment boundaries (Figure 4e). This implementation can be adapted to non-uniform vertical flux distributions at catchment-lake boundaries through empirical equations obtained by analyzing data monitored in the field, showing great potential for testing hypotheses aiming to improve the understanding of hydrological processes at catchment-lake boundaries.

Figure 4d shows the horizontal coupling between the catchment and lake domains. The flows calculated by the SW2D-GPU model are stored and attributed according to the orientation of the faces at the boundaries of the EFDC-MPI model and the direction of the flows coming from the catchment. Water flowing from the north (Qyn) enter north facing boundaries, flows from south (Qys) enter south facing boundaries, flows from east (Qxe) enter east facing boundaries and flows from west (Qxw) enter west facing boundaries. Flow values are automatically written to the QSER.INP file and entered into the lake domain as a volume flow boundary condition.

Study area

The Peri Lake catchment is located in Santa Catarina Island, southern Brazil (Figure 5), with average annual precipitation of 1500 mm (Chaffe et al., 2021Chaffe, P. L. B., Santos, C., Perez, A. B. A., Sá, J. H. M., Carlotto, T., & Hoinaski, L. (2021). Observing the critical zone on a critical budget: The Peri Lake experimental catchment. Hydrological Processes, 35(3), http://dx.doi.org/10.1002/hyp.14087.
http://dx.doi.org/10.1002/hyp.14087...
; Hennemann & Petrucio, 2011Hennemann, M. C., & Petrucio, M. M. (2011). Spatial and temporal dynamic of trophic relevant parameters in a subtropical coastal lagoon in Brazil. Environmental Monitoring and Assessment, 181(1–4), 347-361. PMid:21190080. http://dx.doi.org/10.1007/s10661-010-1833-5.
http://dx.doi.org/10.1007/s10661-010-183...
). The lake surface area is 5 km2 with average depth of 7.0 m and maximum depth of 11.0 m. The surrounding hillslopes are covered by remains of Subtropical Atlantic Rain Forest and sandy Restinga (Perez et al., 2020Perez, A. B. A., Santos, C. I., Sá, J. H. M., Arienti, P. F., & Chaffe, P. L. B. (2020). Connectivity of ephemeral and intermittent streams in a subtropical atlantic forest headwater catchment. Water, 12(6), 1-15. http://dx.doi.org/10.3390/w12061526.
http://dx.doi.org/10.3390/w12061526...
; Santos et al., 2021Santos, C. I., Chaffe, P. L. B., Perez, A. B. A., Arienti, P. F., & Sá, J. H. M. (2021). Precision and accuracy of streamflow measurements in headwater streams during baseflow. RBRH, 26(8), 1-15. http://dx.doi.org/10.1590/2318-0331.262120200135.
http://dx.doi.org/10.1590/2318-0331.2621...
). It is the largest source of water supply on the Island and an important ecosystem for biodiversity preservation. The lake supplies water to the local population through the Water and Sanitation Company (CASAN), which is authorized to extract up to 200 Ls-1 of lake water (water abstraction point is marked with a triangle in Figure 5).

Figure 5
Study area. (a) Shows the location of the Peri Lake catchment on the map of Florianópolis Island in Southern Brazil; (b) Peri Lake catchment in which the elevations, drainage network and the bathymetry of the lake (contour lines) are shown. The color bar represents the topographic elevations. The triangle represents the location of the water abstraction and the circle represents the location of the automated weather station.

Catchment-Lake simulation using SW2D-EFDC model

The SW2D-EFDC model is tested using Peri Lake data. The computational domain consists of a grid with 701 rows and 556 columns of rectangular cells with spatial resolution of 10 m. The catchment domain has 143723 active cells and the lake domain has 50638 active cells, 1394 cells belonging to the catchment-lake coupling interface.

In the simulations we use a Manning coefficient of 0.12 considering the presence of boulders with correction for channels covered by forests (Arcement & Schneider, 1989Arcement, G. J., & Schneider, V. R. (1989). Guide for selecting manning’s roughness coefficients for natural channels and flood plains (Vol. 2339). Denver: United States Geological Survey. Retrieved in 2021, July 1, from https://pubs.usgs.gov/wsp/2339/report.pdf
https://pubs.usgs.gov/wsp/2339/report.pd...
) and a time step of 0.04 seconds for the SW2D-GPU model (catchment). For the 3D hydrodynamic model (lake), the coefficient of roughness of the bottom is assumed as 0.00025 m or 0.25 mm, representing a condition where there is little influence of roughness (Qin et al., 2004Qin, B., Hu, W., Gao, G., Luo, L., & Zhang, J. (2004). Dynamics of sediment resuspension and the conceptual schema of nutrient release in the large shallow Lake Taihu, China. Chinese Science Bulletin, 49(1), 54-64. http://dx.doi.org/10.1007/BF02901743.
http://dx.doi.org/10.1007/BF02901743...
) and the time step of the numerical solver is 0.5 seconds. The time steps adopted were chosen to ensure the stability criteria of the models (Carlotto et al., 2021Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
; Shin et al., 2019Shin, S., Her, Y., Song, J. H., & Kang, M. S. (2019). Integrated sediment transport process modeling by coupling Soil and Water Assessment Tool and Environmental Fluid Dynamics Code. Environmental Modelling & Software, 116(1), 26-39. http://dx.doi.org/10.1016/j.envsoft.2019.02.002.
http://dx.doi.org/10.1016/j.envsoft.2019...
). The temporal resolution of the meteorological data is of 1 hour (Figure 6). The meteorological data used in this study were monitored using an automatic weather station located in the Peri Lake catchment (green circle in Figure 5b). The meteorological data used correspond to the period from 22/01/2020-09:00 to 29/01/2020-09:00 and have no gaps. Peri Lake water level data were provided by the Water and Sanitation Company (CASAN) which carried out the monitoring at the water abstraction point, whose location is indicated by the triangle in Figure 5b.

Figure 6
Weather data for the period from 22/01/2020-09:00 to 29/01/2020-09:00 with temporal resolution of 1 hour. (a) Distribution of wind velocities and wind directions; (b) Rainfall, solar radiation and temperature data.

The simulations are carried out for considering wind off and wind on (only in the lake area) scenarios. A dye tracer transport has been included in the simulation for the visualization of water inputs and lake hydrodynamics. The water that comes from the catchment is represented by the concentration 10.00 mgL-1 and the initial concentration in the lake is null. We used data from Carlotto et al. (2021)Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205.
http://dx.doi.org/10.1016/j.envsoft.2021...
to define that 45% of rainfall is lost by interception (INT), 20% is lost by infiltration (INF) in the catchment. In the lake area, a water loss (LWL) equivalent to 30% is considered. The water treatment plant is represented using an abstraction point of 120 Ls-1 (Figure 5b).

RESULTS

During the simulations, water level variations in the lake are recorded. We compare the two models and verify the conservation of mass and that the water inlets in the lake are compatible with those of the SW2D-GPU using the SW2D-EFDC model (Figure 7). First, only the SW2D-GPU model is used to verify whether the parameters n (Manning coefficient), INT (percentage of rainfall interception loss), INF (percentage of rainfall infiltration loss) and LWL (lake water losses), used would provide a good representation of the water level variations in the lake. The model is well adjusted as the Root Mean Square Error (RMSE) equal to 0.779. The coupled version SW2D-EFDC is applied and the simulated values of the water levels in the lake are compared again with the measured values. We identified that the SW2D-EFDC model provided an improvement in the fit of the simulated values to the measured data, showing a reduction of the RMSE to 0.750.

Figure 7
Simulated water levels and gauge data. The black dots represent the gauged level data. The red dashed line represents the lake water level simulated by the SW2D-GPU model and the blue line represents the lake water level simulated by the SW2D-EFDC coupled model.

The lake water level is well represented by both the SW2D-GPU model and the coupled SW2D-EFDC version (Figure 7). In the first 60 hours (period in which the catchment has the greatest contributions to the water inputs in the lake), the coupling between the two models is well established so that there are no significant water losses at the catchment-lake interface. A small difference in the simulated levels is verified after 80 hours, in which the levels of the coupled model SW2D-EFDC are slightly higher due to differences in water extraction (by evaporation and water abstraction) in the 3D hydrodynamic model lake domain. However, this difference remains less than 1 cm (which is the precision of the level sensor) throughout the simulated period.

The Figure 8 presents other aspects of the lake hydrodynamics, showing how the dye concentration (virtual tracer) propagates inside the lake. The Figure 8 presents the results of coupled simulation of water flows in the catchment and the hydrodynamics of the lake in wind on and wind off scenarios in which, in addition to the water velocities, the dynamics of a virtual tracer are also simulated. Water enters through rivers that have the largest drainage network, and in the period of the most intense rainfall the water velocities coming from the main river cause higher velocities in the inner part of the lake. However, there are also several smaller water inlets across the catchment-lake boundary (Figure 8il). In a scenario that includes wind velocities and directions we can see the hydrodynamic behavior of the lake, estimate how the water velocities in the lake behave (Figure 8mp) and estimate how the transport of a dye or solutes would enter from the catchment (Figure 8qt).

Figure 8
Interactions between water flows in the catchment and the lake. (a-d) Water depth variation in the catchment; (e-h) Water velocities in the lake in a wind-off setting; (i-l) The dynamics of a dye in the lake in a wind-off scenario; (m-p) Water velocities in the lake in a wind-on scenario; (q-t) Dynamics of a dye in the lake in a wind-on scenario. The columns represent the results at 24, 48, 72 and 96 hours, respectively.

In the simulation, the waters entering the catchment are mixed with a virtual tracer that facilitates the visualization of diffuse water inflows into the lake. In the wind-off scenario, it is easier to perceive the water inflows coming from the two main rivers, which with higher velocities transport the virtual tracer towards the central area of the lake, whereas the diffuse inflows distributed along the entire catchment-lake boundary have lower velocities and the virtual tracer remains on the lake shores.

When wind velocities and directions are considered, the hydrodynamics of the lake is modified, with the wind as the main controller of water movement. In this scenario, the effect of the mixing of the virtual tracer that enters through the catchment-lake boundary becomes visible, as now the tracer concentrations that were retained on the lake shores are carried by the water towards the central region. This behavior, in addition to showing that wind velocities are of great importance for lake hydrodynamics, also reveals that diffuse water inflows across catchment-lake boundaries can significantly influence lake water composition. Although this case study shows a way to use virtual tracer concentrations (dye) to visualize diffuse water inflows into the lake, it can also be a good way to infer possible entry points for nutrients and solutes from the catchment, estimate for which regions of the lake are transported, and possibly define where the highest concentrations can be found.

DISCUSSIONS

The benefit of coupling using high-performance models

The technological development and the consequent increase in the capacity of computers to perform large amounts of calculations also began to require the development of compatible mathematical and computational models capable of using such technologies (O’Donncha et al., 2019O’Donncha, F., Iakymchuk, R., Akhriev, A., Gschwandtner, P., Thoman, P., Heller, T., Aguilar, X., Dichev, K., Gillan, C., Markidis, S., Laure, E., Ragnoli, E., Vassiliadis, V., Johnston, M., Jordan, H., & Fahringer, T. (2019). AllScale toolchain pilot applications: PDE based solvers using a parallel development environment. Computer Physics Communications, 251, 107089. http://dx.doi.org/10.1016/j.cpc.2019.107089.
http://dx.doi.org/10.1016/j.cpc.2019.107...
). This is a fundamental aspect to be considered in the next years, in which scientific and technological development in the area of water resources will be closely related to the creation of computational tools focused on generating knowledge about hydrological processes and ecosystem relationships in catchments in a scenario of climate change and concerns about the water and energy security (Getirana et al., 2021Getirana, A., Libonati, R., & Cataldi, M. (2021). Brazil is in water crisis - it needs a drought plan. Nature, 600(7888), 218-220. PMid:34880440. http://dx.doi.org/10.1038/d41586-021-03625-w.
http://dx.doi.org/10.1038/d41586-021-036...
).

In this work we show that the coupling of the SW2D-GPU model with the EFDC-MPI hydrodynamic model provide a 3D hydrodynamic modeling of the lake considering the diffuse water inflows from the catchment, solute transport and wind influences (Figure 8). This coupling resulted in the SW2D-EFDC model that uses parallel processing in multi-core and GPU architectures. Thus, it minimizes the problem of long computational time, which is one of the main obstacles for the application of coupled models in real-world simulations (Hu et al., 2020Hu, D., Yao, S., Duan, C., & Li, S. (2020). Real-time simulation of hydrodynamic and scalar transport in large river-lake systems. Journal of Hydrology, 582, 124531. http://dx.doi.org/10.1016/j.jhydrol.2019.124531.
http://dx.doi.org/10.1016/j.jhydrol.2019...
; Munar et al., 2018Munar, A. M., Cavalcanti, J. R., Bravo, J. M., Fan, F. M., Motta-Marques, D., & Fragoso Junior, C. R. (2018). Coupling large-scale hydrological and hydrodynamic modeling: toward a better comprehension of watershed-shallow lake processes. Journal of Hydrology, 564, 424-441. http://dx.doi.org/10.1016/j.jhydrol.2018.07.045.
http://dx.doi.org/10.1016/j.jhydrol.2018...
). Another problem inherent to the complexity of the models is the preparation of the inputs to start the simulation, mainly in the part of the 3D hydrodynamic model (Huang et al., 2016Huang, J., Yan, R., Gao, J., Zhang, Z., & Qi, L. (2016). Modeling the impacts of water transfer on water transport pattern in Lake Chao, China. Ecological Engineering, 95, 271-279. http://dx.doi.org/10.1016/j.ecoleng.2016.06.074.
http://dx.doi.org/10.1016/j.ecoleng.2016...
). Therefore, in the coupling that we carried out, the processes of creating the inputs and the configuration of the 3D hydrodynamic model were automated to ensure the continuity of the solution and the data sharing between the SW2D-GPU model and the EFDC-MPI model.

The SW2D-EFDC model is one of the main contributions of this work, containing the following potentialities: (i) it allows hydrological and hydrodynamic simulations in large areas and with high spatial resolution; (ii) it simulates hydrodynamics in lake ecosystems with little availability of measured data; (iii) it simulates catchment and lake interactions; (iv) it is ideal for simulations using GPUs and clusters with multiple processors (CPUs) and can also be used in common office computers.

Model applicability

The catchment hydrology influences the spatial heterogeneity of nutrient loads, as the sources of water entering lakes can be local or widely dispersed, which determines the distribution of nutrients and solutes in the water body (Janssen et al., 2019Janssen, A. B. G., van Wijk, D., van Gerven, L. P. A., Bakker, E. S., Brederveld, R. J., DeAngelis, D. L., Janse, J. H., & Mooij, W. M. (2019). Success of lake restoration depends on spatial aspects of nutrient loading and hydrology. The Science of the Total Environment, 679, 248-259. PMid:31082598. http://dx.doi.org/10.1016/j.scitotenv.2019.04.443.
http://dx.doi.org/10.1016/j.scitotenv.20...
). In this sense, the SW2D-EFDC model was developed to provide the study of the effects of diffuse water inputs that come from the catchment on the hydrodynamics of the lake and thus improve the understanding of how do changes in hydrological regimes influence lake hydrodynamics and which are the relationships between water levels in the lake and water flows from the catchment.

These issues are important, especially in a closed lake like Peri Lake, which can have significant water inflows from slopes and small streams where there is no monitoring, this behavior is evidenced in the results presented in Figure 8 through the simulation with tracer dye. In this context, this work showed that the SW2D-EFDC model can bring important contributions to the study of lake hydrodynamics related to the variability of water levels and the transport of solutes in lake water, allowing to improve the understanding of these ecosystems that are sensitive to climate change and human activities that occur in the catchment (Couture et al., 2014Couture, R. M., Tominaga, K., Starrfelt, J., Moe, S. J., Kaste, Y., & Wright, R. F. (2014). Modelling phosphorus loading and algal blooms in a Nordic agricultural catchment-lake system under changing land-use and climate. Environmental Science. Processes & Impacts, 16(7), 1588-1599. PMid:24622900. http://dx.doi.org/10.1039/C3EM00630A.
http://dx.doi.org/10.1039/C3EM00630A...
).

The practical applications of the SW2D-EFDC model go beyond the case study presented in this work, and may be useful in other study areas and in different contexts, such as lakes formed in hydroelectric dams and reservoirs used for public water supply. In these cases, the coupled model can be a powerful tool to assess the water supply and water quality improvement scenarios considering the agricultural system and diffuse source pollution and also to assess the environmental risk of pollution incidents in quantitative terms around lakes which are important sources of drinking water (Hwang et al., 2021Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911.
http://dx.doi.org/10.3390/app11093911...
; Tian et al., 2019Tian, P., Wu, H., Yang, T., Zhang, W., Jiang, F., Zhang, Z., & Wu, T. (2019). Environmental risk assessment of accidental pollution incidents in drinking water source areas: a case study of the Hongfeng Lake Watershed, China. Sustainability, 11(19), 5403. http://dx.doi.org/10.3390/su11195403.
http://dx.doi.org/10.3390/su11195403...
). Overall the SW2D-GPU model can be applied to quantifying the effects of external forcing and water inputs on the lake hydrodynamic processes, the approach used allow the prediction of flows in ungauged areas, providing a representation of the diffuse discharges entering the lake boundaries. The model can be constantly improved and tested as the catchment is being instrumented. Regarding usability, the SW2D-EFDC model significantly reduces the difficulties commonly encountered in the hydrological-hydrodynamic modeling of lake ecosystems, since most of the configuration procedures were automated.

CONCLUSIONS

In this work it was shown that the SW2D-EFDC coupled model is able to represent the exchange of water between the catchment and the lake. The tests and application of the coupled model SW2D-EFDC were developed in the Peri Lake catchment, which is a lake ecosystem with a tropical climate located in southern Brazil. It was verified that the coupled model correctly simulated lake water levels during a precipitation event. The SW2D-EFDC model was applied to simulate the lake hydrodynamics considering the transport of a virtual tracer in wind-off and wind-on scenarios. This application showed that the model remained stable for water velocities induced by wind velocities measured in the catchment. The transport of a virtual tracer showed the model ability to represent the inputs and dynamics of solutes coming from the catchment. Therefore, the SW2D-EFDC model can be a useful tool to study water flows in the catchment and its influences on water levels and lake hydrodynamic at a catchment scale.

The coupling of the SW2D-GPU model and the EFDC-MPI model allowed us to take an important step towards studying the influence of catchment flows on lake hydrodynamics, in an automated way and with high-performance computational resources using a parallel scheme that leverages processing power of GPU and multiple CPUs. Some limitations still remain and offer opportunities for future studies. One of the challenges for coupled hydrological-hydrodynamic modeling is the bidirectional representation of flows. In the SW2D-EFDC model, the flows occur only from the catchment to the lake, this was a simple way adopted to test how the EFDC-MPI model would behave in the face of a coupling involving the entire boundary between catchment and lake. The test results showed good computational performance and there was no loss of numerical stability, indicating that a more complex coupling scheme involving the bidirectional representation of the flows is viable for future studies.

ACKNOWLEDGEMENTS

We thank Brazilian National Council for Scientific and Technological Development - CNPq, for the scholarship of the first author under the grant number 150528/2022-1. We also thank Water and Sanitation Company (CASAN) for providing the Peri Lake water level data.

REFERENCES

  • Ahn, J. M., Kim, H., Cho, J. G., Kang, T., Kim, Y. S., & Kim, J. (2021). Parallelization of a 3-dimensional hydrodynamics model using a hybrid method with MPI and OpenMP. Processes, 9(9), 1548. http://dx.doi.org/10.3390/pr9091548
    » http://dx.doi.org/10.3390/pr9091548
  • Alarcon, V. J., Johnson, D., McAnally, W. H., van der Zwaag, J., Irby, D., & Cartwright, J. (2014). Nested hydrodynamic modeling of a coastal river applying dynamic-coupling. Water Resources Management, 28(10), 3227-3240. http://dx.doi.org/10.1007/s11269-014-0671-6
    » http://dx.doi.org/10.1007/s11269-014-0671-6
  • Arcement, G. J., & Schneider, V. R. (1989). Guide for selecting manning’s roughness coefficients for natural channels and flood plains (Vol. 2339). Denver: United States Geological Survey. Retrieved in 2021, July 1, from https://pubs.usgs.gov/wsp/2339/report.pdf
    » https://pubs.usgs.gov/wsp/2339/report.pdf
  • Bocaniov, S. A., Leon, L. F., Rao, Y. R., Schwab, D. J., & Scavia, D. (2016). Simulating the effect of nutrient reduction on hypoxia in a large lake (Lake Erie, USA-Canada) with a three-dimensional lake model. Journal of Great Lakes Research, 42(6), 1228-1240. http://dx.doi.org/10.1016/j.jglr.2016.06.001
    » http://dx.doi.org/10.1016/j.jglr.2016.06.001
  • Carlotto, T., Borges Chaffe, P. L., Innocente dos Santos, C., & Lee, S. (2021). SW2D-GPU: a two-dimensional shallow water model accelerated by GPGPU. Environmental Modelling & Software, 145, 105205. http://dx.doi.org/10.1016/j.envsoft.2021.105205
    » http://dx.doi.org/10.1016/j.envsoft.2021.105205
  • Carlotto, T., Silva, R. V., & Grzybowski, J. M. V. (2018). A GPGPU-accelerated implementation of groundwater flow model in unconfined aquifers for heterogeneous and anisotropic media. Environmental Modelling & Software, 101, 64-72. http://dx.doi.org/10.1016/j.envsoft.2017.12.004
    » http://dx.doi.org/10.1016/j.envsoft.2017.12.004
  • Carlotto, T., Silva, R. V., & Grzybowski, J. M. V. (2019). GPGPU-accelerated environmental modelling based on the 2D advection-reaction-diffusion equation. Environmental Modelling & Software, 116, 87-99. http://dx.doi.org/10.1016/j.envsoft.2019.02.001
    » http://dx.doi.org/10.1016/j.envsoft.2019.02.001
  • Chaffe, P. L. B., Santos, C., Perez, A. B. A., Sá, J. H. M., Carlotto, T., & Hoinaski, L. (2021). Observing the critical zone on a critical budget: The Peri Lake experimental catchment. Hydrological Processes, 35(3), http://dx.doi.org/10.1002/hyp.14087
    » http://dx.doi.org/10.1002/hyp.14087
  • Couture, R. M., Tominaga, K., Starrfelt, J., Moe, S. J., Kaste, Y., & Wright, R. F. (2014). Modelling phosphorus loading and algal blooms in a Nordic agricultural catchment-lake system under changing land-use and climate. Environmental Science. Processes & Impacts, 16(7), 1588-1599. PMid:24622900. http://dx.doi.org/10.1039/C3EM00630A
    » http://dx.doi.org/10.1039/C3EM00630A
  • DSI LLC (2022). EFDC+ theory, version 10.3. Retrieved in 2021, July 1, from https://www.eemodelingsystem.com/wp-content/Download/Documentation/EFDC_Theory_Document_Ver_10.3_2022.05.03.pdf
    » https://www.eemodelingsystem.com/wp-content/Download/Documentation/EFDC_Theory_Document_Ver_10.3_2022.05.03.pdf
  • Getirana, A., Libonati, R., & Cataldi, M. (2021). Brazil is in water crisis - it needs a drought plan. Nature, 600(7888), 218-220. PMid:34880440. http://dx.doi.org/10.1038/d41586-021-03625-w
    » http://dx.doi.org/10.1038/d41586-021-03625-w
  • Gregersen, J. B., Gijsbers, P. J. A., & Westen, S. J. P. (2007). OpenMI: open modelling interface. Journal of Hydroinformatics, 9(3), 175-191. http://dx.doi.org/10.2166/hydro.2007.023
    » http://dx.doi.org/10.2166/hydro.2007.023
  • Hamrick, J. (1992). A three-dimensional environmental fluid dynamics computer code: theoretical and computational aspects Virginia: Virginia Institute of Marine Science. https://doi.org/10.21220/V5TT6C
    » https://doi.org/10.21220/V5TT6C
  • Hamrick, J. (1996). User’s manual for the environmental fluid dynamics computer code (Special Reports in Applied Marine Science and Ocean Engineering (SRAMSOE), No. 331). Virginia: Virginia Institute of Marine Science. http://dx.doi.org/10.21220/V5M74W
    » http://dx.doi.org/10.21220/V5M74W
  • Harpham, Q. K., Hughes, A., & Moore, R. V. (2019). Introductory overview: the OpenMI 2.0 standard for integrating numerical models. Environmental Modelling & Software, 122, 104549. http://dx.doi.org/10.1016/j.envsoft.2019.104549
    » http://dx.doi.org/10.1016/j.envsoft.2019.104549
  • Hennemann, M. C., & Petrucio, M. M. (2011). Spatial and temporal dynamic of trophic relevant parameters in a subtropical coastal lagoon in Brazil. Environmental Monitoring and Assessment, 181(1–4), 347-361. PMid:21190080. http://dx.doi.org/10.1007/s10661-010-1833-5
    » http://dx.doi.org/10.1007/s10661-010-1833-5
  • Hu, D., Yao, S., Duan, C., & Li, S. (2020). Real-time simulation of hydrodynamic and scalar transport in large river-lake systems. Journal of Hydrology, 582, 124531. http://dx.doi.org/10.1016/j.jhydrol.2019.124531
    » http://dx.doi.org/10.1016/j.jhydrol.2019.124531
  • Huang, J., Yan, R., Gao, J., Zhang, Z., & Qi, L. (2016). Modeling the impacts of water transfer on water transport pattern in Lake Chao, China. Ecological Engineering, 95, 271-279. http://dx.doi.org/10.1016/j.ecoleng.2016.06.074
    » http://dx.doi.org/10.1016/j.ecoleng.2016.06.074
  • Hwang, S., Jun, S. M., Song, J. H., Kim, K., Kim, H., & Kang, M. S. (2021). Application of the SWAT-EFDC linkage model for assessing water quality management in an estuarine reservoir separated by levees. Applied Sciences, 11(9), 1-16. http://dx.doi.org/10.3390/app11093911
    » http://dx.doi.org/10.3390/app11093911
  • Janssen, A. B. G., van Wijk, D., van Gerven, L. P. A., Bakker, E. S., Brederveld, R. J., DeAngelis, D. L., Janse, J. H., & Mooij, W. M. (2019). Success of lake restoration depends on spatial aspects of nutrient loading and hydrology. The Science of the Total Environment, 679, 248-259. PMid:31082598. http://dx.doi.org/10.1016/j.scitotenv.2019.04.443
    » http://dx.doi.org/10.1016/j.scitotenv.2019.04.443
  • Lai, G., Wang, P., & Li, L. (2016). Possible impacts of the Poyang Lake (China) hydraulic project on lake hydrology and hydrodynamics. Nordic Hydrology, 47(S1), 187-205. http://dx.doi.org/10.2166/nh.2016.174
    » http://dx.doi.org/10.2166/nh.2016.174
  • Li, Y., Zhang, Q., Yao, J., Werner, A. D., & Li, X. (2014). Hydrodynamic and hydrological modeling of the poyang lake catchment system in China. Journal of Hydrologic Engineering, 19(3), 607-616. http://dx.doi.org/10.1061/(ASCE)HE.1943-5584.0000835
    » http://dx.doi.org/10.1061/(ASCE)HE.1943-5584.0000835
  • Lopes, V. A. R., Fan, F. M., Pontes, P. R. M., Siqueira, V. A., Collischonn, W., & Motta Marques, D. (2018). A first integrated modelling of a river-lagoon large-scale hydrological system for forecasting purposes. Journal of Hydrology, 565, 177-196. http://dx.doi.org/10.1016/j.jhydrol.2018.08.011
    » http://dx.doi.org/10.1016/j.jhydrol.2018.08.011
  • Munar, A. M., Cavalcanti, J. R., Bravo, J. M., Fan, F. M., Motta-Marques, D., & Fragoso Junior, C. R. (2018). Coupling large-scale hydrological and hydrodynamic modeling: toward a better comprehension of watershed-shallow lake processes. Journal of Hydrology, 564, 424-441. http://dx.doi.org/10.1016/j.jhydrol.2018.07.045
    » http://dx.doi.org/10.1016/j.jhydrol.2018.07.045
  • Noh, S. J., Lee, S., An, H., Kawaike, K., & Nakagawa, H. (2016). Ensemble urban flood simulation in comparison with laboratory-scale experiments: impact of interaction models for manhole, sewer pipe, and surface flow. Advances in Water Resources, 97, 25-37. http://dx.doi.org/10.1016/j.advwatres.2016.08.015
    » http://dx.doi.org/10.1016/j.advwatres.2016.08.015
  • O’Donncha, F., Iakymchuk, R., Akhriev, A., Gschwandtner, P., Thoman, P., Heller, T., Aguilar, X., Dichev, K., Gillan, C., Markidis, S., Laure, E., Ragnoli, E., Vassiliadis, V., Johnston, M., Jordan, H., & Fahringer, T. (2019). AllScale toolchain pilot applications: PDE based solvers using a parallel development environment. Computer Physics Communications, 251, 107089. http://dx.doi.org/10.1016/j.cpc.2019.107089
    » http://dx.doi.org/10.1016/j.cpc.2019.107089
  • O’Donncha, F., Ragnoli, E., & Suits, F. (2014). Parallelisation study of a three-dimensional environmental flow model. Computers & Geosciences, 64, 96-103. http://dx.doi.org/10.1016/j.cageo.2013.12.006
    » http://dx.doi.org/10.1016/j.cageo.2013.12.006
  • Perez, A. B. A., Santos, C. I., Sá, J. H. M., Arienti, P. F., & Chaffe, P. L. B. (2020). Connectivity of ephemeral and intermittent streams in a subtropical atlantic forest headwater catchment. Water, 12(6), 1-15. http://dx.doi.org/10.3390/w12061526
    » http://dx.doi.org/10.3390/w12061526
  • Qin, B., Hu, W., Gao, G., Luo, L., & Zhang, J. (2004). Dynamics of sediment resuspension and the conceptual schema of nutrient release in the large shallow Lake Taihu, China. Chinese Science Bulletin, 49(1), 54-64. http://dx.doi.org/10.1007/BF02901743
    » http://dx.doi.org/10.1007/BF02901743
  • Rueda, F. J., & MacIntyre, S. (2010). Modelling the fate and transport of negatively buoyant storm-river water in small multi-basin lakes. Environmental Modelling & Software, 25(1), 146-157. http://dx.doi.org/10.1016/j.envsoft.2009.07.002
    » http://dx.doi.org/10.1016/j.envsoft.2009.07.002
  • Santos, C. I., Chaffe, P. L. B., Perez, A. B. A., Arienti, P. F., & Sá, J. H. M. (2021). Precision and accuracy of streamflow measurements in headwater streams during baseflow. RBRH, 26(8), 1-15. http://dx.doi.org/10.1590/2318-0331.262120200135
    » http://dx.doi.org/10.1590/2318-0331.262120200135
  • Shin, S., Her, Y., Song, J. H., & Kang, M. S. (2019). Integrated sediment transport process modeling by coupling Soil and Water Assessment Tool and Environmental Fluid Dynamics Code. Environmental Modelling & Software, 116(1), 26-39. http://dx.doi.org/10.1016/j.envsoft.2019.02.002
    » http://dx.doi.org/10.1016/j.envsoft.2019.02.002
  • Tian, P., Wu, H., Yang, T., Zhang, W., Jiang, F., Zhang, Z., & Wu, T. (2019). Environmental risk assessment of accidental pollution incidents in drinking water source areas: a case study of the Hongfeng Lake Watershed, China. Sustainability, 11(19), 5403. http://dx.doi.org/10.3390/su11195403
    » http://dx.doi.org/10.3390/su11195403
  • Umgiesser, G., Zemlys, P., Erturk, A., Razinkova-Baziukas, A., Mezine, J., & Ferrarin, C. (2016). Seasonal renewal time variability in the Curonian Lagoon caused by atmospheric and hydrographical forcing. Ocean Science, 12(2), 391-402. http://dx.doi.org/10.5194/os-12-391-2016
    » http://dx.doi.org/10.5194/os-12-391-2016
  • Xie, Z. T., Yang, F. L., & Fu, X. L. (2012). Mathematical model for flood routing in Jingjiang River and Dongting Lake network. Water Science and Engineering, 5(3), 259-268. http://dx.doi.org/10.3882/j.issn.1674-2370.2012.03.002
    » http://dx.doi.org/10.3882/j.issn.1674-2370.2012.03.002
  • Zhang, J., Huang, T., Chen, L., Liu, X., Zhu, L., Feng, L., & Yang, Y. (2019). Water-exchange response of downstream river-lake system to the flow regulation of the Three Gorges reservoir, China. Water, 11(11), 2394. http://dx.doi.org/10.3390/w11112394
    » http://dx.doi.org/10.3390/w11112394
  • Zhang, L., Lu, J., Chen, X., Liang, D., Fu, X., Sauvage, S., & Sanchez Perez, J.-M. (2017). Stream flow simulation and verification in ungauged zones by coupling hydrological and hydrodynamic models: a case study of the Poyang Lake ungauged zone. Hydrology and Earth System Sciences, 21(11), 5847-5861. http://dx.doi.org/10.5194/hess-21-5847-2017
    » http://dx.doi.org/10.5194/hess-21-5847-2017

Edited by

Editor-in-Chief: Adilson Pinheiro
Associated Editor: Iran Eduardo Lima Neto

Publication Dates

  • Publication in this collection
    13 Feb 2023
  • Date of issue
    2023

History

  • Received
    25 Oct 2022
  • Reviewed
    13 Nov 2022
  • Accepted
    20 Dec 2022
Associação Brasileira de Recursos Hídricos Av. Bento Gonçalves, 9500, CEP: 91501-970, Tel: (51) 3493 2233, Fax: (51) 3308 6652 - Porto Alegre - RS - Brazil
E-mail: rbrh@abrh.org.br