You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the loaded variable is missing one layer in the 3D domain. Specifically, I'm loading the vertical velocity on a staggered grid, which has nz+1 elements in the vertical direction (where nz is the number of vertical grid cells in the simulation). I'm using ERF, and the staggered grid output is saved separately from the cell-centered output.
I think this may be yt's issue because I can see the full data with Paraview.
Below is a simple test script. ds.index.grids shows the correct dimensions, but other parts of the output do not.
import yt
# Here when loading the file, domain dimensions are 64 64 32]
ds = yt.load("pltW00200")
# and here the Bos grids are [64 64 33]
print(ds.index.grids)
# The staggered w should have 64 x 64 x 33 values, but I can only get 64 x 64 x 32
ad = ds.all_data()
z_velocity_stag = ad["z_velocity_stag"].to_value()
print('Shape of z_velocity_stag: ',z_velocity_stag.shape)
print('z-dim of z_velocity_stag (should be 33): ', int(len(z_velocity_stag) / 64 / 64))
Just took a quick look and looks to me like your staggered grids will effectively be truncated and the resulting array treated as cell-centered. Not really sure what it'd take to get it fully supported but I suspect it'd be pretty involved.
Hello,
I found that the loaded variable is missing one layer in the 3D domain. Specifically, I'm loading the vertical velocity on a staggered grid, which has nz+1 elements in the vertical direction (where nz is the number of vertical grid cells in the simulation). I'm using ERF, and the staggered grid output is saved separately from the cell-centered output.
I think this may be yt's issue because I can see the full data with Paraview.
I've uploaded the test file for your reference:
pltW00200.zip
Below is a simple test script. ds.index.grids shows the correct dimensions, but other parts of the output do not.
And this is the output I got:
The text was updated successfully, but these errors were encountered: