My sense is that this may simply be a convention, not an actual part of the definition that HSPF expects, but nevertheless it appears to be somewhat common (I have seen it in the CBP files, as well as TMDL uci's from 2 different modeling groups).
The error arises in the code in HSP2_CLI.py which skips these elements, as the string test expects an exact match on "WDM", not "WDMn":
if nline[:10].strip() == "WDM":
This ends up skipping the WDM in question, then, later when running the model, it fails because it can not find the DSN (error: ).
By isolating only the first 3 characters of the stripped string, the test for
By changing the conditional tothe below allows things to proceed (and my CBP UCI executes and appears to produce reasonable output, more on that later):
Maybe this is only relevant to the branch that was created by @timcera to allow Linux command line execution, but also appears related to #53 .
Summary: WDM files described in the FILES block and EXT SOURCES/TARGETS with a numerical suffix are not added to the hdf5 file. Example:
My sense is that this may simply be a convention, not an actual part of the definition that HSPF expects, but nevertheless it appears to be somewhat common (I have seen it in the CBP files, as well as TMDL uci's from 2 different modeling groups).
The error arises in the code in HSP2_CLI.py which skips these elements, as the string test expects an exact match on "WDM", not "WDMn":
This ends up skipping the WDM in question, then, later when running the model, it fails because it can not find the DSN (error: ). By isolating only the first 3 characters of the stripped string, the test for
By changing the conditional tothe below allows things to proceed (and my CBP UCI executes and appears to produce reasonable output, more on that later):
Pull request submitted in #81