NCL > Application examples > Basic examples

ContourPlot example 13

Drawing raster contours using inverse map transformations

This example demonstrates how to use inverse map transformations and how to create a raster contour plot. The names of the example codes that create this plot are cn13c.c, cn13f.f, and cn13n.ncl.

Discussion

Resources are controlled through a resource file called cn13.res.

A detailed discussion about how to create the plot appears in the comments of the source code for the example.

Creating the plot using HLU C library calls

The HLU C program that generates this plot is called cn13c.c.

Creating the plot using HLU FORTRAN library calls

The HLU FORTRAN program that generates this plot is called cn13f.f.

Creating the plot using NCL

The NCL script that generates this plot is called cn13n.ncl.

The data

The data for this plot are created in the example's source code.

How to run this example

The examples are installed in the following locations:

  • $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn13c.c
  • $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn13f.f
  • $NCARG_ROOT/lib/ncarg/nclex/contourplot/cn13n.ncl
The resource file for this example is located in:

  • $NCARG_ROOT/lib/ncarg/resfiles/contourplot/cn13.res
You can copy this example and run it by typing "ng4ex cn13c", "ng4ex cn13f", or "ng4ex cn13n". A copy of the source file and resource file will be placed in your current working directory. The source code will be compiled and automatically run for you.