next up previous contents
Next: 1.4.2 Data Encoding Options Up: 1.4 Features of the Previous: 1.4 Features of the

1.4.1 File Format Options

 

The CDF library gives the user the option to choose from one of two file formats in which to store the data and metadata. The first option is the traditional CDF multi-file format, which is also the default. This file format is illustrated in Figure 1.4 (assuming a CDF containing four variables). The example.cdf file contains all of the control information and metadata for the CDF. In addition to the .cdf file, a file exists for each variable in the CDF and contains only the data associated with that variable. This is illustrated by the files example.v0 through example.v3. The second option is the single-file format, which, as illustrated in Figure 1.5, consists of only the example.cdf file. This file contains the control information, metadata, and the data values for each of the variables in the CDF. Both formats allow direct access. The advantage of the single-file format is that it minimizes the number of files one has to manage and makes it easier to transport CDFs across a network. The organization of the data within the single file may, however, become somewhat convoluted, slightly increasing the data access time. The multi-file format, on the other hand, clearly delimits the data from the metadata and is organized in a consistent fashion within the files. Updating, appending, and accessing data are also done with optimum efficiency.

   figure690
Figure 1.4: Multi-File Format

   figure803
Figure 1.5: Single-File Format



cdfsupport@nssdca.gsfc.nasa.gov