subroutine tbl_h5_create_dbl(me,location,name,datas)
class(growing_h5_tbl_t), intent(inout) :: me
integer(hid_t), intent(in) :: location
character(*), intent(in) :: name
real(dp), intent(in) :: datas(..)
integer :: err
integer(hid_t) :: prop, dspc
integer(hsize_t) :: max_dims(8), chunk_dims(8)
me%rank = rank(datas) + 1
me%dims(1) = 1
me%dims(2:me%rank) = shape(datas)
max_dims = me%dims
chunk_dims = me%dims
max_dims(1) = H5S_UNLIMITED_F
chunk_dims(1) = 1 ! was 128, setting to 1 to avoid calls to fseek()
call h5screate_simple_f(me%rank, me%dims, dspc, err, max_dims)
call h5pcreate_f(H5P_DATASET_CREATE_F, prop, err)
call h5pset_chunk_f(prop, me%rank, chunk_dims, err)
call h5dcreate_f(location, name, H5T_NATIVE_DOUBLE, dspc, me%dset, err, prop)
call h5pclose_f(prop, err)
call h5sclose_f(dspc, err)
select rank(datas)
rank(0)
call h5dwrite_f(me%dset, H5T_NATIVE_DOUBLE, datas, me%dims, err)
rank(1)
call h5dwrite_f(me%dset, H5T_NATIVE_DOUBLE, datas, me%dims, err)
rank(2)
call h5dwrite_f(me%dset, H5T_NATIVE_DOUBLE, datas, me%dims, err)
rank default
error stop "growing array can be only rank from 0 to 2"
end select
end subroutine tbl_h5_create_dbl