Package: pygsflow
pygsflowpyGSFLOW is a python package to Create, Read, Write, Edit, and Visualize GSFLOW modelsGSFLOW 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 theFlopypackage (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 foundhereAPI DocumentationpyGSFLOW API documentation can be found @https://pygsflow.github.io/pygsflowdocs/ExamplesBasic examples can be found in the Tutorial Examples tab of the pyGSFLOW API
documentation athttps://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/examplesRequirementsVersion 1.1.0(Master branch and from pypi)Windows or Linux operating system (GSFLOW is not currently compiled for MacOS)Python 3.6 or greaterFloPy 3.3.4 or greater,notefor Python 3.6 use (pip install flopy==3.3.4)NetCdf4 (optional, required for netcdf exporting and autotesting) (pip install netcdf4)Numba (optional, but recommended for raster resampling routines) (pip install numba)Version 1.1.1(Develop branch)Windows or Linux operating system (GSFLOW is not currently compiled for MacOS)Python 3.6 or greaterFlopy 3.3.4 or greater (pip install flopy)notefor Python 3.6 use (pip install flopy==3.3.4)NetCdf4 (optional, required for netcdf exporting and autotesting) (pip install netcdf4)Numba (optional, but recommended for raster resampling routines) (pip install numba)InstallationVersion 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 pygsflowVersion 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/developAlternatively 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 instructionsTo 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.1In some cases symbolic links to gfortran-10 must be set up this can be done withsudo 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++AuthorsAyman Alzraiee, Joshua Larsen, Donald Martin, Rich NiswongerHow to CiteLarsen, 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.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/P9NPZ5ADIPDS numberIP-128405ContributingPlease seeContributing.mdRunning Autotests LocallypyGSFLOW 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 -vwith pytest:cd autotest
pytestHow to find pygsflow's root directory:Open a python terminal and type:importgsflowprint(gsflow.__file__)Project HistoryThis project is a refinement and continuation of the original pygsflow repository at:https://github.com/aymanalz/pygsflowDisclaimerThis 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