|
Purpose
|
Creates a new data set. |
|
Return value
|
Returns the data set identifier (sds_id) if successful and FAIL (or -1) otherwise. |
|
Description
|
SDcreate creates a data set with the name specified by the parameter name, the values of the data type specified by parameter data_type, the number of dimensions specified by the parameter rank, and the dimension sizes specified by the array dimsizes. |
|
|
Once a data set has been created, it is not possible to change its name, data type, or rank. However, it is possible to create a data set and close the file before writing any data values to it. The values can be added or modified at a future time. To add data or modify an existing data set, use SDselect to get the data set identifier instead of SDcreate. |
|
|
If the parameter name is NULL in C or an empty string in Fortran, the default name "Data Set" will be generated. If the length of the name specified by the name parameter is longer than 64 characters, then the name will be truncated to 64 characters. |
|
|
The calling program must ensure that the length of the dimsizes array is the value of the rank parameter, which is between 1 and MAX_VAR_DIMS (or 32). |
|
|
To create a data set with an unlimited dimension, assign the value of SD_UNLIMITED (or 0) to dimsizes[0] in C and to dimsizes(rank) in Fortran. |
|
|
The data_type parameter can contain any data type supported by the HDF library. These data types are listed in Table 1A in Section I of this manual. |