{ "info": { "author": "benjiyamin, see AUTHORS.md", "author_email": "benjiyamin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "# Project Overview\n\nPyFlo is an open-source library written in Python for performing hydraulic and hydrology stormwater \nanalysis. Capabilities include network hydraulic grade analysis and time/iteration based storage and \nflood routing simulations. SCS Unit Hydrograph and Rational Method are included for basin \ncomputations. Most of the calculations and procedures are derived from available existing \npublications and resources. There are some GUI programs available that have similar capabilities. \nThe intent is that many will build from and contribute to the project, making it much more powerful \nthan a single person ever could.\n\n# Installation\n\nInstalling the easy way, using pip:\n\n```bash\n$ pip install pyflo\n```\n\n# Examples\n\n## Hydrographs\n\nFrom [NEH Hydrology Ch. 16, Ex. 16-1](http://www.wcc.nrcs.usda.gov/ftpref/wntsc/H&H/NEHhydrology/ch16.pdf#page=15):\n\n```python\nfrom pyflo import system\nfrom pyflo.nrcs import hydrology\n\nuh484 = system.array_from_csv('./resources/distributions/runoff/scs484.csv')\nbasin = hydrology.Basin(\n area=4.6,\n cn=85.0,\n tc=2.3,\n runoff_dist=uh484,\n peak_factor=484.0\n)\n```\n### Unit Hydrograph\n\nWith PyFlo, it's fairly simple to create a unit hydrograph, which represents the time-flow \nrelationship per unit (inch) of runoff depth.\n\n```python\nunit_hydrograph = basin.unit_hydrograph(interval=0.3)\n```\n\nWe can use `matplotlib` to plot the example results:\n\n```python\nfrom matplotlib import pyplot\n\nx = unit_hydrograph[:, 0]\ny = unit_hydrograph[:, 1]\npyplot.plot(x, y, 'k')\npyplot.plot(x, y, 'bo')\npyplot.title(r'Unit Hydrograph from Example 16-1')\npyplot.xlabel(r'Time ($hr$)')\npyplot.ylabel(r'Discharge ($\\frac{ft^{3}}{s}$)')\npyplot.show()\n```\n\n![Unit Hydrograph](./docs/img/unit_hydrograph_16-1.png \"Unit Hydrograph\")\n\n### Flood Hydrograph\n\nA flood hydrograph can be generated, which is a time-flow relationship synthesized from basin \nproperties and a provided scaled rainfall distribution.\n\n```python\nimport numpy\n\nrainfall_dist = numpy.array([\n (0.00, 0.000),\n (0.05, 0.074),\n (0.10, 0.174),\n (0.15, 0.280),\n (0.20, 0.378),\n (0.25, 0.448),\n (0.30, 0.496),\n (0.35, 0.526),\n (0.40, 0.540),\n (0.45, 0.540),\n (0.50, 0.540),\n (0.55, 0.542),\n (0.60, 0.554),\n (0.65, 0.582),\n (0.70, 0.640),\n (0.75, 0.724),\n (0.80, 0.816),\n (0.85, 0.886),\n (0.90, 0.940),\n (0.95, 0.980),\n (1.00, 1.000)\n])\nrainfall_depths = rainfall_dist * [6.0, 5.0] # Scale array to 5 inches over 6 hours.\nflood_hydrograph = basin.flood_hydrograph(rainfall_depths, interval=0.3)\n```\n\nWe can use `matplotlib` to plot the example results:\n\n```python\nfrom matplotlib import pyplot\n\nx = flood_hydrograph[:, 0]\ny = flood_hydrograph[:, 1]\npyplot.plot(x, y, 'k')\npyplot.plot(x, y, 'bo')\npyplot.title(r'Flood Hydrograph from Example 16-1')\npyplot.xlabel(r'Time ($hr$)')\npyplot.ylabel(r'Discharge ($\\frac{ft^{3}}{s}$)')\npyplot.show()\n```\n\n![Flood Hydrograph](./docs/img/flood_hydrograph_16-1.png \"Flood Hydrograph\")\n\n# Contributing\n\nFor developers, it's important to use common best practices when contributing to the project.\n[PEP 8](https://www.python.org/dev/peps/pep-0008/) should always be adhered. Code should be\ndocumented with [Google style docstrings](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).\nPull requests and filing issues are encouraged.\n\nTo start contributing with the PyFlo repository:\n\n1. Fork it!\n\n2. Create a local clone of your fork.\n \n $ git clone https://github.com/YOUR-USERNAME/pyflo\n Cloning into `pyflo`...\n remote: Counting objects: 10, done.\n remote: Compressing objects: 100% (8/8), done.\n remove: Total 10 (delta 1), reused 10 (delta 1)\n Unpacking objects: 100% (10/10), done.\n\n3. Set up a clean working environment, using virtualenv.\n\n $ virtualenv -p python3 venv\n $ source venv/bin/activate\n $ pip install -r requirements/development.txt\n\n4. Add the original as a remote repository named `upstream`.\n\n $ git remote add upstream https://github.com/benjiyamin/pyflo.git\n $ git remote -v\n origin https://github.com/YOUR-USERNAME/pyflo.git (fetch)\n origin https://github.com/YOUR-USERNAME/pyflo.git (push)\n upstream https://github.com/benjiyamin/pyflo.git (fetch)\n upstream https://github.com/benjiyamin/pyflo.git (push)\n\n5. Fetch the current upstream repository branches and commits.\n\n $ git fetch upstream\n remote: Counting objects: 75, done.\n remote: Compressing objects: 100% (53/53), done.\n remote: Total 62 (delta 27), reused 44 (delta 9)\n Unpacking objects: 100% (62/62), done.\n From https://github.com/benjiyamin/pyflo\n * [new branch] master -> upstream/master\n\n6. Checkout your local `master` branch and sync `upstream/master` to it, without losing local changes.\n\n $ git checkout master\n Switched to branch 'master'\n \n $ git merge upstream/master\n\n7. Commit your local changes and push to `upstream/master`.\n\n $ git commit -m 'Add some feature'\n $ git push upstream master\n\n8. Submit a pull request. =)\n\nFor a list of contributors who have participated in this project, check out [AUTHORS](AUTHORS.md).\n\n# Testing\n\nUnit Testing is currently done using the built-in unittest module:\n\n```bash\n$ python tests.py\n```\n\n# License\n\nThis project is licensed under GPL 3.0 - see [LICENSE](LICENSE.md) for details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://benjiyamin.github.io/pyflo", "keywords": "hydraulics hydrology storm simulation", "license": "GNU General Public License v3 (GPLv3), see LICENSE.md", "maintainer": null, "maintainer_email": null, "name": "pyflo", "package_url": "https://pypi.org/project/pyflo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyflo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://benjiyamin.github.io/pyflo" }, "release_url": "https://pypi.org/project/pyflo/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "PyFlo is an open-source library written in Python for performing hydraulic and hydrology stormwater analysis.", "version": "0.3.3" }, "last_serial": 2438798, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "50725d522467a788c0ff2e0393550e91", "sha256": "91161b3999ef3e53426dc81369f1e116b60db02e90ee80712a812cda7abf7d4e" }, "downloads": -1, "filename": "pyflo-0.1.tar.gz", "has_sig": false, "md5_digest": "50725d522467a788c0ff2e0393550e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13223, "upload_time": "2016-10-21T00:29:24", "url": "https://files.pythonhosted.org/packages/67/0e/797940e38118ae5e7271487c4ec2b89a2e3f156f503c839918fbfa1f9c95/pyflo-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "96ea9a2b027cbbc5e263359b92dd4f53", "sha256": "940840078083e5d7414fbc3db220b461742170dbde342f916a07fae4c05e6630" }, "downloads": -1, "filename": "pyflo-0.2.tar.gz", "has_sig": false, "md5_digest": "96ea9a2b027cbbc5e263359b92dd4f53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15891, "upload_time": "2016-10-21T01:02:14", "url": "https://files.pythonhosted.org/packages/22/cc/956b43ef3e213c23b0761e74784d2d8c904d22f3ba9ec769abe527006560/pyflo-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "c704d8a6f2cde080d0251332bd7f0dc1", "sha256": "ea362ec7e989d5d73748b9567a611ee26ca78ac1fab617a2c09ed4711d1f6baa" }, "downloads": -1, "filename": "pyflo-0.3.tar.gz", "has_sig": false, "md5_digest": "c704d8a6f2cde080d0251332bd7f0dc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11622, "upload_time": "2016-10-21T01:06:41", "url": "https://files.pythonhosted.org/packages/be/3f/e45fa8e906770442097bdc88934d5b331a4dca75ee2171622c1b9b94b729/pyflo-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4f85531040c6d65e8c82f3684cdf7db3", "sha256": "02d918b5f109c07fb7a2deab5b365254fdea8bc040f62506a86ecaac9f8900ff" }, "downloads": -1, "filename": "pyflo-0.3.1.tar.gz", "has_sig": false, "md5_digest": "4f85531040c6d65e8c82f3684cdf7db3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11620, "upload_time": "2016-10-21T01:14:01", "url": "https://files.pythonhosted.org/packages/ff/d6/7e5bc5363b1bd800fd37a6bbf9686281730af624ddc24a7426be8b7b0179/pyflo-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "f565758740fb80f2401fb7fedbddf82a", "sha256": "85804fb5a1678121e192395549037a835ebc5782d99aab52af5cc3650fe56bee" }, "downloads": -1, "filename": "pyflo-0.3.2.tar.gz", "has_sig": false, "md5_digest": "f565758740fb80f2401fb7fedbddf82a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16693, "upload_time": "2016-10-21T01:22:25", "url": "https://files.pythonhosted.org/packages/98/ce/d0de2b73547d3a48d4e9abb583b6026ad0990a19973256ee73ad004a291e/pyflo-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "1139c2c15076b9806328c38b619fdd08", "sha256": "6b05d659223f87a1722d737ef8d9d455c247c88e9bd26303216d86c6cae545d6" }, "downloads": -1, "filename": "pyflo-0.3.3.tar.gz", "has_sig": false, "md5_digest": "1139c2c15076b9806328c38b619fdd08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56579, "upload_time": "2016-11-02T22:47:43", "url": "https://files.pythonhosted.org/packages/7f/ea/f32e4f8bcdd22eaf9e6f682797f8000b0a334be0b3c5c231888bb7f0203b/pyflo-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1139c2c15076b9806328c38b619fdd08", "sha256": "6b05d659223f87a1722d737ef8d9d455c247c88e9bd26303216d86c6cae545d6" }, "downloads": -1, "filename": "pyflo-0.3.3.tar.gz", "has_sig": false, "md5_digest": "1139c2c15076b9806328c38b619fdd08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56579, "upload_time": "2016-11-02T22:47:43", "url": "https://files.pythonhosted.org/packages/7f/ea/f32e4f8bcdd22eaf9e6f682797f8000b0a334be0b3c5c231888bb7f0203b/pyflo-0.3.3.tar.gz" } ] }