Skip to main content

pywatershed is a Python package for hydrologic modeling

Project description

pywatershed

ci-badge codecov-badge Documentation Status asv Formatted with black

Available on pypi PyPI Status PyPI Versions

Anaconda-Server Badge Anaconda-Server Badge

WholeTale

Table of Contents

About

Welcome to the pywatershed repository!

Pywatershed is Python package for simulating hydrologic processes motivated by the need to modernize important, legacy hydrologic models at the USGS, particularly the Precipitation-Runoff Modeling System (PRMS, Markstrom et al., 2015) and its role in GSFLOW (Markstrom et al., 2008). The goal of modernization is to make these legacy models more flexible as process representations, to support testing of alternative hydrologic process conceptualizations, and to facilitate the incorporation of cutting edge modeling techniques and data sources. Pywatershed is a place for experimentation with software design, process representation, and data fusion in the context of well-established hydrologic process modeling.

For more information on the goals and status of pywatershed, please see the pywatershed docs.

Installation

pywatershed uses Python 3.9 or 3.10.

The pywatershed package is available on PyPI but installation of all dependencies sets (lint, test, optional, doc, and all) may not be reliable on all platforms.

The pywatershed package is available on conda-forge. The installation is the quickest way to get up and running by provides only the minimal set of dependencies (not including Jupyter nor all packages needed for running the example notebooks, also not suitable for development purposes).

We recommend the following installation procedures to get fully-functional environments for running pywatershed and its example notebooks. We strongly recommend using Mambato first instal dependencies from the environment_y_jupyter.yml file in the repository before installing pywatershed itself. Mamba will be much faster than Ananconda (but the conda command could also be used).

If you wish to use the stable release, you will use main in place of <branch> in the following commands. If you want to follow development, you'll use develop instead.

Without using git (directly), you may:

curl -L -O https://raw.githubusercontent.com/EC-USGS/pywatershed/<branch>/environment_w_jupyter.yml
mamba env create -f environment_w_jupyter.yml
conda activate pws
pip install git+https://github.com/EC-USGS/pywatershed.git@<branch>

Or to use git and to be able to develop:

git clone https://github.com/EC-USGS/pywatershed.git
cd pywatershed
mamba env create -f environment_w_jupyter.yml
activate pws
pip install -e .

(If you want to name the environment other than the default pws, use the command mamba env update --name your_env_name --file environment_w_jupyter.yml --prune you will also need to activate this environment by name.)

We install the environment_w_jupyter.yml to provide all known dependencies including those for running the example notebooks. (The environment.yml does not contain Jupyter or JupyterLab because this interferes with installation on WholeTale, see Getting Started section below.)

Getting started / Example notebooks

Please note that you can browse the API reference, developer info, and index in the pywatershed docs. But the best way to get started with pywatershed is to dive into the example notebooks.

For introductory example notebooks, look in the examples/ directory in the repository. Numbered starting at 00, these are meant to be completed in order. Numbered starting at 00, these are meant to be completed in order. Notebook outputs are not saved in Github. But you can run these notebooks locally or using WholeTale (an NSF funded project supporting logins from many institutions, free but sign-up or log-in required) where the pywatershed environment is all ready to go:

WholeTale

WholeTale will give you a JupyterLab running in the root of this repository. You can navigate to examples/ and then open and run the notebooks of your choice. The develop container may require the user to update the repository (git pull origin) to stay current with development.

Non-numbered notebooks in examples/ cover additional topics. These notebooks are not yet covered by testing and you may encounter some issues. In examples/developer/ there are notebooks of interest to developers who may want to learn about running the software tests.

Community engagement

We value your feedback! Please use discussions or issues on Github. For more in-depth contributions, please start by reading over the pywatershed DEVELOPER.md and CONTRIBUTING.md guidelines.

Thank you for your interest.

Disclaimer

This information is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The information has not received final approval by the U.S. Geological Survey (USGS) and 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 information.

From: https://www2.usgs.gov/fsp/fsp_disclaimers.asp#5

This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy

Although this software program has been used by the USGS, no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith. This software is provided "AS IS."

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywatershed-1.0.0.tar.gz (14.1 MB view details)

Uploaded Source

Built Distribution

pywatershed-1.0.0-py3-none-any.whl (14.1 MB view details)

Uploaded Python 3

File details

Details for the file pywatershed-1.0.0.tar.gz.

File metadata

  • Download URL: pywatershed-1.0.0.tar.gz
  • Upload date:
  • Size: 14.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pywatershed-1.0.0.tar.gz
Algorithm Hash digest
SHA256 65c9bab1a715366895251850c25789562bb11f4d044006b00e53d4f667b8f9fe
MD5 403099f2b78d3d1f1d72161026ef056b
BLAKE2b-256 2aca80923a4c4e3ddb556575cfcb44b5119b7f714e13f08c3f692fbf6295499f

See more details on using hashes here.

File details

Details for the file pywatershed-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pywatershed-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pywatershed-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f206a720c3f39f60fb45553c57a6fb56955c0524e9e705efef87e09f90e032
MD5 ba3e0fcef733db253947f1c88ce2ec74
BLAKE2b-256 552f2746a2b48a0684e9ca41da5f306a0ef48ceb7fbcdaf5dc22bb5ebc2ee0bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page