Introduction
FloPy3 includes support for MODFLOW-2000, MODFLOW-2005, and MODFLOW-NWT. Other supported MODFLOW-based models include MODPATH (version 6), MT3D and SEAWAT.
FloPy3 Changes
FloPy3 is significantly different from FloPy2 (hosted on googlecode). The main changes are:
- FloPy3 is fully zero-based. This means that layers, rows and columns start counting at zero. The reason for this is consistency. Arrays are zero-based by default in Python, so it was confusing to have a mix.
- Input for packages that take layer, row, column, data input (like the wel or ghb package) has changed and is much more flexible now. See the notebook flopy3boundaries
- Support for use of EXTERNAL and OPEN/CLOSE array specifiers has been improved.
- load() methods have been developed for all of the standard MODFLOW packages and a few less used packages (e.g. SWI2).
- MODFLOW parameter support has been added to the load() methods. MULT, PVAL, and ZONE packages are now supported and parameter data are converted to arrays in the load() methods. MODFLOW parameters are not supported in write() methods. MULT package FUNCTION and EXPRESSION functionality are not currently supported.
Installation
Dependencies:
FloPy3 requires NumPy 1.9 (or higher)
For base Python distributions:
To install FloPy3 type:
pip install flopy
To update FloPy3 type:
pip install flopy --upgrade
To uninstall FloPy3 type:
pip uninstall flopy
For Anaconda distributions (osx-64 and win-64):
To install or update FloPy3 with conda run:
conda install -c https://conda.binstar.org/jdhughes flopy
To uninstall FloPy3 type:
conda remove flopy
Development versions of FloPy3:
To install the bleeding edge version of FloPy3 from the git repository type:
pip install git+https://github.com/modflowpy/flopy.git
To update your version of FloPy3 with the bleeding edge code from the git repository type:
pip install git+https://github.com/modflowpy/flopy.git --upgrade
Documentation
Documentation for FloPy3 is a work in progress. FloPy3 code documentation is available at:
Examples
IPython Notebook Examples
The following IPython Notebooks contain example FloPy scripts for a variety of models and FloPy features
Basic examples
- An overview of the options to enter layer,row,column,data values for packages such as the wel and ghb packages is given in the flopy3boundaries Notebook
- The lake example, a very simple FloPy3 example of steady flow in a square model with a fixed head cell in the middle (representing a lake) in a 10-layer model.
- A variant of the water-table example, a very simple example of one-dimensional groundwater flow in an unconfined aquifer with recharge, from the MODFLOW-NWT documentation (http://pubs.usgs.gov/tm/tm6a37/). This IPython Notebook build files for MODFLOW-NWT.
- The Zaidel discontinuous water-table example, which simulates a discontinuous water table over a stairway impervious base, from http://onlinelibrary.wiley.com/doi/10.1111/gwat.12019/abstract. This IPython Notebook build files for MODFLOW-USG. (http://pubs.usgs.gov/tm/06/a45/).
- The Henry Problem, a simple saltwater intrusion model developed with Flopy and run using SEAWAT.
SWI2 examples
- Example 1 of the SWI2 manual, simulating a rotating interface.
SWI2 Test Problems for FloPy3
A zip file containing FloPy3 scripts for running and post-processing the SWI2 Examples (examples 1 to 5) that are described in Bakker et al. (2013) is available at:
Note that examples 2 and 5 also include FloPy3 scripts for running and post-processing SEAWAT models.
Tutorials
A few simple FloPy3 tutorials are available at:
MODFLOW Resources