Hi,
There are several ways, but assuming you have vtk files as in the example here
this function returns a dictionary of specified variables:
def get2DAthenaData(vtk_file,variables):
data = {}
ds = yt.load(vtk_file)
gs = ds.index.select_grids(ds.index.max_level)
grid = gs[0] #assuming SMR wasn't used
for var in variables:
data[var] = grid[var][:,:,0]
return data
Example usage:
data = get2DAthenaData('kh.0010.vtk', ['density','pressure','vorticity_z'])
rho = data['density']
p = data['pressure']
w = data['vorticity_z']
So if you just want to have access to 1D profiles to compare with a 1D solution, rho[:,0] would be the 1D density profile along x at the first y index.
If you instead want to make 2D images, you can just generate the dataset ds and then look into FixedResolutionBuffer.
-Tim