resampling methods

While resampling a 3D data set (a FlatField) "g3ds" into
another FlatField which is a 2D slice across the 3D data,
I get some unexpected values produced.

The max/min values of the 3D grid are 52.45282, -23.908264

use of "resample" without specifying sampling mode:

  newffld = (FlatField)ffld.resample(g3ds);

or using 
  newffld = (FlatField)ffld.resample(g3ds,
                                     Data.WEIGHTED_AVERAGE, 
                                     Data.NO_ERRORS);

gets a new FlatField whose  max, min are 320.39398, -135.35602 
-- larger than the original grid's max and min. Since this
is humidity data it is also surprizing to see a value over 100.

However use of 

 newffld = (FlatField)ffld.resample(g3ds, Data.NEAREST_NEIGHBOR, NO_ERRORS);

gives a reasonable 2D Field whose max, min are 39.018806, -11.9811945  

What's going on? 


Stu Wier     

Unidata Program Center
UCAR
P.O. Box 3000
Boulder, CO 80307
Unidata home page: http://www.unidata.ucar.edu/