Integration of the MODFLOW Lak7 package in the FREEWAT GIS modelling environment

: The MODFLOW Lake Package is integrated into the FREEWAT GIS environment in order to simulate surface water - groundwater interaction using state of the art techniques for numerical simulations, thus allowing the improved consideration of surface water bodies for water resources management. Surface water bodies, both stationary and flowing, can strongly affect groundwater elevations and flow patterns which in turn may affect the qualitative and quantitative state of groundwater resources. With the advancement of numerical simulation techniques and increased model complexity, FREEWAT facilitates the usage of the lake package through existing QGIS tools to edit model layer geometry as well as an intuitive and simple user interface for the specification of constant and time variable lake properties as defined through MODFLOW.


Abstract:
The MODFLOW Lake Package is integrated into the FREEWAT GIS environment in order to simulate surface water -groundwater interaction using state of the art techniques for numerical simulations, thus allowing the improved consideration of surface water bodies for water resources management. Surface water bodies, both stationary and flowing, can strongly affect groundwater elevations and flow patterns which in turn may affect the qualitative and quantitative state of groundwater resources. With the advancement of numerical simulation techniques and increased model complexity, FREEWAT facilitates the usage of the lake package through existing QGIS tools to edit model layer geometry as well as an intuitive and simple user interface for the specification of constant and time variable lake properties as defined through MODFLOW.

