Updates for code.usgs.gov

develop
Joseph D Hughes 2018-05-22 11:30:42 -04:00
parent 4ae1edb4e7
commit 7fc7d1468e
11 changed files with 804 additions and 93 deletions

9
CODE_OF_CONDUCT.md Executable file
View File

@ -0,0 +1,9 @@
Code of Conduct
===============
All contributions to- and interactions surrounding- this project will abide by
the [USGS Code of Scientific Conduct][1].
[1]: https://www2.usgs.gov/fsp/fsp_code_of_scientific_conduct.asp

18
CONTRIBUTING.md Executable file
View File

@ -0,0 +1,18 @@
Contributing
============
Contributions are welcome from the community. Questions can be asked on the
[issues page][1]. Before creating a new issue, please take a moment to search
and make sure a similar issue does not already exist. If one does exist, you
can comment (most simply even with just a `:+1:`) to show your support for that
issue.
If you have direct contributions you would like considered for incorporation
into the project you can [fork this repository][2] and
[submit a pull request][3] for review.
[1]: https://github.com/modflowpy/flopy/issues
[2]: https://help.github.com/articles/fork-a-repo/
[3]: https://help.github.com/articles/about-pull-requests/

11
DISCLAIMER.md Normal file
View File

@ -0,0 +1,11 @@
Disclaimer
----------
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.

46
LICENSE.md Executable file
View File

