[Users] Combine multiple h5 files
Gabriele Bozzola
bozzola.gabriele at gmail.com
Wed Jun 15 18:20:39 CDT 2022
Hi Maria,
You can also use kuibit, which knows how to read the various files and
combine them.
Assuming `sim` is your SimDir, `sim.gridfunctions.xyz` is a dictionary-like
object that contains all the grid functions in those files.
For instance, `sim.gridfunctions.xyz["rho"][0]` is going to be a
`HierarchicalGridData` for your 3D rest mass density at iteration 0. This
data structure contains all the information for the various refinement
levels in the data. You can resample it to `UniformGridData` for
visualization purposes.
Processing large 3D data with kuibit can be computationally intensive.
Gabriele
On Wed, Jun 15, 2022, 1:30 PM Roland Haas <rhaas at illinois.edu> wrote:
> Hello all,
>
> Chris' answer is absolutely correct.
>
> The utilities are built by default by Simfactory and by doing `make
> sim-utils` using a non-simfactory build.
>
> hdf5_merge is the tool to use to combine multiple HDF5 files, eg
> different variables or multiple segments of the same simulation.
>
> It won't merge output files from multiple processes into a single file
> (so foo.xyz.file_0.h5 and foo.xyz.file_1.h5 cannot be merged but
> foo.xyz.file_0.h5 and bar.xyz.file_0.h5 can be merged).
>
> If you need merge files foo.xyz.file_0.h5 and foo.xyz.file_1.h5 into
> foo.xyz.h5 then you can use the hdf5_slicer utility and its
> --out3d-cube option (hdf5_slicer --help gives some examples).
>
> Yours,
> Roland
>
> > KIa ora Maria,
> >
> > For me, there are hdf scripts located in Cactus/exe/<Build name>,
> > such as hdf5_merge, which should do what you are after. These
> > potentially may only be there for certain build options but someone
> > more knowledgeable than me can probably expand on that.
> >
> > Cheers,
> >
> > Chris
> >
> > [cid:8795d7d8-3669-4adf-905d-788d81a3ba8c]
> >
> >
> > [cid:3a28163e-f206-41a5-8619-e8b15edd91b0]
> >
> >
> >
> > Dr Chris Stevens
> >
> > Lecturer in Applied Mathematics
> >
> > Rm 602, Jack Erskine building
> >
> > School of Mathematics and Statistics
> >
> > T: +64 3 369 0396 (Internal 90396)
> >
> > University of Canterbury | Te Whare Wānanga o Waitaha
> >
> > Private Bag 4800, Christchurch 8140, New Zealand
> >
> >
> https://urldefense.com/v3/__http://www.chrisdoesmaths.com__;!!DZ3fjg!7WZG6jdWvLk-xY5fpz4Gs3WVdDMulNQE0FhbqLOwxf9IysF59IG7mH_Z0TF3XaW3u_RV_uOqShXgQ0PhdVxvHwVDSarFL5K9$
> > <
> https://urldefense.com/v3/__http://www.chrisdoesmaths.com/__;!!DZ3fjg!7WZG6jdWvLk-xY5fpz4Gs3WVdDMulNQE0FhbqLOwxf9IysF59IG7mH_Z0TF3XaW3u_RV_uOqShXgQ0PhdVxvHwVDSQw-a2Wd$
> > >
> >
> >
> > Director
> > SCRI Ltd
> >
> https://urldefense.com/v3/__http://www.scri.co.nz__;!!DZ3fjg!7WZG6jdWvLk-xY5fpz4Gs3WVdDMulNQE0FhbqLOwxf9IysF59IG7mH_Z0TF3XaW3u_RV_uOqShXgQ0PhdVxvHwVDSaWVNa5R$
> > <
> https://urldefense.com/v3/__http://www.scri.co.nz/__;!!DZ3fjg!7WZG6jdWvLk-xY5fpz4Gs3WVdDMulNQE0FhbqLOwxf9IysF59IG7mH_Z0TF3XaW3u_RV_uOqShXgQ0PhdVxvHwVDSYsOUyhW$
> > >
> >
> > ________________________________
> > From: users-bounces at einsteintoolkit.org
> > <users-bounces at einsteintoolkit.org> on behalf of Hamilton, Maria
> > <babiuc at marshall.edu> Sent: 16 June 2022 08:02 To: Roland Haas
> > <rhaas at illinois.edu> Cc: users at einsteintoolkit.org
> > <users at einsteintoolkit.org> Subject: [Users] Combine multiple h5 files
> >
> > You don't often get email from babiuc at marshall.edu. Learn why this is
> > important<
> https://urldefense.com/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!DZ3fjg!7WZG6jdWvLk-xY5fpz4Gs3WVdDMulNQE0FhbqLOwxf9IysF59IG7mH_Z0TF3XaW3u_RV_uOqShXgQ0PhdVxvHwVDSfd6n3TN$
> > > Hi,
> >
> > I have a quick question: my output has a series of ....xyz.file_...h5
> > and I would like to look at them. Do I have to combine them? If yes,
> > is there a way to combine them in one single file?
> >
> > Maria
> >
> > _______________________
> > Maria C. Babiuc Hamilton, Ph.D.
> > Professor, Department of Physics
> > College of Science, Marshall University,
> > 1 John Marshall Drive, Huntington, WV, 25755
> > Room S 257, Phone: (304)696-2754
> >
>
>
>
> --
> My email is as private as my paper mail. I therefore support encrypting
> and signing email messages. Get my PGP key from http://keys.gnupg.net.
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20220615/59d4c2ee/attachment.html
More information about the Users
mailing list