Creates a group (analogous to directory) in an HDF5 file and updates hash table.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
| character(len=*), | intent(in) | :: | groupname |
Group name |
impure subroutine hdf5_obj_CreateGroup(this,groupname) !> Creates a group (analogous to directory) in an HDF5 ! file and updates hash table. implicit none class(hdf5_obj), intent(inout) :: this !! A HDF5 object character(len=*), intent(in) :: groupname !! Group name ! Work variables integer :: ierr integer(HID_T) :: gid character(len=:), & allocatable :: groupname_ ! Format name of this group groupname_=this%FixGroupName(groupname) ! Create a group in the HDF5 file call H5Gcreate_f(this%fid,groupname_,gid,ierr) if (ierr.ne.0) & call this%parallel%Stop("Unable to create a group in HDF5 file "//this%filename) ! Add to hash table call this%tbl%Put(key=this%tbl%HashString(groupname_),val=gid) ! Close group we just created call this%CloseGroup(groupname) return end subroutine hdf5_obj_CreateGroup