SMS:Binary Dataset Files *.dat

From XMS Wiki
Revision as of 15:56, 7 February 2014 by Jcreer (talk | contribs)
Jump to navigationJump to search

Datasets can be stored to either ASCII or binary files. Compared to ASCII files, binary files require less memory and can be imported to SMS more quickly. The disadvantages of binary files are that they are not as portable and they cannot be viewed with a text editor. The binary format is patterned after the ASCII format in that the data are grouped into "cards". However, the cards are identified by a number rather than a card title.

Dataset files are opened through File | Open and are saved when other files are saved such as 2D Scatter Point Files.

File Format

Card Item Size Description
version 4 byte integer The SMS binary dataset file format version.

value = 3000

100 objecttype 4 byte integer Indentifies the type of objects that the datasets in the file are associated with. Options are as follows:
1 TINs
3 2D meshes
5 2D scatter points
110 SFLT 4 byte integer The number of bytes that will be used in the remainder of the file for each floating point value (4, 8, or 16).
120 SFLG 4 byte integer The number of bytes that will be used in the remainder of the file for status flags.
110 SFLT 4 byte integer The number of bytes that will be used in the remainder of the file for each floating point value (4, 8, or 16).
130 or 140 BEGSCL or BEGVEC The number of bytes that will be used in the remainder of the file for status flags.
150 VECTYPE 4 byte integer (0 or 1) In the case of vector dataset files, indicates whether the vectors will be applied at the nodes/gridnodes or the elements/cells.
160 OBJID 4 byte integer The id of the associated object. Value is ignored for grids and meshes.
170 NUMDATA 4 byte integer The number of data values that will be listed per time step. This number should correspond to the number of vertices, nodes, cell centers (cell-centered grid), cell corners (mesh-centered grid) or scatter points.
180 NUMCELLS 4 byte integer This number should correspond to the number of elements (meshes) or the number of cells (mesh-centered grids). Value is ignored for other object types.
190 NAME 40 bytes The name of the dataset. Use one character per byte. Mark the end of the string with the '\0' character.
200 TS Marks the beginning of a time step.
ISTAT SFLG integer (0 or 1) Indicates whether or not status flags will be included in the file.
TIME SFLT real Time corresponding to the time step.
statflag1 SFLG integer Status flag (0 or 1) for node 1
statflag2 SFLG integer Status flag (0 or 1) for node 2
...
Repeat card 200 for each time step in the dataset.
210 ENDDS Signal the end of a set of cards defining a dataset.
240 RT_JULIAN 8 byte float The reference time as a Julian number.
250 TIMEUNITS 4 byte integer The time units as follows:
0 - hours
1 - minutes
2 - seconds
4 - days

Cards

Card Type VERSION
Card ID 3000
Description File type identifier. No fields.
Required YES


Card Type OBJTYPE
Card ID 100
Description Identifies the type of objects that the datasets in the file are associated with.
Required YES. If card does not exist, the file can only be read through the Data Browser. The datasets would then be assigned to the objects corresponding to the active module.
Format OBJTYPE type
Sample OBJTYPE tin
Field Variable Size Value Description
1 type 4 byte int
tin
mesh2d
scat2d
Tins
2D mesh
2D scatterpoints


Card Type SFLT
Card ID 110
Description Identifies the number of bytes that will be used in the remainder of the file for each floating point value (4, 8, or 16).
Required YES
Field Variable Size Value Description
1 sizefloat 4 byte int
4
8 or
16
Number of bytes


Card Type SFLG
Card ID 120
Description Identifies the number of bytes that will be used in the remainder of the file for status flags (1, 2, or 4).
Required YES
Field Variable Size Value Description
1 sizeflag 4 byte int
1
2 or
4
Number of bytes


Card Type BEGSCL
Card ID 130
Description Marks the beginning of a set of cards defining a scalar dataset.
Required YES


Card Type BEGVEC
Card ID 140
Description Marks the beginning of a set of cards defining a vector dataset.
Required YES


Card Type VECTYPE
Card ID 150
Description Identifies the type of vector data that will be read and where to apply it.
Required YES. If card does not exist, the file can only be read through the Data Browser. The datasets would then be assigned to the objects corresponding to the active module.
Field Variable Size Value Description
1 type 4 byte int
0
1
The vectors are applied to the nodes/grid nodes.
The vectors are applied to the elements/cells.


Card Type OBJID
Card ID 160
Description The id of the associated object.
Required This card is required in the case of TINs, 2D scatter points, and 3D scatter points. With each of these objects, multiple objects may be defined at once. Hence the id is necessary to relate the dataset to the proper object.
Field Variable Size Value Description
1 id 4 byte int + The id of the object.


Card Type NUMDATA
Card ID 170
Description The id of the associated object.
Required The number of data values that will be listed per time step. This number should correspond to the number of vertices, nodes, cell centers (cell-centered grid), cell corners (mesh-centered grid), maximum node id (meshes) or scatter points.
Field Variable Size Value Description
1 numdata 4 byte int + The number of items. At each time step, numdata are listed.


Card Type NUMCELLS
Card ID 180
Description This number should correspond to the element id (meshes) or the number of cells (grids).
Required YES
Field Variable Size Value Description
1 numcells 4 byte int + The number of elements or cells.


Card Type NAME
Card ID 190
Description The name of the dataset.
Required YES
Field Variable Size Value Description
1 name 40 bytes str The name of the dataset. Use one character per byte. Mark the end of the string with the '\0' character.


Card Type TS
Card ID 200
Description Defines the set of scalar values associated with a time step. Should be repeated for each time step.
Required YES
Field Variable Size Value Description
1 istat SFLG int
0
1
Use status flags from previous time step. For the first time step, this value indicates that all cells are active.
Status flags will be listed.
2 time SFLT int + The time step value. This number is ignored if there is only one time step
stat SFLG int
0
1
Inactive
Active
One status flag should be listed for each cell or element. These flags are included only when istat = 1.
val SFLT real +/- The scalar values.


Card Type ENDDS
Card ID 210
Description Signals the end of a set of cards defining a dataset
Required YES


Card Type RT_JULIAN
Card ID 240
Description The reference time as a Julian number.
Required NO
Field Variable Size Value Description
1 reference time 8 byte float +/- Continuous count of days and fractions of days since noon Universal Time on January 1, 4713 BCE (on the Julian calendar).


Card Type TIMEUNITS
Card ID 250
Description The time units.
Required NO, but recommended
Field Variable Size Value Description
1 time units 4 byte float
0
1
2
Hours
Minutes
Seconds


Related Topics