Skip to main content

Command line script and Python library to develop water balance from HSPF models

Project description

Tests Test Coverage Latest release BSD-3 clause license hspf_utils downloads PyPI - Python Version

hspf_utils - Quick Guide

The hspf_utils is a command line script and Python library of utilities to work with the Hydrological Simulation Program - FORTRAN (HSPF). Uses pandas (http://pandas.pydata.org/) or numpy (http://numpy.scipy.org) for any heavy lifting.

Requirements

  • hspfbintoolbox - Utility to extract time-series from HSFP binary output files; collected and installed by ‘pip’ or ‘easy_install’ command.

Installation

Should be as easy as running pip install hspf_utils or conda install -c conda-forge hspf_utils at any command line.

Usage - Command Line

Just run ‘hspf_utils –help’ to get a list of subcommands:

usage: hspf_utils [-h] {about,detailed,summary,mapping,parameters} ...

positional arguments:
  {about,detailed,summary,mapping,parameters}
    about               Display version number and system information.
    detailed            Develops a detailed water balance.
    summary             Develops a summary water balance.
    mapping             Develops a csv file appropriate for joining to a GIS
                        layer.
    parameters          Develops a table of parameter values.

optional arguments:
  -h, --help            show this help message and exit

For the subcommands that output data it is printed to the screen and you can then redirect to a file.

Usage - API

You can use all of the command line subcommands as functions. The function signature is identical to the command line subcommands. The return is always a PANDAS DataFrame. Input can be a CSV or TAB separated file, or a PANDAS DataFrame and is supplied to the function via the ‘input_ts’ keyword.

Simply import hspf_utils:

import hspf_utils

# Then you could call the functions

ntsd = hspf_utils.summary("test.hbn", uci="test.uci")

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

hspf_utils-6.0.10.tar.gz (17.0 MB view details)

Uploaded Source

Built Distribution

hspf_utils-6.0.10-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file hspf_utils-6.0.10.tar.gz.

File metadata

  • Download URL: hspf_utils-6.0.10.tar.gz
  • Upload date:
  • Size: 17.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hspf_utils-6.0.10.tar.gz
Algorithm Hash digest
SHA256 1f91076592bf9096129f3f63199aa80e69874e8e265eb0cd0a35abe488f875f6
MD5 d98f5508c909dff9a46b166c910c6d3d
BLAKE2b-256 f90f44b25ab238d02253faab3503c71ce6e83e6353fa82a0d08cf0efb6021e2e

See more details on using hashes here.

File details

Details for the file hspf_utils-6.0.10-py3-none-any.whl.

File metadata

  • Download URL: hspf_utils-6.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hspf_utils-6.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b75d30cca62668db3da041895b18a7f70b902733ae77d24c6f1fe9301c205a90
MD5 5191c1615cfa78c210ae620bebde9ebd
BLAKE2b-256 5a9bcc5f9a3469997b5c5551e0d0a44a5bd078627e1e7229d5b91bde985cae63

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