Introduction:
FREEWAT is a H2020 project which seeks to promote the application of water management and planning in accordance with the Water Framework Directive 2000/60 / EC (WFD) and other relevant guidelines (Rossetto et al. 2015). The WFD recognizes modeling as an activity for a variety of applications, of which FREEWAT will work to facilitate: test hypothesis on conceptual models, validate management scenarios, water resource assessment and forecasting, assessment of the impact of major engineering works, and evaluation of the effectiveness of the proposed remedial measures.
FREEWAT is a open source and public domain GIS integrated modelling environment with an embedded water management and planning module for the simulation of water quantity and quality in surface water and groundwater . In order to simulate surface water -groundwater interaction using state of the art techniques, FREEWAT supports the Lak7 package (Merrit & Konikow, 2000), among others. The FREEWAT modelling environment is implemented as a plugin of the open source software QGIS as a desktop interface, it takes advantage of Spatialite as a geodatabase management system and FloPy (Bakker et. al., 2016) as reference python library to connect with hydrological codes, particularly MODFLOW-2005(Harbaugh, 2005.

Background:
The presence of surface water bodies, both stationary and flowing, can strongly affect groundwater elevations and flow patterns. Conversely, groundwater seepage can be one of or the major sources of surface water bodies. The lake package allows for the simulation of hydraulic interaction between a lake and groundwater in the surrounding aquifer so that the effects of the changes in the conditions of one of the two water bodies is calculated on the other. In this effect the lake package differs from previous methods used to simulate surface water bodies. Previously, these were the constant head package, river package (Harbaugh, 2005), the reservoir package (Fenske, Leake & Prudic, 1996) or the "High K" method outlined by Merrit & Konikow (2000). The lake package treats lake cells as a single stage and respond to change in groundwater or surface water flux to or from the lake. In this way it bears similarity to the streamflow routing package SFR (Niswonger & Prudic, 2010), which can also be a source or sink to the lake cells. The lake package may find application in simulations where the temporal variability of groundwater and lake fluxes is a key aim of investigation, or in systems where groundwater and surface water exchanges are highly dependant on varying lake stages and area. The lake package calculates a separate water budget for those cells identified as lake removing them from the solution of the groundwater equation and setting them as inactive. Active groundwater cells adjacent to the lakes exchange water at a rate determined by (i) the relative calculated head in the aquifer and stage in the lake, (ii) hydraulic conductivities of the aquifer and lakebed materials and (iii) the area of the lakes, recalculated every time step.

Method:
MODFLOW, which is the core of FREEWAT, is a finite-element model. Thus its elements in QGIS are defined by a discretization grid in three dimensions simulated by consecutive raster grids with depth information. The Lake package is not an exception and the lake volume is calculated through the 3D cells identified as lake. As a consequence of the finite-difference approach in FREEWAT, the lake stage is related to lake volume directly through the volume of the model grid cells marked as lake cells, and their water level. Specifying lake stage-volume-area relations through an external file, as supported by the lak7 package, will be implemented in FREEWAT. Lake stage is crucial for determining the groundwater flow from and to the lake. As the lake cells are inactive for the groundwater flow equation, the bottom of the lake is identical to the bottom elevation of the grid cell. Adjusting the height of a cell is approximate to adjusting lake bathymetry (Figure 1). Additionally, the lake can dry completely and re-wet during transient simulations if the lake stage drops below this cell bottom. In FREEWAT, the implementation of the Lake package can be generally separated into two steps. During the first step, the model geometry and active cells can be modified before the lake package itself is activated in the second. All model layer cells that contain lakes need to be specified as inactive. To conform with lake bathymetry, the vertical size of the lake cells, i.e. the thickness of the aquifer layers, can also be changed. The selection and editing of appropriate cells is performed with existing QGIS tools, by querying and modifying the attribute tables of relevant model layers. Additionally, any layers which contain lakes must be unconfined or convertible and wet-able, and specified as such in the layer property flow (LPF) table, used to define the basic properties of the MODFLOW model. Figure 2 The FREEWAT interface to create lake layers with a synthetic model The second step requires the activation of FREEWAT's "Create lake layer" interface ( Figure 3) to set lake solver properties, lake source and sink terms for each time step, as well as starting stages, minimum and maximum stages, as well as lake leakance terms. The lake budget equation can be solved explicitly, semi-implicitly or implicitly by specifying the time-weighting factor (0, 0.5 or 1 respectively) for transient stress periods. Additionally, the number of iterations for solving the equilibrium lake stages using Newton's method can be specified, as well as the convergence criterion. Small topological variations in the lake bottom can be added to give a smooth transition for the lake equilibrium stage solution as the stage reaches the bottom of a cell; just before it dries up, or when it re-wets. The lake stage must be specified only for the initial conditions while following transient and steady state stress periods, the lake stage is determined by the lake solver. For any steady state stress periods, a minimum and maximum stage must be specified. If the lake solver determines a stage higher or lower than these limits, the simulation returns an error. As shown in Figure 2, the lower table stores time constant lake information (starting stage, min and max stages, leakance and lake-bottom undulations) while the upper table stores all time-variant information for each time step and for each lake. These supplementary time-variant values are inputs and outputs of the lake water budget that can take the form of: atmospheric recharge [LT -1 ], evaporation [LT -1 ], overland runoff following precipitation events [L 3 T -1 ] and direct withdrawal [L 3 T -1 ]. The lake package supports several external packages, such as surface water routing with the SFR package, or as surplus from the unsaturated zone flow package (Niswonger,Prudic & Regan, 2006), although the connections of lakes to these packages is always implemented within those packages rather than within the lake package, which acts as a passive reservoir. This furthermore allows for the inclusion of lakes in more complicated water management and planning modules, such as the modflow FARM process (Hanson, 2014).
Through this "Create lake layer" interface, the lake layers are created as a layer object with a grid equal to that of the model layers. The created layers contain a lake ID feature, which allows the cells to be assigned to one specific lake in each layer. Once lakes have been created, they can also be deleted through this interface, although the manipulation of the datasets is restricted to the created model tables to ease usability. The lake properties can also be changed through the QGIS interface after creation by editing the lake layer attribute tables. After a successful termination of the MODFLOW simulation, the Lake package delivers the hydrologic budget summaries for the lakes for each time step specified in the MODFLOW output control. This budget for each lake includes stage, volume, volume change, precipitation, evaporation, runoff, inflow and outflow from groundwater and surface water, water use, influx from connected lakes, surface area, stage-change and percentage error, for each time step, printed into the listing file.

Conclusion
The inclusion of the Lake package into the FREEWAT GIS environment allows for the inclusion of surface water bodies with temporal variability of fluxes and stages into numerical models and so comply with the state of the art. This will allow the improved consideration of surface water in management scenarios, water resource assessment and forecasting, or assessment of the impact of major engineering works. Groundwater systems that are highly affected by and dependant on stationary surface water bodies can be included as the subjects of investigations directly within modflow, rather than functioning a model constraint. By creating a simple process and user interface for applying the lake package to a groundwater model, FREEWAT supports the consideration of these complex processes.