The optional zVariables section contains the definition of each zVariable in the CDF, the values for any vAttribute zEntries associated with each zVariable, and (optionally) data values for those zVariables. The format of the zVariables section is as follows:
#zVariables
[<variable-definition>
<variable-definition>
<variable-definition>
.
.
.
<variable-definition>]
Where <variable-definition> is a zVariable definition. The format of each zVariable definition is as follows:
! Variable Data Number Record Dimension
! Name Type Elements Dims Sizes Variance Variances
! -------- ---- -------- ---- ----- -------- ---------
<var-name> <var-data-type> <n-elems> <dims> <sizes> <rec-vary> <dim-varys>
! Attribute Data
! Name Type Value
! --------- ---- -----
[<attr-name> <entry-data-type> <entry-value>
<attr-name> <entry-data-type> <entry-value>
<attr-name> <entry-data-type> <entry-value>
. . .
. . .
. . .
<attr-name> <entry-data-type> <entry-value>]. ! Note the "."
[[<rec-num>:]<indices> = <value>
[<rec-num>:]<indices> = <value>
[<rec-num>:]<indices> = <value>
. .
. .
. .
[<rec-num>:]<indices> = <value>]
Each field is defined as follows:
The number of dimensions for the zVariable.
The dimension sizes --- one value per dimension. If the zVariable has zero (0) dimensions, this field would be left blank.
NOTE: The last zEntry MUST be followed by a period ( .). If no zEntries are specified for a zVariable, the period must still be present.
{...}
)
in the same manner as for an attribute entry for a character string data type.
For non-character string data types the value is not enclosed in braces
(the braces are not necessary because there can only be one element). The
format for CDF_EPOCH values is described in Section 2.2.10.
The vAttribute zEntries are optional. If omitted, the terminating period is still required. The zVariables values are also optional.
Several sample zVariable definitions follow:
! Variable Data Number Record Dimension
! Name Type Elements Dims Sizes Variance Variances
! -------- ---- -------- ---- ----- -------- ---------
"Instrument" CDF_CHAR 10 0 F
! Attribute Data
! Name Type Value
! -------- ---- -----
"FIELDNAM" CDF_CHAR { "Measuring instrument" }.
[] = { "Gonkulator" }
! Variable Data Number Record Dimension
! Name Type Elements Dims Sizes Variance Variances
! -------- ---- -------- ---- ----- -------- ---------
"Ticks" CDF_BYTE 1 1 3 T T
! Attribute Data
! Name Type Value
! -------- ---- -----
. ! no attribute entries
1:[1] = 1
1:[2] = 2
1:[3] = 3
2:[1] = 3
2:[2] = 2
2:[3] = 1
! Variable Data Number Record Dimension
! Name Type Elements Dims Sizes Variance Variances
! -------- ---- -------- ---- ---------- -------- ---------
"WIND VELOCITY" CDF_REAL4 1 3 360 180 10 T T T T
! Attribute Data
! Name Type Value
! -------- ---- -----
"FIELDNAM" CDF_CHAR { "Wind velocity." }
"VALIDMIN" CDF_REAL4 { 0.0 }
"VALIDMAX" CDF_REAL4 { 300.0 }
"UNITS " CDF_CHAR { "Knots" }
"FORMAT " CDF_CHAR { "F9.1 " }.