tbl_h5_revert_dbl Subroutine

private subroutine tbl_h5_revert_dbl(me, n_steps_back)

Arguments

Type IntentOptional Attributes Name
class(growing_h5_tbl_t), intent(inout) :: me
integer, intent(in) :: n_steps_back

Calls

proc~~tbl_h5_revert_dbl~~CallsGraph proc~tbl_h5_revert_dbl tbl_h5_revert_dbl h5dset_extent_f h5dset_extent_f proc~tbl_h5_revert_dbl->h5dset_extent_f interface~h5dflush H5Dflush proc~tbl_h5_revert_dbl->interface~h5dflush

Called by

proc~~tbl_h5_revert_dbl~~CalledByGraph proc~tbl_h5_revert_dbl tbl_h5_revert_dbl proc~hdf5_write hdf5_t%hdf5_write proc~hdf5_write->proc~tbl_h5_revert_dbl

Source Code

subroutine tbl_h5_revert_dbl(me, n_steps_back)
    class(growing_h5_tbl_t), intent(inout) :: me
    integer, intent(in) :: n_steps_back
    integer :: err
    me%dims(1) = max(1, me%dims(1)-n_steps_back)    ! shrink the dimension counter
    call h5dset_extent_f(me%dset, me%dims, err)     ! truncate the HDF5 dataset
    err = H5Dflush(me%dset)
end subroutine tbl_h5_revert_dbl