HDF5 object oriented Fortran Library

Hello,

I've been developing a set of functions and an OO library that wraps those
functions in modern Fortran. It is at: https://github.com/rjgtorres/oo_hdf.

It already covers a lot of use cases such as reading and writing datasets
up to 6 dimensions, reading parts of datasets, extending datasets, defining
scales, reading and writing attributes, counting number of attributes,
counting number of objects (datasets or groups), verifying if an object is
a group or a dataset.

I will keep adding more features as I need them, and in a short time I will
change the structure of some functions to start returning error messages.

As the library is open source I'll accept any contributions and will
consider your requests.

I will gladly help in using or setting it up.

Best regards,
Ricardo Torres

Hi Ricardo,

I just did a quick glance, and I noticed a few things.

(1) Have you considered passing the C address of the array arguments instead to your functions? That would simplify your interfaces and remove a lot of code duplication. Also, using the F2003 HDF5 functions instead would also help eliminate extra code. You might want to check your code with -i8 -r8 (or equiv.).

(2) I would suggest using the size_t, hid_t, etc… definitions instead; those are guaranteed to be compatible with C.

Looks like a good start.

Scot

···

On May 31, 2017, at 6:34 AM, Ricardo Torres <ricardojgtorres@gmail.com<mailto:ricardojgtorres@gmail.com>> wrote:

Hello,

I've been developing a set of functions and an OO library that wraps those functions in modern Fortran. It is at: https://github.com/rjgtorres/oo_hdf.

It already covers a lot of use cases such as reading and writing datasets up to 6 dimensions, reading parts of datasets, extending datasets, defining scales, reading and writing attributes, counting number of attributes, counting number of objects (datasets or groups), verifying if an object is a group or a dataset.

I will keep adding more features as I need them, and in a short time I will change the structure of some functions to start returning error messages.

As the library is open source I'll accept any contributions and will consider your requests.

I will gladly help in using or setting it up.

Best regards,
Ricardo Torres
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hello Scot,

I didn't look at any C integration features yet, I'm not a C programmer...
But if you could show, or direct me, to an example i can implement it.

Some of the functions that i have were developed some time ago for work
projects, some by me, others from my colleagues and some from other open
source projects. When i'm doing new functions I try to use the best hdf
functions, non deprecated at least, and F2003 if they exist. One problem is
that the fortran documentation is really not great! I've found routines
that are not the same as of the C (see H5Lget_name_by_idx
<https://support.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-GetNameByIdx>),
routines with missing input arguments and others were there are fortran
interfaces and in the site says they don't exist (sorry for the lack of
examples but I don't remember them).

I will change the kinds to the hdf5 for congruency.

Thank you for your suggestions.

Best regards,
Ricardo