HDF_VD_READ

The HDF_VD_READ function reads data from a VData in a Hierarchical Data Format file. This function returns the number of records successfully read from the VData .

The default is to use FULL_INTERLACE and to read all fields in all records. The user can override the defaults with keywords. If multiple fields with different data types are read, all of the data is read into a byte array. The data must then be explicitly converted back into the correct type(s) using various IDL type conversion routines. For example:

nread = HDF_VD_READ(vdat, x, NREC=1, FIELDS="FLT,LNG")

floatvalue = FLOAT(x, 0)

longvalue = LONG(x, 4)

Calling Sequence

Result = HDF_VD_READ( VData, Data )

Arguments

VData

The VData handle returned by a previous call to HDF_VD_ATTACH.

Data

A named variable in which the data is returned.

Keywords

FIELDS

A string containing a comma-separated list of fields to be read. Normally HDF_VD_READ will read all fields in the VData.

FULL_INTERLACE

Set this keyword to use full interlace when reading (the default).

NO_INTERLACE

Set this keyword to use no interlace when reading.

NRECORDS

The number of records to read. By default, HDF_VD_READ reads all records from a VData.

Examples

Typical read:

NREC = HDF_VD_READ(Vdat, X)

Read one field:

NREC = HDF_VD_READ(Vdat, X, FIELDS='VEL')

Read a record:

NREC = HDF_VD_READ(Vdat, X, NRECORDS=1)