@@ -2896,6 +2896,23 @@ subroutine hdf5_list_attributes(ifile, location, attrs)
28962896 enddo
28972897 end subroutine
28982898
2899+ subroutine hdf5_delete_attribute (ifile , location , attr )
2900+ integer (hid_t), intent (in ) :: ifile
2901+ character (len=* ), intent (in ) :: location
2902+ character (len=* ), intent (in ) :: attr
2903+
2904+ integer (hid_t) :: obj_id
2905+ call h5oopen_f(ifile, trim (adjustl (location)), obj_id, hdf_err)
2906+ call h5adelete_f(obj_id, attr, hdf_err)
2907+ call h5oclose_f(obj_id, hdf_err)
2908+ end subroutine hdf5_delete_attribute
2909+
2910+ subroutine hdf5_delete (ifile , location )
2911+ integer (hid_t), intent (in ) :: ifile
2912+ character (len=* ), intent (in ) :: location
2913+ call h5ldelete_f(ifile, location, hdf_err)
2914+ end subroutine hdf5_delete
2915+
28992916 ! help function with separates /group1/group2/dset -> /group1/group2 and dset
29002917 subroutine hdf5_help_separate_dsetname (dsetfull , gname , dset )
29012918 character (len=* ), intent (in ) :: dsetfull
0 commit comments