@ -0,0 +1,46 @@
License
=======
Unless otherwise noted, This project is in the public domain in the United
States because it contains materials that originally came from the United
States Geological Survey, an agency of the United States Department of
Interior. For more information, see the official USGS copyright policy at
https://www2.usgs.gov/visual-id/credit_usgs.html#copyright
Additionally, we waive copyright and related rights in the work
worldwide through the CC0 1.0 Universal public domain dedication.
CC0 1.0 Universal Summary
-------------------------
This is a human-readable summary of the
[Legal Code (read the full text)][1].
### No Copyright
The person who associated a work with this deed has dedicated the work to
the public domain by waiving all of his or her rights to the work worldwide
under copyright law, including all related and neighboring rights, to the
extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial
purposes, all without asking permission.
### Other Information
In no way are the patent or trademark rights of any person affected by CC0,
nor are the rights that other persons may have in the work or in how the
work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with
this deed makes no warranties about the work, and disclaims liability for
all uses of the work, to the fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the
author or the affirmer.
[1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode

176
README.md
View File

@ -1,7 +1,7 @@
<img src="https://raw.githubusercontent.com/modflowpy/flopy/master/examples/images/flopy3.png" alt="flopy3" style="width:50;height:20">
### Version 3.2.9 develop &mdash; build 94
### Version 3.2.9 develop &mdash; build 126
[![Build Status](https://travis-ci.org/modflowpy/flopy.svg?branch=develop)](https://travis-ci.org/modflowpy/flopy)
[![PyPI Version](https://img.shields.io/pypi/v/flopy.png)](https://pypi.python.org/pypi/flopy)
[![Coverage Status](https://coveralls.io/repos/github/modflowpy/flopy/badge.svg?branch=develop)](https://coveralls.io/github/modflowpy/flopy?branch=develop)
@ -10,13 +10,29 @@
Introduction
-----------------------------------------------
FloPy includes support for MODFLOW-2000, MODFLOW-2005, MODFLOW-NWT, and MODFLOW-USG. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
FloPy now includes beta support for MODFLOW 6. Click [here](docs/mf6.md) for more information.
FloPy includes support for [MODFLOW 6](docs/mf6.md), MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, and MODFLOW-2000. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
If you think you have found a bug in FloPy, or if you would like to suggest an improvement or enhancement, please submit a new issue through the [Github Issue tracker](https://github.com/modflowpy/flopy/issues). Pull requests will only be accepted on the develop branch of the repository.
Contributing
------------------------------------------------
Contributions are welcome from the community. Questions can be asked on the
[issues page][1]. Before creating a new issue, please take a moment to search
and make sure a similar issue does not already exist. If one does exist, you
can comment (most simply even with just a `:+1:`) to show your support for that
issue.
If you have direct contributions you would like considered for incorporation
into the project you can [fork this repository][2] and
[submit a pull request][3] for review.
[1]: https://github.com/modflowpy/flopy/issues
[2]: https://help.github.com/articles/fork-a-repo/
[3]: https://help.github.com/articles/about-pull-requests/
Documentation
@ -34,17 +50,39 @@ How to Cite
##### ***Software/Code citation for FloPy:***
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 04 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 22 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
Examples
Getting Started
-----------------------------------------------
### [jupyter Notebook Examples](docs/notebook_examples.md)
### [Getting started with FloPy](docs/working_with_flopy.md)
### [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html)
### [Additional jupyter Notebook Examples](docs/notebook_examples.md)
### [Python Script Examples](docs/script_examples.md)
### [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html)
FloPy Supported Packages
-----------------------------------------------
A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
FloPy Model Checks
-----------------------------------------------
A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
FloPy Changes
-----------------------------------------------
A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
Installation
@ -60,6 +98,57 @@ FloPy requires **Python** 2.7 or **Python** 3.3 (or higher)
FloPy requires **NumPy** 1.9 (or higher) and **enum34** for **Python** 2.7 or **Python** 3.3.
**For base and Anaconda Python distributions:**
To install FloPy type:
pip install flopy
or
conda install flopy
To update FloPy type:
pip install flopy --upgrade
or
conda update flopy
To uninstall FloPy type:
pip uninstall flopy
or
conda uninstall flopy
**Installing from the git repository:**
***Current Version of FloPy:***
To install the current version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master
To update your version of FloPy with the current version from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master --upgrade
***Development version of FloPy:***
To install the bleeding edge version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop
To update your version of FloPy with the bleeding edge code from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop --upgrade
***Optional Method Dependencies:***
Additional dependencies to use optional FloPy helper methods are listed below.
@ -88,61 +177,6 @@ Additional dependencies to use optional FloPy helper methods are listed below.
| `.loadtxt()` in `flopy.utils.flopyio` - ***used if available*** | **pandas** >= 0.15 |
**For base Python distributions:**
To install FloPy type:
pip install flopy
To update FloPy type:
pip install flopy --upgrade
To uninstall FloPy type:
pip uninstall flopy
**Installing from the git repository:**
***Current Version of FloPy:***
To install the current version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master
To update your version of FloPy with the current version from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master --upgrade
***Development version of FloPy:***
To install the bleeding edge version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop
To update your version of FloPy with the bleeding edge code from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop --upgrade
FloPy Supported Packages
-----------------------------------------------
A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
FloPy Model Checks
-----------------------------------------------
A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
FloPy Changes
-----------------------------------------------
A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
MODFLOW Resources
-----------------------------------------------
@ -150,3 +184,17 @@ MODFLOW Resources
+ [Online guide for MODFLOW-2000](http://water.usgs.gov/nrp/gwsoftware/modflow2000/Guide/index.html)
+ [Online guide for MODFLOW-2005](http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/)
+ [Online guide for MODFLOW-NWT](http://water.usgs.gov/ogw/modflow-nwt/MODFLOW-NWT-Guide/)
Disclaimer
----------
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.

49
code.json Executable file
View File

@ -0,0 +1,49 @@
[
{
"status": "Release Candidate",
"downloadURL": "https://code.usgs.gov/usgs/modflow/flopy/archive/master.zip",
"repositoryURL": "https://code.usgs.gov/usgs/modflow/flopy.git",
"laborHours": -1,
"disclaimerURL": "https://code.usgs.gov/usgs/modflow/flopy/blob/master/DISCLAIMER.md",
"tags": [
"MODFLOW",
"MODFLOW 6",
"MODFLOW-2005",
"MODFLOW-NWT",
"MODFLOW-USG",
"MODFLOW-2000",
"MT3DMS",
"MT3D-USGS",
"SEAWAT",
"MODPATH",
"groundwater model",
"transport model",
"python"
],
"description": "FloPy is a python package to create, run, and post-process MODFLOW-based models.",
"languages": [
"python"
],
"contact": {
"name": "Christian D. Langevin",
"email": "langevin@usgs.gov"
},
"vcs": "git",
"version": "3.2.9.126",
"date": {
"metadataLastUpdated": "2018-05-22"
},
"organization": "U.S. Geological Survey",
"permissions": {
"licenses": [
{
"URL": "https://code.usgs.gov/usgs/modflow/flopy/blob/master/LICENSE.md",
"name": "Public Domain, CC0-1.0"
}
],
"usageType": "openSource"
},
"homepageURL": "https://code.usgs.gov/usgs/modflow/flopy/",
"name": "flopy"
}
]

View File

@ -1,13 +1,29 @@
Introduction
-----------------------------------------------
FloPy includes support for MODFLOW-2000, MODFLOW-2005, MODFLOW-NWT, and MODFLOW-USG. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
FloPy now includes beta support for MODFLOW 6.
FloPy includes support for [MODFLOW 6](docs/mf6.md), MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, and MODFLOW-2000. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
If you think you have found a bug in FloPy, or if you would like to suggest an improvement or enhancement, please submit a new issue through the [Github Issue tracker](https://github.com/modflowpy/flopy/issues).
Contributing
------------------------------------------------
Contributions are welcome from the community. Questions can be asked on the
[issues page][1]. Before creating a new issue, please take a moment to search
and make sure a similar issue does not already exist. If one does exist, you
can comment (most simply even with just a `:+1:`) to show your support for that
issue.
If you have direct contributions you would like considered for incorporation
into the project you can [fork this repository][2] and
[submit a pull request][3] for review.
[1]: https://github.com/modflowpy/flopy/issues
[2]: https://help.github.com/articles/fork-a-repo/
[3]: https://help.github.com/articles/about-pull-requests/
Documentation
@ -25,9 +41,154 @@ How to Cite
*Software/Code citation for FloPy:*
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 04 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 22 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
Getting Started
-----------------------------------------------
### [Getting started with FloPy](docs/working_with_flopy.md)
### [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html)
### [Additional jupyter Notebook Examples](docs/notebook_examples.md)
### [Python Script Examples](docs/script_examples.md)
FloPy Supported Packages
-----------------------------------------------
A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
FloPy Model Checks
-----------------------------------------------
A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
FloPy Changes
-----------------------------------------------
A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
Installation
-----------------------------------------------
**Python versions:**
FloPy requires **Python** 2.7 or **Python** 3.3 (or higher)
**Dependencies:**
FloPy requires **NumPy** 1.9 (or higher) and **enum34** for **Python** 2.7 or **Python** 3.3.
**For base and Anaconda Python distributions:**
To install FloPy type:
pip install flopy
or
conda install flopy
To update FloPy type:
pip install flopy --upgrade
or
conda update flopy
To uninstall FloPy type:
pip uninstall flopy
or
conda uninstall flopy
**Installing from the git repository:**
*Current Version of FloPy:*
To install the current version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master
To update your version of FloPy with the current version from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master --upgrade
*Development version of FloPy:*
To install the bleeding edge version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop
To update your version of FloPy with the bleeding edge code from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop --upgrade
*Optional Method Dependencies:*
Additional dependencies to use optional FloPy helper methods are listed below.
| Method | Python Package |
| ------------------------------------------------------------------------------------ | -------------------------------------------------- |
| `.plot()` | **matplotlib** >= 1.4 |
| `.plot_shapefile()` | **matplotlib** >= 1.4 and **Pyshp** >= 1.2 |
| `.to_shapefile()` | **Pyshp** >= 1.2 |
| `.export(*.shp)` | **Pyshp** >= 1.2 |
| `.export(*.nc)` | **netcdf4** >= 1.1 and **python-dateutil** >= 2.4 |
| `.export(*.tif)` | **rasterio** |
| `.export(*.asc)` in `flopy.utils.reference` `SpatialReference` class | **scipy.ndimage** |
| `.interpolate()` in `flopy.utils.reference` `SpatialReference` class | **scipy.interpolate** |
| `.interpolate()` in `flopy.mf6.utils.reference` `StructuredSpatialReference` class | **scipy.interpolate** |
| `.get_dataframes()` in `flopy.utils.mflistfile` `ListBudget` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.observationfile` `ObsFiles` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.sfroutputfile` `ModflowSfr2` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.util_list` `MfList` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.zonebud` `ZoneBudget` class | **pandas** >= 0.15 |
| `.pivot_keyarray()` in `flopy.mf6.utils.arrayutils` `AdvancedPackageUtil` class | **pandas** >= 0.15 |
| `._get_vertices()` in `flopy.mf6.utils.binaryfile_utils` `MFOutputRequester` class | **pandas** >= 0.15 |
| `.get_dataframe()` in `flopy.mf6.utils.mfobservation` `Observations` class | **pandas** >= 0.15 |
| `.df()` in `flopy.modflow.mfsfr2` `SfrFile` class | **pandas** >= 0.15 |
| `.time_coverage()` in `flopy.export.metadata` `acc` class - *used if available* | **pandas** >= 0.15 |
| `.loadtxt()` in `flopy.utils.flopyio` - *used if available* | **pandas** >= 0.15 |
MODFLOW Resources
-----------------------------------------------
+ [MODFLOW and Related Programs](http://water.usgs.gov/ogw/modflow/)
+ [Online guide for MODFLOW-2000](http://water.usgs.gov/nrp/gwsoftware/modflow2000/Guide/index.html)
+ [Online guide for MODFLOW-2005](http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/)
+ [Online guide for MODFLOW-NWT](http://water.usgs.gov/ogw/modflow-nwt/MODFLOW-NWT-Guide/)
Disclaimer
----------
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.
Installation
-----------------------------------------------
To install FloPy version 3.2.9 &mdash; develop:

View File

@ -19,20 +19,36 @@ header-includes:
- \fancyhead[CE, CO]{FloPy Release Notes}
- \fancyfoot[LE, RO]{FloPy version 3.2.9 &mdash; develop}
- \fancyfoot[CO, CE]{\thepage\ of \pageref{LastPage}}
- \fancyfoot[RE, LO]{05/04/2018}
- \fancyfoot[RE, LO]{05/22/2018}
geometry: margin=0.75in
---
Introduction
-----------------------------------------------
FloPy includes support for MODFLOW-2000, MODFLOW-2005, MODFLOW-NWT, and MODFLOW-USG. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
FloPy now includes beta support for MODFLOW 6.
FloPy includes support for [MODFLOW 6](docs/mf6.md), MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, and MODFLOW-2000. Other supported MODFLOW-based models include MODPATH (version 6), MT3DMS, MT3D-USGS, and SEAWAT.
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
If you think you have found a bug in FloPy, or if you would like to suggest an improvement or enhancement, please submit a new issue through the [Github Issue tracker](https://github.com/modflowpy/flopy/issues).
Contributing
------------------------------------------------
Contributions are welcome from the community. Questions can be asked on the
[issues page][1]. Before creating a new issue, please take a moment to search
and make sure a similar issue does not already exist. If one does exist, you
can comment (most simply even with just a `:+1:`) to show your support for that
issue.
If you have direct contributions you would like considered for incorporation
into the project you can [fork this repository][2] and
[submit a pull request][3] for review.
[1]: https://github.com/modflowpy/flopy/issues
[2]: https://help.github.com/articles/fork-a-repo/
[3]: https://help.github.com/articles/about-pull-requests/
Documentation
@ -50,9 +66,154 @@ How to Cite
##### ***Software/Code citation for FloPy:***
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 04 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2018, FloPy v3.2.9 &mdash; develop: U.S. Geological Survey Software Release, 22 May 2018, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
Getting Started
-----------------------------------------------
### [Getting started with FloPy](docs/working_with_flopy.md)
### [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html)
### [Additional jupyter Notebook Examples](docs/notebook_examples.md)
### [Python Script Examples](docs/script_examples.md)
FloPy Supported Packages
-----------------------------------------------
A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
FloPy Model Checks
-----------------------------------------------
A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
FloPy Changes
-----------------------------------------------
A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
Installation
-----------------------------------------------
**Python versions:**
FloPy requires **Python** 2.7 or **Python** 3.3 (or higher)
**Dependencies:**
FloPy requires **NumPy** 1.9 (or higher) and **enum34** for **Python** 2.7 or **Python** 3.3.
**For base and Anaconda Python distributions:**
To install FloPy type:
pip install flopy
or
conda install flopy
To update FloPy type:
pip install flopy --upgrade
or
conda update flopy
To uninstall FloPy type:
pip uninstall flopy
or
conda uninstall flopy
**Installing from the git repository:**
***Current Version of FloPy:***
To install the current version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master
To update your version of FloPy with the current version from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/master --upgrade
***Development version of FloPy:***
To install the bleeding edge version of FloPy from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop
To update your version of FloPy with the bleeding edge code from the git repository type:
pip install https://github.com/modflowpy/flopy/zipball/develop --upgrade
***Optional Method Dependencies:***
Additional dependencies to use optional FloPy helper methods are listed below.
| Method | Python Package |
| ------------------------------------------------------------------------------------ | -------------------------------------------------- |
| `.plot()` | **matplotlib** >= 1.4 |
| `.plot_shapefile()` | **matplotlib** >= 1.4 and **Pyshp** >= 1.2 |
| `.to_shapefile()` | **Pyshp** >= 1.2 |
| `.export(*.shp)` | **Pyshp** >= 1.2 |
| `.export(*.nc)` | **netcdf4** >= 1.1 and **python-dateutil** >= 2.4 |
| `.export(*.tif)` | **rasterio** |
| `.export(*.asc)` in `flopy.utils.reference` `SpatialReference` class | **scipy.ndimage** |
| `.interpolate()` in `flopy.utils.reference` `SpatialReference` class | **scipy.interpolate** |
| `.interpolate()` in `flopy.mf6.utils.reference` `StructuredSpatialReference` class | **scipy.interpolate** |
| `.get_dataframes()` in `flopy.utils.mflistfile` `ListBudget` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.observationfile` `ObsFiles` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.sfroutputfile` `ModflowSfr2` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.util_list` `MfList` class | **pandas** >= 0.15 |
| `.get_dataframes()` in `flopy.utils.zonebud` `ZoneBudget` class | **pandas** >= 0.15 |
| `.pivot_keyarray()` in `flopy.mf6.utils.arrayutils` `AdvancedPackageUtil` class | **pandas** >= 0.15 |
| `._get_vertices()` in `flopy.mf6.utils.binaryfile_utils` `MFOutputRequester` class | **pandas** >= 0.15 |
| `.get_dataframe()` in `flopy.mf6.utils.mfobservation` `Observations` class | **pandas** >= 0.15 |
| `.df()` in `flopy.modflow.mfsfr2` `SfrFile` class | **pandas** >= 0.15 |
| `.time_coverage()` in `flopy.export.metadata` `acc` class - ***used if available*** | **pandas** >= 0.15 |
| `.loadtxt()` in `flopy.utils.flopyio` - ***used if available*** | **pandas** >= 0.15 |
MODFLOW Resources
-----------------------------------------------
+ [MODFLOW and Related Programs](http://water.usgs.gov/ogw/modflow/)
+ [Online guide for MODFLOW-2000](http://water.usgs.gov/nrp/gwsoftware/modflow2000/Guide/index.html)
+ [Online guide for MODFLOW-2005](http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/)
+ [Online guide for MODFLOW-NWT](http://water.usgs.gov/ogw/modflow-nwt/MODFLOW-NWT-Guide/)
Disclaimer
----------
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.
Installation
-----------------------------------------------
To install FloPy version 3.2.9 &mdash; develop from the USGS FloPy website:

108
docs/working_with_flopy.md Normal file
View File

@ -0,0 +1,108 @@
Examples
-----------------------------------------------
### jupyter Notebook Examples
The following jupyter Notebooks contain examples for using FloPy pre- and post-processing capabilities with a variety of MODFLOW-based models.
#### MODFLOW-2000, MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, MODPATH, MT3DMS, MT3D-USGS, and SEAWAT
##### ***Basic examples***
+ An overview of loading existing MODFLOW models, creating models, and common post-processing capabilities using FloPy is presented in the [flopy3_working_stack_demo](../examples/Notebooks/flopy3_working_stack_demo.ipynb) Notebook.
+ 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 [flopy3_modflow_boundaries](../examples/Notebooks/flopy3_modflow_boundaries.ipynb) Notebook
+ An overview of how to control the format of numeric arrays written by FloPy to MODFLOW-based input files is given in the [flopy3_array_outputformat_options](../examples/Notebooks/flopy3_array_outputformat_options.ipynb) Notebook.
+ An overview of how FloPy handles external files for numeric arrays written by FloPy to MODFLOW-based input files is given in the [flopy3_external_file_handling](../examples/Notebooks/flopy3_external_file_handling.ipynb) Notebook.
+ An overview of FloPy functionality in the ```SpatialReference``` class for locating the model in a "real world" coordinate reference system is given in the [flopy3_SpatialReference_demo](../examples/Notebooks/flopy3_SpatialReference_demo.ipynb) Notebook.
+ An overview of FloPy capabilities to load a SFR2 file and evaluate data contained in the file is given in the [flopy3_SFR2_load](../examples/Notebooks/flopy3_SFR2_load.ipynb) Notebook.
+ An overview of FloPy capabilities to create a SFR2 file and evaluate data contained in the file is given in the [flopy3_sfrpackage_example](../examples/Notebooks/flopy3_sfrpackage_example.ipynb) Notebook. This example also shows how to read SFR water balance output into a pandas dataframe for additional postprocessing.
+ An overview of FloPy capabilities to create a MNW2 file and evaluate data contained in the file is given in the [flopy3_mnw2package_example](../examples/Notebooks/flopy3_mnw2package_example.ipynb) Notebook.
+ An overview of FloPy capabilities to create a UZF file and evaluate data contained in the file and UZF output files is given in the [flopy3_uzf_example](../examples/Notebooks/flopy3_uzf_example) Notebook.
+ An overview of FloPy capabilities for exporting two-dimensional array data as a binary file is given in the [flopy3_save_binary_data_file](../examples/Notebooks/flopy3_save_binary_data_file.ipynb) Notebook.
+ An overview of FloPy capabilities to create MODPATH models and plot MODPATH results is given in the [flopy3_Modpath_example](../examples/Notebooks/flopy3_Modpath_example.ipynb) Notebook.
+ An overview of using FloPy and GRIDGEN to creating layered quadtree grids for MODFLOW-USG is given in the [flopy3_gridgen](../examples/Notebooks/flopy3_gridgen.ipynb) Notebook.
+ The [lake example](../examples/Notebooks/flopy3_lake_example.ipynb), a very simple FloPy 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](../examples/Notebooks/flopy3_WatertableRecharge_example.ipynb), 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](../examples/Notebooks/flopy3_Zaidel_example.ipynb), 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/).
+ An overview of the options for creating a Source/Sink Mixing (SSM) Package for MT3DMS and SEAWAT is given in the [flopy3ssm](../examples/Notebooks/flopy3_multi-component_SSM.ipynb) Notebook.
+ The ['Crank-Nicolson' example distributed with MT3D-USGS](../examples/Notebooks/flopy3_MT3D-USGS_example.ipynb), a simple MT3D-USGS model that uses the SFT Package.
+ The [Henry Problem](../examples/Notebooks/flopy3_SEAWAT_henry_problem.ipynb), a simple saltwater intrusion model developed with FloPy and run using SEAWAT.
##### ***Examples from [Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)***
+ [A basic FloPy example](../examples/groundwater_paper/Notebooks/example_1.ipynb) Notebook.
+ [Upper San Pedro Basin](../examples/groundwater_paper/Notebooks/uspb.ipynb) simulated model results (figure 2) and computed capture fraction (figure 5) Notebook.
##### ***SWI2 examples***
+ [Example 1](../examples/Notebooks/flopy3_swi2package_ex1.ipynb) of the SWI2 manual, simulating a rotating interface.
+ [Example 4](../examples/Notebooks/flopy3_swi2package_ex4.ipynb) of the SWI2 manual, upconing below a pumping well below a two-aquifer island system.
##### ***Model analysis and error checking examples***
+ An overview of the FloPy [model input data `check()` method capabilities](../examples/Notebooks/flopy3_ModelCheckerExample.ipynb).
+ An overview of the FloPy [zone budget `ZoneBudget()` method capabilities](../examples/Notebooks/flopy3_ZoneBudget_example) Notebook. The `ZoneBudget()` method is a python implementation of USGS ZONEBUDGET executable for MODFLOW (Harbaugh, 1990).
+ An overview of the FloPy [`get_transmissivities()` method for computing open interval transmissivities (for weighted averages of heads or fluxes)](../examples/Notebooks/flopy3_get_transmissivities_example.ipynb) Notebook. This method can be used to:
* compute vertically-averaged head target values representative of observation wells of varying open intervals (including variability in saturated thickness due to the position of the water table). This may be especially important for reducing error in observations used for parameter estimation, in areas with appreciable vertical head gradients (due to aquitards, pumping, discharge to surface water, etc.)
* apportion boundary fluxes (e.g. from an analytic element model) among model layers based on transmissivity.
* any other analysis where a distribution of transmissivity is needed for a specified vertical interval of the model.
+ An overview of utilties for [post-processing head results from MODFLOW](../examples/Notebooks/flopy3_Modflow_postprocessing_example.ipynb).
#### ***Export examples***
+ An overview of the FloPy [netCDF and shapefile export capabilities](../examples/Notebooks/flopy3_export.ipynb).
+ [Exporting 2-D arrays as rasters or contour shapefiles](../examples/Notebooks/flopy3_Modflow_postprocessing_example.ipynb).
#### ***Parameter Estimation examples***
+ An overview of the FloPy [parameter estimation capabilities](../examples/Notebooks/flopy3_PEST.ipynb).
#### MODFLOW 6
##### ***Basic examples***
+ A simple MODFLOW 6 example is given in the [flopy3_mf6_A_simple-model](../examples/Notebooks/flopy3_mf6_A_simple-model.ipynb) Notebook.
+ A more complicated MODFLOW 6 example is given in the [flopy3_mf6_B_complex-model](../examples/Notebooks/flopy3_mf6_B_complex-model.ipynb) Notebook.
#### Plotting examples ***(limited functionality for MODFLOW 6 models)***
+ An overview of the FloPy [map and cross-section plotting capabilities](../examples/Notebooks/flopy3_MapExample.ipynb).
+ An overview of the FloPy [model input and output data `plot()` method capabilities](../examples/Notebooks/flopy3_PlotArrayExample.ipynb)
+ An overview of SWR1 Process Output Processing and Plotting is given in the [flopy3_LoadSWRBinaryData](../examples/Notebooks/flopy3_LoadSWRBinaryData.ipynb) Notebook.
+ The [flopy3_shapefile_features](../examples/Notebooks/flopy3_shapefile_features.ipynb) Notebook illustrates some functionality in flopy for exchanging MODFLOW-related information with shapefiles, including convenience functions for working with shapefile data in numpy recarrays, some simple container objects for storing geographic information, and a demonstration of automatic writing of projection (.prj) files using EPSG codes.
+ An overview of [plotting MODFLOW-USG unstructured grid data and model results](../examples/Notebooks/flopy3_UnstructuredGridPlotting.ipynb).
+ An overview of [how to plot MODFLOW 6 results for a single GWF model](../examples/Notebooks/flopy3_BasicMODFLOW6Plot.ipynb).
#### Additional MODFLOW examples
+ Example problems from the 2015 2nd edition of [Applied Groundwater Modeling](https://github.com/Applied-Groundwater-Modeling-2nd-Ed) by Mary P. Anderson, William W. Woessner, and Randall J. Hunt (https://github.com/Applied-Groundwater-Modeling-2nd-Ed)

View File

@ -1,11 +1,11 @@
# flopy version file automatically created using...pre-commit.py
# created on...May 04, 2018 16:58:15
# created on...May 22, 2018 11:30:42
major = 3
minor = 2
micro = 9
build = 94
commit = 2765
build = 126
commit = 2797
__version__ = '{:d}.{:d}.{:d}'.format(major, minor, micro)
__build__ = '{:d}.{:d}.{:d}.{:d}'.format(major, minor, micro, build)

View File

@ -5,12 +5,18 @@ import subprocess
import os
import sys
import datetime
import json
# update files and paths so that there are the same number of
# path and file entries in the paths and files list. Enter '.'
# as the path if the file is in the root repository directory
paths = ['flopy', '.', 'docs', 'docs']
files = ['version.py', 'README.md', 'USGS_release.md', 'PyPi_release.md']
paths = ['flopy', '.',
'docs', 'docs',
'.', '.']
files = ['version.py', 'README.md',
'USGS_release.md', 'PyPi_release.md',
'code.json', 'DISCLAIMER.md']
# check that there are the same number of entries in files and paths
if len(paths) != len(files):
@ -21,6 +27,58 @@ if len(paths) != len(files):
pak = 'flopy'
approved = '''Disclaimer
----------
This software has been approved for release by the U.S. Geological Survey
(USGS). Although the software has been subjected to rigorous review, the USGS
reserves the right to update the software as needed pursuant to further analysis
and review. No warranty, expressed or implied, is made by the USGS or the U.S.
Government as to the functionality of the software and related material nor
shall the fact of release constitute any such warranty. Furthermore, the
software is released on condition that neither the USGS nor the U.S. Government
shall be held liable for any damages resulting from its authorized or
unauthorized use.
'''
preliminary = '''Disclaimer
----------
This software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.
'''
def get_disclaimer(branch):
if 'release' in branch.lower() or 'master' in branch.lower():
disclaimer = approved
else:
disclaimer = preliminary
return disclaimer
def get_branch():
try:
# determine current buildstat branch
b = subprocess.Popen(("git", "status"),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT).communicate()[0]
if isinstance(b, bytes):
b = b.decode('utf-8')
# determine current buildstat branch
for line in b.splitlines():
if 'On branch' in line:
branch = line.replace('On branch ', '').rstrip()
except:
branch = None
return branch
def get_version_str(v0, v1, v2, v3):
version_type = ('{}'.format(v0),
@ -107,6 +165,9 @@ def update_version():
# update README.md with new version information
update_readme_markdown(vmajor, vminor, vmicro, vbuild)
# update code.json
update_codejson(vmajor, vminor, vmicro, vbuild)
# update docs/USGS_release.md with new version information
update_USGSmarkdown(vmajor, vminor, vmicro, vbuild)
@ -130,31 +191,60 @@ def add_updated_files():
sys.exit(1)
def update_readme_markdown(vmajor, vminor, vmicro, vbuild):
try:
# determine current buildstat branch
b = subprocess.Popen(("git", "status"),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT).communicate()[0]
if isinstance(b, bytes):
b = b.decode('utf-8')
def update_codejson(vmajor, vminor, vmicro, vbuild):
# determine current buildstat branch
for line in b.splitlines():
if 'On branch' in line:
branch = line.replace('On branch ', '').rstrip()
except:
# get branch
branch = get_branch()
if branch is None:
print('Cannot update code.json - could not determine current branch')
return
# create version
version = get_tag(vmajor, vminor, vmicro)
# load and modify json file
jsonFile = open('code.json', 'r') # Open the JSON file for reading
data = json.load(jsonFile) # Read the JSON into the buffer
jsonFile.close() # Close the JSON file
# modify the json file data
now = datetime.datetime.now()
sdate = now.strftime('%Y-%m-%d')
data[0]['date']['metadataLastUpdated'] = sdate
if 'release' in branch.lower() or 'master' in branch.lower():
data[0]['version'] = version
data[0]['status'] = 'Production'
else:
data[0]['version'] = version + '.{}'.format(vbuild)
data[0]['status'] = 'Release Candidate'
# rewrite the json file
with open(files[4], 'w') as f:
json.dump(data, f, indent=4)
return
def update_readme_markdown(vmajor, vminor, vmicro, vbuild):
# get branch
branch = get_branch()
if branch is None:
print('Cannot update README.md - could not determine current branch')
return
# create version
version = get_tag(vmajor, vminor, vmicro)
# create disclaimer text
disclaimer = get_disclaimer(branch)
# read README.md into memory
with open(files[1], 'r') as file:
lines = [line.rstrip() for line in file]
# rewrite README.md
terminate = False
f = open(files[1], 'w')
for line in lines:
if '### Version ' in line:
@ -183,7 +273,17 @@ def update_readme_markdown(vmajor, vminor, vmicro, vbuild):
'{}, '.format(now.strftime('%d %B %Y')) + \
'http://dx.doi.org/10.5066/F7BK19FH]' + \
'(http://dx.doi.org/10.5066/F7BK19FH)'
elif 'Disclaimer' in line:
line = disclaimer
terminate = True
f.write('{}\n'.format(line))
if terminate:
break
f.close()
# write disclaimer markdown file
f = open('DISCLAIMER.md', 'w')
f.write(disclaimer)
f.close()
return