SCDzine
N E W S

SCD unveils new mathematical library, 'Ngmath'

Contains a collection of interpolators for 1D, 2D, and 3D data . . .

natgrid plot
Fred Clare


Contents

Search

Article index

Back issues

Subscribe

Contact us

SCD

by Fred Clare


SCD's math librarian and the SCD NCAR Graphics Group have collaborated to produce a new mathematical library called Ngmath. The Ngmath library is a collection of mathematical procedures for which there are equivalent Fortran, C, and NCAR Command Language (NCL) entries. These procedures are generally not available in other SCD libraries.


What the Ngmath library contains

Currently the Ngmath library contains a collection of interpolators for one-dimensional, two-dimensional, and three-dimensional data. The packages are:
  • Fitgrid, an interpolator for 1D data and 2D gridded data
  • Natgrid, an interpolator for 2D random data
  • Dsgrid, an interpolator for 3D random data


Accessing the Ngmath library

The Ngmath library is a standalone library. Using the Fortran and C entries in the library in no way depends upon using NCAR Graphics. However, the library is distributed only with NCAR Graphics. The NCL interface to the Ngmath entries is a part of NCL's built-in functions and procedures as of Release 4.1 of NCAR Graphics.

If you have NCAR Graphics installed at your site, the Ngmath library is located in $NCARG_ROOT/lib/libngmath.a. If you want to load the library directly, check your environment variable settings to see if you have $NCARG_ROOT set. If not, consult your local system administrator to see what you should set it to.

If you are using NCAR Graphics, adding a -lngmath flag to ncargf77, ncargf90, nhlf77, nhlf90, ncargcc, or nhlcc (for Fortran and C codes) will load the Ngmath library. Note that ncargf90 and nhlf90 may not exist on some systems.


Future plans for the Ngmath library

The next package we will add to the Ngmath library is FFTPACK, a locally developed library of one-dimensional FFT solvers including complex, real, sine, cosine, quarter-sine, and quarter-cosine transforms.

We also plan a package for drawing Bezier curves and a random data two-dimensional interpolator that allows for constrained regions with holes. We will provide NCL interfaces to commercial libraries such as Linpack and IMSL as time permits.

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