Skip to main content

Reads Hydrological Simulation Program - FORTRAN binary output files.

Project description

Tests Test Coverage Latest release BSD-3 clause license hspfbintoolbox downloads 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.6.tar.gz (17.2 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hspfbintoolbox-9.0.6.tar.gz
Algorithm Hash digest
SHA256 4c528c3df14833b277452737971fa197cf5a4f883d0494cc3d9729af375b6c68
MD5 1e6bea88ef92eb3e5ee825415bed1f2c
BLAKE2b-256 9dfa159b9158ce8d68153c5296cc33c383dc2bb4345fca103708c08c5b2a4cd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hspfbintoolbox-9.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fbf27478e41bee773b226e150fcb50aeba298ff7fb4c9159ab0c87b965eb793a
MD5 1614df3d12a8a5614a10dce25b7da314
BLAKE2b-256 10e4832e08900128a411b073f596e0cf1424a581272dd3b99a3f2312378c2c30

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