Closes an HDF5 group and removes it from the hashtable.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
| character(len=*), | intent(in) | :: | groupname |
Group to close |
impure subroutine hdf5_obj_CloseGroup(this,groupname) !> Closes an HDF5 group and removes it from the hashtable. implicit none class(hdf5_obj), intent(inout) :: this !! A HDF5 object character(len=*), intent(in) :: groupname !! Group to close ! Work variables integer :: ierr integer(HID_T) :: obj if (trim(adjustl(groupname)).ne.'/') then ! Get group object obj = this%GetGroupObject(groupname) ! get index of this group if (obj.eq.-1_HID_T) & call this%parallel%Stop("Unable to find group "//trim(adjustl(groupname))//" in HDF5 file "//this%filename) ! Close a group in the HDF5 file call H5Gclose_f(obj, ierr) if (ierr.ne.0) & call this%parallel%Stop("Unable to close group "//trim(adjustl(groupname))//" in HDF5 file "//this%filename) ! Remove group from hashtable call this%tbl%Remove(key=this%tbl%HashString(this%FixGroupName(groupname))) end if return end subroutine hdf5_obj_CloseGroup