1 integer(hid_t) :: loc_id
2 integer(hid_t) :: attr_id
3 integer(hsize_t) :: dims(1)
4 type(h5o_info_t) :: object_info
6 dims = int([1], hsize_t)
9 call h5oget_info_by_name_f(handle%file_id, objpath, object_info, error)
10 sll_assert_always(error == 0)
13 select case (object_info%type)
15 call h5gopen_f(handle%file_id, objpath, loc_id, error)
16 sll_assert_always(error == 0)
17 case (h5o_type_dataset)
18 call h5dopen_f(handle%file_id, objpath, loc_id, error)
19 sll_assert_always(error == 0)
23 call h5aopen_f(loc_id, attrname, attr_id, error)
24 sll_assert_always(error == 0)
27 call h5aread_f(attr_id, datatype, attrvalue, dims, error)
28 sll_assert_always(error == 0)
31 call h5aclose_f(attr_id, error)
32 sll_assert_always(error == 0)
35 select case (object_info%type)
37 call h5gclose_f(loc_id, error)
38 sll_assert_always(error == 0)
39 case (h5o_type_dataset)
40 call h5dclose_f(loc_id, error)
41 sll_assert_always(error == 0)