Hi,
I encountered a problem when processing BoxLib (Nyx) data from pure
hydro simulations without particles, using an Anaconda installation
of yt.
After loading a dataset with yt.load(), I get the following error
for ds.field_list:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-5-5aaf470c0415> in <module>()
----> 1 ds.field_list
/sw/tools/anaconda3/4.1.1/generic/lib/python3.5/site-packages/yt/data_objects/static_output.py in field_list(self)
459 @property
460 def field_list(self):
--> 461 return self.index.field_list
462
463 def create_field_info(self):
/sw/tools/anaconda3/4.1.1/generic/lib/python3.5/site-packages/yt/data_objects/static_output.py in index(self)
417 raise RuntimeError("You should not instantiate Dataset.")
418 self._instantiated_index = self._index_class(
--> 419 self, dataset_type=self.dataset_type)
420 # Now we do things that we need an instantiated index for
421 # ...first off, we create our field_info now.
/sw/tools/anaconda3/4.1.1/generic/lib/python3.5/site-packages/yt/frontends/boxlib/data_structures.py in __init__(self, ds, dataset_type)
906 def __init__(self, ds, dataset_type='nyx_native'):
907 super(NyxHierarchy, self).__init__(ds, dataset_type)
--> 908 self._read_particle_header()
909
910 def _read_particle_header(self):
/sw/tools/anaconda3/4.1.1/generic/lib/python3.5/site-packages/yt/frontends/boxlib/data_structures.py in _read_particle_header(self)
909
910 def _read_particle_header(self):
--> 911 if not self.ds.parameters["particles"]:
912 self.pgrid_info = np.zeros((self.num_grids, 3), dtype='int64')
913 return
KeyError: 'particles'
Same problem with slices. I am not sure what exactly causes the
error here, but since I can load datasets from cosmological
simulations with Nyx and process them without problems, I suppose
the problem outlined above is somehow related to the missing
particles.
How can this be fixed?
Best
Wolfram