netCDF  4.2.1.1
Specify a Hyperslab

The NetCDF allows specification of hyperslabs to be read or written with vectors which specify the start, count, stride, and mapping.

A Vector Specifying Start Index for Each Dimension

A vector of size_t integers specifying the index in the variable where the first of the data values will be read.

The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0).

The length of start vector must be the same as the number of dimensions of the specified variable. The elements of start correspond, in order, to the variable's dimensions.

A Vector Specifying Count for Each Dimension

A vector of size_t integers specifying the edge lengths along each dimension of the block of data values to be read.

To read a single value, for example, specify count as (1, 1, ... , 1).

The length of count is the number of dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions.

Setting any element of the count array to zero causes the function to exit without error, and without doing anything.

A Vector Specifying Stride for Each Dimension

A vector of size_t integers specifying the interval between selected indices.

A value of 1 accesses adjacent values of the netCDF variable in the corresponding dimension; a value of 2 accesses every other value of the netCDF variable in the corresponding dimension; and so on.

The elements of the stride vector correspond, in order, to the variable's dimensions.

A NULL stride argument is treated as (1, 1, ... , 1).

A Vector Specifying Mapping for Each Dimension

A vector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array.

imap[0] gives the distance between elements of the internal array corresponding to the most slowly varying dimension of the netCDF variable. imap[n-1] (where n is the rank of the netCDF variable) gives the distance between elements of the internal array corresponding to the most rapidly varying dimension of the netCDF variable. Intervening imap elements correspond to other dimensions of the netCDF variable in the obvious way. Distances between elements are specified in type-independent units of elements.

Note:
The distance between internal elements that occupy adjacent memory locations is 1 and not the element's byte-length as in netCDF 2.
 All Data Structures Files Functions Variables Typedefs Defines

Generated on Sat Sep 15 2012 12:44:34 for netCDF. NetCDF is a Unidata library.