From what I can tell by inspecting the hdf5 file directly (here's a
Hi all, I'm running into some issues with 2D FLASH data, which seem to be related to the z positions of the data. Nathan has helped me track down the likely culprits, but I haven't come up with a reasonable workaround as of yet. link to it: http://www.ucolick.org/~jforbes/cloud_hdf5_plt_cnt_0000 ), the z-coordinates are explicitly specified to be 0.0 for each of the root grids (there are 4 in this particular setup), and -1.0 for all other grids. I think the 'dz' field in yt is also somehow being read directly from the hdf5 file, and it is 1 cm for all cells. The problem is that pf.domain_left_edge[2] and pf.domain_right_edge[2] are -8 kpc and 8 kpc respectively, so as-is, yt will give all the data a z-coordinate of -8 kpc, whereas I think it should probably be close to 0 in this particular setup. Even worse, the difference between the z-coordinates explicitly written in the hdf5 file between root and refined blocks means that most of the data will be at z = -8 kpc, but some will be at z=0 (i.e. when the root grid has the maximum-resolution data available at a particular location). Any suggestions would be appreciated. Thank you, John Bonus information: In the IRC channel I mentioned that replacing na.rint(self.grid_left_edge[i]/dx)*dx with na.rint(self.grid_left_edge[i]/(.99999999999*dx))*dx (and the corresponding change for the right edge) in frontends/flash/data_structures.py seemed to sidestep the problem, but in fact it created other problems. The effect was that all the z-data now appeared at -8 kpc, so I thought that would solve any issues stemming from the data having different z-values, but as it turns out that put all the z coordinates just outside grid_left_edge, so for instance calling pc.add_phase_object ran into trouble because it could find no valid data inside the domain. I suspect that part of the problem lies with the for loop at line 146 in frontends/flash/data_structures.py as I claimed on yt-dev, but it seems the problems are a bit deeper.