[Users] .h5 file issue.
Roland Haas
rhaas at illinois.edu
Tue Sep 1 09:43:44 CDT 2020
Hello Bilal,
Cactus HDF5 files are quite complex to read correctly, in particular
when mesh refinement is involved.
Most often they are used with VisIt for visualization.
Both Ian Hinder's SimulationTools (Mathematica) and Wolfgang Kastaun's
PostCactus (Python) can read the files and provide simple
visualizations.
Please see:
https://docs.einsteintoolkit.org/et-docs/Analysis_and_post-processing
and
https://simulationtools.org/documentation/english/tutorials/plotting
and
https://github.com/wokast/PyCactus/blob/master/PostCactus/doc/examples/notebooks/pc_example_2d.ipynb
Yours,
Roland
> Dear Users,
>
> I am trying to open a .h5 file in jupyter-notebook. Please anyone guide me about reading of HDF files.
>
> *_Command;_*
>
>
> import h5py
> filename = "ct_multilevel-err.h5"
> with h5py.File(filename, "r") as f:
> # List all groups
> print("Keys: %s" % f.keys())
> a_group_key = list(f.keys())[0]
>
> # Get the data
> data = list(f[a_group_key])
>
> *_Error;_*
>
> IOError Traceback (most recent call last)
> <ipython-input-12-769b4593257a> in<module>()
> 1 filename= "ct_multilevel-err.h5"
> ----> 2with h5py.File(filename, "r") as f:
> 3 # List all groups
> 4 print("Keys: %s" % f.keys())
> 5 a_group_key= list(f.keys())[0]
>
> /usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc in__init__(self, name, mode, driver, libver, userblock_size, swmr, rdcc_nslots, rdcc_nbytes, rdcc_w0, track_order, **kwds)
> 406 fid = make_fid(name, mode, userblock_size,
> 407 fapl, fcpl=make_fcpl(track_order=track_order),
> --> 408swmr=swmr) 409 410 if isinstance(libver, tuple):
>
> /usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc inmake_fid(name, mode, userblock_size, fapl, fcpl, swmr)
> 171 if swmrand swmr_support:
> 172 flags|= h5f.ACC_SWMR_READ
> --> 173fid= h5f.open(name, flags, fapl=fapl)
> 174 elif mode== 'r+':
> 175 fid= h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
>
> h5py/_objects.pyx inh5py._objects.with_phil.wrapper()
>
> h5py/_objects.pyx inh5py._objects.with_phil.wrapper()
>
> h5py/h5f.pyx inh5py.h5f.open()
>
> *IOError**: Unable to open file (unable to open file: name = 'ct_multilevel-err.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)*
>
--
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20200901/8ed5365e/attachment.bin
More information about the Users
mailing list