Hi Andrew, I had a look of those files and I think I get what you mean. By the way, about my second question, ‘cannot load in PartTypeN fields’, I think probably it’s because there is no definition of those fields in yt’s source code. Cheers, Yuxiang
On 22 Jan 2015, at 10:42, Andrew Myers
wrote: Hi Yuxiang,
There is a standard list of fields that yt automatically defines whenever you load an OWLS dataset (you can see the list in yt/frontends/owls/fields.py). You don't need to explicitly define any new fields yourself for this to happen - this all takes place under the hood. I think that the code that does this is adding all the fields twice for some reason. This is something that needs to get fixed in the OWLS frontend in yt's source code, not anything you are doing in your scripts.
-Andrew
On Wed, Jan 21, 2015 at 3:30 PM, Yuxiang Qin
mailto:yuxiangq@student.unimelb.edu.au> wrote: 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
mailto:nathan12343@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
mailto:yuxiangq@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@lists.spacepope.org mailto:yt-users@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@lists.spacepope.org mailto:yt-users@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@lists.spacepope.org mailto:yt-users@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org