A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Recent Releases of HSPsquared

HSPsquared - 0.11.0a1: HSP2 with Testing Framework and Python Packaging

DOI

The Hydrologic Simulation Program–Python (HSP2) model is being developed by an open source team led by RESPEC.

This release was prepared by a team of collaborators including @timcera, @austinorr, @rburghol, and @aufdenkampe who contributed their expertise in making the project compatible with the Python Packaging Index (PyPI) and automated testing. It also includes more Special Actions capabilities and GENER operations.

What's Changed

New Contributors

Full Changelog: https://github.com/respec/HSPsquared/compare/0.11.0...0.11.0a1

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC 10 months ago

HSPsquared - v0.11.0: HSP2 with Special Actions Prototype and Other Minor Fixes

DOI

The Hydrologic Simulation Program–Python (HSP2) model is being developed by an open source team led by RESPEC.

This release contains a prototype of the Special Actions capability contributed by @rburghol and team at VA DEQ, including dynamic python code loading for hsp2 runtime customization. See issues #90 , #99, and #113 for more details on those enhancements.

Small fixes in this release include the following:

  • Improved Celsius conversion precision in PSTEMP
  • Improved AGWO precision in PWATER
  • Proper conversion of GWVS cut off in PWATER
  • Atmospheric Deposition properly added to totals in NUTRX and PLANK
  • Correct linkage of PKIF inflow
  • Proper implementation of PQUAL/IQUAL REMQOP calculation
  • QPREC improved with conversion factor changed to be same as used by HSPF
  • Constant value GENER operations

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.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC over 1 year ago

HSPsquared - v0.10.1: HSP2 with Additional Documentation & Fixes

DOI

New in v0.10.1: Additional Documentation & Fixes

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.

For more details, see the closed issues in our completed v0.10.1: Additional Documentation & Fixes 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.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC almost 3 years ago

HSPsquared - v0.10.0: HSP2 including WQ w/ Improved Performance, Abstracted I/O, Updated Docs

DOI

New in v0.10.0: HSP2 including WQ w/ Improved Performance, Abstracted I/O, Updated Docs

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.

For more details, see the closed issues in our completed v0.10.0: WQ w/ Improved Performance, Abstracted I/O, Updated Docs Milestone.

Downloads

  • HSP2_Driver.zip (coming soon)
    • 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.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC over 3 years ago

HSPsquared - v0.9.3: HSP2 Detailed Water Quality Modules (RQUAL) as Classes

DOI

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

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 to float64, 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.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC over 3 years ago

HSPsquared - v0.9.2: HSP2 with Water Quality Modules not including RQUAL

DOI

The Hydrologic Simulation Program–Python (HSP2) model is being developed by RESPEC as part of an internally funded research and development (R&D) project. 

This release continues development of HSP2, including better-tested water quality modules, improved performance with Numba, support for metric units, and a few minor bug fixes (h/t to LimnoTech for continued collaboration). This release includes modules thru PQUAL/IQUAL/GQUAL (not yet including the AGCHEM modules nor RQUAL).

See the develop branch for ongoing development efforts to include full HSPF water quality.

Change Log

For a detailed list of changes, see the conversation and commits associated with Pull Request #60

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.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC over 3 years ago

HSPsquared - v0.9.1: HSP2 with Draft Water Quality Modules and Improved WDM Reader

DOI

The Hydrologic Simulation Program–Python (HSP2) model is being developed by RESPEC as part of an internally funded research and development (R&D) project. 

This release continues development of HSP2, adding draft water quality modules, improved testing infrastructure, and an improved WDM reader that can handle a much broader range of WDM files (h/t LimnoTech for the WDM reader). This release includes modules thru PQUAL/IQUAL/GQUAL (not yet including the AGCHEM modules nor RQUAL).

See the develop branch for ongoing development efforts to include full HSPF water quality.

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.

Change Log

New Features

  • Implements HSPF PERLND modules ATEMP (38f71326a1ab37b5bd66dcc45a4c603cd007d3bf), SEDMNT (b9a3853628b523974d0e467e28fbce5e9691629d), PSTEMP (cbab468a681edeb49a76071454597bc1d8edae36), PWTGAS (0740df1dc385fae33e7acb023cf73d2150be3081), and PQUAL (5c94e20043b7616f0f4263deaea768e76df6a245).
  • Implements HSPF IMPLND modules SOLIDS (b9a3853628b523974d0e467e28fbce5e9691629d), IWTGAS (0740df1dc385fae33e7acb023cf73d2150be3081), and IQUAL (5a1eeca1df4312b65118a7b0ca73a471de61fdf5).
  • Implements HSPF RCHRES modules ADCALC (50edb71f141005658618c4bd54fb657458cd879a), CONS (8a136876b5ea306cb409cfca08aeb1477ca5b095), HTRCH (52d68bd19ffea41e2e0a3b14893544f2bb7524ff), SEDTRN (dce622da92bdf2726476de696fdf4a88a121c697), and GQUAL (07a22c17b58d345b58205e3b577114b64dd16726).
    • Note for all of the above testing is limited and will be ongoing.

