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

DFSDadddata/dsadata

intn DFSDadddata(char *filename, intn rank, int32 dimsizes[], VOIDP data)
filename

IN:

Name of the HDF file

rank

IN:

Number of dimensions in the data array to be written

dimsizes

IN:

Array containing the size of each dimension

data

IN:

Array containing the data to be stored

Purpose

Appends a scientific dataset in its entirety to an existing HDF file if the file exists. If not, a new file is created.

Return value

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

Description

In addition to appending a multidimensional array of data to an HDF file, DFSDadddata automatically stores any information pertinent to the dataset. It will not overwrite existing data in the file. The array data can be of any valid type. However, if no data type has been set by DFSDsetNT, it is assumed that the data is of type float32.

Calling DFSDadddata will write the scientific dataset and all associated information. That is, when DFSDadddata is called, any information set by a DFSDset* call is written to the file, along with the data array itself.

Example

This example stores a three-dimensional array of type float32 in a scientific dataset. The scientific dataset is added to a file called 'myfile.hdf', with no other attribute information.

     #include "hdf.h"
     float32 points[5][20][5000];
     int dims[3];
     ...

     dims[0] = 5;
     dims[1] = 20;
     dims[2] = 5000;

     DFSDadddata("myfile.hdf",3, dims, points);
 
FORTRAN

integer function dsadata(filename, rank, dimsizes, data)

character* (*) filename

integer rank

integer dimsizes(*), data(*)



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

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