next up previous contents
Next: 2.3.14 Hyper Access Up: 2.3 Variables Previous: 2.3.12 Majority

2.3.13 Single Value Access

   

Single value access allows only one value to be read from or written to a variable with a single call to the CDF library. Two parameters are specified when performing a single value read/write:

For 0-dimensional CDFs, the dimension indices are not applicable.

Single value access is sensitive to the record and dimension variances of a variable. For instance, if a variable has a record variance of NOVARY (with one record written) and a value is read from the fourth record, the CDF library will actually read the value from the first record (the record that is physically stored). If a value were written to the fourth record, the CDF library would actually write the value to the first record (the only record that actually physically exists). If the record variance is VARY, the values are written to the actual records. (The physical records are the same as the virtual records.) The same applies to any dimension variances that are NOVARY. When a set of indices is specified for a single value read/write, the index for a dimension whose variance is NOVARY is forced to the first index regardless of the actual index specified for that dimension (see Section 2.3.11).

In a C application single value access for rVariables is performed using either the CDFvarGet and CDFvarPut functions (Standard Interface) or the <GET_,rVAR_DATA_> and <PUT_,rVAR_DATA_> operations of the CDFlib function (Internal Interface). Single value access for zVariables is performed using the <GET_,zVAR_DATA_> and <PUT_,zVAR_DATA_> operations of the CDFlib function (Internal Interface). In a Fortran application single value access for rVariables is performed using either the CDF_var_get and CDF_var_put subroutines (Standard Interface) or the <GET_,rVAR_DATA_> and <PUT_,rVAR_DATA_> operations of the CDF_lib subroutine (Internal Interface). Single value access for zVariables is performed using the <GET_,zVAR_DATA_> and <PUT_,zVAR_DATA_> operations of the CDF_lib subroutine (Internal Interface).



next up previous contents
Next: 2.3.14 Hyper Access Up: 2.3 Variables Previous: 2.3.12 Majority



cdfsupport@nssdca.gsfc.nasa.gov