An error when using yt on PLUTO 4.1

Dear everyone, I recently used yt to plot the slice files for the hdf5 file from PLUTO 4.1. An error exists when ploting, i.e., [('chombo', 'rho'), ('chombo', 'vx1'), ('chombo', 'vx2'), ('chombo', 'vx3'), ('chombo', 'prs')] Traceback (most recent call last): File "simple_slice.py", line 18, in <module> p = yt.ProjectionPlot(ds, "y", "density") File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1227, in __init__ field_parameters = field_parameters, method = method) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 250, in __init__ self.get_data(field) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 295, in get_data chunk_fields, "io", local_only = True)): File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 506, in parallel_objects for obj_id, obj in oiter: File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 592, in chunks self.get_data(fields) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 681, in get_data fluids, self, self._current_chunk) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/geometry/geometry_handler.py", line 252, in _read_fluid_fields chunk_size) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 147, in _read_fluid_selection data = self._read_data(g, fname) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 104, in _read_data shape = grid.ActiveDimensions + 2*self.ghost AttributeError: 'IOHandlerPlutoHDF5' object has no attribute 'ghost' Could you give some instructions on it? Best wishes, Jun

Hi Jun, It looks like the ghost cell information is not getting set up properly in the Pluto IOHandler. Could you try adding the line: self._read_ghost_info() to the end of the __init__ method of IOHandlerPlutoHDF5, in yt/frontends/chombo/io.py (line 239 in the current development tip)? I think that will solve your problem. Best, Andrew On Tue, Jun 16, 2015 at 5:57 AM, 方军 <fangjun@ynu.edu.cn> wrote:
Dear everyone, I recently used yt to plot the slice files for the hdf5 file from PLUTO 4.1. An error exists when ploting, i.e., [('chombo', 'rho'), ('chombo', 'vx1'), ('chombo', 'vx2'), ('chombo', 'vx3'), ('chombo', 'prs')] Traceback (most recent call last): File "simple_slice.py", line 18, in <module> p = yt.ProjectionPlot(ds, "y", "density") File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1227, in __init__ field_parameters = field_parameters, method = method) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 250, in __init__ self.get_data(field) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 295, in get_data chunk_fields, "io", local_only = True)): File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 506, in parallel_objects for obj_id, obj in oiter: File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 592, in chunks self.get_data(fields) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 681, in get_data fluids, self, self._current_chunk) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/geometry/geometry_handler.py", line 252, in _read_fluid_fields chunk_size) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 147, in _read_fluid_selection data = self._read_data(g, fname) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 104, in _read_data shape = grid.ActiveDimensions + 2*self.ghost
AttributeError: 'IOHandlerPlutoHDF5' object has no attribute 'ghost'
Could you give some instructions on it? Best wishes, Jun _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Andrew Myers
-
方军