Silverfrost Forums

Welcome to our forums

HDF5

20 Jun 2019 10:08 #23813

Do anyone succeeded to read HDF5 files from Fortran in this users group or any other Fortran groups?

20 Jun 2019 11:50 #23815

Absoft Fortran comes with pre-built libraries for HDF4, HDF5 and NetCDF. Absoft provides example source files, headers, and a makefile to build the examples.

See https://forums.absoft.com/index.php?topic=810.0 .

HDF is also available for Gfortran/Cygwin.

Many years ago (~10 ?) I built HDF from source using Intel Fortran on Windows 7. Doing so was not easy, because HDF depends on other packages as prerequisites, and required many tweaks. The easiest route, perhaps, is to get the stuff working on Linux and then try to duplicate on Windows.

What are your specific needs?

20 Jun 2019 12:19 #23816

Thanks mecej4. I need just to read the content of hdf5 file, ideally using FTN95 /64. Its structure is simple, 10-12 quantities on 3D mesh. File size up to 0.1-10 TB. If this is not possible then using any Windows Fortran and then either make content visible to FTN95 or convert the content of HDF5 into regular ASCII.

By the way Absoft says 'Further info you will get on HDF website.' And this HDF website was made to confuse people to ultimate extent 😃. Ideally, to find someone who have done this with Fortran and can make simple example of reading some simple demo HDF5 file.

20 Jun 2019 2:02 #23817

Have you looked at the NCDUMP converter, available at https://nsidc.org/data/hdfeos/hdf_to_ascii.html ? You should be able to convert one of your smaller data files and see if the conversion from HDF to ASCII produces a usable data file.

Of course, when you do such a conversion, the structure of the data is no longer contained in the data file, and your program has to have that structural information programmed by you in order to be able to process the converted ASCII data file.

20 Jun 2019 10:09 #23819

Thanks, will look. Again Matlab shocked me. This is how things have to be done: everything ultimately convenient and simple for the people. Our student, without programming experience, just in couple hours made reading of the hdf5 file in Matlab. Before that another student in a month made the same in Python. And before before that, another guy, professor, in whole several months to a year made writing and reading hdf5 using C++. After that he was not able to repeat that to correct some errors and expand functionality 😃

21 Jun 2019 1:36 #23820

Update ncdump works with their demo hdf file but does not show me anything with my file. HdfViewer made by the same group shows content of my hdf file OK but das not have functionality to extract everything from DOS prompt command (via Windows GUI only). Probably they stopped developing ncdump in latest versions HDF5 because i do not see it there, it only supplied in the HDF version 4. The DOS version like ncdump would be possible to use in automatic regime calling it from FTN95. So my idea now is to find anyone who made HDF5 reader in Fortran and create own analogy of ncdump.exe ...

21 Jun 2019 10:08 #23837

And guess those who do not know how much efforts is in Matlab to extract data out of HDF file?

Yes, like it should be with award winning software, just one single line

x1=h5read(file,'/X');

Do anyone knows if it is possible to make stand alone program in Matlab? Then we'd create EXE module in Matlab which will extract data off HDF and convert it to ASCII or binary and run it from FTN95

21 Jun 2019 11:51 #23838

A number of utilities for HDF5 are listed at https://support.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump .

Some words of caution regarding HDF and other binary file formats: plan and investigate carefully before adopting such a file format. There are several problems and attempting to overcome them can eat up a lot of time before the user finds out that some cannot be overcome. See https://cyrille.rossant.net/moving-away-hdf5/ .

22 Jun 2019 7:54 #23839

That was great help, mecej4, thanks, i found the workaround. The HDF group made HDF5 analog of HDF4 standalone extraction tool ncdump, called h5dump, i just missed it when looked first time. Hopefully after getting experience with this tool, i some day will be able to read HDF5 files from FTN95 directly. Or may be Silverfrost will adapt HDF5 library. For now the approach of launching external converter from FTN95 will be probably OK.

Yes, there exist danger with binary or zipped storage, but we have no choice, the sizes of files PIC codes generate are enormous, 1.2 TB for example was just one of today's runs from one of 3 supercomputers we use every day.

/* 10-15 years from now this will be laughable how small it is what we today consider hell large

24 Jun 2019 8:12 #23841

The hdfgroup does not teach people going from simplest to complex. You will break your legs trying to understand what is what there. They even do not bother to clean up the mess in their website.

I guarantee I'd have no clue till today what is Clearwin or OpenGL or .NET or draw_text@/draw_line@ if Silverfrost had no simplest possible demo examples for all that options. Though OpenGL examples were not that simple, just one was. And i started with it and am very happy with the results. Sorry there were so little of them

24 Jun 2019 10:04 #23843

just one was

And which was that?

Eddie

25 Jun 2019 2:51 #23846

The one which rotates the XY plot

Please login to reply.