Demonstrations

Get the MMAB class library
Get the MMAB source library
Get all examples in a single tar file


Exemplars of MMAB C++ Class Library

pointh.test.C
// Program to test the points class(es)
//Test on each and every modification
// Robert Grumbine Last Modified 4 May 1998

vec.test.C
//Program to exercise all of the elements of the mvector class
//Test on each and every modification to mvector.h
//Robert Grumbine 25 January 1999

metricvector.test.C
//Program to exercise all of the elements of the mvector and
// metricvector classes
//Test on each and every modification to mvector.h
//Robert Grumbine 25 January 1999


test.gridbase.C
// Demonstration and exercising of the base grid2 class, grid_base
// This can also be used to diagnose system efficiency
// Robert Grumbine 19 February 1999


mathtest.C
// Program to test the grid_math class (and antecedant grid_base)
// Robert Grumbine Last Modified 15 April 1998


test.gridmath.C
//Test the grid_math class.  Oriented more to execution speed than
//  class function demonstration
//Robert Grumbine November 20  2000

Elementary Tools and Demonstrations

default.args.C
//Demonstration of using default arguments in a class operation
//Robert Grumbine 18 April 2000

map.C
// Demonstration of using the C++ 'map' structure. 
// This permits construction of associative arrays.
// Robert Grumbine 18 April 2000

gridpt.C
//Illustrate building a grid2 of something other than a simple
//  type.  In this case we have a grid2 of point3's.
//Robert Grumbine 18 April 2000

find_frompt.C -DGRIDTYPE
// Return the lat-long position of a given i,j coordinate
// Robert Grumbine 28 June 1999
// Uses strtod rather than atoi

find_fromll.C  -DGRIDTYPE
// Given a lat-long, find the i,j in grid which corresponds
// Robert Grumbine 17 June 1998

all_locations.C  -DGRIDTYPE
// Return the lat-long position of all i,j coordinate on the specified grid
// Robert Grumbine 28 June 1999

locatetest.C -DGRIDTYPE
// Test that the given grid's location functions truly do invert.
// Take the corner points, find their latitude/longitude, and then
// find the i,j corresponding to that latitude/longitude.  The resultant
// i,j should be within roundoff error of the corner point values.
// Robert Grumbine 18 April 2000

getcell.C -DGRIDTYPE, -DVARTYPE
// Read in an unformatted grid of GRIDTYPE<VARTYPE> and extract
//   info at a specified (arg) lat-long
// Robert Grumbine  Jun 28  1999
// also shows proper use of strtod, vs. atoi

time_interp.C   -DGRIDTYPE, -DDTYPE
classes:  ncepgrids (mvector, point3, )
//Program to interpolate linearly between grids from two separate days.
//If one of the days has no data for a point, then use the other day.
//If neither day has data, leave blank.  Start with the global grids.
//Robert Grumbine 19 November 1998

color.function.C
// Illustration of using the color processing function to produce
//   xpm output files
// Robert Grumbine 28 June 1999

gridgrid.C
// Program to conduct the horizontal interpolation between two grids,
//   initially done for the Regional Otis Analysis and Dmitry Chalikov's
//   Regional Ocean model
// Robert Grumbine 11 June 1999

date.C -- demo program with class declaration embedded
// Class to implement NCEP standards on date-time manipulations
// Robert Grumbine 15 June 2001

date.h -- date class
// Class to implement NCEP standards on date-time manipulations
// Robert Grumbine 15 June 2001

C

typesize.c
/* Display the sizes of standard types on the current machine */
/* Robert Grumbine 6 June 1994 */

space.c
/* Test of space allocation */
/* Robert Grumbine 2 Oct 1995 */
/* Extended for systems over 128 Mb allocatable, raise to 16 Gb,
 * 13 July 2004 */

defined.c
/* Illustration of how to use the 'defined' macro for conditional compilation */
/* Robert Grumbine 16 March 1998 */


Fortran

nantest.f
C     Demo of working with a NAN -- NANs are neither greather than,
C       nor less than or equal, to 0
C     Robert Grumbine July 30, 2002

Makefile

sample.make.for.loop
#Demonstration of a simple for loop in a makefile
#Robert Grumbine  6 August 1997

generic.rules
Demo of using generic rules for compilation in makefiles


Scripts

fn.sh
#Demonstrate usage of a function within a shell script
#note that functions must be defined before their use
#Robert Grumbine  7 October 1999

hur.parmer
#Script to read the result of a call to wgrib -V applied to a hurricane
#model output grib file and echo out the grid parameters needed by
#the hurricane -> regional wave model interpolation program
#Robert Grumbine 12 August 1998

Javascript

convert inches to cm, open new little window
compute things related to significant wave height
iterative loop, count number of passes over a link
Change image displayed based on what link the cursor is over
Animate a roster of figures, permit jump to a particular historic image


HTML

Including content
Last Modified 27 May 2005
Return to main tools page
Return to Main Page
For more information or to suggest corrections or improvements, please write NCEP.EMC.MarineWeb@noaa.gov

Valid HTML 4.01!