[Kst] netCDF datasource reader

Kimberly Scott kscott at nova.astro.umass.edu
Tue Mar 29 18:10:22 CEST 2005

Our modified version of your netCDF datasource reader is able to read
netCDF files that have fields with multiple samples per frame, and it
seems to be reading these files just fine.  However, when we declare new
vectors of our variables and try to plot curves, we do not see what we
expect.  Below is a detailed description of our variables, what we are
trying to plot, and what we actually see in Kst.

Let's just consider two of our variables, "sf" and "mf".  sf is a field
with 1 sample per frame, while mf has 64 samples per frame.  sf is a counter, 
so it's vector values are like those for the "INDEX" field.  mf counts
from 0 to 63 within each frame of sf.

We are trying to plot mf vs. sf, mostly just to check that our datasource
reader is doing its job.  In the "New Vector" window, we choose the field
sf, set the "Range" to 100, and indicate to count from the end of the
file.  The "Units" is set to frames, which seems to be the only option as
of now.  We do the same for the field mf, again setting the "Range" to
100, as we are expecting Kst to read 100 frames of data for the mf
variable (that is, 100 X 64 samples for mf).

When we plot mf vs. sf, we expect to see a "saw-tooth" pattern, with mf
going from 0 to 63 within one frame of sf, dropping to zero at the start
of the next frame of sf, and repeating this pattern 100 times.  Instead,
we are only seeing 100 samples for mf plotted, starting with the first sf
value.  It seems that Kst is only plotting the first 100 samples for mf,
not 100 frames.

We are unsure if this is an issue with our datasource reader, or with the
way that Kst thinks about frames and samples.  The "Units" option in the
"New Vector" window is set to frames, so we expect to be grabbing 100
frames of data, but it looks like for fields with multiple samples per
frame, it only grabs 100 samples.  Do you know why Kst does this?

If you think that this may be a problem with our datasource reader, would
you be able to take a look at our source code?  If so, we'd be happy to
send you a copy of our version of this reader, along with the file that
contains the data we are trying to read, so that you can reproduce our

Thank you kindly for your help!

More information about the Kst mailing list