[yt-users] can yt load file non-recursively?
Yuxiang Qin
yuxiangq at student.unimelb.edu.au
Wed Jan 21 15:30:47 PST 2015
Hi,
Thanks for your help.
Nathan, I am using OWLS, a Gadget format data.
Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it.
Cheers,
Yuxiang
> On 22 Jan 2015, at 09:43, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
>
> Hi Yuxiang,
>
> What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.
>
> -Nathan
>
> On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin <yuxiangq at student.unimelb.edu.au <mailto:yuxiangq at student.unimelb.edu.au>> wrote:
> Dear yt-users,
>
> I have a tiny question about loading files.
>
> I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
>
> snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5*
> snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5*
> snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5*
> snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5*
> snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5*
> snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5*
> snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
>
> However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
>
> IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
>
> Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
>
> Cheers,
> --
> Yuxiang Qin
> PhD Student
> School of Physics
> The University of Melbourne
> VIC, Australia, 3010
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150122/603a26d8/attachment.htm>
-------------- next part --------------
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list