On Tue, 8 Aug 2006, Kevin Baggett wrote:
Robb,
I am using some of your classes (BufrDataExtractor in particular) to get out
some data for files I have. Some of the data has a shape of, say, 2, but when I
use the getFloatData, it returns the first dimension all at once and then the
second dimension. When I use the NetCDF GUI, it prints out alternating values
from each dimension. Where in the code is this alternating value approach
accomplished?
Kevin,
interpreting compressed data is a much more difficult task then uncompressed.
compressed data is a different animal, all the values for the fields are
grouped together. to get one obs, you have to read the values using astride of
numObs. the code is in BufrIosp.java, readDataCompressed, line 532
} else if( bd.isNumeric() ) {
ii = (IndexIterator)iiHash.get( v.getShortName() );
float[] bufrdata = bd.getFloatData();
//System.out.println( "bufrdata.length ="+
bufrdata.length
//+" = "+ numObs );
for( int m = 0; m < numObs && m != end; m++ ) {
for( int n = m; n < bufrdata.length; n += numObs
) {
ii.setFloatNext( bufrdata[n] );
}
}
the global attribute in the index; compressdata = true determines how the read
will happen.
robb...
==============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/
==============================================================================