| Name | flow-modnum JSON |
| Version |
0.0.35
JSON |
| download |
| home_page | None |
| Summary | Flow Hydro Consulting's numerical modeling group Python library. |
| upload_time | 2025-08-19 21:56:52 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.12.4 |
| license | Copyright (c) 2018 The Python Packaging Authority
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
| keywords |
numerical
modeling
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
<img src="https://static.wixstatic.com/media/ac0ca5_db4f67801b0149b1ad0ec345e448de8f~mv2_d_3207_1376_s_2.png/v1/fill/w_261,h_111,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/Color%20logo%20with%20background.png" alt="flopy3" style="width:50;height:20">
# flow-modnum
Python library with utilities created for Flow Hydro Consulting numerical modeling group.
Introduction
-----------------------------------------------
flow-modnum is a library with utilites created for Flow Hydro Consulting numerical modeling group. The utilites were built to plot results from MODFLOW models, such as water levels, concentrations, properties, among others. flow-modnum supports MODFLOW-USG. Results from model's are generated using PEST's Groundwater Utilities (https://pesthomepage.org/programs)
Documentation
-----------------------------------------------
Installation
-----------------------------------------------
flow-modnum requires **Python** 3.12.4+ with:
```
numpy >=1.26.4
matplotlib >=3.8.4
pandas >=2.2.2
folium >= 0.18.0
plotly >= 5.22.0
pyproj >= 3.6.1
tqdm >= 4.66.4
geopandas >= 1.0.1
fiona >= 1.9.6
shapely >= 2.0.5
scipy >= 1.13.1
scikit-image >= 0.23.2
```
pip install flow-modnum
Getting Started
-----------------------------------------------
### Plotting MODFLOW-USG model results water table results
```python
from flowmodnum import water_levels
# Function to plot hydrograms
water_levels.plot_hydrograms(obs_dir, model_dir, wells_dir, scale, date_ini, format_date='%d/%m/%Y', lang='EN')
"""
Function to plot water level hydrograms form MODFLOW-USG output files.
Arguments:
obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.
model_dir: (str) Directory to model files.
wells_dir: (str) Directory to table containing wells. Columns must be: "Well_Name" "X_Coordinate" "Y_Coordinate" "Model_Layer"
scale: (float/int) Vertical scale (+- from mean values)
date_ini: (str) Initial date. Must be the same format as format_date.
format_date: (str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'
lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.
Outputs: Folder with hydrograms for each well.
"""
# Function to plot fit between observed and simulated values
water_levels.plot_fit(obs_dir, model_dir, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN')
"""
Function to plot simulated fit to observed data from MODFLOW-USG output files.
Arguments:
obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.
model_dir: (str) Directory to model files.
wells_dir: (str) Directory to table containing wells. Columns must be: "Well_Name" "X_Coordinate" "Y_Coordinate" "Model_Layer"
scale: (float/int) Vertical scale (+- from mean values)
date_ini: (str) Initial date. Must be the same format as format_date.
format_date:(str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'
lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.
Output: Fit plot image.
"""
# Function to get fit statistics between observed and simulated values
water_levels.get_stats(obs_dir, model_dir, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN')
"""
Function to generate table with fit statistics from MODFLOW-USG output files.
Arguments:
obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.
model_dir: (str) Directory to model files.
wells_dir: (str) Directory to table containing wells. Columns must be: "Well_Name" "X_Coordinate" "Y_Coordinate" "Model_Layer"
scale: (float/int) Vertical scale (+- from mean values)
date_ini: (str) Initial date. Must be the same format as format_date.
format_date: (str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'
lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.
Output: Fit stats on .csv file.
"""
# Function to generate interactive map with hydrograms
water_levels.mapped_hydrograms(obs_dir, model_dir, EPSG, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN', grid_dir=None)
"""
Function to plot water level hydrograms on map from MODFLOW-USG output files.
Arguments:
obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.
model_dir: (str) Directory to model files.
EPSG: (int) EPSG code to which all coordinated are referenced.
wells_dir: (str) Directory to table containing wells. Columns must be: "Well_Name" "X_Coordinate" "Y_Coordinate" "Model_Layer"
scale: (float) Vertical scale (+- from mean values)
date_ini: (str) Initial date. Must be the same format as format_date.
format_date: (str)(Optional) Date format to build DataFrames. Default is '%d/%m/%Y'
lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.
grid_dir: (str) (Optional) Directory to model grid to plot on map. Shapefile format. Must be referenced to EPSG.
Outputs: .html file with interactive map with wells. Each wells shows hydrograms on click.
"""
# Function to generate contours for given layers and stress periods
water_levels.generate_contours(model_dir, date_ini, layers, sps, EPSG, levels, dry_cells = -999.99)
"""
Function to generate water level contours (shapefiles) from MODFLOW-USG output file.
Arguments:
hds_dir: (str) Directory to MODFLOW-USG .hds file.
gsf_dir: (str) Directory to MODFLOW-USG .gsf file.
date_ini: (str) Initial date of model. Format dd/mm/YYYY.
layers: (list) Layers to extract contours of water levels.
sps: (list) Stress periods to extract contours of water levels.
EPSG: (int) EPSG code to which all coordinated are referenced.
levels: (list) Contours levels
dry_cells: (float) (Optional) Value assigned to dry cells by model.
Outputs: Folder with shapefiles for desired contours.
"""
```
Additional flow-modnum Resources
------------------------------------------------
Questions
------------------------------------------------
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](https://github.com/modflowpy/flopy/discussions) on the flow-modnum GitHub repository. If using Stack Overflow, questions should be tagged with tag `flow-modnum`.
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
------------------------------------------------
How to Cite
-----------------------------------------------
Additional FloPy Related Publications
-----------------------------------------------
MODFLOW Resources
-----------------------------------------------
+ [MODFLOW and Related Programs](https://water.usgs.gov/ogw/modflow/)
Raw data
{
"_id": null,
"home_page": null,
"name": "flow-modnum",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12.4",
"maintainer_email": null,
"keywords": "numerical, modeling",
"author": null,
"author_email": "Matias Bravo <mjbravo4@uc.cl>",
"download_url": "https://files.pythonhosted.org/packages/bc/89/247fbfc576de7c6c94829df0fcb4f65d6edf527344c797c24674c13f7bd8/flow_modnum-0.0.35.tar.gz",
"platform": null,
"description": "<img src=\"https://static.wixstatic.com/media/ac0ca5_db4f67801b0149b1ad0ec345e448de8f~mv2_d_3207_1376_s_2.png/v1/fill/w_261,h_111,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/Color%20logo%20with%20background.png\" alt=\"flopy3\" style=\"width:50;height:20\">\n\n# flow-modnum\nPython library with utilities created for Flow Hydro Consulting numerical modeling group.\n\nIntroduction\n-----------------------------------------------\n\nflow-modnum is a library with utilites created for Flow Hydro Consulting numerical modeling group. The utilites were built to plot results from MODFLOW models, such as water levels, concentrations, properties, among others. flow-modnum supports MODFLOW-USG. Results from model's are generated using PEST's Groundwater Utilities (https://pesthomepage.org/programs)\n\n\nDocumentation\n-----------------------------------------------\n\n\nInstallation\n-----------------------------------------------\n\nflow-modnum requires **Python** 3.12.4+ with:\n\n```\nnumpy >=1.26.4\nmatplotlib >=3.8.4\npandas >=2.2.2\nfolium >= 0.18.0\nplotly >= 5.22.0\npyproj >= 3.6.1\ntqdm >= 4.66.4\ngeopandas >= 1.0.1\nfiona >= 1.9.6\nshapely >= 2.0.5\nscipy >= 1.13.1\nscikit-image >= 0.23.2\n```\n\n pip install flow-modnum\n\n\n\nGetting Started\n-----------------------------------------------\n\n### Plotting MODFLOW-USG model results water table results\n\n```python\n\nfrom flowmodnum import water_levels\n\n# Function to plot hydrograms\nwater_levels.plot_hydrograms(obs_dir, model_dir, wells_dir, scale, date_ini, format_date='%d/%m/%Y', lang='EN')\n\"\"\"\n Function to plot water level hydrograms form MODFLOW-USG output files.\n \n Arguments:\n \n obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.\n model_dir: (str) Directory to model files.\n wells_dir: (str) Directory to table containing wells. Columns must be: \"Well_Name\" \"X_Coordinate\" \"Y_Coordinate\" \"Model_Layer\"\n scale: (float/int) Vertical scale (+- from mean values)\n date_ini: (str) Initial date. Must be the same format as format_date.\n format_date: (str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'\n lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.\n \n Outputs: Folder with hydrograms for each well.\n \n\"\"\"\n\n# Function to plot fit between observed and simulated values\nwater_levels.plot_fit(obs_dir, model_dir, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN')\n\"\"\"\n Function to plot simulated fit to observed data from MODFLOW-USG output files.\n \n Arguments:\n \n obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.\n model_dir: (str) Directory to model files.\n wells_dir: (str) Directory to table containing wells. Columns must be: \"Well_Name\" \"X_Coordinate\" \"Y_Coordinate\" \"Model_Layer\"\n scale: (float/int) Vertical scale (+- from mean values)\n date_ini: (str) Initial date. Must be the same format as format_date.\n format_date:(str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'\n lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.\n \n Output: Fit plot image.\n\"\"\"\n\n# Function to get fit statistics between observed and simulated values\nwater_levels.get_stats(obs_dir, model_dir, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN')\n\"\"\"\n Function to generate table with fit statistics from MODFLOW-USG output files.\n \n Arguments:\n \n obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.\n model_dir: (str) Directory to model files.\n wells_dir: (str) Directory to table containing wells. Columns must be: \"Well_Name\" \"X_Coordinate\" \"Y_Coordinate\" \"Model_Layer\"\n scale: (float/int) Vertical scale (+- from mean values)\n date_ini: (str) Initial date. Must be the same format as format_date.\n format_date: (str) (Optional) Date format to build DataFrames. Default is '%d/%m/%Y'\n lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.\n \n Output: Fit stats on .csv file.\n\"\"\"\n\n# Function to generate interactive map with hydrograms\nwater_levels.mapped_hydrograms(obs_dir, model_dir, EPSG, wells_dir, date_ini, format_date='%d/%m/%Y', lang='EN', grid_dir=None)\n\"\"\"\n Function to plot water level hydrograms on map from MODFLOW-USG output files.\n \n Arguments:\n \n obs_dir: (str) Directory to observation data. Format as John Doherty's Groundwater Utilities.\n model_dir: (str) Directory to model files.\n EPSG: (int) EPSG code to which all coordinated are referenced.\n wells_dir: (str) Directory to table containing wells. Columns must be: \"Well_Name\" \"X_Coordinate\" \"Y_Coordinate\" \"Model_Layer\"\n scale: (float) Vertical scale (+- from mean values)\n date_ini: (str) Initial date. Must be the same format as format_date.\n format_date: (str)(Optional) Date format to build DataFrames. Default is '%d/%m/%Y'\n lang: (str) (Optional) Language. Can choose between EN and SP. Default is EN.\n grid_dir: (str) (Optional) Directory to model grid to plot on map. Shapefile format. Must be referenced to EPSG.\n \n Outputs: .html file with interactive map with wells. Each wells shows hydrograms on click.\n\"\"\"\n\n# Function to generate contours for given layers and stress periods\nwater_levels.generate_contours(model_dir, date_ini, layers, sps, EPSG, levels, dry_cells = -999.99)\n\"\"\"\n Function to generate water level contours (shapefiles) from MODFLOW-USG output file. \n \n Arguments:\n \n hds_dir: (str) Directory to MODFLOW-USG .hds file.\n gsf_dir: (str) Directory to MODFLOW-USG .gsf file.\n date_ini: (str) Initial date of model. Format dd/mm/YYYY.\n layers: (list) Layers to extract contours of water levels.\n sps: (list) Stress periods to extract contours of water levels.\n EPSG: (int) EPSG code to which all coordinated are referenced.\n levels: (list) Contours levels\n dry_cells: (float) (Optional) Value assigned to dry cells by model.\n \n Outputs: Folder with shapefiles for desired contours.\n\"\"\"\n\n```\n\n\n\nAdditional flow-modnum Resources\n------------------------------------------------\n\n\nQuestions\n------------------------------------------------\nDo 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](https://github.com/modflowpy/flopy/discussions) on the flow-modnum GitHub repository. If using Stack Overflow, questions should be tagged with tag `flow-modnum`.\n\nTo 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**.\n\n\nContributing\n------------------------------------------------\n\n\n\nHow to Cite\n-----------------------------------------------\n\n\n\nAdditional FloPy Related Publications\n-----------------------------------------------\n\n\n\nMODFLOW Resources\n-----------------------------------------------\n\n+ [MODFLOW and Related Programs](https://water.usgs.gov/ogw/modflow/)\n",
"bugtrack_url": null,
"license": "Copyright (c) 2018 The Python Packaging Authority\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Flow Hydro Consulting's numerical modeling group Python library.",
"version": "0.0.35",
"project_urls": {
"Homepage": "https://github.com/MatiasBravo1511/flow-modnum"
},
"split_keywords": [
"numerical",
" modeling"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1d4610bf8cc82d1d936b5bd18b2fb6d9b7ce46c790e79d416a175d367b8b541b",
"md5": "b1f2664905a27fe25157dee47b7ffb57",
"sha256": "f4c8848eb310a019e69264cfb8faacd5e5aaf140e6107569cc846eff1b509a82"
},
"downloads": -1,
"filename": "flow_modnum-0.0.35-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b1f2664905a27fe25157dee47b7ffb57",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12.4",
"size": 1617809,
"upload_time": "2025-08-19T21:56:50",
"upload_time_iso_8601": "2025-08-19T21:56:50.350908Z",
"url": "https://files.pythonhosted.org/packages/1d/46/10bf8cc82d1d936b5bd18b2fb6d9b7ce46c790e79d416a175d367b8b541b/flow_modnum-0.0.35-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bc89247fbfc576de7c6c94829df0fcb4f65d6edf527344c797c24674c13f7bd8",
"md5": "2ec7649b607558f612842087d8b36aaf",
"sha256": "0cb5b0034f30265c8d4eaf35f468e7f8cc7d0b9af53f9e43d4afee30a268e41c"
},
"downloads": -1,
"filename": "flow_modnum-0.0.35.tar.gz",
"has_sig": false,
"md5_digest": "2ec7649b607558f612842087d8b36aaf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12.4",
"size": 30263797,
"upload_time": "2025-08-19T21:56:52",
"upload_time_iso_8601": "2025-08-19T21:56:52.617516Z",
"url": "https://files.pythonhosted.org/packages/bc/89/247fbfc576de7c6c94829df0fcb4f65d6edf527344c797c24674c13f7bd8/flow_modnum-0.0.35.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 21:56:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MatiasBravo1511",
"github_project": "flow-modnum",
"github_not_found": true,
"lcname": "flow-modnum"
}