[yt-users] Error in reading the hydrodynamics dataset in Ramses

Junhwan Choi (최준환) choi.junhwan at gmail.com
Wed Nov 20 08:26:45 PST 2013


Hi yt users,

I try to make a basic visualization for the Ramses simulation using
following script:
==========================
from yt.mods import *

ds = load("/lustre/widow2/proj/ast031/test11_rhd_fesc=0.05/output_00048/info_00048.txt")
center = [0.5, 0.5, 0.5]

pw = ProjectionPlot(ds, "x", ("deposit", "all_density"))
pw.zoom(1.01)
pw.save("allview")

pw = ProjectionPlot(ds, "x", "Density")
pw.zoom(1.01)
pw.save("allviewGas")
============================
It WORKS for the particle projection (for allview) but it does not
work for gas projection.

When the yt try to deal with gas dataset, I got the following error
message and the script crash.
You are running with the wrong number of fields.
Please specify these in the load command.
We are looking for 6 fields.
The last set of field sizes was: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
Traceback (most recent call last):
  File "DenVis_DM_Gas.py", line 10, in <module>
    pw = ProjectionPlot(ds, "x", ("gas", "Density"))
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/visualization/plot_window.py",
line 1441, in __init__
    field_parameters = field_parameters)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/data_objects/construction_data_containers.py",
line 234, in __init__
    self.get_data(field)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/data_objects/construction_data_containers.py",
line 278, in get_data
    chunk_fields, "io")):
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py",
line 434, in parallel_objects
    for obj_id, obj in oiter:
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/data_objects/data_containers.py",
line 453, in chunks
    self.get_data(fields)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/data_objects/data_containers.py",
line 531, in get_data
    fluids, self, self._current_chunk)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/geometry/geometry_handler.py",
line 520, in _read_fluid_fields
    chunk_size)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/frontends/ramses/io.py",
line 41, in _read_fluid_selection
    rv = subset.fill(content, fields, selector)
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/frontends/ramses/data_structures.py",
line 304, in fill
    for level, offset in enumerate(self.domain.hydro_offset):
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/frontends/ramses/data_structures.py",
line 102, in hydro_offset
    hvals = fpu.read_attrs(f, header, "=")
  File "/autofs/na3_home1/jhchoi/common/src/yt-hg/yt/utilities/fortran_utils.py",
line 74, in read_attrs
    assert(s1 == s2)
AssertionError

I do not understand what is the problem since it is such a basic visualization.
Since I am new for Ramses data, I may take a simple mistake.
Can anyone explain what the error message means and how to resolve the problem?

Thank you in advance,
Junhwan



More information about the yt-users mailing list