title: Scripting MODFLOW Model Development Using Python and FloPy.
abstract: Graphical user interfaces (GUIs) are commonly used to construct and postprocess numerical groundwater flow and transport models. Scripting model development with the programming language Python is presented here as an alternative approach. One advantage of Python is that there are many packages available to facilitate the model development process, including packages for plotting, array manipulation, optimization, and data analysis. For MODFLOW-based models, the FloPy package was developed by the authors to construct model input files, run the model, and read and plot simulation results. Use of Python with the available scientific packages and FloPy facilitates data exploration, alternative model evaluations, and model analyses that can be difficult to perform with GUIs. Furthermore, Python scripts are a complete, transparent, and repeatable record of the modeling process. The approach is introduced with a simple FloPy example to create and postprocess a MODFLOW model. A more complicated capture-fraction analysis with a real-world model is presented to demonstrate the types of analyses that can be performed using Python and FloPy.
authors.affiliation: mark.bakker@tudelft.nl.
authors.forename: M
authors.initials: M
authors.lastname: Bakker
authors.affiliation: Flinders University, Adelaide, South Australia.|Currently at Federal Institute for Geosciences and Natural Resources, BGR, Hannover, Germany.
authors.forename: V
authors.initials: V
authors.lastname: Post
authors.affiliation: U.S. Geological Survey, Reston, VA.
authors.forename: C D
authors.initials: CD
authors.lastname: Langevin
authors.affiliation: U.S. Geological Survey, Reston, VA.
authors.forename: J D
authors.initials: JD
authors.lastname: Hughes
authors.affiliation: U.S. Geological Survey, Texas Water Science Center, Austin, TX.
authors.forename: J T
authors.initials: JT
authors.lastname: White
authors.affiliation: U.S. Geological Survey, East Hartford, CT.
authors.forename: J J
authors.initials: JJ
authors.lastname: Starn
authors.affiliation: U.S. Geological Survey Wisconsin Water Science Center, Middleton, WI.
authors.forename: M N
authors.initials: MN
authors.lastname: Fienen
mesh_terms: D060587:Groundwater; D006801:Humans; D008962:Models, Theoretical; D011381:Programming Languages; D014872:Water Movements