Skip to main content

Command line script and Python library to read HSPF WDM, binary, and plotgen time series.

Project description

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

hspf_reader - Quick Guide

The hspf_reader is a pure Python module and command line script to read HSPF time-series from WDM files, HSPF binary files, and HSPF plotgen files.

Use “wdmtoolbox” to create, examine, read, and write to WDM files.

Use “hspfbintoolbox” to catalog and read HSPF binary output files.

Installation

pip

pip install hspf_reader

conda

conda install -c conda-forge hspf_reader

Usage - Command Line

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

usage: hspf_reader [-h]
                 {wdm, hbn, plotgen, about} ...

positional arguments:
  {wdm, hbn, plotgen, about}

wdm
    Read HSPF WDM files.
hbn
    Read HSPF binary files.
plotgen
    Read HSPF plotgen files.
about
    Display version number and system information.

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

The output time-series data 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.

Simply import hspf_reader:

from hspf_reader import hspf_reader

# Then you could call the functions
ntsd = hspf_reader.wdm('wdm_file.wdm', 202)

# Once you have a PANDAS DataFrame you can use that as input to other
# hspf_reader functions.
ntsd = hspf_reader.hbn('hbn_file.hbn', "yearly", [,,,"TAET"])

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_reader-2.1.0.tar.gz (863.2 kB view details)

Uploaded Source

Built Distribution

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

hspf_reader-2.1.0-py3-none-any.whl (63.5 kB view details)

Uploaded Python 3

File details

Details for the file hspf_reader-2.1.0.tar.gz.

File metadata

  • Download URL: hspf_reader-2.1.0.tar.gz
  • Upload date:
  • Size: 863.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hspf_reader-2.1.0.tar.gz
Algorithm Hash digest
SHA256 7f9e3bfd88283d2b52281093a54d59b246a6a5ee982bce0acb4bfd5769622a3c
MD5 195394dbe13e2a8d425719d56fe5fa62
BLAKE2b-256 fb901ef07d249202450990be13bb088db513f652b9f0ebcf56f2a40727085c81

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspf_reader-2.1.0.tar.gz:

Publisher: pypi-package.yml on timcera/hspf_reader

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_reader-2.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for hspf_reader-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6a5a1251b318e9f991ccfc2da5fafed821297c3a7e9424d324d1970eca5077f
MD5 0a40b54a32973a66a85830cb9fae7eeb
BLAKE2b-256 d7ecc8205d2641d787e3dbe9e5056e36cd48c16a74cb8bcc5d4c7780404e7542

See more details on using hashes here.

Provenance

The following attestation bundles were made for hspf_reader-2.1.0-py3-none-any.whl:

Publisher: pypi-package.yml on timcera/hspf_reader

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