Skip to main content

Reads Hydrological Simulation Program - FORTRAN binary output files.

Project description

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

Documentation for hspfbintoolbox

The hspfbintoolbox is a Python script and library of functions to read Hydrological Simulation Program Fortran (HSPF) binary files and print to screen. The time series can then be redirected to file, or piped to other command line programs like tstoolbox.

Requirements

  • python 3.7 or later

  • tstoolbox - utilities to process time-series

Installation

pip

pip install hspfbintoolbox

conda

conda install -c conda-forge hspfbintoolbox

Usage - Command Line

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

catalog

Prints out a catalog of data sets in the binary file.

extract

Prints out data to the screen from a HSPF binary output file.

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 hspfbintoolbox:

import hspfbintoolbox

# Then you could call the functions
ntsd = hspfbintoolbox.extract('tests/test.hbn', 'yearly', ',905,,AGWS')

# Once you have a PANDAS DataFrame you can use that as input.
ntsd = tstoolbox.aggregate(statistic='mean', agg_interval='daily', input_ts=ntsd)

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

hspfbintoolbox-9.0.8.tar.gz (17.2 MB view details)

Uploaded Source

Built Distribution

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

hspfbintoolbox-9.0.8-py3-none-any.whl (63.7 kB view details)

Uploaded Python 3

File details

Details for the file hspfbintoolbox-9.0.8.tar.gz.

File metadata

  • Download URL: hspfbintoolbox-9.0.8.tar.gz
  • Upload date:
  • Size: 17.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hspfbintoolbox-9.0.8.tar.gz
Algorithm Hash digest
SHA256 2f3751c9ee56f11db98c7d0c0e062d8b57e36ef21503486d2d99b476bcccaa44
MD5 3c3e5313f322e6c103becdac7d481ea8
BLAKE2b-256 667c2e4b1b56887234700b9c7fb68d0f9298d99e334a1acf815f127522718c04

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspfbintoolbox-9.0.8.tar.gz:

Publisher: pypi-package.yml on timcera/hspfbintoolbox

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

File details

Details for the file hspfbintoolbox-9.0.8-py3-none-any.whl.

File metadata

  • Download URL: hspfbintoolbox-9.0.8-py3-none-any.whl
  • Upload date:
  • Size: 63.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hspfbintoolbox-9.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 88951a139fd4af2f0f51033a4a03e4872364d94a7146e84f80303e42969c64f3
MD5 84846bac34d5f75c2d34272e92d97ee1
BLAKE2b-256 5727ae2426c102eab7dc34fb083bb166d209e8ffcd7dc90d0ca8a76d8c658515

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspfbintoolbox-9.0.8-py3-none-any.whl:

Publisher: pypi-package.yml on timcera/hspfbintoolbox

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