SCDzine
N E W S

Natgrid interpolates 2D random data

natgrid plot Natgrid plot


Contents

Search

Article index

Back issues

Subscribe

Contact us

SCD

by Fred Clare


N atgrid is a two-dimensional random data interpolation package based on Dave Watson's package nngridr. Nngridr is written as a standalone executable. Natgrid provides C and Fortran interfaces to nngridr in both single and double precision. Also, NCL entries for natgrid are among NCL's built-in functions and procedures.

Natgrid uses an areas-based weighted average algorithm; the method is known as "natural neighbor" interpolation. This method chooses for its interpolation not too many and not too few points, but just the right number. Natgrid allows for both natural neighbor linear and natural neighbor nonlinear interpolation:

  • Natural neighbor linear interpolation produces a surface that has continuous slopes except at the original data values.

  • Natural neighbor nonlinear interpolation produces a surface with a continuous slope everywhere.


See the difference

The following two plots illustrate how Natgrid improves upon some of the weaknesses of Bivar, an older utility for regridding 2D random data:

bivar plot Old Bivar plot (crosshairs mark actual data maximum) natgrid plot New Natgrid plot (crosshairs mark actual data maximum)

The maximum value in the original dataset is 125. Bivar overshoots in its interpolation and interpolates a maximum value of 150 and this value is mispositioned with respect to the actual location of the maximum as marked by the crosshairs. Bivar also fails to represent the plateau between the values of 72 and 84.

For an example of Bivar's tendency to introduce undesired small scale oscillations compared with the superior natgrid results, see:

ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/plot7.html


For more information

For complete documentation for the Natgrid package, see:

ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/nnhome.html


back Back to "Ngmath"

rule
Contents || Search || Article index || Back issues || Subscribe || Contact us || SCD