SD API


The SD (Scientific Data) API is a collection of callable (from C or FORTRAN programs) routines which will allow the user to, among other operations, create, write, and read HDF files containing multi-dimensional arrays of scientific data. In subsequent sections, we will show how the SD API can be used for reading and writing HDF data sets. For a complete listing of all the operations permitted in the SD API, please see the HDF 4.1r3 User's Guide. As will be demonstrated shortly, FORTRAN (C) routines in the SD API begin with the prefix "sf" ("SD"). Data within a scientific data set may be of the floating real or integer type. In HDF, and in the SD API, a scientific data set (or SDS) must consist of a multi-dimensional array (called a SDS array), together with information on data type and dimension record. The SD API allows the user to work simultaneously with more than one multi-dimensional scientific data set (SDS) while the DFSD API is restricted to one multi-dimensional array.


Previous Main Topic

Next Main Topic

Return to Main Topics

SDS Array

The SDS array is the actual data itself, an n-dimensional array which contains the floating point or integer values. Each SDS array has an SDS name (series of alphanumeric characters) that can either be assigned by the calling statement with the FORTRAN or C program or automatically assigned by the HDF library when the new data set (if writing) is created.

Return to top

Data Type

The SD API supports the following data types:

As described later, the data type is defined in the accessing/creating function call statements within the C and FORTRAN programs.

Return to top

Dimensions

The dimensions of an SDS array identify the shape and size of the array in question. This includes the rank of the dimensions, which in HDF speak refers to the number of dimensions. One innovative feature of HDF is that one, and only one, dimension of an SDS array may be of unlimited size and referred to as an unlimited dimension.

Return to top

Optional information

When writing or creating an HDF file, the user may also wish to include information regarding the data set or array. This must be done in the calling functions of the C or FORTRAN programs.

Attributes, either predefined by NCSA or user-defined, are text strings which provide metadata about the file, data set, or dimension of interest. This includes information on what is in the file or individual SDS arrays, and how the maker of the file/data intends for the data to be used or viewed. Like most of the other routines mentioned above, attributes are defined in the function calls of the program. Attributes are further covered in section 6.

Return to top