Hi all,
Is there a way to loop over object attributes using Fortran bindings?
Something akin to an iterate method, but if I know that there are natt
attributes with indeces starting at n0, incremented by 1 and a method to
retrieve attribute name by index that would be great. It seems that
h5aget_num_attrs_f<http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs>is
depricated and there is no work around as far as I can tell, there is
no
easy work around. The documentation points to H5O methods, but these have a
virtually non-existent API. If one uses
h5aget_num_attrs_f<http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs>one
needs an object id, which can be fetched by h5oopen_f, BUT there is no
h5oclose_f! Also there are no object querrying fortran bindins so one
couldn't even figure out what type of object it is on the fly and branch to
the proper close statement.
Does anyone have any suggestions here? (Other than venturing into the
unfamiliar and murky waters of mixed language programming.)
Thanks,
Izaak Beekman
···
===================================
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman@princeton.edu
UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman@umiacs.umd.edu
ibeekman@umd.edu
A thought just occured to me: would it be sensible to call
h5aget_name_by_idx_f and monitor the err return value? The only problem here
is that there are no details in the documentation (which I can find) that
detail what the starting index value should be (e.g. 0 or 1 or something
strange) and which way to increment the indeces and what the stride/step
should be (probably 1?)
Any and all help or suggestions greatly appreciated.
Izaak Beekman
···
===================================
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman@princeton.edu
UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman@umiacs.umd.edu
ibeekman@umd.edu
On Fri, Oct 21, 2011 at 4:42 PM, Zaak Beekman <zbeekman@gmail.com> wrote:
Hi all,
Is there a way to loop over object attributes using Fortran bindings?
Something akin to an iterate method, but if I know that there are natt
attributes with indeces starting at n0, incremented by 1 and a method to
retrieve attribute name by index that would be great. It seems that
h5aget_num_attrs_f<http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs>is depricated and there is no work around as far as I can tell, there is no
easy work around. The documentation points to H5O methods, but these have a
virtually non-existent API. If one uses h5aget_num_attrs_f<http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs>one needs an object id, which can be fetched by h5oopen_f, BUT there is no
h5oclose_f! Also there are no object querrying fortran bindins so one
couldn't even figure out what type of object it is on the fly and branch to
the proper close statement.
Does anyone have any suggestions here? (Other than venturing into the
unfamiliar and murky waters of mixed language programming.)
Thanks,
Izaak Beekman
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman@princeton.edu
UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman@umiacs.umd.edu
ibeekman@umd.edu
Zaak,
H5O Fortran wrappers will be available in 1.8.8. If all regression tests pass this weekend, we will make a release candidate tar ball available early next week.
h5aget_num_attrs_f is still in the library. "Deprecated" is actually a typo ;-). Thank you for catching it!.
Elena
···
On Oct 21, 2011, at 3:53 PM, Zaak Beekman wrote:
A thought just occured to me: would it be sensible to call h5aget_name_by_idx_f and monitor the err return value? The only problem here is that there are no details in the documentation (which I can find) that detail what the starting index value should be (e.g. 0 or 1 or something strange) and which way to increment the indeces and what the stride/step should be (probably 1?)
Any and all help or suggestions greatly appreciated.
Izaak Beekman
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman@princeton.edu
UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman@umiacs.umd.edu
ibeekman@umd.edu
On Fri, Oct 21, 2011 at 4:42 PM, Zaak Beekman <zbeekman@gmail.com> wrote:
Hi all,
Is there a way to loop over object attributes using Fortran bindings? Something akin to an iterate method, but if I know that there are natt attributes with indeces starting at n0, incremented by 1 and a method to retrieve attribute name by index that would be great. It seems that h5aget_num_attrs_f is depricated and there is no work around as far as I can tell, there is no easy work around. The documentation points to H5O methods, but these have a virtually non-existent API. If one uses h5aget_num_attrs_f one needs an object id, which can be fetched by h5oopen_f, BUT there is no h5oclose_f! Also there are no object querrying fortran bindins so one couldn't even figure out what type of object it is on the fly and branch to the proper close statement.
Does anyone have any suggestions here? (Other than venturing into the unfamiliar and murky waters of mixed language programming.)
Thanks,
Izaak Beekman
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman@princeton.edu
UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman@umiacs.umd.edu
ibeekman@umd.edu
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org