[yt-dev] Issue #882: BoxLib frontend does not deal with 1-d data properly (yt_analysis/yt)

Michael Zingale issues-reply at bitbucket.org
Tue Aug 19 08:04:07 PDT 2014


New issue 882: BoxLib frontend does not deal with 1-d data properly
https://bitbucket.org/yt_analysis/yt/issue/882/boxlib-frontend-does-not-deal-with-1-d

Michael  Zingale:

In the BoxLib frontend, around line 572, we do:

```
        # Skip timesteps per level                                              
        header_file.readline()
        self._header_mesh_start = header_file.tell()
        header_file.next()
        next_line = header_file.next()
        if len(next_line.split()) == 1:
            coordinate_type = int(next_line)
        else:
            coordinate_type = 0
```

This code is supposed to skip over all the lines the give the timestep per level, but the boxlib format actually writes out the dx's per left here, in the format

dx dy dz  (level 0)
dx dy dz (level 1)
...

when it is over, it will print out an integer flag that represents the geometry.  But for 1-d, it seems that this `len(next_line.split()) == 1` clause is catching a single dx as the geometry, at we crash.


Responsible: mzingale



More information about the yt-dev mailing list