Data Set Files (ASCII)

Data sets can be stored to either ASCII or binary files. The default format is binary. Data sets can be saved in ASCII format by right clicking on the data set in the Project Explorer and selecting the Export command from the pop up menu. For both file formats, multiple data sets can be stored in a single file and both scalar and vector data sets can be saved to the same file. The file format is identical for 2D and 3D data sets.

For scalar data set files, one value is listed per vertex, cell, node, or scatter point. The points are listed sequentially in ascending order according to the ids of the nodes, points, vertices, or cells. For vector data set files, one set of XYZ 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.

The ASCII Data Set file format is as follows:

DATASET         // File type identifier
OBJTYPE type    // Type of object data set is associated with
REFTIME reftime // A value corresponding to beginning date/time of dataset
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
ACTTS time      // Marks the active time step
MAPTS time      // Marks the time step which is mapped as elevations
TS istat time   // Time step of the following data
stat1           // Status 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 flags
stat2
.
.
statnumcells
vx1 vy1 vz1
vx2 vy2 vz2
.
.
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 ASCII Data Set File:

DATASET
OBJTYPE grid2d
REFTIME 945.348729
BEGSCL
ACTTS 1.00000000e+00
ND 8
NC 8
NAME "trichloroethylene"
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 3.20000000e+01
6.40000000e+01 6.40000000e+01 1.28000000e+02
1.44000000e+02 1.44000000e+02 2.88000000e+02
1.96000000e+02 1.96000000e+02 3.92000000e+02
2.25000000e+02 2.25000000e+02 4.50000000e+02
9.21600000e+03 9.21600000e+03 1.84320000e+04
9.60400000e+03 9.60400000e+03 1.92080000e+04
9.80100000e+03 9.80100000e+03 1.96020000e+04
ENDDS

If variograms have been defined for a data set or time step of a data set within GMS, the variograms are saved in the data set file. The variogram cards are not documented.

The card types used in the scalar data set file format are as follows:

 

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 data sets in the file are associated with.

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.

Format

OBJTYPE type

Sample

OBJTYPE tin

Field

Variable

Value

Description

1

type

tin
mesh2d
grid2d
scat2d
mesh3d
grid3d
scat3d

TINs
2D meshes
2D grids
2D scatter points
3D meshes
3D grids
3D scatter points

 

Card Type

REFTIME

Description

A value corresponding to the beginning date/time of the data set.

Required

NO

Format

REFTIME reftime

Sample

REFTIME 3982.897459

Field

Variable

Value

Description

1

reftime

±

A value corresponding to the beginning date/time of the data set.

 

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

ACTTS

Description

Used to mark the active data set.  The card should be placed after the BEGSCL or BEGVEC card of the active data set and the active time step should be listed.

Required

NO

Format

ACTTS time

Sample

ACTTS 0.00

Field

Variable

Value

Description

1

time

±

The time corresponding to the active time step.  Use 0.0 for steady state data sets.

 

Card Type

MAPTS

Description

Used to mark the data set which is mapped to the object elevations.  The card should be placed after the BEGSCL or BEGVEC card of the mapped data set and the mapped time step should be listed.

Required

NO

Format

MAPTS time

Sample

MAPTS 0.00

Field

Variable

Value

Description

1

time

±

The time corresponding to the mapped  time step.  Use 0.0 for steady state data sets.

 

Card Type

OBJID

Description

The unique id of the object the data set is associated with.

Required

This card is required for data sets associated with TINs and scatter point sets.

Format

OBJID id

Sample

OBJID 2383

Field

Variable

Value

Description

1

id

+

The unique id of the object.

 

Card Type

VECTYPE

Description

Identifies the type of vector data that will be read and where to apply it.

Required

This card is only required if the vector data is associated with elements/cells.  If this card is not present, it is assumed that the data are associated with nodes/gridnodes.

Format

VECTYPE type

Sample

VECTYPE 0

Field

Variable

Value

Description

1

type

0,1

0 = The vectors will be applied to the nodes/gridnodes.
1 = The vectors will be 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

Sample

TS 1 12.5
0
1
1
1
34.5
74.3
58.4
72.9

Field

Variable

Value

Description

1

istat

0

 

1

Use status flags from previous time step.  For first time step, this indicates that all cells are active.

Status flags will be listed.

2

time

+

The time step value.  If only one time step exists, time is not required

3 - (nd+2)

stat

0,1

The status of each item. If active, stat=1.  If inactive stat=0.  Omitted if i=0 on STAT card.

(nd+2) - (2nd+2)

val

±

The scalar data values of each item.

 

Card Type

ENDDS

Description

Marks the end of a scalar or vector data set.  No fields.

Required

YES