SMS:ASCII Dataset Files *.dat: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
 
No edit summary
Line 100: Line 100:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 112: Line 112:




{|border="1" style="text-align:left"  
{|class="wikitable"
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 153: Line 153:




{|border="1" style="text-align:left"  
{|class="wikitable"
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 176: Line 176:




{|border="1" style="text-align:left"  
{|class="wikitable"
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 201: Line 201:




{|border="1" style="text-align:left"  
{|class="wikitable"
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 240: Line 240:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 252: Line 252:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 264: Line 264:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 300: Line 300:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 326: Line 326:




{|border="1" style="text-align:left"  
{|class="wikitable"
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 352: Line 352:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''
Line 378: Line 378:




{|border="1" style="text-align:left"  
{|class="wikitable"  
|-
|-
|width="100"|''Card Type''
|width="100"|''Card Type''

Revision as of 16:27, 29 November 2012

Datasets can be stored in either ASCII or binary files. Multiple datasets can be stored in a single file and both scalar and vector datasets can be saved to the same file. For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset files, one set of XY vector components is listed per vertex, cell, node, or scatter point. If necessary, a set of status flags can be included in the file. If the status flag is false (0), the corresponding item (node, cell, etc.) is inactive. If status flags are not included in the file, it is assumed that all items are active. Dataset files are opened through File | Open and are saved when other files are saved such as 2D Scatter Point Files or through the Export Dataset Dialog.

File Format

DATASET              /* File type identifier */
OBJTYPE type         /* Type of object data set is associated with */
BEGSCL               /* Beginning of scalar data set */
OBJID id             /* Object id */
ND numdata           /* Number of data values */
NC numcells          /* Number of cells or elements */
NAME "name"          /* Data set name */
RT_JULIAN            /* The reference time as a Julian number. */
TIMEUNITS            /* The time units. */
TS istat time        /* Time step of the following data. */
stat1                /* Status or activity flags */
stat2
.
.
statnumcells
val1                 /* Scalar data values */
val2
.
.
valnumdata
/* Repeat TS card for each time step */
ENDDS                /* End of data set */
BEGVEC               /* Beginning of vector dataset */
VECTYPE type         /* Vector at node/gridnode or element/cell */
OBJID id             /* Object id */
ND numdata           /* Number of data values */
NC numcells          /* Number of cells or elements */
NAME "name"          /* Data set name */
TS istat time        /* Time step of the following data. */
stat1                /* Status or activity flags */
stat2
.
.
statnumcells
vx1 vy1
vx2 vy2
.
.
vnumdata vnumdata vnumdata
/* Repeat TS card for each time step */
ENDDS                /* End of data set */
/* Repeat BEGSCL and BEGVEC sequences for each data set */

Sample File

Note: This sample file is using an activity array, so there are 16 values per TS. The first 8 values are activity flags for each of the 8 nodes. Values 9-16 are the scalar values for the 8 nodes.

DATASET
OBJTYPE "grid2d"
BEGSCL
ND 8
NC 8
NAME "sediment transport"
RT_JULIAN 2453867.068720
TIMEUNITS seconds
TS 1 1.00000000e+00
0
0
0
1
1
1
1
0
0.00000000e+00
0.00000000e+00
0.00000000e+00
3.24000000e+00
4.39000000e+00
2.96000000e+00
7.48000000e+00
0.00000000e+00
ENDDS
BEGVEC
VECTYPE 0
ND 8
NC 8
NAME "velocity"
TS 1 5.00000000e+00
0
0
0
1
1
1
1
0
1.60000000e+01 1.60000000e+01
6.40000000e+01 6.40000000e+01
1.44000000e+02 1.44000000e+02
1.96000000e+02 1.96000000e+02
2.25000000e+02 2.25000000e+02
9.21600000e+03 9.21600000e+03
9.60400000e+03 9.60400000e+03
9.80100000e+03 9.80100000e+03
ENDDS

Cards

Card Type DATASET
Description File type identifier. Must be on first line of file. No fields.
Required YES


Card Type OBJTYPE
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 Value Description
1 type
"mesh2d"
"scat2d"
"cgrid2d"
"specgrid2d"
2D mesh
2D scatterpoints
2D cartesian grid
Spectral energy grid


Card Type OBJID
Description Identifies the object that the data sets in the file are associated with.
Required NO. Card is only used if the OBJTYPE is scat2d.
Format OBJID id
Sample OBJID 1254
Field Variable Value Description
1 id Integer > 0 The ID of the object.


Card Type RT_JULIAN
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
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


Card Type BEGSCL
Description Scalar data set file identifier. Marks beginning of scalar data set. No fields.
Required YES


Card Type BEGVEC
Description Vector data set file identifier. Marks beginning of vector data set. No fields.
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 data sets 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 ND
Description The number of data values that will be listed per time step. This number should correspond to the total number of vertices, nodes, cells centers (cell-centered grid), cell corners (mesh-centered grid), maximum node id (meshes) or scatter points.
Required YES.
Format ND numdata
Sample ND 10098
Field Variable Value Description
1 numdata + The number of items. At each time step, numdata values are printed.


Card Type NC
Description This number should correspond to the maximum element id (meshes) or the number of cells (grids).
Required YES.
Format NC numcells
Sample NC 3982
Field Variable Value Description
1 numcells + The number of elements or cells


Card Type NAME
Description The name of the data set.
Required YES.
Format NAME "name"
Sample NAME "Total head"
Field Variable Value Description
1 "name" str The name of the dataset in double quotes.


Card Type TS
Description Marks the beginning of a new time step, indicates if stat flags are given, and defines the time step value, status flags, and scalar data values for each item.
Required YES.
Format
TS istat time
stat1
stat2
.
.
stat numcells
val1
val2
.
.
valnumdata
Field Variable Value Description
1 active array flag
0
1
Activity or status values not specified
Activity or status values specified - A value of 0 (inactive) or 1 (active) must be specified for each node following the TS card, before the scalar or vector values are specified.
2 Time step double Time step value for data

Related Topics