import yt min_coord = [0.0, 0.0, 0.0] # Coordinates for the corners of the box - taking the whole simulation domaine max_coord = [1.0, 1.0, 1.0] # Preload an output and allocate the array ds = yt.load('./output_00002/info_00002.txt') box = ds.box(min_coord, max_coord) vz = box[('gas', 'velocity_z')] # Simulate reading a 1000 outputs in a row for i in range(1000): # Load the dataset and read in z velocity field ds = yt.load('./output_00002/info_00002.txt') box = ds.box(min_coord, max_coord) vz = box[('gas', 'velocity_z')] #del box, vz #ds.clear_data() print('Done processing!')