A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

pyGSFLOW

A set of Python modules to run the GSFLOW integrated hydrologic model program.
https://github.com/pygsflow/pygsflow

Category: Natural Resources
Sub Category: Water Supply and Quality

Keywords

groundwater groundwater-modelling gsflow integrated-modelling modflow prms pygsflow python surface-water usgs

Last synced: about 17 hours ago
JSON representation

Repository metadata

Python package to Create, Read, Write, Edit, and Visualize GSFLOW models

README.md

pygsflow continuous integration
codecov
PyPI
JOSS
Frontiers

pygsflow

pyGSFLOW is a python package to Create, Read, Write, Edit, and Visualize GSFLOW models

GSFLOW model development has previously been a piecemeal approach that required multiple software tools to build, edit, postprocess, and visualize models. pyGSFLOW changes this by being a tightly coupled scripting library that provides support for GSFLOW, PRMS, and MODFLOW. Custom modules for both GSFLOW and PRMS are included in this library. MODFLOW support is provided by wrapping the Flopy package (Bakker and others, 2021) with GSFLOW specific code. Together, these three pieces create a single integrated scripting package that helps to standardize and streamline model development and calibration.

This is the development repository for pyGSFLOW. Official USGS releases can be found here

API Documentation

pyGSFLOW API documentation can be found @

https://pygsflow.github.io/pygsflowdocs/

Examples

Basic examples can be found in the Tutorial Examples tab of the pyGSFLOW API
documentation at https://pygsflow.github.io/pygsflowdocs/tutorials.html#

Interactive jupyter notebook example problems can be found in the examples directory.
https://github.com/pygsflow/pygsflow/tree/master/examples

Requirements

Version 1.1.0 (Master branch and from pypi)

  1. Windows or Linux operating system (GSFLOW is not currently compiled for MacOS)
  2. Python 3.6 or greater
  3. FloPy 3.3.4 or greater, note for Python 3.6 use (pip install flopy==3.3.4)
  4. NetCdf4 (optional, required for netcdf exporting and autotesting) (pip install netcdf4)

Version 1.1.1 (Develop branch)

  1. Windows or Linux operating system (GSFLOW is not currently compiled for MacOS)
  2. Python 3.6 or greater
  3. Flopy 3.3.6 or greater (pip install flopy) note for Python 3.6 use (pip install flopy==3.3.4)
  4. NetCdf4 (optional, required for netcdf exporting and autotesting) (pip install netcdf4)
  5. Rasterio and rasterstats (optional, required for raster resampling and model building methods)(pip install rasterio rasterstats)

Installation

Version 1.1.0 (Master branch and from pypi)

The pygsflow repository can be installed using pip.
To install the release version, open a terminal, command prompt, or anaconda prompt and type:

pip install pygsflow

Version 1.1.1 (Develop version with most recent updates)

To install the development version, open a terminal, command prompt or anaconda promt and type:

pip install https://github.com/pygsflow/pygsflow/zipball/develop

Alternatively the user can download a copy of the repository, open a command prompt or anaconda promt terminal, cd into the trunk directory and type:

pip install .

Additional Linux installation instructions

To use the default version of GSFLOW for Linux that is distributed with pyGSFLOW the user
needs to set the permissions of the GSFLOW binary program to execute. From
a terminal window cd into the trunk/bin directory of the pyGSFLOW repository and
write:

chmod u+x gsflow
chmod u+x mfnwt
chmod u+x CRT_1.3.1

In some cases symbolic links to gfortran-10 must be set up this can be done with

sudo ln -fs /usr/bin/gfortran-10 /usr/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/bin/g++

Authors

Ayman Alzraiee, Joshua Larsen, Donald Martin, Rich Niswonger

How to Cite

pyGSFLOW builder methods citation

Larsen, J. D., Alzraiee, A. H., Martin, D. Niswonger, R. G., 2022, Rapid model development for
GSFLOW with Python and pyGSFLOW. Frontiers in Earth Science, 10.

