verakurniawan 0 Posted July 4, 2012 Report Share Posted July 4, 2012 HiI 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!RegardsVera Kurniawan Quote Link to post Share on other sites
heimo 0 Posted July 19, 2012 Report Share Posted July 19, 2012 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 isType 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 mappedY --> XZ --> YNot Mapped (=Bed_elev) --> scalar dataetc (all the rest to --> scalar dataexcept for Vel_X(m/s) -->Vector X Vel_Y(m/s) -->Vector Yalso 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)Heimo Quote Link to post Share on other sites
heimo 0 Posted July 20, 2012 Report Share Posted July 20, 2012 Vera,here is the simple program (with some files) I mailed you about to extract nodal info from the SRH dat files.TsPoint.zip Quote Link to post Share on other sites
cameronj 1 Posted July 20, 2012 Report Share Posted July 20, 2012 Heimo,Would please explain how to the files in the TsPoint.zip you posted above? Thanks,Cameron Jenkins Quote Link to post Share on other sites
heimo 0 Posted July 23, 2012 Report Share Posted July 23, 2012 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 file2) generate a file called "TsPoint.txt" that contains the X and Y coordinates of the selected node3) run the program timser.exe in dosfor %a in (c_sms*.dat) do timser %aNOTE 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.Heimo Quote Link to post Share on other sites
heimo 0 Posted July 31, 2012 Report Share Posted July 31, 2012 (edited) 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 HeimoCreaGene.zip Edited July 31, 2012 by heimo Quote Link to post Share on other sites
cameronj 1 Posted July 31, 2012 Report Share Posted July 31, 2012 There is a newer version of SRH2D that writes out to the xmdf format which can be read into SMS. Aquaveo or the SRH2D developer has a copy of the newer version. Quote Link to post Share on other sites
heimo 0 Posted August 2, 2012 Report Share Posted August 2, 2012 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.Heimo Quote Link to post Share on other sites
heimo 0 Posted August 8, 2012 Report Share Posted August 8, 2012 (edited) I tried to write a simple program ...Attachment deleted as obsolete Edited August 8, 2012 by heimo Quote Link to post Share on other sites
Alan K. Zundel 1 Posted October 10, 2012 Report Share Posted October 10, 2012 There is a new version of SRH-2D now, with an updated template to work in SMS 11.1 (Beta released yesterday). Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.