Python Extensions for utilizing the Hydrological Simulation Program in Fortran (HSPF)
PyHSPF contains a library of subroutines to run the Hydrological Simulation Program in Fortran (HSPF), Python extensions to the HSPF library, and a series of classes for building HSPF input files, performing simulations, and postprocessing simulation results.
HSPF requires flowline and catchment data for a stream network, land use data for the stream reach subbasins, time series of climate and hydrology data. A series of preprocessing classes were developed to extract data from the following publically-available databases on the World Wide Web:
The “core” module requires NumPy, SciPy, and Matplotlib, and can be used to generate the HSPF input files. The preprocessing routines require GDAL, PyShp, and Pillow.
PyHSPF can be used to assimilate the data into an HSPF model, build the HSPF input files, simulate the model over a period of time, and then provide statistics and plots of the simulation output. A series of examples is provided to illustrate PyHSPF usage.