flopy
A Python package to create, run, and post-process MODFLOW-based models.
https://github.com/modflowpy/flopy
Category: Natural Resources
Sub Category: Water Supply and Quality
Keywords
modeling plotting python
Keywords from Contributors
groundwater modflow hydrology earth-science groundwater-modelling pastas water geopandas flopy parallel-computing
Last synced: about 1 hour ago
JSON representation
Repository metadata
A Python package to create, run, and post-process MODFLOW-based models.
- Host: GitHub
- URL: https://github.com/modflowpy/flopy
- Owner: modflowpy
- License: other
- Created: 2014-12-14T16:50:55.000Z (about 11 years ago)
- Default Branch: develop
- Last Pushed: 2025-11-27T16:26:48.000Z (27 days ago)
- Last Synced: 2025-11-27T23:24:00.050Z (27 days ago)
- Topics: modeling, plotting, python
- Language: Python
- Homepage: https://flopy.readthedocs.io
- Size: 635 MB
- Stars: 590
- Watchers: 34
- Forks: 349
- Open Issues: 56
- Releases: 33
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Support: docs/supported_packages.md
README.md
Version 3.7.0.dev0 (preliminary)
Introduction
FloPy includes support for MODFLOW 6, MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, and MODFLOW-2000. Other supported MODFLOW-based models include MODPATH (version 6 and 7), MT3DMS, MT3D-USGS, and SEAWAT.
For general modeling issues, please consult a modeling forum, such as the MODFLOW Users Group. Other MODFLOW resources are listed in the MODFLOW Resources section.
Documentation
Installation
FloPy requires Python 3.8+ with:
numpy >=1.15.0,<2.0.0
matplotlib >=1.4.0
pandas >=2.0.0
Dependencies for optional features are summarized here.
To install type:
conda install -c conda-forge flopy
or
pip install flopy
The release candidate version can also be installed from the git repository using the instructions provided below.
After FloPy is installed, MODFLOW and related programs can be installed using the command:
get-modflow :
See the docs for more information.
Getting Started
MODFLOW 6 Quick Start
import flopy
ws = './mymodel'
name = 'mymodel'
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6')
tdis = flopy.mf6.ModflowTdis(sim)
ims = flopy.mf6.ModflowIms(sim)
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True)
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10)
ic = flopy.mf6.ModflowGwfic(gwf)
npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True)
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=[[(0, 0, 0), 1.],
[(0, 9, 9), 0.]])
budget_file = name + '.bud'
head_file = name + '.hds'
oc = flopy.mf6.ModflowGwfoc(gwf,
budget_filerecord=budget_file,
head_filerecord=head_file,
saverecord=[('HEAD', 'ALL'), ('BUDGET', 'ALL')])
sim.write_simulation()
sim.run_simulation()
head = gwf.output.head().get_data()
bud = gwf.output.budget()
spdis = bud.get_data(text='DATA-SPDIS')[0]
qx, qy, qz = flopy.utils.postprocessing.get_specific_discharge(spdis, gwf)
pmv = flopy.plot.PlotMapView(gwf)
pmv.plot_array(head)
pmv.plot_grid(colors='white')
pmv.contour_array(head, levels=[.2, .4, .6, .8], linewidths=3.)
pmv.plot_vector(qx, qy, normalize=True, color="white")
Additional FloPy Resources
-
FloPy tutorials and scripts demonstrating the use of FloPy to run and post-process MODFLOW-based models.
-
FloPy example notebooks demonstrating the use of FloPy pre- and post-processing capabilities with a variety of MODFLOW-based models.
-
MODFLOW 6 example problems demonstrating FloPy use to create, run, and post-process MODFLOW 6 models.
-
A list of supported packages in FloPy is available in docs/supported_packages.md on the github repo.
-
A table of the supported and proposed model checks implemented in FloPy is available in docs/model_checks.md on the github repo.
-
A summary of changes in each FloPy version is available in docs/version_changes.md on the github repo.
Questions
FloPy usage has been growing rapidly, and as the number of users has increased, so has the number of questions about how to use FloPy. We ask our users to carefully consider the nature of their problem and seek help in the appropriate manner.
Do not open issues for general support questions. We want to keep GitHub issues for bug reports and feature requests. General support questions are better answered in the Discussions on the FloPy GitHub repository. Stack Overflow and the MODFLOW google group are other options but currently neither of these are as active as Discussions on the FloPy GitHub repository. If using Stack Overflow, questions should be tagged with tag flopy.
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow or the MODFLOW google group.
Contributing
Bug reports, code contributions, or improvements to the documentation are welcome from the community. See the developer docs to begin. Please also read up on our guidelines for contributing and check out our issues in the hotlist: community-help.
Installing the latest FloPy release candidate
To install the latest release candidate type:
pip install https://github.com/modflowpy/flopy/zipball/develop
How to Cite
Citations for FloPy:
Software/Code citation for FloPy:
Additional FloPy Related Publications
MODFLOW Resources
- MODFLOW and Related Programs
- Online guide for MODFLOW-2000
- Online guide for MODFLOW-2005
- Online guide for MODFLOW-NWT
Disclaimer
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. This software is
provided "as is" and "as-available", and makes no representations or warranties
of any kind concerning the software, whether express, implied, statutory, or
other. This includes, without limitation, warranties of title,
merchantability, fitness for a particular purpose, non-infringement, absence
of latent or other defects, accuracy, or the presence or absence of errors,
whether or not known or discoverable.
Citation (CITATION.cff)
cff-version: 1.2.0
message: If you use this software, please cite both the article from preferred-citation,
references, and the software itself.
type: software
title: FloPy
version: 3.7.0.dev0
date-released: '2024-02-08'
doi: 10.5066/F7BK19FH
abstract: A Python package to create, run, and post-process MODFLOW-based models.
repository-artifact: https://pypi.org/project/flopy
repository-code: https://github.com/modflowpy/flopy
license: CC0-1.0
authors:
- family-names: Bakker
given-names: Mark
orcid: https://orcid.org/0000-0002-5629-2861
- family-names: Post
given-names: Vincent
orcid: https://orcid.org/0000-0002-9463-3081
- family-names: Hughes
given-names: Joseph D.
orcid: https://orcid.org/0000-0003-1311-2354
- family-names: Langevin
given-names: Christian D.
orcid: https://orcid.org/0000-0001-5610-9759
- family-names: White
given-names: Jeremy T.
orcid: https://orcid.org/0000-0002-4950-1469
- family-names: Leaf
given-names: Andrew T.
orcid: https://orcid.org/0000-0001-8784-4924
- family-names: Paulinski
given-names: Scott R.
orcid: https://orcid.org/0000-0001-6548-8164
- family-names: Bellino
given-names: Jason C.
orcid: https://orcid.org/0000-0001-9046-9344
- family-names: Morway
given-names: Eric D.
orcid: https://orcid.org/0000-0002-8553-6140
- given-names: Michael W.
family-names: Toews
orcid: https://orcid.org/0000-0003-3657-7963
- family-names: Larsen
given-names: Joshua D.
orcid: https://orcid.org/0000-0002-1218-800X
- family-names: Fienen
given-names: Michael N.
orcid: https://orcid.org/0000-0002-7756-4651
- family-names: Starn
given-names: Jon Jeffrey
orcid: https://orcid.org/0000-0001-5909-0010
- family-names: Brakenhoff
given-names: Davíd A.
orcid: https://orcid.org/0000-0002-2993-2202
- family-names: Bonelli
given-names: Wesley P.
orcid: https://orcid.org/0000-0002-2665-5078
preferred-citation:
type: article
authors:
- family-names: Hughes
given-names: Joseph D.
orcid: https://orcid.org/0000-0003-1311-2354
- family-names: Langevin
given-names: Christian D.
orcid: https://orcid.org/0000-0001-5610-9759
- family-names: Paulinski
given-names: Scott R.
orcid: https://orcid.org/0000-0001-6548-8164
- family-names: Larsen
given-names: Joshua D.
orcid: https://orcid.org/0000-0002-1218-800X
- family-names: Brakenhoff
given-names: David
orcid: https://orcid.org/0000-0002-2993-2202
title: FloPy Workflows for Creating Structured and Unstructured MODFLOW Models
doi: 10.1111/gwat.13327
journal: Groundwater
year: 2023
month: 5
references:
- authors:
- family-names: Bakker
given-names: Mark
orcid: https://orcid.org/0000-0002-5629-2861
- family-names: Post
given-names: Vincent
orcid: https://orcid.org/0000-0002-9463-3081
- family-names: Langevin
given-names: Christian D.
orcid: https://orcid.org/0000-0001-5610-9759
- family-names: Hughes
given-names: Joseph D.
orcid: https://orcid.org/0000-0003-1311-2354
- family-names: White
given-names: Jeremy T.
orcid: https://orcid.org/0000-0002-4950-1469
- family-names: Starn
given-names: Jon Jeffrey
orcid: https://orcid.org/0000-0001-5909-0010
- family-names: Fienen
given-names: Michael N.
orcid: https://orcid.org/0000-0002-7756-4651
type: article
title: Scripting MODFLOW Model Development Using Python and FloPy
doi: 10.1111/gwat.12413
journal: Groundwater
volume: 54
issue: 5
start: 733
end: 739
year: 2016
month: 9
Owner metadata
- Name: modflowpy
- Login: modflowpy
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/10146746?v=4
- Repositories: 4
- Last ynced at: 2023-02-27T09:10:31.487Z
- Profile URL: https://github.com/modflowpy
GitHub Events
Total
- Create event: 37
- Release event: 6
- Issues event: 87
- Watch event: 58
- Delete event: 24
- Issue comment event: 327
- Push event: 157
- Pull request event: 310
- Pull request review event: 208
- Pull request review comment event: 166
- Fork event: 41
Last Year
- Create event: 35
- Release event: 6
- Issues event: 75
- Watch event: 51
- Delete event: 21
- Issue comment event: 266
- Push event: 129
- Pull request review comment event: 130
- Pull request review event: 149
- Pull request event: 262
- Fork event: 36
Committers metadata
Last synced: 6 days ago
Total Commits: 3,663
Total Committers: 79
Avg Commits per committer: 46.367
Development Distribution Score (DDS): 0.766
Commits in past year: 175
Committers in past year: 23
Avg Commits per committer in past year: 7.609
Development Distribution Score (DDS) in past year: 0.497
| Name | Commits | |
|---|---|---|
| Joseph D Hughes | j****s@u****v | 858 |
| Christian D Langevin | l****n@u****v | 473 |
| jwhite | j****0@g****m | 376 |
| wpbonelli | w****i@u****u | 351 |
| aleaf | a****f@u****v | 339 |
| spaulins-usgs | s****i@u****v | 245 |
| Mike Taves | m****s@g****m | 172 |
| Jason Bellino | j****o@u****v | 166 |
| Joshua Larsen | j****n@u****v | 152 |
| emorway-usgs | e****y@u****v | 84 |
| Mark Bakker | m****k@g****m | 43 |
| Mike Fienen | m****n@u****v | 43 |
| dependabot[bot] | 4****] | 36 |
| Chris Nicol | 3****c | 26 |
| scottrp | 4****p | 23 |
| Brioch Hemmings | b****h@g****m | 22 |
| Jeff Starn | j****n@u****v | 20 |
| github-actions[bot] | 4****] | 19 |
| Davíd Brakenhoff | d****f@a****l | 18 |
| martclanor | m****r@w****m | 14 |
| Ralf Junghanns | r****s@g****m | 13 |
| unknown | j****s@I****t | 11 |
| mjreno | m****o@I****t | 11 |
| Jeremy White | j****e@g****z | 8 |
| Etienne Bresciani | 5****i | 8 |
| Kyle Wilcox | k****e@a****m | 8 |
| Clark, Brian R | b****k@u****v | 8 |
| Michael Ou | o****n@g****m | 7 |
| Matt Knowling | m****g@g****m | 7 |
| unknown | j****r@I****t | 5 |
| and 49 more... | ||
Committer domains:
- usgs.gov: 10
- artesia-water.nl: 2
- deltares.nl: 2
- ucar.edu: 1
- witteveenbos.com: 1
- igsaaahmltw272v.gs.doi.net: 1
- igsaaa071l01144.gs.doi.net: 1
- gns.cri.nz: 1
- axiomalaska.com: 1
- igskiacwvmgs007.gs.doi.net: 1
- ing.uchile.cl: 1
- soe70924.isd.ad.flinders.edu.au: 1
- brabantwater.nl: 1
- ucdavis.edu: 1
- gs.doi.net: 1
- mac7262.gns.cri.nz: 1
- rhdhv.com: 1
- seequent.com: 1
- gwscience.co.uk: 1
- itascadenver.com: 1
- edinsi.nl: 1
- bluegeo.ca: 1
- email.arizona.edu: 1
- nelen-schuurmans.nl: 1
- pm.me: 1
- python-academy.de: 1
Issue and Pull Request metadata
Last synced: 10 days ago
Total issues: 882
Total pull requests: 1,748
Average time to close issues: 5 months
Average time to close pull requests: 8 days
Total issue authors: 276
Total pull request authors: 80
Average comments per issue: 2.72
Average comments per pull request: 1.55
Merged pull request: 1,528
Bot issues: 1
Bot pull requests: 95
Past year issues: 43
Past year pull requests: 243
Past year average time to close issues: 24 days
Past year average time to close pull requests: 3 days
Past year issue authors: 31
Past year pull request authors: 20
Past year average comments per issue: 1.79
Past year average comments per pull request: 1.07
Past year merged pull request: 190
Past year bot issues: 0
Past year bot pull requests: 37
Top Issue Authors
- jdhughes-usgs (45)
- flydream0428 (30)
- aleaf (29)
- wpbonelli (25)
- dbrakenhoff (24)
- jtwhite79 (23)
- langevin-usgs (22)
- wkitlasten (20)
- giovannifi (17)
- RyanConway91 (16)
- hjia1005 (12)
- mwtoews (12)
- hwreeves-USGS (12)
- rabbl (11)
- porterma (11)
Top Pull Request Authors
- wpbonelli (355)
- mwtoews (201)
- jlarsen-usgs (188)
- jdhughes-usgs (144)
- w-bonelli (112)
- spaulins-usgs (111)
- langevin-usgs (87)
- aleaf (61)
- dependabot[bot] (49)
- github-actions[bot] (46)
- jbellino-usgs (36)
- emorway-usgs (30)
- cnicol-gwlogic (29)
- scottrp (27)
- mjreno (25)
Top Issue Labels
- bug (134)
- enhancement (58)
- question (6)
- help wanted (6)
- maintenance (6)
- in progress (5)
- documentation (5)
- interesting_ideas (3)
- performance (2)
- modflow 6 (2)
- deprecation (2)
- wontfix (1)
- repro (1)
Top Pull Request Labels
- dependencies (58)
- bug (36)
- maintenance (32)
- documentation (21)
- github_actions (18)
- enhancement (17)
- modflow 6 (15)
- performance (5)
- deprecation (3)
- refactor (1)
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 53,074 last-month
- Total docker downloads: 5,769
- Total dependent packages: 19 (may contain duplicates)
- Total dependent repositories: 45 (may contain duplicates)
- Total versions: 72
- Total maintainers: 2
pypi.org: flopy
FloPy is a Python package to create, run, and post-process MODFLOW-based models
- Homepage:
- Documentation: https://flopy.readthedocs.io
- Licenses: CC0
- Latest release: 3.9.5 (published 3 months ago)
- Last Synced: 2025-12-11T18:03:43.338Z (13 days ago)
- Versions: 56
- Dependent Packages: 18
- Dependent Repositories: 40
- Downloads: 53,074 Last month
- Docker Downloads: 5,769
-
Rankings:
- Dependent packages count: 0.695%
- Docker downloads count: 1.682%
- Dependent repos count: 2.325%
- Average: 2.427%
- Stargazers count: 2.958%
- Forks count: 3.02%
- Downloads: 3.884%
- Maintainers (2)
conda-forge.org: flopy
- Homepage: https://github.com/modflowpy/flopy
- Licenses: CC0-1.0
- Latest release: 3.3.5 (published almost 4 years ago)
- Last Synced: 2025-12-17T07:03:23.805Z (8 days ago)
- Versions: 16
- Dependent Packages: 1
- Dependent Repositories: 5
-
Rankings:
- Forks count: 10.257%
- Dependent repos count: 14.689%
- Average: 18.354%
- Stargazers count: 19.516%
- Dependent packages count: 28.954%
Score: 21.824200198847812


