WMS:ASCII Dataset Files: Difference between revisions
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Datasets can be stored to 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. The file format is identical for 2D and 3D datasets. The ASCII dataset format is shown in Figure 1. A sample dataset file is shown in Figure 2. | |||
For scalar | For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset 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. | ||
{|class="wikitable" style="border:1px #AAA solid;" | {|class="wikitable" style="border:1px #AAA solid;" | ||
Line 8: | Line 8: | ||
|width="250"|/* File type identifier */ | |width="250"|/* File type identifier */ | ||
|- | |- | ||
|OBJTYPE type||/* Type of object | |OBJTYPE type||/* Type of object dataset is associated with */ | ||
|- | |- | ||
|BEGSCL||/* Beginning of scalar | |BEGSCL||/* Beginning of scalar dataset */ | ||
|- | |- | ||
|OBJID id||/* Object id */ | |OBJID id||/* Object id */ | ||
Line 18: | Line 18: | ||
|NC numcells||/* Number of cells or elements */ | |NC numcells||/* Number of cells or elements */ | ||
|- | |- | ||
|NAME "name"||/* | |NAME "name"||/* Dataset name */ | ||
|- | |- | ||
|TS istat time||/* Time step of the following data. */ | |TS istat time||/* Time step of the following data. */ | ||
Line 42: | Line 42: | ||
|val<sub>numdata</sub>||/* Repeat TS card for each time step */ | |val<sub>numdata</sub>||/* Repeat TS card for each time step */ | ||
|- | |- | ||
|ENDDS||/* End of | |ENDDS||/* End of dataset */ | ||
|- | |- | ||
|BEGVEC||/* Beginning of vector dataset */ | |BEGVEC||/* Beginning of vector dataset */ | ||
Line 54: | Line 54: | ||
|NC numcells||/* Number of cells or elements */ | |NC numcells||/* Number of cells or elements */ | ||
|- | |- | ||
|NAME "name"||/* | |NAME "name"||/* Dataset name */ | ||
|- | |- | ||
|TS istat time||/* Time step of the following data. */ | |TS istat time||/* Time step of the following data. */ | ||
Line 80: | Line 80: | ||
|/* Repeat TS card for each time step */ | |/* Repeat TS card for each time step */ | ||
|- | |- | ||
|ENDDS||/* End of | |ENDDS||/* End of dataset */ | ||
|- | |- | ||
|/* Repeat BEGSCL and BEGVEC sequences for each | |/* Repeat BEGSCL and BEGVEC sequences for each dataset */ | ||
|} | |} | ||
''Figure 1. ASCII | ''Figure 1. ASCII Dataset File Format.'' | ||
Line 187: | Line 187: | ||
|ENDDS | |ENDDS | ||
|} | |} | ||
''Figure 2. Sample ASCII | ''Figure 2. Sample ASCII Dataset File.'' | ||
The card types used in the scalar | The card types used in the scalar dataset file format are as follows: | ||
{|border="1" align="center" cellpadding="2" text-align: center | {|border="1" align="center" cellpadding="2" text-align: center | ||
Line 206: | Line 206: | ||
|''Card Type''||colspan="3"|'''OBJTYPE''' | |''Card Type''||colspan="3"|'''OBJTYPE''' | ||
|- | |- | ||
|''Decription''||colspan="3"|Identifies the type of objects that the | |''Decription''||colspan="3"|Identifies the type of objects that the datasets in the file are associated with. | ||
|- | |- | ||
|''Required''||colspan="3"|YES. If card does not exist, the file can only be read through the Data Browser. The | |''Required''||colspan="3"|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''||colspan="3"|OBJTYPE type | |''Format''||colspan="3"|OBJTYPE type | ||
Line 224: | Line 224: | ||
|'''BEGSCL''' | |'''BEGSCL''' | ||
|- | |- | ||
|''Description''||Scalar | |''Description''||Scalar dataset file identifier. Marks beginning of scalar dataset. No fields. | ||
|- | |- | ||
|''Required''||YES | |''Required''||YES | ||
Line 234: | Line 234: | ||
|'''BEGVEC''' | |'''BEGVEC''' | ||
|- | |- | ||
|''Description''||Vector | |''Description''||Vector dataset file identifier. Marks beginning of vector dataset. No fields. | ||
|- | |- | ||
|''Required''||YES | |''Required''||YES | ||
Line 278: | Line 278: | ||
|''Card Type''||colspan="3"|'''NAME''' | |''Card Type''||colspan="3"|'''NAME''' | ||
|- | |- | ||
|''Decription''||colspan="3"|The name of the | |''Decription''||colspan="3"|The name of the dataset. | ||
|- | |- | ||
|''Required''||colspan="3"|YES. | |''Required''||colspan="3"|YES. | ||
Line 318: | Line 318: | ||
{{WMSMain}} | {{WMSMain}} | ||
[[Category:File Formats]] | [[Category:WMS File Formats|A]] |
Latest revision as of 16:44, 17 February 2014
Datasets can be stored to 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. The file format is identical for 2D and 3D datasets. The ASCII dataset format is shown in Figure 1. A sample dataset file is shown in Figure 2.
For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset 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.
DATASET | /* File type identifier */ |
OBJTYPE type | /* Type of object dataset is associated with */ |
BEGSCL | /* Beginning of scalar dataset */ |
OBJID id | /* Object id */ |
ND numdata | /* Number of data values */ |
NC numcells | /* Number of cells or elements */ |
NAME "name" | /* Dataset name */ |
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 dataset */ |
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" | /* Dataset 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 dataset */ |
/* Repeat BEGSCL and BEGVEC sequences for each dataset */ |
Figure 1. ASCII Dataset File Format.
DATASET |
OBJTYPE grid2d |
BEGSCL |
OBJID 27211 |
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 |
OBJID 27211 |
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 |
Figure 2. Sample ASCII Dataset File.
The card types used in the scalar dataset file format are as follows:
Card Type | DATASET |
Description | File type identifier. Must be on first line of file. No fields. |
Required |
Card Type | OBJTYPE | ||
Decription | 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 | tin mesh2d grid2d scat2d mesh3d grid3d scat3d |
TINs 2D meshes 2D grids 2D scatter points 3D meshes 3D grids 3D scatter points |
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 | |||
Decription | 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. | |||
Field | Variable | Size | Value | Description |
1 | type | 4 byte int |
0 1 |
The vectors will be applied to the nodes/gridnodes. The vectors will be applied to the elements/cells. |
Card Type | ND | ||
Decription | 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 elements or cells. |
Card Type | NAME | ||
Decription | 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 | ||
Decription | 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 | Use status flags from previous time step. For first time step, this indicates that all cells are active. 1 Status flags will be listed. |
2 | time | + | The time step value. If only one time step exists, time is not required |
2 - (n+1) | stat | 0,1 | The status of each item. If active, stat=1. If inactive stat=0. Omitted if i=0 on STAT card. |
(n+2) - (2n +1) |
val | "+/-" | The scalar data values of each item. |
WMS – Watershed Modeling System | ||
---|---|---|
Modules: | Terrain Data • Drainage • Map • Hydrologic Modeling • River • GIS • 2D Grid • 2D Scatter | |
Models: | CE-QUAL-W2 • GSSHA • HEC-1 • HEC-HMS • HEC-RAS • HSPF • MODRAT • NSS • OC Hydrograph • OC Rational • Rational • River Tools • Storm Drain • SMPDBK • SWMM • TR-20 • TR-55 | |
Toolbars: | Modules • Macros • Units • Digitize • Static Tools • Dynamic Tools • Drawing • Get Data Tools | |
Aquaveo |