Hi, I have a netcdf file that has 2d slices recorded at different timesteps. I am trying to animate this. Here's the file metadata from ncdump:
netcdf xslice_144 {
dimensions:
y = 576 ;
z = 48 ;
time = UNLIMITED ; // (209 currently)
ntr = 1 ;
variables:
float yc(y) ;
float zcave(z) ;
float zc(z, y) ;
float day(time) ;
float tau(time) ;
float swr(time) ;
float qloss(time) ;
float rain(time) ;
float s(time, z, y) ;
float temp(time, z, y) ;
float rho(time, z, y) ;
float u(time, z, y) ;
float v(time, z, y) ;
float w(time, z, y) ;
float vor(time, z, y) ;
float shear(time, z, y) ;
float n2(time, z, y) ;
}
Here's the output from ncdfvdfcreate:
ncdfvdfcreate -timedims time -vars zc:s:temp -zcoordvar zc -gridtype layered xslice_144.cdf movie.vdf
Created VDF file:
Num time steps : 209
3D Variable names :
2DXY Variable names : s temp zc
2DXZ Variable names :
2DYZ Variable names :
Excluded 3D Variable names :
Excluded 2D Variable names :
Coordinate extents : 0 0 -390.286 1 0.0833333 -0.485702
Output from ncdf2vdf (am showing only the last bit):
ncdf2vdf -timedims time -vars zc:s:temp xslice_144.cdf movie.vdf
.
.
.
Processing VDC time step 208
Processing variable zc, data range (-390.286, -0.485702)
Processing variable s, data range (29.1623, 35.0479)
Processing variable temp, data range (10.3444, 30.2805)
Everything seems fine but I am unable to animate it or do anything else really in vapor. When I try to click on the contours or probe tabs or try to advance from the initial frame to the next one, vapor keeps crashing. What am I doing wrong?
Thanks,
Sanjiv
It looks like the data was converted soundly. Could you tell us what version of Vapor you're using, and what platform (Windows, Linux, or OSX)?
Also, if you could provide us with a few samples from your data then we can try to reproduce it.
I am using vapor 2.5.0 and the operating system is OSX 10.10.5 (Yosemite).
After your reply, I tried opening the data in an older machine (OSX 10.7.5) with an older version of vapor (2.0.2) and I am able to animate it.
Let me try to create the vdf file using only the first two or three timesteps. I can then share a link on dropbox. Would that work?
I installed the latest version of vapor on my older machine (OSX 10.7.5) and am able to reproduce the exact same problem. The frame at t=0 shows up but if I try to advance or click on other tabs (like contours, etc.), it crashes.
Actually, if you could share a couple of the original netcdf files we would be able to more accurately reproduce your procedure. A link to dropbox would be great.
https://www.dropbox.com/s/jjqv4dr5m8a8qdl/xslice_144.cdf?dl=0
Thanks!It looks like this netcdf file only contains 2D data, on the y-z plane, but you can still visualize this in vapor.
However it looks like what we're using for our z coordinate variable (zc) is not being used to specify the dimensions of your other variables. The 2D variables are functions of [time, z, y], so we shouldn't use zc or a layered grid unless I've missed something.
Can you try visualizing the data that comes from the following commands, to see if it fits your needs?
ncdfvdfcreate -timedims time xslice_144.cdf movie.vdf
ncdf2vdf -timedims time xslice_144.cdf movie.vdf