how to open HDF5 file in ParaView

hi mathiew,
i have file with .hdf5 file format , could you help how to visualize at paraview , since i amtried to open it, there is comment:


ERROR: In Utilities\VisItBridge\databases\vtkVisItChomboReader.cxx, line 135
vtkVisItChomboReader (0000023E635C6820): The selected database type was not correct for the given file.  The message from the database was Cannot be a Chombo file, does not have Chombo_global

ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (0000023E689FBA40): Algorithm vtkFileSeriesReader(0000023E701C9F80) returned failure for request: vtkInformation (0000023E6FDDDC70)
  Debug: Off
  Modified Time: 304290
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1



ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\Utilities\VisItBridge\databases\AvtAlgorithms\vtkAvtSTMDFileFormatAlgorithm.cxx, line 132
vtkVisItChomboReader (0000023E635C6820): Unable to find any meshes

ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (0000023E689FBA40): Algorithm vtkFileSeriesReader(0000023E701C9F80) returned failure for request: vtkInformation (0000023E6FDDDC70)
  Debug: Off
  Modified Time: 304290
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1



ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\Utilities\VisItBridge\databases\AvtAlgorithms\vtkAvtSTMDFileFormatAlgorithm.cxx, line 132
vtkVisItChomboReader (0000023E635C6820): Unable to find any meshes

ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (0000023E689FBA40): Algorithm vtkFileSeriesReader(0000023E701C9F80) returned failure for request: vtkInformation (0000023E6FDDDC70)
  Debug: Off
  Modified Time: 304290
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1

I am tried to open it using Paraview 5.8 (because I am using phyton 3.7) , but even i am using latest version also can not open it

Hi @Noverdo_Saputra

HDF5 is not a file format, it is a container, which format are you using ?

Thanks Mathieu, when i check properties type file is .hdf5 , not specified like h5 or other type of hdf5


please your advice

Regards

What software produced the .hdf5 files? HDF5 is a very flexible format and requires knowledge of how the data is arranged internally to use it effectively. ParaView supports a number of different .hdf5 files produced by different software, but you have to tell ParaView how to interpret it, and to do that you need to tell it which “type” of .hdf5 file it is.

HDF5 is a general purpose file format, and many codes produce this to dump their data. The internal contents of the hdf5 file vary from code to code. Generally, companion xmf files are dumped either by the code (maybe controlled by some flag) or separately in post-processing. These xmf files (xdmf format) describes the content of the hdf5 files to ParaView. There is also a less straightforward possibility to load the hdf5 files using Programmable source where it is your responsibility to describe the data to ParaView. I am happy to spend some time on this to help you out if you don’t mind sharing a sample data file, and also let me know which code generates this data (if it is some general purpose simulation code).

Hi Cory & Dutta, I am working with python for mechanical simulation. I send output data and python code to produce output.
taylor_bar_25000.hdf5 (210.9 KB)
output.py (11.7 KB)
vtk_output.py (6.2 KB)

Can you please share the vtk file that eas generated by the code if any? Then I can compare this to make a programmable source for this.

Problem has solved using this code
pysph_to_vtk.py (10.7 KB)

1 Like

This is good but requires you to convert the data, which can be a problem for very large data sizes. Perhaps a better option would be to create a companion ascii .xmf file accompanying your hdf5 files. This would enable you to read in the hdf5 files directly.