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 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.1.3.tar.gz (17.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hspf_utils-6.1.3-py3-none-any.whl (69.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hspf_utils-6.1.3.tar.gz
  • Upload date:
  • Size: 17.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hspf_utils-6.1.3.tar.gz
Algorithm Hash digest
SHA256 e1e82c960b99e18149ff0f0a1f0174251626421df7b519600b547b6154dbebbf
MD5 b66879360786368bc3327bcc5ba9dc7f
BLAKE2b-256 d855862febf2aa4c5ad5e9e6bf6a5b66ade00cbaa8263d0903366d9c9b2f19bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspf_utils-6.1.3.tar.gz:

Publisher: pypi-package.yml on timcera/hspf_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: hspf_utils-6.1.3-py3-none-any.whl
  • Upload date:
  • Size: 69.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hspf_utils-6.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ade97e09626fd90079af8d011f8d5ef20d74800b559d633e0d431d8f102848d4
MD5 ccc964c0eec2a4b7d77b81556515a667
BLAKE2b-256 a2879dab8b644da0f3b0ab6a07bd99cd7972f2d3d1606bc5ef81bfd941c8834c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspf_utils-6.1.3-py3-none-any.whl:

Publisher: pypi-package.yml on timcera/hspf_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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