Extracting River station and water levels in any/MATLAB environment

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Extracting River station and water levels in any/MATLAB environment

anandtkulkarni
Hi Chris, Posting first message of 2018! I have simple HEC-RAS model of river1 and reach1 with 4 station points viz: 3000m, 2000m, 1000m and 0m. I am able to compute the water levels and save the project using RAS Controller. However I am struggling to extract the resulting water levels out of it. How could one possibly possibly extract water levels to a .txt or .csv file Having tried couple of method I am inclined to think that calling following function should help Output_ComputationLevel_Export(ByRef filename As String, ByRef errmsg As String, Optional ByRef WriteFlow As Boolean = Nothing, Optional ByRef WriteStage As Boolean = Nothing, Optional ByRef WriteArea As Boolean = Nothing, Optional ByRef WriteTopWidth As Boolean = Nothing) As Object few clarifications - what would be the output file name? prj file or somting else? if not above function then is it OutputDSS_GetStageFlow(ByRef river As String, ByRef reach As String, ByRef rs As String, ByRef nvalue As Integer, ByRef ValueDateTime As System.Array, ByRef Stage As System.Array, ByRef Flow As System.Array, ByRef errmsg As String) As Boolean i know river is 'river1', reach is 'reach1' and rs can be say '3000'. Others I am not sure how to populate. Chris, thanks for writing the book, I have ordered it online and is under shipping. I am informed it may take one more week of so. Thanks, Regards, Anand K
Reply | Threaded
Open this post in threaded view
|

Re: Extracting River station and water levels in any/MATLAB environment

Chris G.
Administrator
Hi Anand-

I suggest using OutputDSS_GetStageFlow to get water surface elevations.  Appendix A of "Breaking the HEC-RAS Code" clearly explains the arguments that go with that Function.  Good luck!

Chris
Chris G.
@RASModel
www.therassolution.com
Reply | Threaded
Open this post in threaded view
|

Re: Extracting River station and water levels in any/MATLAB environment

Zara
In reply to this post by anandtkulkarni
Hi Anand,

Could you find the answer to your question? I have the same problem.

Thanks,
Zara
Reply | Threaded
Open this post in threaded view
|

Re: Extracting River station and water levels in any/MATLAB environment

anandtkulkarni
Oh yes getting water levels from MATLAB is not that hard

h=actxserver('RAS501.HECRASCONTROLLER');
h.Output_NodeOutput(riverID,reachID,nodeIDs,updn,profile,nVar);

With appropriate 'nVar' value one could get the desired output. The book "Breaking HEC-RAS Code" has good details about them . Say for example you can get Water Surface Elevation if you use nVar=2 and so on for others.

Hope this helps!

Regards,
Anand K