HDFGETSDS Function

Gets an HDF Scientific Data Set.

Restriction: See "Supported Platforms Guide" on the PV-WAVE Documentation website to check if this function is available on your operating system.

Usage

    status = HDFGETSDS (filename, data)

Input Parameters

filename—The name of the HDF file.

Output Parameters

data—An array containing values from the Scientific Data Set. The data type and dimensions for data are automatically set using calls to DFSDGETNT and DFSDGETDIMS.

Return Value

status—The status of the function call, where:

  • SUCCEED (0)—Indicates success.

  • FAIL (–1)—Indicates failure.

Keywords

Help—If present and nonzero, lists the usage for this routine.

Maxrank—Maximum number of dimensions expected with this dataset. The default value is 10.

Usage—If present and nonzero, lists the usage for this routine. (Same as the Help keyword.)

Discussion

HDFGETSDS obtains the current Scientific Data Set in an HDF file and positions the active pointer to the next SDS. This function is preferred for getting Scientific Data Sets, as it automatically dimensions and casts a PV‑WAVE array prior to obtaining the actual data.

Example

hdf_init
@hdf_common
testfile = !Data_dir + '/storm.hdf'
data = 0
status = DFSDrestart()
IF (status EQ FAIL) THEN  $
   MESSAGE, 'Failed DFSDrestart for HDFGETSDS.'
status = HDFGETSDS (testfile, data, Maxrank=100)
IF (status EQ FAIL) THEN  $
   MESSAGE, 'HDFGETSDS failed.'

See Also

HDFGETNT

Also refer to the following routines in the HDF Reference Manual:

DFSDGETDATA,   DFSDGETDIMS,   DFSDLASTREF

For more information on using the HDF interface and the calling sequence for the entire suite of HDF base functions, refer to PV-WAVE HDF Interface.

For a complete list of the HDF convenience routines, refer to Functional Summary of Routines.