
NCL > Application examples > Basic examples
Ngmath example 2
Simple example of natural neighbor linear regridding
This example can be created using HLU C and FORTRAN library calls or NCL. It demonstrates how to use the Natgrid package to do simple regridding using natural neighbor interpolation (Natgrid is part of the Ngmath library). The names of the source files for this example are nm02c.c, nm02f.f, and nm02n.ncl.
Discussion
This module discusses how to use the Natgrid package using calls to the Ngmath library and the HLU library.
Creating the plot using HLUs
The HLU C program that generates this plot is called nm02c.c.
Creating the plot using HLU FORTRAN library calls
The HLU FORTRAN program that generates this plot is called nm02f.f.
Creating the plot using NCL
The NCL script that generates this plot is called nm02n.ncl.
The data
This plot does not use any external data.
How to run this example
This example can be generated using a C program (nm02c.c), a FORTRAN program (nm02f.f), or an NCL script (nm02n.ncl). The examples are installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/ngmath/nm02c.c
- $NCARG_ROOT/lib/ncarg/hluex/ngmath/nm02f.f
- $NCARG_ROOT/lib/ncarg/nclex/ngmath/nm02n.ncl
working directory and run through NCL for you.