next up previous contents
Next: START and END Fields Up: Indices Previous: Record indices   Contents


Dimension Indices

Returning to the identification of the various dimensional levels with sets of indices of a data array, one realizes that the description given in Section 2.3.1 implies a certain ordering to that array: Level 0 dimensions/indices would be the fastest-varying, followed by the Level 1 dimensions/indices, and finally the Level 2 dimensions/indices. To impose such an ordering on how the data sets are written would be excessively restrictive, so a logical separation is made between the order of the array indices (which may be in any arbitrary order desired by the dataset creator) and the order in which dimensions are specified, which is fixed by the format. A pointer or index must therefore be attached to each dimensional specification, indicating to which ``array index'' that dimension corresponds. The set of all these pointers, then, would constitute a one-to-one mapping between array indices and data dimensions. (A special case of such a pointer is the Level 0 dimension of scalar data; as mentioned above, a dimension of rank 1 is superfluous, and, since there is therefore unlikely to be an array dimension corresponding to the single Level 0 grid point, the pointer may be taken as -1--it doesn't really point to an array index.).

For convenience, we will refer to the data array as written in the dataset as the ``actual array,'' while the data array whose indices are ordered in the Level 0-Level 1-Level 2 sequence will be called the ``virtual array.'' In this virtual array, the first $I$ indices correspond to the Level 0 dimensions (where $I$ is the order of the Level 0 dimensions--the number of Level 0 dimensions), the next $J$ indices correspond to the Level 1 dimensions ($J$ being the order of the Level 1 dimensions), and the final $K$ indices correspond to the Level 2 dimensions (where $K$ is the order of the Level 2 dimensions).

The pointers which map the virtual-array indices to the actual-array indices are specified in the INDEX fields of the DIMSPEC0, DIMSPEC1, and DIMSPEC2 records. Each INDEX field is a one-dimensional array of pointers; the $i{\rm th}$ element of an INDEX field gives the position in the actual array of the index of a given Level's $i{\rm th}$ dimension. For examples, see Section 3.2.

The DESCRIP1, DESCRIP2, DESCRIP3, DESCRIP, DESCVAL, and DESCSUP records contain another index, NDEX, which identifies which dimension at a given level they are describing. This NDEX value reflects the ordering of the indices of the virtual array, however, and not the actual array's indices. That is, the field DESCRIP1.DEXSORT.NDEX is to be used as an index into the DIMSPEC1.INDEX pointer array: DIMSPEC1.INDEX[DESCRIP1.DEXSORT.NDEX] gives that index of the actual array which corresponds to the dimension being described by the DESCRIP1 record. (This sounds more complicated than it actually is; see the examples in Section 3.2.)


next up previous contents
Next: START and END Fields Up: Indices Previous: Record indices   Contents
Eric Nash 2003-09-25