next up previous contents
Next: 2.3.15 Sequential Access Up: 2.3.14 Hyper Access Previous: 2.3.14 Hyper Access

Example (Fortran application)

 

Assume a 2-dimensional variable array with sizes [2,4], row majority, a record variance of VARY, dimension variances of [VARY,VARY], and hyper read parameters as follows:

The values placed in the application's buffer would be as follows (with the first value being in low memory):

5(1,1) 5(1,2) 5(1,3) 5(1,4) 5(2,1) 5(2,2) 5(2,3) 5(2,4)
6(1,1) 6(1,2) 6(1,3) 6(1,4) 6(2,1) 6(2,2) 6(2,3) 6(2,4)
where r(i,j) is a physically stored value with r being the record number, i being the first dimension index, and j being the second dimension index. ( r, i, and j are physical record numbers and dimension indices.)

If the dimension variances had been [VARY,NOVARY], the values placed in the buffer would have been

5(1,1) 5(1,1) 5(1,1) 5(1,1) 5(2,1) 5(2,1) 5(2,1) 5(2,1)
6(1,1) 6(1,1) 6(1,1) 6(1,1) 6(2,1) 6(2,1) 6(2,1) 6(2,1)

If the record count had been 3 and the record interval 2, the values placed in the buffer would have been

5(1,1) 5(1,2) 5(1,3) 5(1,4) 5(2,1) 5(2,2) 5(2,3) 5(2,4)
7(1,1) 7(1,2) 7(1,3) 7(1,4) 7(2,1) 7(2,2) 7(2,3) 7(2,4)
9(1,1) 9(1,2) 9(1,3) 9(1,4) 9(2,1) 9(2,2) 9(2,3) 9(2,4)

If the dimension counts had been [2,2] and the dimension intervals [1,2], the values placed in the buffer would have been

5(1,1) 5(1,3) 5(2,1) 5(2,3)
6(1,1) 6(1,3) 6(2,1) 6(2,3)

If the CDF majority had been column major, the values placed in the buffer would have been...

5(1,1) 5(2,1) 5(1,2) 5(2,2) 5(1,3) 5(2,3) 5(1,4) 5(2,4)
6(1,1) 6(2,1) 6(1,2) 6(2,2) 6(1,3) 6(2,3) 6(1,4) 6(2,4)

Had these examples been for hyper writes, the CDF library would have expected to find the values in the application's buffer exactly as they were placed there during the corresponding hyper read. In the case where the record interval was 2, the records being skipped would be written using the variable's pad   value if they did not already exist. If they did already exist, they would not be affected.

In a C application hyper reads and writes for rVariables are performed using either the CDFvarHyperGet and CDFvarHyperPut functions (Standard Interface) or the <GET_,rVAR_HYPERDATA_> and <PUT_,rVAR_HYPERDATA_> operations of the CDFlib function (Internal Interface). Hyper reads and writes for zVariables are performed using the <GET_,zVAR_HYPERDATA_> and <PUT_,zVAR_HYPERDATA_> operations of the CDFlib function (Internal Interface). In a Fortran application hyper reads and writes for rVariables are performed using either the CDF_var_hyper_get and CDF_var_hyper_put subroutines (Standard Interface) or the <GET_,rVAR_HYPERDATA_> and <PUT_,rVAR_HYPERDATA_> operations of the CDF_lib subroutine (Internal Interface). Hyper reads/writes for zVariables are performed using the <GET_,zVAR_HYPERDATA_> and <PUT_,zVAR_HYPERDATA_> operations of the CDF_lib subroutine (Internal Interface).



next up previous contents
Next: 2.3.15 Sequential Access Up: 2.3.14 Hyper Access Previous: 2.3.14 Hyper Access



cdfsupport@nssdca.gsfc.nasa.gov