[yt-users] shape mismatch?

david collins antpuncher at gmail.com
Fri Aug 19 14:04:54 PDT 2011


Hi, all--

I have this simulation that has a single subgrid.  64^3 root, 24 zone
root grid (from 0.15625 to 0.34375 along each axis)

With the old output style (enzo1.0.1) this doesn't give me any
problems.  But with the new output version (packed IO, newgridio-no,
in mhdctmerge) I get the following message3

<trace>
>>> pf = MyOutputs.FileStaticOutputFourPi('/Users/dccollins/ThisScratch/param//Turbulence/t64_1lev_m/./DD0001/data0001')
>>> pf.h
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dccollins/local/src/yt-hg/yt/data_objects/static_output.py",
line 159, in _get_hierarchy
    self.__hierarchy = self._hierarchy_class(self, data_style=self.data_style)
  File "/Users/dccollins/local/src/yt-hg/yt/frontends/enzo/data_structures.py",
line 158, in __init__
    AMRHierarchy.__init__(self, pf, data_style)
  File "/Users/dccollins/local/src/yt-hg/yt/data_objects/hierarchy.py",
line 70, in __init__
    self._parse_hierarchy()
  File "/Users/dccollins/local/src/yt-hg/yt/frontends/enzo/data_structures.py",
line 220, in _parse_hierarchy
    if self._parse_binary_hierarchy(): return
  File "/Users/dccollins/local/src/yt-hg/yt/frontends/enzo/data_structures.py",
line 295, in _parse_binary_hierarchy
    self.grid_dimensions[:] = f["/ActiveDimensions"][:]
ValueError: shape mismatch: objects cannot be broadcast to a single shape
>>> pdb.pm()
> /Users/dccollins/local/src/yt-hg/yt/frontends/enzo/data_structures.py(295)_parse_binary_hierarchy()
-> self.grid_dimensions[:] = f["/ActiveDimensions"][:]
(Pdb) self.grid_dimensions
array([[1, 1, 1],
       [1, 1, 1]], dtype=int32)
(Pdb) f['/ActiveDimensions'][:]
array([[64, 64, 64],
       [32, 32, 16],
       [32, 32, 16]], dtype=int32)
(Pdb)
</trace>

Why is self.grid_dimensions a 2d array?  Why don't these things match?

Thanks!
d.

-- 
Sent from my computer.



More information about the yt-users mailing list