Jump to content
GMS, SMS, and WMS User Forum

Load result file (xxx_SMS1.dat) from SRH-2D to SMS8.0

Recommended Posts


I really need help here. I manage to run a model with partial mode using SRH-2D numerical model.

The model produced result file which supposedly be able to be incorporated to SMS later on.

The result file is in xxx_SMS1.dat type. I did attach my results file in case it is useful for analyzing my problem (note that I should convert my results file to Excel as I couldnt attach the original (.dat) file). results.txt The problem is I could not incorporate the result file from SRH-2D to my mesh in SMS. I simply load the result file to SMS as 2D mesh file type, but it gave me nothing.

How could I see my results (in terms of water velocity, water depth and water surface elevation) in my mesh within SMS?

Thank you!


Vera Kurniawan

Link to post
Share on other sites
  • 2 weeks later...

Hi Vera,

Just got back from holidays. You may have already solved this, but if not - here's how to open those dat files.

You should open it as a scatter set. In SMS9 you just open the the dat-file and as SMS does not automatically recognize it, there should appear a window where the topmost selection is 'use import wizard'. Select that option (default options should be OK. If not, add 'comma' to column delimiters). Then select 'Next'. Now you can choose what data you want to import.

The file with headers is

Type X Y Z Not Mapped Not Mapped etc...

Header Point_ID X(m) Y(m) Bed_Elev(m) etc....

1 123.4 567.8 -10.00 ...

Select the types as:

X --> not mapped

Y --> X

Z --> Y

Not Mapped (=Bed_elev) --> scalar data

etc (all the rest to --> scalar data

except for

Vel_X(m/s) -->Vector X

Vel_Y(m/s) -->Vector Y

also change the header line of both Vexor X and Vector Y to same name, e.g. 'velocity'.

[ Btw, If you have lots of time steps to import, it is adviseable to remove the 'point number' header and the numers from the dat files and renaming the vector header line names with a simpe program, via excel or someting else you can think of. This should make it easier to open the files.]

Now you can use the scatter set as such (by selecting display options/Scatter set and checking some of the following three options 1) points/use contour color scheme, 2) contours and 3) velocity vectors)

Also, you can interpolate the scatter data to the 2dm mesh by clicking on each data set and selecting from menu Scatter/Interpolate to mesh. (No actual interpolation is done as the scatter points and mesh nodes coincide)


Link to post
Share on other sites

Hi Cameron.

The program simply reads the lines with given x,y nodal coordiantes and appends (with dos for loop) it to tserie.txt. This file you can then open in excel, sort the rows according to time step and draw your time series.

Here's a clip of the mail to Vera:

--- clip begins ---

Steps here:

1) generate an empty file "tserie.txt" (with notepad). This file can atually have a header line if you wish. All data from dat files is then simply appened to the end of this file

2) generate a file called "TsPoint.txt" that contains the X and Y coordinates of the selected node

3) run the program timser.exe in dos

for %a in (c_sms*.dat) do timser %a

NOTE that dos has a restriction of 8+3 charaters for file names, so you'll have to run SRH so that the name of the case is restrited to 1 char (as you have more that 100 steps so that the maximum is 'c_sms999.dat' which is 8 chars long). On the other hand, you coud try to rename/copy the files, although I can't think of a fast (automatic) way to do that.


Link to post
Share on other sites
  • 2 weeks later...

I tried to write a simple program that would generate a 'generic ascii data file' from SRH output files, but had problems. I then realized that SRH output in SMS format writes data to cell centers instead of nodes. When you select 'SRH' as output format, this program (hopefully) works. Edit the file 'MeshInfo.dat' to suite your model and run 'CreaGene.exe' in dos.

So, this program will write a file with data on all nodes and all timesteps (if wished) so that time series and animations of SRH results can be made (one file per variable).

No guarantees given, though ;)



Edited by heimo
Link to post
Share on other sites

Hi Cameron,

I managed to try out the new version, but alas - I use SMS9 and XMDF (at least in the form produced by SRH) doesn't seem to be supported by it. So, unfortunately I'm stuck with these make shift tryouts at least for now.


Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...