Improvements

  • Improved WDM reader is capable of reading more sophisticated WDM files (71a88bb9772999041f72217b5a7d83246defab6e).
  • Improved testing infrastructure (c556ff777846a3fabb5d2a4cc0129670fa5d7631).

Bug Fixes

  • Small fixes in PWATER and HYDR (06da636644810292f78ffb4e4d327ef3591e9a8b) to more precisely match HSPF results.
  • Fixed subscript in SEDTRN Colby method and SNOW initialization (4138f527ae67645ee04cefac3dab2d8d71399da5).

For a detailed list of changes, see the conversation and commits associated with Pull Release #50.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC almost 4 years ago

HSPsquared - v0.8.2: HSP2 Expand Tests and Improve Read UCI, WDM, HBN

DOI

The Hydrologic Simulation Program–Python (HSP2) model is being developed by RESPEC as part of an internally funded research and development (R&D) project. 

This release, from 11/20/2020, continues development of the Python 3 codebase HSP2 hydrology modules, by improving readHBN, readUCI, and readWDM utilities and adding a number of additional test cases.

See the develop branch for ongoing development efforts to include full HSPF water quality.

Downloads

  • HSP2_Driver_June2020.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.

Change Log

New Features

  • Added Tutorial (d2f3423a996bd849506d4c32f8c54c65dbd8a23f)
  • Added many new test cases. #31

Improvements

  • Streamlined installation instructions, removing Setup.py in favor of using conda commands (commit 5b1f7ba98a0ca3455a9bf8c83771e9651147b1b3).
  • Updated Conda environment.yml to specify Python 3.8 (a529de713bdf48f1d324c1790da000def3618587)
  • Added new testing files and results (f112f9e7139d7fb88fbc2a094b0ff535173286e0)
  • Refined readHBN.py, readUCI.py, and readWDM.py to work with a larger range of file configurations (c1da3774ca3749dd64d79de5fb5e6cb8fc293bc8, ce4952dff9478f800634678d9ef2dc32e55d9843, f53c8df24f13eb9c09d03a393b422e7649ef3055).

Bug Fixes

  • Fixed ATEMP (c36f27c4e129eb700becc749c6e13cdf2e9e4b7a).
  • Fixed IWATER (0e73c2064be631b014e676c2f075977ae872dbdc).

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by PaulDudaRESPEC about 4 years ago

HSPsquared - v0.8.1: HSP2 Add Python 3 Executable, Setup, Demos, and Docs

DOI

The Hydrologic Simulation Program–Python (HSP2 or HSPsquared) model is being developed by RESPEC as part of an internally funded research and development (R&D) project.

This release of HSP2, from 6/13/2020, is Python 3.x compatible and supports the major hydrology modules of HSPF -- PWATER, IWATER and HYDR. HSP2 is designed to work with Python 3.6, 3.7 and 3.8.

This release adds an executable file, setup instructions, demonstration Jupyter notebooks, and and other documentation developed during and after the March 24-25, 2020, collaborative workshop with LimnoTech.

Change Log

New Features

  • Installation instructions for Python 3 version, with Setup.py or with a conda environment.yml file.
  • A HSP2_Driver Windows executable (HSP2_Driver.exe, and associated files)
    • This allows a user to run HSP2 from the command line, similar to HSPF, 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.
  • Added a number Jupyter notebooks (Introduction.ipynb, Demo2.ipynb, Demo3.ipynb) and associated TutorialData to an updated Demo1.ipynb notebook, all tested with the new Python 3 codebase for HSP2.

Improvements

  • Updated conda environment (environment.yml) to use Python 3.7.
  • Git-track notebooks as binary. #35

Bug Fixes

  • Fixed issues in HSP2 hydrology to fully agree with HSPF (9a569431c6d5e0321a7e999282b2b130dbc2309f)

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by aufdenkampe about 4 years ago

HSPsquared - v0.8.0: HSP2 Rewritten for Python 3 and HSPF naming conventions

DOI

The Hydrologic Simulation Program–Python (HSP2 or HSPsquared) model is being developed by RESPEC as part of an internally funded research and development (R&D) project.

This is a major rewrite of the HSP2 model for use in a Python 3.6+ environment, completed 4/5/2020. All modules were renamed and rewritten to reflect the naming conventions of HSPF Modules, Sections, and Subroutines.

This release was shared in advance of a collaborative HSP2 development kickoff workshop with LimnoTech staff, on March 24-25, 2020.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by aufdenkampe about 4 years ago

HSPsquared - v0.7.7: Hydrologic Simulation Program Python (HSPsquared) Initial Release

DOI

The Hydrologic Simulation Program–Python (HSP2 or HSPsquared) model is being developed by RESPEC as part of an internally funded research and development (R&D) project.

This first release of HSP2, finalized on 5/28/2019, was written and tested to work with Python 2.7 from the Anaconda distribution. The code depends on Tim Cera's HSPF toolboxes (wdmtoolbox, tstoolbox, and hspfbintoolbox) and their dependencies. Installation instructions are provided in the main ReadMe.

Hydrological modules were tested for Big Sioux River modeling in 2018.
Water quality modules have not yet been implemented.

Hydrosphere - Freshwater and Hydrology - Jupyter Notebook
Published by aufdenkampe about 4 years ago