Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672
Hdf rm purpose

Excerpt

Creates a new dataset and links it into the file

HTML Wrap
classhdf-rm-content-block
Hdf rm procedure

H5D_CREATE2(loc_id, name, dtype_id, space_id, lcpl_id, dcpl_id, dapl_id)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
Hdf rm c signature
hid_t H5Dcreate2hid_t loc_idconst char *namehid_t dtype_idhid_t space_idhid_t lcpl_idhid_t dcpl_idhid_t dapl_id ) 
Hdf rm fortran signature
SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & 
     hdferr, dcpl_id, lcpl_id, dapl_id)

  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier 
  CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset 
  INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier 
  INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier 
  INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier 
  INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                         ! 0 on success and -1 on failure
  INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id 
                                         ! Dataset creation property list
  INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id 
                                         ! Link creation property list
  INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id 
                                         ! Dataset access property list
END SUBROUTINE h5dcreate_f
Hdf rm parameters
hid_t loc_idIN: Location identifier; may be a file, group, dataset, named datatype, or attribute
const char *name    IN: Dataset name
hid_t dtype_idIN: Datatype identifier
hid_t space_idIN: Dataspace identifier
hid_t lcpl_idIN: Link creation property list
hid_t dcpl_idIN: Dataset creation property list
hid_t dapl_idIN: Dataset access property list
Hdf rm description

H5D_CREATE2 creates a new dataset named name at the location specified by loc_id, and associates constant and initial persistent properties with that dataset, including dtype_id, the datatype of each data element as stored in the file; space_id, the dataspace of the dataset; and other initial properties as defined in the dataset creation property and access property lists, dcpl_id and dapl_id, respectively. Once created, the dataset is opened for access.

loc_id may be a file, group, dataset, named datatype or attribute.  If an attribute, dataset, or named datatype is specified for loc_id then the dataset will be created at the location where the attribute, dataset, or named datatype is attached. name may be either an absolute path in the file or a relative path from loc_id naming the dataset.

If dtype_id is either a fixed-length or variable-length string, it is important to set the string length when defining the datatype. String datatypes are derived from H5T_C_S1 (or H5T_FORTRAN_S1 for Fortran codes), which defaults to 1 character in size. See H5T_SET_SIZE and Creating variable-length string datatypes.

If dtype_id is a committed datatype, and if the file location associated with the committed datatype is different from the file location where the dataset will be created, the datatype is copied and converted to a transient type.

The link creation property list, lcpl_id, governs creation of the link(s) by which the new dataset is accessed and the creation of any intermediate groups that may be missing.

The datatype and dataspace properties and the dataset creation and access property lists are attached to the dataset, so the caller may derive new datatypes, dataspaces, and creation and access properties from the old ones and reuse them in calls to create additional datasets.

Once created, the dataset is ready to receive raw data. Immediately attempting to read raw data from the dataset will probably return the fill value.

To conserve and release resources, the dataset should be closed when access is no longer required.

Hdf rm returnvals

Returns a dataset identifier if successful; otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart3264
progLangcpp
lineEnd4265
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm history
Release    Change
1.8.0C function introduced in this release.