v0.9.3: HSP2 Detailed Water Quality Modules (RQUAL) as Classes
New in v0.9.3: HSP2 Detailed Water Quality Modules (RQUAL) as Classes
This important release adds to HSP2 detailed RQUAL water quality module sections (OXRX, NUTRX, PLANK, and PHCARB), implements those RQUAL modules as Numba classes, and improves the testing system to include these use cases.
The Hydrologic Simulation Program–Python (HSP2) model is being developed by an open source team led by RESPEC, in collaboration with LimnoTech, with support from the U.S. Army Corps of Engineers, Engineer Research and Development Center (ERDC), Environmental Laboratory.
New Features
- Port RQUAL water quality module sections from HSPF #58
- The dissolved oxygen (OXRX), nutrients (NUTRX), plankton (PLANK), and carbonate buffering system (PHCARB) sections for surface waters (RCHRES) are the last of the commonly used HSPF modules that needed to be ported to HSP2. With this release, >95% of HSPF use cases can now be supported with HSP2.
- All RQUAL sections implemented Numba classes, as a first step and template for migrating HSP2 from Fortran 77 functional programming code structures to object-oriented class structures used in modern programming.
- Class structures enable inheritance of attributes and methods by objects and the passing of attributes among objects.
- Numba classes enable just-in-time (JIT) compiling for enhanced performance.
- Implemented GENER and related operations #57
- The GENER module is used extensively to compute (within the model) constituent loads based on input flow and concentration, with one or both being a time series. These capabilities are used extensively several of our HSP2 use cases
Improvements
- Substantially improved the performance of the testing system (LimnoTech#46 (comment)), while also expanded to support additional use cases for RQUAL (LimnoTech#46)
- General performance enhancements from implementing Numba jitclasses.
- Updates to UCI reader to support all GENER operations, as described in #57 (comment).
Fixes
- Many minor fixes to get all HSP2 results to exactly match HSPF results (within the rounding errors that naturally occur from the switch from
float32
tofloat64
, especially for operations that include subtractions).
For more details, see the closed issues in our completed v0.9.3 RQUAL Water Quality Modules as Classes + Expand Testing Milestone.
Downloads
- HSP2_Driver.zip
- HSP2_Driver contains an .exe for running HSP2, enabling a user to run HSP2 without needing to do anything with python code or notebooks. The driver uses the PyQt5 file dialog to prompt for the name of the HDF5 file to run, or if that doesn’t exist yet you can give it the name of a UCI or WDM file to import. It also runs with the H5 file name on the command line.