[Users] Extracting the last iteration from 3D CarpetIOHDF5 output files

Lorenzo Ennoggi lorenzo.ennoggi at gmail.com
Mon Jun 27 07:01:14 CDT 2022


Hello,
I have a set of 3D output files from CarpetIOHDF5 (rho.xyz_file<n>.h5),
each containing many iterations, and I want to create a set of new
CarpetIOHDF5 files containing the data related to the last iteration. I
have tried something, but I couldn't get anything to work, so I am asking
for help here.

For each file rho.xyz_file<n>.h5, I used the hdf5_extract utility to create
a new file containing the dataset related to the last iteration
("HYDROBASE::rho
it=1067600 tl=0 rl=0 c=<n>") and the group "Parameters and Global
Attributes". However, when I try to open the set of new files with VisIt I
get the following error:

VisIt could not read from the file
> "/home/lorenzo/CBD_prod_WZ9_400_140_280_output-0014/Output/rho.xyz_it1067600_tl0_rl0_c*
> database".


The generated error message was:


There was an error opening
> /home/lorenzo/CBD_prod_WZ9_400_140_280_output-0014/Output/rho.xyz_it1067600_tl0_rl0_c*
> database. It may be an invalid file.  VisIt tried using the following file
> format readers to open the file: CarpetHDF5


The following error(s) may be helpful in identifying the problem:
> *Tried to access an invalid index 1 (Maximum = 0).*


I thought that maybe some metadata in the new files are telling VisIt that
there are multiple iterations available, which is not true; I'm not
completely sure this is really the issue, though.

In the new files, the attributes "GH$iteration" and "carpet_global_time"
from the group "Parameters and Global Attributes" are still respectively
set to the first iteration (992800) and the first time (148920) available
in the original files, while I am extracting the last iteration (1067600,
time 160140). Also, in the new files, the dataset "Grid Structure v5" (a
string) still contains
"grid_times:[[[148920,148919.85000000001,148919.69999999998]]]", which also
looks wrong. Therefore, I used h5py to generate new files in which I fixed
"GH$iteration", "carpet_global_time" and "Grid Structure v5", but I still
get the same error from VisIt.

I have also thought about re-running the simulation that produced the
original files from the last checkpoint and just dump the last iteration,
but that simulation was run some time ago and the code I am using has
evolved quite a bit in the meantime, to the point that some parameters are
not even defined anymore.

Is there any other attribute/dataset I should edit in order to fix the new
files? Are there smarter ways to extract an iteration from a set of 3D
CarpetHDF5 output files? Please let me know if you need additional
information from my end.

Thank you very much,
Lorenzo Ennoggi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20220627/fdd72d8f/attachment.html 


More information about the Users mailing list