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.

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/


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: