Hi David,<br><br>Can you try modifying your script slightly, to see if this addresses the problem? This will ensure that the grids are added in a particular order, from low level to high level. I am not certain it will fix it, but it might, and if it does, I will adjust the code to make sure this does not happen again.<div><br></div><div><span class="k" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">for</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre"> </span><span class="n" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">state</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre"> </span><span class="ow" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">in</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre"> sorted(</span><span class="n" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">sol</span><span class="o" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">.</span><span class="n" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre">states, key = lambda a: a.patch.level):</span><br></div><div><span class="n" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:8.39999961853027px;white-space:pre"><br></span></div><div><br></div><br><div class="gmail_quote">On Mon Nov 10 2014 at 9:43:08 AM David Ketcheson <<a href="mailto:dketch@gmail.com">dketch@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I have some AMR output data (from AMRClaw, for which there is not a yt front end) and I'm following instructions here:</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="http://yt-project.org/docs/3.0/examining/loading_data.html#generic-amr-data" target="_blank">http://yt-project.org/docs/3.0/examining/loading_data.html#generic-amr-data</a><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">My script is here:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://gist.github.com/30d8bdf41422dc20bb95" target="_blank">https://gist.github.com/30d8bdf41422dc20bb95</a><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">yt</span><span style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">.</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">load_amr_grids</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">() </span>command seems to complete successfully.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">But when I try to generate a slice plot, I get the following:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>AttributeError Traceback (most recent call last)</div><div><ipython-input-30-384f3d2d8b79> in <module>()</div><div>----> 1 yt.SlicePlot(ds, 0, "density")</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/visualization/plot_window.pyc in SlicePlot(ds, normal, fields, axis, *args, **kwargs)</div><div> 1840 del kwargs['north_vector']</div><div> 1841</div><div>-> 1842 return AxisAlignedSlicePlot(ds, normal, fields, *args, **kwargs)</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/visualization/plot_window.pyc in __init__(self, ds, axis, fields, center, width, axes_unit, origin, fontsize, field_parameters, window_size, aspect)</div><div> 1012 slc = ds.slice(axis, center[axis],</div><div> 1013 field_parameters = field_parameters, center=center)</div><div>-> 1014 slc.get_data(fields)</div><div> 1015 PWViewerMPL.__init__(self, slc, bounds, origin=origin,</div><div> 1016 fontsize=fontsize, fields=fields,</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/data_objects/data_containers.pyc in get_data(self, fields)</div><div> 600 def get_data(self, fields=None):</div><div> 601 if self._current_chunk is None:</div><div>--> 602 self.index._identify_base_chunk(self)</div><div> 603 if fields is None: return</div><div> 604 nfields = []</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/data_objects/data_containers.pyc in index(self)</div><div> 127 if self._index is not None:</div><div> 128 return self._index</div><div>--> 129 self._index = self.ds.index</div><div> 130 return self._index</div><div> 131</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/data_objects/static_output.pyc in index(self)</div><div> 272 raise RuntimeError("You should not instantiate Dataset.")</div><div> 273 self._instantiated_index = self._index_class(</div><div>--> 274 self, dataset_type=self.dataset_type)</div><div> 275 # Now we do things that we need an instantiated index for</div><div> 276 # ...first off, we create our field_info now.</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/frontends/stream/data_structures.pyc in __init__(self, ds, dataset_type)</div><div> 167 self.float_type = "float64"</div><div> 168 self.directory = os.getcwd()</div><div>--> 169 GridIndex.__init__(self, ds, dataset_type)</div><div> 170</div><div> 171 def _count_grids(self):</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/geometry/geometry_handler.pyc in __init__(self, ds, dataset_type)</div><div> 55</div><div> 56 mylog.debug("Setting up domain geometry.")</div><div>---> 57 self._setup_geometry()</div><div> 58</div><div> 59 mylog.debug("Initializing data grid data IO")</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/geometry/grid_geometry_handler.pyc in _setup_geometry(self)</div><div> 56</div><div> 57 mylog.debug("Constructing grid objects.")</div><div>---> 58 self._populate_grid_objects()</div><div> 59</div><div> 60 mylog.debug("Re-examining index")</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/frontends/stream/data_structures.pyc in _populate_grid_objects(self)</div><div> 242 def _populate_grid_objects(self):</div><div> 243 for g in self.grids:</div><div>--> 244 g._setup_dx()</div><div> 245 self.max_level = self.grid_levels.max()</div><div> 246</div><div><br></div><div>/Users/ketch/anaconda/lib/python2.7/site-packages/yt/data_objects/grid_patch.pyc in _setup_dx(self)</div><div> 136 id = <a href="http://self.id/" target="_blank">self.id</a> - self._id_offset</div><div> 137 if self.Parent is not None:</div><div>--> 138 self.dds = self.Parent.dds.ndarray_view() / self.ds.refine_by</div><div> 139 else:</div><div> 140 LE, RE = self.index.grid_left_edge[id,:], \</div><div><br></div><div>AttributeError: 'StreamGrid' object has no attribute 'dds'</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I would greatly appreciate any help.</div></div>
______________________________<u></u>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/<u></u>listinfo.cgi/yt-users-<u></u>spacepope.org</a><br>
</blockquote></div>