[yt-users] can yt load file non-recursively?

Yuxiang Qin yuxiangq at student.unimelb.edu.au
Tue Jan 20 22:20:52 PST 2015


Hi,

I got two more question about loading files. I don’t think I can find the answer on yt website, so here I am.

First thing is when I try to load in snapshot files (my data is a OWLS data), it always tells me some fields already exists. What is that meaning? it also tell s override it by setting force_override=True. What thing will I override? I put force_override=True to ds.load(), it doesn’t recognise it. So where should I put it?

P001 yt : [WARNING  ] 2015-01-20 16:02:43,268 Field ('gas', 'C_density') already exists. To override use force_override=True.                                     
P003 yt : [WARNING  ] 2015-01-20 16:02:43,268 Field ('gas', 'Fe_number_density') already exists. To override use force_override=True.                             
P003 yt : [WARNING  ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_Fe_density') already exists. To override use force_override=True.             
P001 yt : [WARNING  ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_C_mass') already exists. To override use force_override=True.                 
P001 yt : [WARNING  ] 2015-01-20 16:02:43,269 Field ('gas', 'C_mass') already exists. To override use force_override=True.                                        
P001 yt : [WARNING  ] 2015-01-20 16:02:43,269 Field ('deposit', 'PartType0_smoothed_N_number_density') already exists. To override use force_override=True.       
P003 yt : [WARNING  ] 2015-01-20 16:02:43,270 Field ('gas', 'Fe_density') already exists. To override use force_override=True.                                    
P003 yt : [WARNING  ] 2015-01-20 16:02:43,270 Field ('deposit', 'PartType0_smoothed_Fe_mass') already exists. To override use force_override=True.                
P001 yt : [WARNING  ] 2015-01-20 16:02:43,270 Field ('gas', 'N_number_density') already exists. To override use force_override=True.                              
Ps. It’s not about parallel computation. When I run the script with one process, it also gives me those warnings.

Second thing is when I try to load subhalo files, it cannot load in PartTypeN data. ds.field_list and ds.derived_field_list don’t show those PartTypeN fields. I think those fields are added by the people who run the simulation, not from original OWLS data. So how to load in those fields?

Ps. Actually, I have question three again about the parallel computation, but I am eager to find out the answers to these two. So I post my question now :<

Thanks a lot!

Cheers,
Yuxiang

> On 21 Jan 2015, at 11:29, Yuxiang Qin <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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150121/d8296204/attachment.html>
-------------- 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