NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
On Wed, 22 Dec 1999, From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx> wrote: > Please give us some more information. > > There have been some changes to FlatField.java recently. Is > > valuesJ = values[j]; > > at line 3252 in your FlatField.java? If not, please send > me a little code around your line 3252. Doesn't seem to be. This is the cut from line 3245 to 3262: for (j=0; j<TupleDimension; j++) { valuesJ = values[j]; new_valuesJ = new_values[j]; for (i=0; i<length; i++) { float v = Float.NaN; int len = indices[i] == null ? 0 : indices[i].length; if (len > 0) { v = valuesJ[indices[i][0]] * coefs[i][0]; for (k=1; k<len; k++) { v += valuesJ[indices[i][k]] * coefs[i][k]; } new_valuesJ[wedge[i]] = v; } else { // values outside grid new_valuesJ[wedge[i]] = Double.NaN; } } } > It looks like your netCDF file should become a FlatField > with 3 range components (MinTemp, MaxTemp and WindDirection) > "j" at line 3252 should cycle through 0, 1, 2. Thus the "3" > value is hard to explain. Yeah...I can't figure this one out too. > Also, please put: > > System.out.println("f: " + f.getType() + "\n" + > "predictedSet: " + predictedSet.getType()); > > before: > > f = (FieldImpl)f.resample(predictedSet, mode, Data.INDEPENDENT); > > in your FieldManipulation.java, and send me the result. OK...the result is: f: FunctionType (Real): (time) -> (MinTemp, MaxTemp, WindDirection) predictedSet: Set(time) f: FunctionType (Real): (time) -> (MinTemp, MaxTemp, WindDirection) predictedSet: Set(time) f: FunctionType (Real): (time) -> (MinTemp, MaxTemp, WindDirection) predictedSet: Set(time) > You could also run in jdb, catch the ArrayIndexOutOfBoundsException, > and send me the output of 'print values.length' and > 'print TupleDimension' after the Exception. I've never really used jdb before but I did catch the exception and typed the following: print values.length produces: "values.length" is not a valid local or class name. print TupleDimension produces: "TupleDimension" is not a valid local or class name. Eug. _--_|\ Eugene Tan <E.Tan@xxxxxxxxxx> / \ AutoTAF Project Developer \_.--.*/ Bureau of Meteorology, Melbourne, VIC 3001, Australia v Telephone: +613 9669 4652
visad
archives: