read .h5 file by Fortran


I want to read the data in the .h5 file generated by Fluent through Fortran, how should I start?


A vast subject, but a good place to start would be to use h5dump ( or “h5dump -Hp” if you don’t want to view the raw data) to determine what data you are interested in reading and how the data is organized. Then depending on what you want to read, take a look at the Fortran examples found here:

If the output file from Fluent was the CGNS format (which uses HDF5), then you can use the CGNS library instead to read the data, and avoid having to use HDF5 directly. See for more information.



Thank you very much for your reply, it is very helpful to me, I will continue to study hard


Hi @1150571487,

You may want to have a look at HDFql as it can greatly alleviate you from the low-level details of HDF5. In here you can learn how to read data stored in an HDF5 file in Fortran.

Hope it helps!