[yt-users] covering_grid with RAMSES dataset

Enrico Garaldi egaraldi at uni-bonn.de
Wed Mar 23 09:36:34 PDT 2016


Hi,
I am having troubles using the smoothed_covering_grid and covering_grid with 
RAMSES dataset.
I have yt-project version 3.2.3 and I am using the "output_00080" dataset 
from the yt sample datasets.

smoothed_covering_grid fails (raising a RuntimeError because tot != 0, line 
880 of construction_data_containers.pyc), while covering_grid seems to leave 
unfilled the refined regions. What I mean is that if a cell is refined 
beyond the maximum allowed level for the grid, it is left unfilled (contrary 
to what happens with ENZO datasets).

I am using this code:

import yt
import matplotlib.pyplot as plt

ds = yt.load('/users/egaraldi/Documents/output_00080/info_00080.txt')

cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge, 
dims=ds.domain_dimensions)

density_field = cgrid["density"]

print (density_field == 0.0).any()  #should be False but it is True

plt.imshow(density_field[:,:,48].v, interpolation='none')
plt.show()    #holes with zero-density corresponding to refined regions

Am I doing something wrong?

Thanks in advance,
Enrico

-------------------------------------
Enrico Garaldi - Ph.D. student
Argelander-Institut für Astronomie
Address: Auf dem Hügel 71, 53121 Bonn, Germany
Room: 1.024
Phone: +49 (0) 228 73 3433
egaraldi[at]uni-bonn[dot]de



More information about the yt-users mailing list