Hello, I am trying to interrogate a DSS file containing HECHMS results. I need to do this automatically with a script or code, not a user interface. I have tried using the Excel add-in and the DSSUTIL program, both will not output the results, and give an error saying they can only process regular time series. If I use DSSVue to convert the data to a regular time series of the same time interval both approaches work successfully. Is there anyway to get HECHMS to output the results as a regular time series (rather than an irregular time series that have data at regular time intervals), or a way to do the conversion with a script? Thanks.
Re: HECHMS results saved as irregular time series?
mgibbs,
I think HEC-HMS results are saved as regular time series data,
I have no problems to read it with DSSUTL,
which command line you use to extract data with DSSUTL?
Re: HECHMS results saved as irregular time series?
Thanks Dariogab,
I have used DSSUTL successfully on the sample.dss that came with DSSVue like this:
EV DATA=1 (Use the first record)
EF [DATE] [TIME] [DATA] (output format)
EX OUT.TXT (output to file)
but when I try to do the first line with the dss files produced from 2 different HECHMS models I get the error:
Error: Only Time Series data may be Exported.
Type identified: RTD
But if I open a table of the record in DSSVue it says the data is of type INST-VAL, the same as the data output from sample.dss
I get a similar error from the Excel Tool, I can get it to work fine for sample.dss, but for the two dss files with HECHMS results I get the error:
HECDSS does not recognize a valid data type for this pathname.
Please check the pathname conventions outline in the HECDSS User's manual.
The pathname itself seems to be fine:
//OUTLET_AMER/FLOW/18JUN2007/5MIN/RUN:RUN 1/
I have tried it with an A Part and without spaces, but with no luck.
If I look in the Visual Basic code where the error occurs, it says the data are of type UND.
Any ideas that could be suggested would be greatly appreciated. Thanks.
Re: HECHMS results saved as irregular time series?
Thanks again dariogab, the WR (and TA) command does work. After some more digging, it turns out the reason the DSSUTL export and Excel add in do not work with HEC-HMS results is because from version 3 HEC-HMS saves the results as double precision, where these tools can only read single precision values.
There is a precision converter plug in for HEC-DSSVue that can convert the results back to single precision, so I might try to write a script that can call this plugin.
I am still battling with getting HEC-HMS results data out of a dss file. Using DSSUTL and the WR option does work, sometimes. By opening the dss file in DSSVue it appears as if only some of the records can be read, and some of the results are not listed. If I delete some of the results that I am not interested in, such as ET-SOIL, ET-POTENTIAL for the catchments, eventually the record I am interested in appears in DSSVue. If I try using WR in DSSUTL before the delete, it does not find the requested record. If I run the same commands after the delete, it works. The model I am working with has 19 catchments, 9 junctions, 9 reaches and a sink, running for 9 months on a daily time interval. The only data in the DSS file is the daily rainfall and 1 daily streamflow gauge.
I am trying to link the model to an optimization algorithm, so I need a reliable, scripted way to run HEC-HMS and interpret the results. If anyone has had any success reliably getting data of of a DSS file containing HEC-HMS results (version 3.1 or 3.2) without a GUI, I would greatly appreciate your help.
For anyone that is having a similar experience, the problem was that HEC-HMS does not write the catalog for the .dss file. This catalog needs to be updated, as HEC-HMS has added new records to the .dss file. To do the update, select refresh from the View menu in DSSVue, or use the command CA.N in DSSUTL. Thanks Dariogab and the HEC-HMS team for their help.