Timestamp information not loaded from VTKHDF file

In the xml VTK files you could store timestamp information in the FieldData by including a DataArray with the name TimeValue, which is really important when reading a group of files and need to add the timestamp to any figures or plots.

I’ve noticed that this doesn’t seem to work with VTKHDF files - if I create a TimeValue DataSet in the the FieldData, Paraview no longer reads this as the timestamp for this file. I’ve also checked in the spreadsheet view to see if the FieldData is being read but the table is empty so it appears that either Paraview doesn’t read FieldData from VTKHDF files or my file is not correct.

I’m not sure which is the case so I’ve attached a simple example where there should be some FieldData.

temporal_w=5dt_t_0.vtkhdf|attachment (289.6 KB)

Hello @jpmorr,

If you want to specify some timestamp data, you need to add a Steps group and to follow the doc here: VTK File Formats - VTK documentation

In anyway temporal image data should be supported

@Lucas_Givord Does that mean the mechanism of a specific piece of FieldData to identify a time to paraview is not supported?

With regards the Steps in the documentation, is that not more for when you want to include multiple timesteps of data in a single VTKHDF file?

In my case, I have a single timestep per file since my data are usually quite large (often several hundred MB per timestep) and it would not make sense to have a single VTKHDF file that could be 10s or 100s of GB in size. So I would like to use the ability of Paraview to load a group of files with the time idinetified from the field data (Field Data as Time Meta-Data in VTK XML File Formats - VTK documentation). Is the only way to create a step for a single timestep?

Also, I’m still not clear if FieldData is supported in VTKHDF, regardless of whether it is for a timestamp or not. In the file I uploaded, I cannot see any field data when loaded in Paraview - it does not appear in the list of variables or the spreadsheet view. Could there be a problem with the VTKHDF file or the Paraview file reader?

Does that mean the mechanism of a specific piece of FieldData to identify a time to paraview is not supported?

TimeStep and TimeValue are special datasets and we treat it differently

Also, I’m still not clear if FieldData is supported in VTKHDF

Do you use paraview master? If it’s the case then yes it should be supported

So I would like to use the ability of Paraview to load a group of files

Yes, make sense. AFAIK we should be able to load a temporal data like that by relying on the File Series mechanism, @Louis_Gombert do you know if it’s still the case? Where we should put the time value in that case?

I’m on paraview 5.13 at the moment as I assumed that since it was just released about a month ago it would be supported in that version. I can check the master version later - do I need to compile it or is there pre-compiled version available?

you can use a nightly build available in paraview.org

Nightly builds are available at https://www.paraview.org/download/?version=nightly

2 Likes

I’ve just tried out the latest nightly build of paraview (5.13.1-572) but FieldData is still not loaded from my VTKHDF file. It seems like it may be that Paraview doesn’t yet support it?

you should be able to load and see an image data which contains field data in paraview master, could you please share me your data?

Also note that we support the compression so having 1 big file could be acceptable as workaround in your case

I couldn’t find the ImageData example you mentioned, but I did find the can from the documentation (VTK File Formats - VTK documentation) which is an unstructured grid and has FieldData for NSTEPS, TMSTEPS and TimeValue. These values are visible from the spreadsheet view, but not as properties for display. The TimeValue isn’t set

Checking this example helped me resolve the missing FieldData in my file - I was doing something stupid (passing a None value and then not writing any data to the file) so I can see that the field data is read by Paraview, just not set as a TimeValue.

Interestingly if you load the can-pvtu.hdf example you can see that it is trying to do something with the NSTEPS, TMSTEPS and TimeValue data as Paraview thinks there are 10 timesteps in the file with values between 0-1 for the times which isn’t quite correct for this example as it is only a single timestep from the exodus can example - probably the last one.

I did come across this GitLab issue (https://gitlab.kitware.com/vtk/vtk/-/issues/18980) on the same topic where the poster mentioned including the timestep in VTKHDF/Steps/Values. Would that work here for the single timstep? It wasn’t clarified in the thread.

If I get the opportunity,I will test this for including the time for each file in a time series.

1 Like

I just tested a simple case of adding a Steps group with NSteps and Values to see if Paraview would pick that up for a single file but unfortunately not.

At least the File Series and FieldData work with the VTKHDF file format for now and hopefully at some point in the future TimeValue support gets added.

Thanks for these investigations, it would be nice to open an issue regarding that, I don’t know how the XMLReader/FileSeriesReader proceed to append time value but maybe the HDFReader can do the same.