General pyGSFLOW citation

Larsen, J. D., Alzraiee, A., Niswonger, R. G., 2022, Integrated hydrologic model development
and postprocessing for GSFLOW using pyGSFLOW. Journal of Open Source Software, 7(72), 3852.

Code citation

Larsen, J. D., Alzraiee, A., Niswonger, R., 2021, pyGSFLOW v1.0.0: U.S. Geological
Survey Software Release, 2 July 2021, https://doi.org/10.5066/P9NPZ5AD

IPDS number

IP-128405

Contributing

Please see Contributing.md

Running Autotests Locally

pyGSFLOW uses github actions CI to automatically test code for each commit and pull request. These tests can also be run locally.
To run tests locally, navigate to pygsflow's root directory, open a command prompt, anaconda prompt, or terminal window:

with nosetests:

cd autotest
nosetests -v

with pytest:

cd autotest
pytest

How to find pygsflow's root directory:

Open a python terminal and type:

import gsflow
print(gsflow.__file__)

Project History

This project is a refinement and continuation of the original pygsflow repository at:

https://github.com/aymanalz/pygsflow

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


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 171
Total Committers: 5
Avg Commits per committer: 34.2
Development Distribution Score (DDS): 0.023

Commits in past year: 32
Committers in past year: 1
Avg Commits per committer in past year: 32.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Joshua Larsen j****n@u****v 167
lxy 3****7@q****m 1
gsflowpython 4****n 1
Payton Gardner 4****w 1
Patrick McCarthy 1****s 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 29
Total pull requests: 20
Average time to close issues: 23 days
Average time to close pull requests: 2 months
Total issue authors: 10
Total pull request authors: 7
Average comments per issue: 1.03
Average comments per pull request: 0.45
Merged pull request: 13
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 6.0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/pygsflow/pygsflow

Top Issue Authors

  • jlarsen-usgs (17)
  • ccalvocm (3)
  • mrush-usgs (2)
  • thurber (1)
  • zhuzhufeifei (1)
  • jptraylor (1)
  • mdbartos (1)
  • SwenMeyer1978 (1)
  • boatmorrow (1)
  • sinloss (1)

Top Pull Request Authors

  • jlarsen-usgs (13)
  • jonathanqv (2)
  • pmccarthy-usgs (1)
  • AlirezaKavousi (1)
  • spwika-usgs (1)
  • boatmorrow (1)
  • sinloss (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

pypi.org: pygsflow

pyGSFLOW is a python package to create, run, and post-process GSFLOW-based models

  • Homepage: https://github.com/pygsflow/pygsflow
  • Documentation: https://pygsflow.readthedocs.io/
  • Licenses: MIT license
  • Latest release: 1.1.0 (published almost 3 years ago)
  • Last Synced: 2025-04-25T13:03:35.047Z (1 day ago)
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 190 Last month
  • Rankings:
    • Dependent packages count: 7.31%
    • Forks count: 9.144%
    • Stargazers count: 12.467%
    • Average: 19.078%
    • Dependent repos count: 22.088%
    • Downloads: 44.383%
  • Maintainers (1)

Dependencies

etc/environment.yml conda
  • affine
  • appdirs
  • coverage
  • descartes
  • fiona
  • geos 3.8.1.*
  • matplotlib
  • netcdf4
  • numpy
  • pandas
  • pycrs
  • pyproj
  • pyshp
  • rasterio
  • requests
  • scipy
  • shapely
.github/workflows/ci.yml actions
  • actions/cache v2.1.0 composite
  • actions/checkout v2.3.4 composite
  • codecov/codecov-action v1.5.0 composite
  • conda-incubator/setup-miniconda v2.1.1 composite
  • nelonoel/branch-name v1.0.1 composite
.github/workflows/joss_journal.yml actions
  • actions/checkout v2.3.4 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite

Score: 10.58050535116619