respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

UCI import #4

Closed ckaros closed 6 years ago

ckaros commented 6 years ago

I am attempting to import a UCI from an HSPF model and run it using HSPP as described in the Preview notebook. The UCI and WDM files import without error. However, when I try to run the model, I get the following error:

KeyError: 'No object named /RESULTS/RCHRES_R500/ROFLOW in the file'

Looking back to the UCI, the only pace where ROFLOW is referenced is in the Mass-Link Block: RCHRES ROFLOW ROVOL 1 RCHRES INFLOW IVOL 1

My understanding is that this line is to instruct HSPF how to handle the passing of time series from on RCHRES to another, not to specify any output. Since they are the same module, they use the same units, and there are no conversions necessary. The actual linkages are setup in the SCHEMATIC Block.

JasonLoveRespec commented 6 years ago

Can you provide the UCI and WDM?

ckaros commented 6 years ago

Unfortunately I cannot at this time. I may be able to provide snippets here or there though.

JasonLoveRespec commented 6 years ago

I would love to help but w/o the UCI and WDM it is difficult to reproduce/understand the issue. I assume this model application runs with HSPF and you have reviewed the ECHO file.

Let me know if you can find a way to share the model application (if you need to share outside of GitHub feel free to email me at Jason.Love@respec.com)

jlkittle commented 6 years ago

Could you take a look at the HDF5 file being used by HSP2 using HDFView (or a similar program) and post the contents of the 'RUN_INFO/log' table? Also, do you see any tables (like 'PERLND_Pxxx") below 'RESULTS'?

ckaros commented 6 years ago

There is no RUN_INFO/log table in the HDF5 file. I do see PERLND_Pxxx results, each has PWATER folder results. The RCHRES_Rxxx results folders contain HYDR results tables. I am working to make my UCI and WDM files available, may take some time though.

JasonLoveRespec commented 6 years ago

With your MASS LINK of ....

RCHRES ROFLOW ROVOL 1 RCHRES INFLOW IVOL 1

... are you intending to pass all the flow from an upstream reach to the downstream reach, if so then use the following in your MASS LINK

RCHRES ROFLOW RCHRES INFLOW

if you are looking to pass 1 of the 5 gates to downstream, then use the following (replace "1" with your specific gate)

RCHRES OFLOW 1 RCHRES INFLOW

Let me know if this solves your issue.

ckaros commented 6 years ago

Awesome! all I needed to do was remove the 1 after ROVOL on that line and HSPP ran successfully! Now to compare the results to the HSPF simulation...thanks Jason!

JasonLoveRespec commented 6 years ago

I uploaded a new notebook to help with testing migration of HSPF applications to HSP2. In notebooks directory...