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

Command Line

Help:

hspf_reader --help

about

$ hspf_reader about --help
usage: hspf_reader about [-h]

Display version number and system information.

options:
  -h, --help  show this help message and exit

hbn

$ hspf_reader hbn --help
usage: hspf_reader hbn [-h] [--start_date START_DATE] [--end_date END_DATE]
                       [--sort_columns] [--tablefmt TABLEFMT]
                       [--float_format FLOAT_FORMAT]
                       hbnpath interval [labels ...]

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

positional arguments:
  hbnpath               The HSPF binary output file.  This file must have been created from
                        a completed model run.
  interval              One of 'yearly', 'monthly', 'daily', or 'bivl'.  The 'bivl' option
                        is a sub-daily interval defined in the UCI file.  Typically 'bivl'
                        is used for hourly output, but can be set to any value that evenly
                        divides into a day and needs to match the BIVL setting in the model
                        run.
  labels                The remaining arguments uniquely identify a time-series in the
                        binary file.  The format is
                        'OPERATIONTYPE,ID,VARIABLEGROUP,VARIABLE'.
                        
                        For example: 'PERLND,101,PWATER,UZS IMPLND,101,IWATER,RETS'
                        
                        Leaving a section without an entry will wild card that
                        specification.  To get all the PWATER variables for PERLND 101 the
                        label would use::
                        
                            PERLND,101,PWATER,
                        
                        To get TAET for all PERLNDs::
                        
                            PERLND,,,TAET
                        
                        Note that there are spaces ONLY between label specifications not
                        within the labels themselves.
                        
                        +-----------------------+-------------------------------+
                        | OPERATIONTYPE         | VARIABLEGROUP                 |
                        +=======================+===============================+
                        | PERLND                | ATEMP, SNOW, PWATER, SEDMNT,  |
                        |                       | PSTEMP, PWTGAS, PQUAL,        |
                        |                       | MSTLAY, PEST, NITR, PHOS,     |
                        |                       | TRACER                        |
                        +-----------------------+-------------------------------+
                        | IMPLND                | ATEMP, SNOW, IWATER, SOLIDS,  |
                        |                       | IWTGAS, IQUAL                 |
                        +-----------------------+-------------------------------+
                        | RCHRES                | HYDR, CONS, HTRCH, SEDTRN,    |
                        |                       | GQUAL, OXRX, NUTRX, PLANK,    |
                        |                       | PHCARB, INFLOW, OFLOW, ROFLOW |
                        +-----------------------+-------------------------------+
                        | BMPRAC                | Not used Have to leave        |
                        |                       | VARIABLEGROUP as a wild card. |
                        |                       | For example,                  |
                        |                       | 'BMPRAC,875,,RMVOL'           |
                        +-----------------------+-------------------------------+
                        
                        The Time Series Catalog in the HSPF Manual lists all of the
                        variables in each of these VARIABLEGROUPs.  For BMPRAC, all of the
                        variables in all Groups in the Catalog are available in the unnamed
                        (blank) Group.
                        
                        ID is the operation type identification number specified in the UCI
                        file.
                        
                        Here, the user can specify:
                        
                        - a single ID number to match (1-999)
                        - no entry, matching all ID's in the hbn file
                        - a range, specified as any combination of integers and
                          groups of integers marked as "start:end", with multiple
                          allowed sub-ranges separated by the "+" sign.
                        
                        +------------------+-------------------------+
                        | Example Label ID | Expands to:             |
                        +==================+=========================+
                        | 1:10             | 1,2,3,4,5,6,7,8,9,10    |
                        +------------------+-------------------------+
                        | 11:14+19:22      | 11,12,13,14,19,20,21,22 |
                        +------------------+-------------------------+
                        | 3:5+7            | 3,4,5,7                 |
                        +------------------+-------------------------+

