The FloPy package consists of a set of Python scripts to run MODFLOW, MT3D, SEAWAT and other MODFLOW-related groundwater programs. FloPy enables you to run all these programs with Python scripts. The FloPy project started in 2009 and has grown to a fairly complete set of scripts with a growing user base. FloPy3 was released in December 2014 with a few great enhancements that make FloPy3 backwards incompatible. The first significant change is that FloPy3 uses zero-based indexing everywhere, which means that all layers, rows, columns, and stress periods start numbering at zero. This change was made for consistency as all array-indexing was already zero-based (as are all arrays in Python). This may take a little getting-used-to, but hopefully will avoid confusion in the future. A second significant enhancement concerns the ability to specify time-varying boundary conditions that are specified with a sequence of layer-row-column-values, like the WEL and GHB packages. A variety of flexible and readable ways have been implemented to specify these boundary conditions.

Recently, FloPy has been further enhanced to include full support for MODFLOW 6. The majority of recent development has focused on FloPy functionality for MODFLOW 6, helper functions to use GIS shapefiles and raster files to create MODFLOW datasets, and common plotting and export functionality.

FloPy provides separate APIs for interacting with MF6 and non-MF6 models. MODFLOW 6 class definitions are automatically generated from definition (DFN) files, text files describing the format of MF6 input files.

FloPy is an open-source project and any assistance is welcomed. Please email the development team if you want to contribute.

Return to the Github FloPy website.


FloPy can be installed using conda (from the conda-forge channel) or pip.

To install with conda:

conda install -c conda-forge flopy

To install with pip:

pip install flopy

To install the bleeding edge version of FloPy from the git repository type:

pip install git+

After FloPy is installed, MODFLOW and related programs can be installed using the command:

get-modflow :flopy

See documentation for more information.


Version history

Supported packages

Model checking capabilities

Development Team

FloPy is developed by a team of MODFLOW users that have switched over to using Python for model development and post-processing. Members of the team currently include:

  • Mark Bakker orcid_Mark_Bakker

  • Vincent Post orcid_Vincent_Post

  • Joseph D. Hughes orcid_Joseph_D_Hughes

  • Christian D. Langevin orcid_Christian_D_Langevin

  • Jeremy T. White orcid_Jeremy_T_White

  • Andrew T. Leaf orcid_Andrew_T_Leaf

  • Scott R. Paulinski orcid_Scott_R_Paulinski

  • Jason C. Bellino orcid_Jason_C_Bellino

  • Eric D. Morway orcid_Eric_D_Morway

  • Michael W. Toews orcid_Michael_W_Toews

  • Joshua D. Larsen orcid_Joshua_D_Larsen

  • Michael N. Fienen orcid_Michael_N_Fienen

  • Jon Jeffrey Starn orcid_Jon_Jeffrey_Starn

  • Davíd A. Brakenhoff orcid_Davíd_A_Brakenhoff

  • Wesley P. Bonelli orcid_Wesley_P_Bonelli

  • and others

How to Cite