prms-python

A Python package with tools for the PRMS hydrologic model.


License
BSD-3-Clause
Install
pip install prms-python==0.1

Documentation

PRMS-Python

PRMS-Python provides a Python interface to PRMS data files and manages PRMS simulations. This module aims to improve the efficiency of PRMS workflows by giving access to PRMS data structures while providing "pythonic" tools to do scenario-based PRMS simulations. By "scenario-based" we mean testing model hypotheses associated with model inputs, outputs, and model structure. For example, parameter sensitivity analysis, where each "scenario" is an iterative perturbation of one or many parameters. Another example "scenario-based" modeling exercise would be climate scenario modeling: what will happen to modeled outputs if the input meteorological data were to change?

Installation

PRMS-Python versions are available on the Python Package Index PyPI and can be installed and upgraded using pip:

pip install prms-python

Alternatively clone-then-pip:

git clone https://github.com/PRMS-Python/PRMS-Python.git
cd PRMS-Python

then

pip install --editable .

Another option is to download the source code as a zip file, unzip it and within the PRMS-Python root directory run:

python setup.py install

Usage and documentation

We reccomend starting with the "getting started" Jupyter notebook for file structure rules that PRMS-Python uses and then moving on to other example notebooks in the notebooks directory. Online documentation is available here.

Building documentation

This project uses the Sphinx documentation engine for Python The documentation source is located in docs/source. Eventually we can wrap the following steps into a script. But for now, to build the documentation, go to the docs/ directory and run

make html

If it fails because of missing dependencies, just install the dependencies it says it's missing. Publishing the docs is now done automatically with any commits are pushed to the master branch.

Unit tests

I run them using nose but that's not required. From the root repo directory

nosetests -v

Contribute

We welcome anyone seriously interested in contributing to PRMS-Python to do so in anyway they see fit. If you are not sure where to begin you can look for current issues or submit a new issue here. You may also fork PRMS-Python and submit a pull request if you would like to offer your direct changes to the package.