Just to confirm, this is indeed that bug.  Qi, the error you showed is exactly the issue that was fixed.

Britton

On Thu, Oct 19, 2017 at 10:08 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi,

I think this is due to a bug that was recently fixed by Britton Smith, see https://github.com/yt-project/yt/pull/1569. When I run your script using the current master branch in the yt git repository I don't see any errors.

To get the fix right now you'll need to build the development version of yt from the git repository, see http://yt-project.org/docs/dev/installing.html#installing-yt-from-source

We are probably overdue for a bugfix release so I've added an entry to my todo list to do the backports necessary to generate a bugfix release.

Apologies for the trouble and thank you for the detailed report, hope that's helpful.

-Nathan

On Thu, Oct 19, 2017 at 4:35 PM, Li,Qi <pg3552@ufl.edu> wrote:
Dear user group,

I am trying to smooth particle data output from GIZMO onto an arbitrary grid,  then save the object as data set  and reload in order to do volume rendering. However I can not handle the reloaded data set.

To clarify, I smooth yt sample data — FIRE_M12i_ref11 onto a 64**3 grid, the code is like this:

  1 import yt
  2 
  3 ytname='FIRE_M12i_ref11/snapshot_600.hdf5'
  4 ds=yt.load(ytname)
  5 
  6 # define the region
  7 left = ds.domain_left_edge
  8 right = ds.domain_right_edge
  9 
 10 #now create an abitrary grid and save
 11 arb = ds.arbitrary_grid(left, right,dims=[64, 64, 64])
 12 
 13 fn = arb.save_as_dataset(fields=[('PartType0','density')])
 14 
 15 arb_ds = yt.load('snapshot_600_arbitrary_grid.h5')
 16 print arb_ds.field_list

And it returns an error: 

Traceback (most recent call last):
  File "arbgrid_clean.py", line 16, in <module>
    print arb_ds.field_list
  ...
  ...
  File "/Users/heavyfat/anaconda/lib/python2.7/site-packages/yt/frontends/ytdata/io.py", line 244, in _initialize_index
    pos[:,0] = _get_position_array(ptype, f, "x")
ValueError: could not broadcast input array from shape (64,64,64) into shape (262144)

So, how I can save/load a usable arbitrary grid dataset?
Thanks and looking forward to your suggestions.

Best regards,
Qi 

_______________________________________________
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