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 datasets 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
|
|
|
Card Type
|
BEGSCL
|
Description
|
Scalar dataset file identifier. Marks beginning of scalar dataset. No fields.
|
Required |
YES
|
Card Type
|
BEGVEC
|
Description
|
Vector dataset file identifier. Marks beginning of vector dataset. 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 datasets would then be assigned to the objects corresponding to the active module.
|
Field
|
Variable
|
Size
|
Value
|
Description
|
1
|
type
|
4 byte int
|
|
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), the number of cells (grids), or the number of vertices (scatter sets).
|
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 dataset.
|
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
|
|
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