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 hspf_reader downloads 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.0.2.tar.gz (861.2 kB view details)

Uploaded Source

Built Distribution

hspf_reader-2.0.2-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hspf_reader-2.0.2.tar.gz
  • Upload date:
  • Size: 861.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hspf_reader-2.0.2.tar.gz
Algorithm Hash digest
SHA256 0aee1da85cd39e899ba2ae38dd31f3a156d9a8ac898cfb73dfc57113a6da643f
MD5 f690e73fac0a88ff94bcd6c420d0a124
BLAKE2b-256 ce823c003afe88b8c23e96eb675846989cc694c2dd3938f87fea42089c50dcdc

See more details on using hashes here.

File details

Details for the file hspf_reader-2.0.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for hspf_reader-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da4e1a0480872f2c8c432a1817b19ef5b12182a4ae95b83e0d9b3c4213d1110a
MD5 9c59d5406de197305684c558d50e0b0a
BLAKE2b-256 736a08ec9383b9f23eb3e0fa7fe4967f919da3b7b5295e8f89755c3cfa5fc896

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