YTFieldNotFound Traceback (most recent call last)
<ipython-input-10-833a8830b022> in <module>()
4
5 sp = ds.sphere((0, 0, 0), (6E10, 'cm'), data_source=upper_ad)
----> 6 sp.quantities.total_mass()
/global/u2/c/ccfeng/yt/yt/data_objects/derived_quantities.py in __call__(self)
206 fi = self.data_source.ds.field_info
207 if ("gas", "cell_mass") in fi:
--> 208 gas = super(TotalMass, self).__call__([('gas', 'cell_mass')])
209 else:
210 gas = self.data_source.ds.arr([0], 'g')
/global/u2/c/ccfeng/yt/yt/data_objects/derived_quantities.py in __call__(self, fields)
176 def __call__(self, fields):
177 fields = ensure_list(fields)
--> 178 rv = super(TotalQuantity, self).__call__(fields)
179 if len(rv) == 1: rv = rv[0]
180 return rv
/global/u2/c/ccfeng/yt/yt/data_objects/derived_quantities.py in __call__(self, *args, **kwargs)
66 chunks = self.data_source.chunks([], chunking_style="io")
67 storage = {}
---> 68 for sto, ds in parallel_objects(chunks, -1, storage = storage):
69 sto.result = self.process_chunk(ds, *args, **kwargs)
70 # Now storage will have everything, and will be done via pickling, so
/global/u2/c/ccfeng/yt/yt/utilities/parallel_tools/parallel_analysis_interface.py in parallel_objects(objects, njobs, storage, barrier, dynamic)
505 # this will prevent intermediate objects from being created.
506 oiter = itertools.islice(enumerate(objects), my_new_id, None, njobs)
--> 507 for result_id, obj in oiter:
508 if storage is not None:
509 rstore = ResultsStorage()
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in chunks(self, fields, chunking_style, **kwargs)
1261 def chunks(self, fields, chunking_style, **kwargs):
1262 # This is an iterator that will yield the necessary chunks.
-> 1263 self.get_data() # Ensure we have built ourselves
1264 if fields is None: fields = []
1265 # chunk_ind can be supplied in the keyword arguments. If it's a
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in get_data(self, fields)
1304 def get_data(self, fields=None):
1305 if self._current_chunk is None:
-> 1306 self.index._identify_base_chunk(self)
1307 if fields is None: return
1308 nfields = []
/global/u2/c/ccfeng/yt/yt/geometry/grid_geometry_handler.py in _identify_base_chunk(self, dobj)
287 dobj._chunk_info[0] = weakref.proxy(dobj)
288 elif getattr(dobj, "_grids", None) is None:
--> 289 gi = dobj.selector.select_grids(self.grid_left_edge,
290 self.grid_right_edge,
291 self.grid_levels)
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in selector(self)
1254
1255 if self._data_source is not None:
-> 1256 self._selector = compose_selector(self, self._data_source.selector, sclass(self))
1257 else:
1258 self._selector = sclass(self)
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in selector(self)
1254
1255 if self._data_source is not None:
-> 1256 self._selector = compose_selector(self, self._data_source.selector, sclass(self))
1257 else:
1258 self._selector = sclass(self)
/global/u2/c/ccfeng/yt/yt/geometry/selection_routines.pyx in yt.geometry.selection_routines.CutRegionSelector.__init__()
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in __getitem__(self, key)
246 Returns a single field. Will add if necessary.
247 """
--> 248 f = self._determine_fields([key])[0]
249 if f not in self.field_data and key not in self.field_data:
250 if f in self._container_fields:
/global/u2/c/ccfeng/yt/yt/data_objects/data_containers.py in _determine_fields(self, fields)
1157 raise YTFieldNotParseable(field)
1158 ftype, fname = field
-> 1159 finfo = self.ds._get_field_info(ftype, fname)
1160 elif isinstance(field, DerivedField):
1161 ftype, fname = field.name
/global/u2/c/ccfeng/yt/yt/data_objects/static_output.py in _get_field_info(self, ftype, fname)
796 self._last_finfo = self.field_info[(ftype, fname)]
797 return self._last_finfo
--> 798 raise YTFieldNotFound((ftype, fname), self)
799
800 def _setup_classes(self):
YTFieldNotFound: Could not find field '('index', 'x')' in WDMerger_hdf5_chk_1000.hdf5.
And if I tied to create the sphere using
sp = ds.sphere((0, 0, 0), (6E10, 'cm'), data_source=ds.all_data())
Then there is no problem.
Could someone help me solve this issue.
Thank you.