options:
  -h, --help            show this help message and exit
  --start_date START_DATE
                        [optional, defaults to first date in time-series, input filter]
                        
                        The start_date of the series in ISOdatetime format, or 'None' for
                        beginning.
  --end_date END_DATE   [optional, defaults to last date in time-series, input filter]
                        
                        The end_date of the series in ISOdatetime format, or 'None' for
                        end.
  --sort_columns        [optional, default is False]
                        
                        If set to False will maintain the columns order of the labels.  If
                        set to True will sort all columns by their columns names.
  --tablefmt TABLEFMT   [optional, default is 'cvs_nos']
                        
                        The table format.  Can be one of 'csv', 'tsv', 'csv_nos', 'tsv_nos',
                        'plain', 'simple', 'github', 'grid', 'fancy_grid', 'pipe', 'orgtbl',
                        'jira', 'presto', 'psql', 'rst', 'mediawiki', 'moinmoin', 'youtrack',
                        'html', 'latex', 'latex_raw', 'latex_booktabs' and 'textile'.
  --float_format FLOAT_FORMAT
                        [optional, default is 'g']
                        
                        The format for floating point numbers in the output table.

plotgen

$ hspf_reader plotgen --help
usage: hspf_reader plotgen [-h] [--start_date START_DATE]
                           [--end_date END_DATE] [--tablefmt TABLEFMT]
                           [--float_format FLOAT_FORMAT]
                           [plotgen_args ...]

Print out plotgen data to the screen with ISO-8601 dates.

positional arguments:
  plotgen_args          Path and plotgen file name
                        followed by space separated list of
                        fields. For example::
                        
                            'file.plt 234 345 456'
                        
                            OR
                            `file.plt` can be space separated sets of 'plotgenpath,field'.
                        
                            'file.plt,FIELD1 file2.plt,FIELD2 file.plt,FIELD3'

options:
  -h, --help            show this help message and exit
  --start_date START_DATE
                        [optional, defaults to first date in time-series, input filter]
                        
                        The start_date of the series in ISOdatetime format, or 'None' for
                        beginning.
  --end_date END_DATE   [optional, defaults to last date in time-series, input filter]
                        
                        The end_date of the series in ISOdatetime format, or 'None' for
                        end.
  --tablefmt TABLEFMT   [optional, default is 'cvs_nos']
                        
                        The table format.  Can be one of 'csv', 'tsv', 'csv_nos', 'tsv_nos',
                        'plain', 'simple', 'github', 'grid', 'fancy_grid', 'pipe', 'orgtbl',
                        'jira', 'presto', 'psql', 'rst', 'mediawiki', 'moinmoin', 'youtrack',
                        'html', 'latex', 'latex_raw', 'latex_booktabs' and 'textile'.
  --float_format FLOAT_FORMAT
                        [optional, default is 'g']
                        
                        The format for floating point numbers in the output table.

wdm

$ hspf_reader wdm --help
usage: hspf_reader wdm [-h] [--start_date START_DATE] [--end_date END_DATE]
                       [--tablefmt TABLEFMT] [--float_format FLOAT_FORMAT]
                       [wdmpath ...]

Extract DSN data from the WDM file.

positional arguments:
  wdmpath               Path and WDM file name
                        followed by space separated list of
                        DSNs. For example::
                        
                            'file.wdm 234 345 456'
                        
                            OR
                            `wdmpath` can be space separated sets of 'wdmpath,dsn'.
                        
                            'file.wdm,101 file2.wdm,104 file.wdm,227'

options:
  -h, --help            show this help message and exit
  --start_date START_DATE
                        [optional, defaults to first date in time-series, input filter]
                        
                        The start_date of the series in ISOdatetime format, or 'None' for
                        beginning.
  --end_date END_DATE   [optional, defaults to last date in time-series, input filter]
                        
                        The end_date of the series in ISOdatetime format, or 'None' for
                        end.
  --tablefmt TABLEFMT   [optional, default is 'cvs_nos']
                        
                        The table format.  Can be one of 'csv', 'tsv', 'csv_nos', 'tsv_nos',
                        'plain', 'simple', 'github', 'grid', 'fancy_grid', 'pipe', 'orgtbl',
                        'jira', 'presto', 'psql', 'rst', 'mediawiki', 'moinmoin', 'youtrack',
                        'html', 'latex', 'latex_raw', 'latex_booktabs' and 'textile'.
  --float_format FLOAT_FORMAT
                        [optional, default is 'g']
                        
                        The format for floating point numbers in the output table.