The rVariables section contains the definition of each rVariable in the CDF, the values for any vAttribute rEntries associated with each rVariable, and (optionally) data values for those rVariables. The format of the rVariables section is as follows:
#variables
[<variable-definition>
<variable-definition>
<variable-definition>
.
.
.
<variable-definition>]
Where <variable-definition> is an rVariable definition. The format of each rVariable definition is as follows:
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
<var-name> <var-data-type> <n-elems> <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:
NOTE: The last rEntry MUST be followed by a period ( .). If no rEntries are specified for an rVariable, 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 rEntries are optional. If omitted, the terminating period is still required. The rVariable values are also optional.
Several sample rVariable definitions for a CDF with 2-dimensional rVariables follow:
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
"Latitude" CDF_REAL4 1 F F T
! Attribute Data
! Name Type Value
! -------- ---- -----
"VALIDMIN" CDF_REAL4 { -90.0 }
"VALIDMAX" CDF_REAL4 { 90.0 }
"scale" CDF_REAL4 { -60.0, 60.0 }.
[1,1] = -60.0
[1,2] = -30.0
[1,3] = 0.0
[1,4] = 30.0
[1,5] = 60.0
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
"EPOCH" CDF_EPOCH 1 T F F
! Attribute Data
! Name Type Value
! -------- ---- -----
"scale" CDF_EPOCH { 10-Oct-1991 00:00:00.000,
20-Oct-1991 23:59:59.999 }.
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
'Tmp' CDF_INT2 1 T T T
! Attribute Data
! Name Type Value
! -------- ---- -----
'Fieldname' CDF_CHAR { "Temperature (C)" }.
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
"Pres_lvl" CDF_REAL4 1 T F F
! Attribute Data
! Name Type Value
! -------- ---- -----
. ! no attribute entries
1:[1,1] = 1013.1
2:[1,1] = 1015.0
3:[1,1] = 1012.3
A sample variable definition for a CDF with 0-dimensional rVariables follows:
! Variable Data Number Record Dimension
! Name Type Elements Variance Variances
! -------- ---- -------- -------- ---------
"Latitude" CDF_REAL4 1 F
! Attribute Data
! Name Type Value
! -------- ---- -----
"VALIDMIN" CDF_REAL4 { -90.0 }
"VALIDMAX" CDF_REAL4 { 90.0 }.
[] = -12.3