Fortran API for HDF5

Hello everyone,

My name is Vikas Sharma. I use Modern Fortran to develop frameworks for finite element methods. Recently, I have decided to use HDF5 technology for IO in my FEM framework. After some online search, I found following two popular fortran APIs for HDF5.

It would be a great help for all of us if people can share their experiences (both positives and negatives) about working with these APIs.

Thanking you in advance!


I am also interested in trying HDF5 for saving data (which seems pretty commonly used in various programs). E.g., it is also used in some MD tools:

I am wondering if this format is mainly used in the field of computational fluid dynamics…?

Hi. While I have no experience with these frameworks. However, by just looking at their repos one can deduce:

  • H5Fortran needs F2008. OO_HDF 2003.
  • H5Fortran is maintained
  • OO_HDF indicates in the README that it is compatible with HDF 1.8 series. While H5Fortra indicates it is compatible with 1.8, 1.10, 1.12

While I have no experience with any of them, here is what I can tell you from the above. If you have to use a F2003 compiler, then OO_HDF. Otherwise H5Fortran.



1 Like

Hi @septc, I don’t think we can use HDF5 for any application where we need to perform I/O. May I know which file format do you use for I/O for your application?

@Irvise Thank you for your response. I want to add that I am using H5Fortran for couple of months. It integrates very well with my source code. The structure of the code is simple and intuitive, therefore, one can easily modify it according to one’s need. May I know which file format do you use for I/O in your application?


Hi, the I/O I choose depends on the project’s needs. HDF is very nice in general for scientific applications, but in Fortran there is also JSON, XML and TOML among others.

I tend to favour human readable formats if there is not a lot of information or if a human is supposed to modify the file (either directly or indirectly).