grid_weights[
        (di + 0.5).astype(int), (dj + 0.5).astype(int), (dz + 0.5).astype(int)