IO: Add missing group closing in restore_attributes_h5().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-11-23 13:07:46 -03:00
parent 87dfeec608
commit 2658d6385e

View File

@ -3723,6 +3723,7 @@ module io
call set_last_id(llast_id)
call h5gclose_f(grp_id, status)
if (status /= 0) then
call print_message(loc, "Could not close group 'attributes'!")
return
@ -3760,10 +3761,12 @@ module io
dims = shape(fcoefs)
allocate(coefs(dims(1),dims(2)), stat=status)
if (status == 0) then
call read_dataset_h5(grp_id, 'fcoefs_real', H5T_NATIVE_DOUBLE, dims, coefs, status)
call read_dataset_h5(grp_id, 'fcoefs_real', &
H5T_NATIVE_DOUBLE, dims, coefs, status)
fcoefs = cmplx(1.0d+00, 0.0+00, kind=8) * coefs
call read_dataset_h5(grp_id, 'fcoefs_imag', H5T_NATIVE_DOUBLE, dims, coefs, status)
call read_dataset_h5(grp_id, 'fcoefs_imag', &
H5T_NATIVE_DOUBLE, dims, coefs, status)
fcoefs = fcoefs + cmplx(0.0d+00, 1.0+00, kind=8) * coefs
deallocate(coefs, stat=status)