[Top] [Prev] [Next] [Bottom]

DFSDgetdimscale/dsgdisc

intn DFSDgetdimscale(intn dim, int32 size, VOIDP scale)
dim

IN:

Dimension this scale corresponds to

size

IN:

Size of the scale buffer

scale

OUT:

Array of values defining reference points along a specified dimension

Purpose

Gets the scale corresponding to the specified dimension.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

The DFSD interface requires the dimension scales to be of the same data type as the corresponding data. To store dimension scales of a different data type than the corresponding data, use the multifile SD interface.

Example

In this example an 800 x 500 data array is read from 'myfile.hdf', together with a scale for each dimension. The scales are assumed to be of type float32.


     intn rank;
     int32 dimsizes[2];
     float32 yscale[800], xscale[500];
     float32 pressure[800][500];

     DFSDgetdims ("SDex2.hdf", rank, dimsizes, 2);
     DFSDgetdata ("SDex2.hdf", rank, dimsizes, pressure);
     DFSDgetdimscale (1, dimsizes[0], yscale);
     DFSDgetdimscale (2, dimsizes[1], xscale);
 
FORTRAN

integer function dsgdisc(dim, size, scale)

integer dim, size

integer scale(*)



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.