Conversation
Fetch upstream commits into `wq-updates-tmr` to squash merge conflicts
Pep 8 doc string Raise proper error rather than print/return for error handling
Modify get_uci function to read the GENER block information for HDF5 and store in new variable ddgener
Modify config and main execution loop to create instances of Copy class and store in dictionary within the main function.
Testing against HSPF still ongoing
ParseTable.csv specified only single digit in the NETWORK.SMEMSB1 parameter, but there should be up two digits.
|
@aufdenkampe @tredder75 @bcous |
|
I completed resolving the merge conflicts and the model can now execute through. There's still some issues that need to be resolved, but I proposed that we merge this back into develop. From there we can pull develop into Todd's branch and continue resolving issues related to the model code there. This branch has effectively served its purpose by creating the GENER and COPY modules. |
|
@ptomasula, this looks great! Thanks for organizing all this via this PR/issue! Good call to move forward and merge this with develop and back to Todd's branch. I did notice that @PaulDudaRESPEC made a commit respec@fcc2ee8 in https://github.com/respec/HSPsquared/tree/develop, and it looks like there may be a merge conflict with your code. Can you resolve the merge conflict in the new PR #42 before merging develop into Todd's branch? |
Problem:
The GENER and COPY operations are necessary to execute the GLWACSO test case, but neither module is currently supported in HSP2.
Solution:
Both modules were implemented as classes. Calling the GENER and COPY operation from the main function will initialize an instance of the corresponding class and store it within a dictionary inside the main function. From there timeseries for the class instances can be loaded into other modules (e.g. HTRCH) via the new get_gener_timeseries function. Other modifications include additional revisions to read_uci to load portions of the COPY and GENER blocks from the uci file.
Testing:
Testing was admittedly limited but involved manually executing the GLWACSO test case to ensure data was correctly loaded into the classes and then retrieved using the get_gener_timeseries function. Notably this testing approach is far from comprehensive, because the GLWACSO module does not utilize the full range of Gener operations. Additional testing was done externally, to validate the output from the various Gener opcode methods.
Limitations:
While this implementation will meet the needs of the GLWACSO test case, this addition does not offer full support of functions available to the COPY and GENER modules in HSPF. Notably the Copy class does not support any write operations (i.e. being able to copy data from one file to another). Additionally, the Gener class does not presently support opcodes 8 or 24. Calling these methods will result in a NotImplementedError.
Addresses respec#57.