[FLASH-USERS] How to extract and plot HDF5 data using yt

ZhaoXu xuzhao1994 at sjtu.edu.cn
Fri Mar 1 01:13:03 EST 2024


Hi Jiale,

It seems the working directory is not properly set.

yt.load('sedov_forced_hdf5_plt_cnt_0000') -> 
yt.load('filedir/sedov_forced_hdf5_plt_cnt_0000')

filedir is your data location.

and I suggest running python with Jupyter notebook or spyder/pycharm, 
such IDE

Hope this help

Best

Xu

在 2024/3/1 11:07, 郑佳乐 写道:
> Dear all:
>
> I tried several times loading hdf5 data in yt, but all failed. I am 
> using linux ubuntu.
>
> Error is as follows:
>
> *layoneu at layoneu:~$ python*
>
> *Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import yt
> >>> ds = yt.load('sedov_forced_hdf5_plt_cnt_0000')
> /home/layoneu/.local/lib/python3.10/site-packages/yt/sample_data/api.py:149: 
> UserWarning: Storage directory from yt config doesn't exist (currently 
> set to '/does/not/exist'). Current working directory will be used instead.
>   warn(
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
> "/home/layoneu/.local/lib/python3.10/site-packages/yt/_maintenance/deprecation.py", 
> line 69, in inner
>     return func(*args, **kwargs)
>   File 
> "/home/layoneu/.local/lib/python3.10/site-packages/yt/loaders.py", 
> line 111, in load
>     fn = str(lookup_on_disk_data(fn))
>   File 
> "/home/layoneu/.local/lib/python3.10/site-packages/yt/sample_data/api.py", 
> line 186, in lookup_on_disk_data
>     raise FileNotFoundError(err_msg)
> FileNotFoundError: No such file or directory: 
> 'sedov_forced_hdf5_plt_cnt_0000'.
> >>> *
>
> I cannot fix this error due to inproficiency in FLASH use, any help 
> would be highly appreciated!
> Best regards
>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
>
> For list info, including unsubscribe:
> https://flash.rochester.edu/mailman/listinfo/flash-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240301/80d8f103/attachment.htm>


More information about the flash-users mailing list