Skip to main content

A package to modify StateMod's input and output files for exploratory modeling

Project description

build codecov Static Badge DOI pre-commit

statemodify

statemodify is an open-source Python package that provides users with a way to easily modify StateMod's input and output files to enable exploratory modeling. StateMod is written in Fortran and conducting high-performance computing enabled ensemble exploratory modeling with it requires a systematic and automated approach. Due to the model’s complexity, there are also nontrivial computational challenges in comprehensively sampling the model’s input space and managing the outputs of interest, especially for large ensembles. These challenges limit its use among researchers and broader operational users. Thus, we developed statemodify, a Python package and framework that allows users to easily interact with StateMod using Python exclusively. The user can implement statemodify functions to manipulate StateMod’s input files to develop alternative demand, hydrology, infrastructure, and institutional scenarios for Colorado’s West Slope basins and run these scenarios through StateMod. We also create methods to compress and extract model output into easily readable data frames and provide guidance on analysis and visualization of output in a series of Jupyter notebooks that step through the functionality of the package.

Documentation

Full documentation and tutorials are provided here.

Installation

Install statemodify using pip:

pip install statemodify

Online quickstarter tutorials

Take a statemodify for a spin in one of our no-install Jupyter quickstarters here:

  • Notebook 1: Getting Started and using the DDM and DDR modification functions in the San Juan Subbasin. This notebook has more general intro information on statemodify and shows how changes to demand and water rights can lead to changes to user shortages in the San Juan Subbasin.

  • Notebook 2: Using the EVA modification functions in the Gunnison Subbasin. This notebook looks at how changes in evaporation in reservoirs in the Gunnison subbasin lead to changes to reservoir levels.

  • Notebook 3: Using the RES modification function in the Upper Colorado Subbasin. This notebook looks at how changes in storage in reservoirs in the Upper Colorado subbasin lead to changes to user shortages.

  • Notebook 4: Using the XBM and IWR modification functions across all basins. This notebook debuts the stationary Hidden Markov Model to generate alternative streamflow scenarios across the basins.

  • Notebook 5: Sampling multiple uncertainties. This notebook demonstrates how to create a global Latin hypercube sample to consider multiple uncertainties in a basin.

Contributing to statemodify

Whether you find a typo in the documentation, find a bug, or want to develop functionality that you think will make statemodify more robust, you are welcome to contribute! See the full contribution guidelines in our online documentation.

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

statemodify-0.2.tar.gz (25.0 MB view details)

Uploaded Source

File details

Details for the file statemodify-0.2.tar.gz.

File metadata

  • Download URL: statemodify-0.2.tar.gz
  • Upload date:
  • Size: 25.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for statemodify-0.2.tar.gz
Algorithm Hash digest
SHA256 825ab5cc18c509a81c98ac2ec12ed1e96d1d073db8f329fec3608ac762e8a556
MD5 a7b21b2084234b157ea5174d05b8af27
BLAKE2b-256 61ba3a29be88cdfa7b75e570a94038b9d6ad00e91de4b931c01965b5f7c1d318

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