Convert hdf5 files to a Paraview readable format

Hello everyone,

I use a 3D code for solving Euler equations in a cylindrical geometry.
The structure of my output ( an hdf5 file ) looks like :
gas/mesh/x : 1D array of dimension nx containing all r values
gas/mesh/y : 1D array of dimension ny containing all theta values
gas/mesh/z : 1D array of dimension nz containing all z values

Physical variables
gas/rho : 3D array of dimension nz,ny,nx
gas/p : 3D array of dimension nz,ny,nx

I want to use Paraview in order to visualize my output data but it is not read.
I read that apparently I have to change the format of my data. Thus I want to know, please, to which format I should convert my data ? (If possible the easiest way). If possible I would like to have an example of what my data should look like.
If needed in the following link you can find an example of my file :

Thank you in advance for your help,

A Python Programmable Source and h5py would do the job nicely. See the attached draft. (2.0 KB)

Left as an exercise: if the cylinder must close on itself, you’ll need one more plane of data in the (r,z) space. Or use cell-data instead of point-data.

Hello Jean M. Favre,

I tried your python script and it works like a charm. Thank you very much !
Do you have documentation please Python Programmable source please ?

Best regards,

See the online doc here: