hspf_utils.hspf_utils.summary

hspf_utils.hspf_utils.summary(hbn, uci=None, year=None, modulus=20, constituent='flow', qualnames='')

Develops a summary mass balance.

Parameters:
  • hbn (str) – This is the binary output file containing PERLND and IMPLND information. This should be the binary output file created by the uci file.

  • uci

    [optional, defaults to None]

    This uci file will be read to determine all of the areas and other aspects of the model. If available it will read the land cover names from the PERLND GEN-INFO table.

    The uci keyword and file is required if you want the water balance area-weighted between land covers.

    WARNING: The areas used come only from the SCHEMATIC block and if areas are adjusted by SPECIAL ACTIONS those changes are not used in the mass balance.

  • year

    [optional, defaults to None]

    If None the water balance would cover the period of simulation. Otherwise the year for the water balance.

  • modulus (int) –

    [optional, defaults to 20]

    Usual setup of a HSPF model has PERLND 1, 21, 41, …etc. represent land cover 1 in different sub-watersheds and 2, 22, 42, …etc represent land cover 2 in different sub-watersheds, …etc.

    The remainder of the PERLND label divided by the modulus is the land cover number.

  • constituent (str) –

    [optional, defaults to ‘flow’]

    The constituent to summarize in the table.

    Currently available constituents are: ‘flow’ for PWATER/IWATER and ‘qual’ for PQUAL/IQUAL.

    if ‘qual’ is chosen, then the option ‘qualnames’ specifies the names to be found in the HBN file.

  • qualnames (str) –

    [optional, defaults to ‘’]

    If ‘constituent’ is ‘qual, then this is a comma-separated list of constituent names to be found in the HBN file.

    Example:

    –qualnames ‘TOTAL N’,’TOTAL P’

    This will find PQUAL/IQUAL variables named ‘SOQUAL-TOTAL N’, etc, which occurs if the QUALID in QUAL-PROPS is ‘TOTAL N’.

  • tablefmt (str) –

    [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 (str) –

    [optional, default is ‘.2f’]

    The format for floating point numbers in the output table.