A CDF record is a set of variable arrays, one per rVariable and one per zVariable in the CDF. The variable arrays in a particular record are generally related to each other in some way (often time). This does not have to be the case and is not enforced by the CDF library in any way. A variable record is simply the corresponding variable array within a CDF record.
Physical variable records are actually stored in the CDF file(s). Virtual variable records are not actually stored but do exist in the conceptual view of the variable provided by CDF. Virtual records can occur in a CDF because of the following reasons:
Record variance is described in Section 2.3.10.
The maximum record written is maintained by the CDF library for each variable in the CDF. The ``maximum CDF record'' is simply the maximum rVariable record written (of all the rVariables). This quantity is available through the Standard Interface when inquiring about a CDF. Because the Standard Interface does not allow access to zVariables, zVariables are not considered when determining the ``maximum CDF record.'' The ``maximum CDF record'' would be used by applications dealing only with rVariables. The maximum record written for each rVariable and zVariable is available via the Internal Interface.
Figure 2.1 illustrates the relationships between physical and virtual variable records. Variable 1 has five records that were physically written. Only two records were physically written to variable 2 so the following records are virtual (containing the pad value for that variable). Only one record can be physically written to variable 3 because its record variance is NOVARY. The other records are virtual and contain the same values as the first record. Because a record has not been physically written to variable 4, all of its records are virtual containing the pad value for that variable. Likewise, since no records have been written to variable 5, all of its records are also virtual and contain the pad value for that variable. Note that if these are rVariables, the ``maximum CDF record'' would be five (when displayed by a toolkit program or in a Fortran application --- it would be four in a C application).
Figure 2.1: Physical vs. Virtual Records
Note that a variable's records do not have to be written sequentially starting at the first record. The records may be written in any order. For a variable with VARY record variance, if a new record more than one record beyond the current maximum record for a variable is written, the intervening records will be physically written and contain the pad value for that variable. Also, when one or more values are written to a new physical record, the entire record is physically written with the pad value for the variable being used for the unspecified values. Variable pad values are described in Section 2.3.17.