Environmental Modelling & Software: A B A B C
Environmental Modelling & Software: A B A B C
Environmental Modelling & Software: A B A B C
A R T I C LE I N FO A B S T R A C T
Keywords: This article presents QSWATMOD, a QGIS-based graphical user interface for application and evaluation of
SWAT-MODFLOW SWAT-MODFLOW models. QSWATMOD includes: (i) pre-processing modules to prepare input data for model
Graphical user interface execution, (ii) configuration modules for SWAT-MODFLOW options, and (iii) post-processing modules to view
QGIS and interpret model results. QSWATMOD, written in Python, creates linkage files between SWAT and
QSWATMOD
MODFLOW models, runs a simulation, and displays results within the open source Quantum Geographic
Information System (QGIS) environment. QSWATMOD is equipped with functionalities that assist in storing and
retrieving user and default configuration settings and parameter values, performing the linkage and simulation
processes, and uses various geo-processing functionalities (e.g., selection, intersection, union) of QGIS. The use
of QSWATMOD is demonstrated through an application to the 471 km2 Middle Bosque River Watershed in
central Texas. As the number of SWAT-MODFLOW users grows worldwide, QSWATMOD can be a valuable tool
to assist in creating and managing SWAT-MODFLOW projects.
∗
Corresponding author.
E-mail addresses: [email protected] (S. Park), [email protected] (A. Nielsen), [email protected] (R.T. Bailey), [email protected] (D. Trolle),
[email protected] (K. Bieger).
https://doi.org/10.1016/j.envsoft.2018.10.017
Received 7 August 2018; Received in revised form 8 October 2018; Accepted 27 October 2018
Available online 29 October 2018
1364-8152/ © 2018 Elsevier Ltd. All rights reserved.
S. Park et al. Environmental Modelling and Software 111 (2019) 493–497
Fig. 1. Map showing the location of the Middle Bosque River Watershed within McLennan, Bosque, and Coryell Counties, Texas. The outline of the watershed is the
extent of the SWAT and MODFLOW models.
1988). Subsurface geology consists of mainly sedimentary (limestone) settings, and a project directory, which holds all project inputs and
rocks (Cannata, 1988; Pearson, 2013), with two observation wells lo- outputs. Default user inputs and simulation settings are stored in a
cated near the river. The climate of the study area is characterized by designated SQLite (Hipp et al., 2015) project database. QSWATMOD
semi-arid conditions, with long hot summers and brief mild winters. includes plotting functions based on Matplotlib (Hunter, 2007). The
The annual precipitation between 1985 and 2012 ranges from 340 to tabs of QSWATMOD (Fig. 2) are “Pre-Processing”, “Simulation”, and
950 mm/year. Details of the SWAT and MODFLOW models are shown “Post-Processing”. All data processing is based on the pre-processing,
in Table 1. Results are compared with observed streamflow and configuration, and post-processing modules (see Fig. S1 in Supple-
groundwater head to demonstrate the viewing features of QSWATMOD. mentary Material).
2.1. QSWATMOD overview and development The main role of the Pre-Processing tab is to guide users to specify
paths to the folders containing input files, prepare MODFLOW data, and
QSWATMOD is cross-platform compatible and implemented in the perform geo-processing routines to link the two models. Shapefiles for
open source QGIS platform. Documentation and a QSWATMOD in-
staller are available through http://swat.tamu.edu/software/swat- Table 1
modflow. QGIS must be installed on the system prior to the installa- Summary Characteristics of the SWAT and MODFLOW models.
tion of QSWATMOD. We recommend installing the latest “long term Model Characteristics Value Unit
release (LTR)” version of QGIS through OSgeo4W, a binary distribution
Watershed area 471 [km2]
of open source geospatial software (https://qgis.org). QSWATMOD has
Number of SWAT HRUs 6416 –
dependencies to third-party Python packages including FloPy3 (Bakker Number of SWAT Sub-basins 69 –
et al., 2016), Pandas (McKinney, 2010), OpenCV (Bradski, 2000), and Number of MODFLOW cells 19,176 –
pyshp. These packages will be installed automatically in the designated Number of MODFLOW layers 5 –
Python environment after QSWATMOD is activated in QGIS. QSWAT- MODFLOW grid cell size (m) 150 [m]
Number of MODFLOW River cells 1468 –
MOD has the option of creating a new project or opening a saved ex-
Range of Hydraulic Conductivity values 1e−4 – 300 [m day−1]
isting project from a previous session. A project consists of a QGIS file Range of Specific Yield 0.01–0.25 –
(*.qgs), which stores the information of QGIS status, loaded layers, user
494
S. Park et al. Environmental Modelling and Software 111 (2019) 493–497
the river network, subbasins, and HRUs from an existing SWAT model (Fig. 2 and S2):
are required (Fig. 2b).
1) MODFLOW model files and grid shapefile are available;
2.2.1. SWAT inputs 2) MODFLOW model files are available but there is no grid shapefile;
QSWATMOD creates copies of all SWAT model input files and as- and
sociated GIS files (rasters, vectors) in the project folder once users 3) MODFLOW model has not yet been constructed.
specify the path to an existing SWAT model. The copied HRU, sub-
basin, and river network shapefiles are then imported to the QGIS The first option guides users to specify the path to an existing
canvas. These shapefiles are available with the original SWAT model MODFLOW model and MODFLOW grid shapefile, with the latter re-
created using either ArcSWAT (Olivera et al., 2006) or QSWAT (Dile quiring the same projection as the SWAT shapefiles. For the second
et al., 2016). option, the user specifies the coordinate of the North-West corner of the
MODFLOW boundary or the MODFLOW grid area is based on the extent
2.2.2. MODFLOW options of the SWAT subbasin shapefile, with both reading cell information
QSWATMOD provides the user with three options for MODFLOW (width, depth, top elevation) from the MODFLOW discretization file
Fig. 3. QSWATMOD interface for a) Simulation Tab; b) Configuration Settings (in “swatmf_link.txt” file).
495
S. Park et al. Environmental Modelling and Software 111 (2019) 493–497
(*.dis). Through the third option, a simple MODFLOW model, powered DHRUs were created and 1468 river cells were identified to link with
by the FloPy3 (Bakker et al., 2016) package, can be developed with user the SWAT river network.
inputs of cell dimensions, river bed properties, and aquifer properties
(hydraulic conductivity, specific yield, specific storage) (Fig. S3). Lo- 2.3. Simulation tab
cations of observation wells can be established by an observation well
shapefile or through the user selecting cells on the QGIS canvas (Fig. In the “Simulation” tab (Fig. 3), starting date, ending date, warm-up
S4). period, and time step of the simulation are provided based on in-
formation in the SWAT input file “file.cio” and used for synchronizing
2.2.3. River connections the MODFLOW model time and writing simulation results. In the con-
Linking the cells in the MODFLOW River package with the SWAT figuration settings, users can activate SWAT-MODFLOW simulation
river network is required to simulate groundwater-surface water in- options, optional model output, and change the frequency of SWAT
teractions. QSWATMOD provides three options: 1) Use Only calls to MODFLOW. Finally, “Run Simulation” button is selected.
MODFLOW river package, 2) Use Only SWAT river network, and 3) Use
Both MODFLOW and SWAT (Fig. S5). For the first option, QSWATMOD 2.4. Post-processing tab
extracts river cell values (river stage, river bed conductance, river
bottom elevation) from the MODFLOW River package file. For the The Post-Processing tab and model results are shown in Fig. 4. The
second option, the MODFLOW grid cells are intersected with the SWAT tab facilitates mapping results within QGIS and displaying results dy-
river network shapefile and then river cell parameters for each river cell namically during the simulation run. QSWATMOD has three types of
are calculated based on information provided by the SWAT river net- post-processing modules: plotting, mapping, and exporting results. The
work (DEM, stream length and width) and user inputs (thickness and plot function shows observed and simulated hydrographs of streamflow
hydraulic conductivity of river bed material). For the third option, the and groundwater head, with objective function summary values (Nash-
existing MODFLOW river cells are compared to the SWAT river network Sutcliffe Efficiency (NSE), Percent bias (PBIAS), and R-squared (R2))
(Fig. S5e) with the user deciding which information to keep. displayed on the figures (Fig. 4a and b). The mapping function is de-
signed to show maps of recharge (Fig. 4c) and groundwater head
2.2.4. Linking process (Fig. 4d) on the QGIS canvas via shapefiles. Figures showing spatial
Through the linking process (Fig. 2b), the HRUs are disaggregated patterns of surface water and groundwater interactions (Fig. 4e) can be
to create DHRUs, which are then intersected with MODFLOW grid cells. converted to a single video clip by selecting the “Save to Video” icon
MODFLOW river cells are identified using the SWAT stream network or (see Video S1 in Supplementary Material). The water balance chart is
other river connection options, and the set of river cells within each created using values of precipitation, surface runoff, lateral flow,
subbasin are identified for mapping groundwater-surface water ex- groundwater flow to streams, deep percolation to groundwater, soil
change rates from river cells to SWAT subbasin channels. These gen- water, seepage from streams to the aquifer, and groundwater volume
erated shapefiles are used to create the required SWAT-MODFLOW text from SWAT's “output.std” file. Except for spatially distributed ground-
linkage files. For the Middle Bosque model, the time required by water head and recharge values, users can export all results to text-
QSWATMOD to perform the linking operations on a standard desktop formatted files (see Figure S6).
computer is several minutes (see Table S1 for details). A total of 12,366 Supplementary video related to this article can be found at https://
Fig. 4. QSWATMOD interface for Post-processing tab, showing results from the Middle Bosque SWAT-MODFLOW simulation.
496
S. Park et al. Environmental Modelling and Software 111 (2019) 493–497
doi.org/10.1016/j.envsoft.2018.10.017. graphical user interface for preparing coupled SWAT-MODFLOW simulations'. J. Am.
Water Resour. Assoc. 53 (2), 400–410. https://doi.org/10.1111/1752-1688.12502.
Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., Fienen, M.N.,
3. Summary and conclusion 2016. FloPy v3.2.6: U.S. Geological survey software release, 19 March 2017. https://
doi.org/10.5066/F7BK19FH.
QSWATMOD, a QGIS-based graphical user interface for SWAT- Barthel, R., Banzhaf, S., 2016. Groundwater and surface water interaction at the regional-
scale–A review with focus on regional integrated models. Water Resour. Manag. 30
MODFLOW models, was developed to provide an easy-to-use workflow (1), 1–32. https://doi.org/10.1007/s11269-015-1163-z.
for users preparing input data, configuring simulation settings, and Bradski, G., 2000. The OpenCV library. Dr. Dobb’s J. Software Tools 120, 122–125.
visualizing and interpreting results. QSWATMOD includes options for Cannata, S.L., 1988. Hydrogeology of a Portion of the Washita Prairie Edwards Aquifer:
Central Texas. Doctoral dissertation. Baylor University.
using an existing MODFLOW or creating a new one, with a variety of Dile, Y.T., Daggupati, P., George, C., Srinivasan, R., Arnold, J., 2016. Introducing a new
options for linking MODFLOW river cells with SWAT subbasins for open source GIS user interface for the SWAT model. Environ. Model. Software 85,
groundwater-surface water interactions. QSWATMOD was applied to 129–138. https://doi.org/10.1016/j.envsoft.2016.08.004.
Guzman, J.A., Moriasi, D.N., Gowda, P.H., Steiner, J.L., Starks, P.J., Arnold, J.G.,
the Middle Bosque River Watershed in Texas to demonstrate the linkage
Srinivasan, R., 2015. A model integration framework for linking SWAT and
between existing SWAT and MODFLOW. QSWATMOD can be a valu- MODFLOW. Environ. Model. Software 73, 103–116.
able tool in assisting users to create and manage SWAT-MODFLOW Harbaugh, A.W., 2005. MODFLOW-2005, the U.S. Geological Survey Modular Ground-
projects, allowing coupled surface water/groundwater models to be- water Model-the Ground-water Flow Process. USGS Techniques and Methods, pp.
6–A16.
come more accessible to a broader hydrologic modeling community. Hipp, D.R., Kennedy, D., Mistachkin, J., 2015. SQLite (version 3.8.10.2) [Computer
software]. SQLite Development Team. Retrieved 2015-06-15. Available from:
Acknowledgements https://www.sqlite.org/src/info/2ef4f3a5b1d1d0c4.
Hunter, J.D., 2007. Matplotlib: a 2D graphics environment. Comput. Sci. Eng. 9 (3),
90–95. https://doi.org/10.1109/mcse.2007.55.
This work was supported by grant from the Agriculture and Food Kim, N.W., Chung, I.M., Won, Y.S., Arnold, J.G., 2008. Development and application of
Research Initiative of the USDA National Institute of Food and the integrated SWAT–MODFLOW model. J. Hydrol. 356 (1), 1–16. https://doi.org/
10.1016/j.jhydrol.2008.02.024.
Agriculture (NIFA), grant number #2012-67003-19904 and grant McKinney, W., 2010, June. Data structures for statistical computing in python. In:
number #2017-67019-26332. Proceedings of the 9th Python in Science Conference, vol. 445. SciPy, Austin, TX, pp.
51–56.
Nielsen, A., Bolding, K., Hu, F., Trolle, D., 2017. An open source QGIS-based workflow for
Appendix A. Supplementary data model application and experimentation with aquatic ecosystems. Environ. Model.
Software 95, 358–364. https://doi.org/10.1016/j.envsoft.2017.06.032.
Supplementary data to this article can be found online at https:// Niswonger, R.G., Panday, S., Ibaraki, M., 2011. MODFLOW-nwt, a Newton Formulation
for MODFLOW-2005: USGS Survey Techniques and Methods 6–A37.
doi.org/10.1016/j.envsoft.2018.10.017.
Olivera, F., Valenzuela, M., Srinivasas, R., Choi, J., Cho, H., Koka, S., Agrawal, A., 2006.
ArcGIS-SWAT: a geodata model and GIS interface for SWAT. J. Am. Water Resour.
References Assoc. 42 (2), 295–309.
Pearson, D.K., 2013. Geologic Database of Texas: Project Summary, Database Contents,
and User's Guide: Document Prepared by the US Geological Survey for the Texas
Arnold, J.G., Srinivasan, R., Muttiah, R.S., William, J.R., 1998. Large area hydrologic Water Development Board, Austin. 22 pp.
modeling and assessment Part I Model development. JAWRA 34 (1), 73–89. Sophocleous, M., Perkins, S.P., 2000. Methodology and application of combined wa-
Bailey, R.T., Wible, T.C., Arabi, M., Records, R.M., Ditty, J., 2016. Assessing regional- tershed and ground-water models in Kansas. J. Hydrol. 236 (3–4), 185–201.
scale spatio-temporal patterns of groundwater-surface water interactions using a Wible, T., 2014. Enhanced Watershed Modeling and Data Analysis with a Fully Coupled
coupled SWAT-MODFLOW model. Hydrol. Process. 30 (23), 4420–4433. https://doi. Hydrologic Model and Cloud-based Flow Analysis. Master’s thesis. Colorado State
org/10.1002/hyp.10933. University, Fort Collins, CO.
Bailey, R., Rathjens, H., Bieger, K., Chaubey, I., Arnold, J., 2017. SWATMOD-Prep:
497