Jump to content
GMS, SMS, and WMS User Forum
Sign in to follow this  
Nate

ascii data (*.dat) files and generic mesh (*.2dm) in SMS10.0.6

Recommended Posts

Has the format for the generic ascii data files and/or 2d mesh files changed since SMS 9.0?

I have a number of fortran codes and matlab scripts etc. which I use to read and produce files in SMS's generic *.2dm and *.dat (ascii) formats so that I can view and edit data for non-SMS hydrodynamic models (such as EFDC). however since I upgraded to 10.0.6 today SMS will not read my *.dat files which contain both scalar and vector data. when I try to open a *.dat file after opening my *.2dm mesh I get an error that says:

"Error: ND card before object was defined (line5)"

I don't know what this means my *.dat files don't have any ND cards, the ND cards are in my *.2dm file. I am able to open my *.2dm files, however I get a message that says:

"Some material properties values were missing. They will be defaulted for the model to run correctly."

I cannot find any information on the format of these files (*.2dm and *.dat) in the SMS 10.0.6 online help like what I was able to find in the SMS 9.0 and 8.1 offline help.

anyone else use these generic ascii files? are you having the same problem?

Thanks, Nate

Share this post


Link to post
Share on other sites

Nate,

We have made some additions to the file, such as a reference time card and time units card. The documentation for the files is available here:

2D Mesh File (*.2dm) documentation

http://www.xmswiki.com/wiki/index.php5?tit...h_Files_(*.2dm)

ASCII Data File (*.dat)

http://www.xmswiki.com/wiki/index.php5?tit...t_Files_(*.dat)

The top of your dat file should look something like this:


DATASET
OBJTYPE "mesh2d"
BEGVEC
ND 1701
NC 3200
NAME "Overland Velocity"
RT_JULIAN 2454252.500000
TIMEUNITS seconds
TS 0 0.00000000e+000
5.15000000e-002 7.30000000e-005 0.00000000e+000
5.22000000e-002 1.23000000e-003 0.00000000e+000
5.20000000e-002 2.60000000e-003 0.00000000e+000

If you continue to have problems, please send your files to technical support and let them know the files are for John Howlett.

- John

Share this post


Link to post
Share on other sites

the top of my files look like this:

"

DATASET

OBJTYPE mesh2d

BEGSCL

OBJID 1

ND 79795

NC 76330

NAME "wse"

TS 1 0.20000000E+02

1

1

1

"

the "wse" dataset may or may not be followed by additional vector and/or scalar datasets for velocity, salinity, etc...

note the OBJID card on line 4. this card is shown in the examples in the wiki and in the SMS9.0 help, however there is no description of the card's format. my code which generates the .dat files puts this line there because that's what I saw in the examples. I've found that If I remove the OBJID card on line 4 SMS 10.0.6 will read the file and I can see the data, but I still get an error(very similar to what I was getting before) that says:

"Error: ND card before object was defined (line 3590910)"

-there's another OBJID card on line 3590909 of my file for the next data set.

I guess these OBJID cards are the problem. I'll have to modify my code to stop writing these cards. What are they used for anyway? SMS9.0 doesn't seem to care if the OBJID cards are there or not(at least for my application)

thanks for the quick response,

-Nate

Share this post


Link to post
Share on other sites

Nate,

Thanks for pointing this out to us. I have updated the .dat file documentation to include an explanation of the OBJID card. The OBJID card is only used if the OBJTYPE is scat2d, so you are correct that it should be removed from your file for a mesh2d OBJTYPE.

- John

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...