Adding an SDS to a Vgroup


Contents:



How to add an SDS to a Vgroup

Following is what you need to do to add an SDS to a Vgroup. The program might look as follows (You can either download the C or FORTRAN program at the end, or just take a look at the HTML version with the HDF calls highlighted): Run this program, and then look at the resulting HDF file using hdp dumpsds addsdvg.hdf. The HDF file contains an SDS named sd1 of type 32-bit signed integer, with 1 dimension of size 10. There is no data in this object, and there are no attributes.

If you look at the resulting file using hdp dumpvg addsdvg.hdf, you can see that the SDS is included under the Vgroup with the name VG_Name_1. (This requires some understanding of the underlying structure of an HDF file.)


How to Add Data to an SDS in a Group

Next, add data to the HDF file. Your program will need to: The resulting program might look as follows (You can either download the C or FORTRAN program at the end, or just take a look at the HTML version with the HDF calls highlighted): Examine the resulting HDF file using hdp dumpsds addsdvg.hdf. Notice that data is now included.

Download Sample Programs (optional)

Programs used in this tutorial: [Compiling a program]