ContourPlot example 10

Refining a contour plot

This example demonstrates how to read data from a NetCDF file and create a series of contour plots from the data. This example was created using NCL commands. The name of the example script is cn10n.ncl.

Discussion

This module discusses how to create this plot using NCL commands. This module also shows how to read netCDF data from a file and produce a series of contour plots. The example demonstrates how to create a contour plot using mostly defaults, how to turn on contour fill and other plot attributes, how to plot a sub-area, how to create an XyPlot through the contoured area, and how to overlay the contour plot on a MapPlot object.

A detailed discussion of how this example works appears in its source code.

Creating the plot using HLU C library calls

Currently, the HLU C code has not been written for this example.

Creating the plot using HLU FORTRAN library calls

Currently, the HLU FORTRAN code has not been written for this example.

Creating the plot using NCL

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

The data

The data for this plot is from a netCDF file called cn10n.cdf.

This data file is located in your NCAR Graphics data directory. You can get the name of this directory by typing "ncargpath data" at your shell prompt. Change to this directory and then type "ncdump -h cn10n.cdf" to view the header information for this data file and see all the variables and data attributes.

How to run this example

This is example is installed in the following location:

$NCARG_LIB/ncarg/nclex/contourplot/cn10n.ncl
You can copy this example and run it by typing "ng4ex cn10n". A copy of the NCL script will be placed in your current working directory and run automatically for you.

You can view the output NCGM file using the NCAR Graphics ctrans utility. (Type "ctrans cn10n.ncgm".)


Quick Start Guide Control Panel

NG4 Home, Index, Examples, Glossary, Feedback, QSG Contents, QSG WhereAmI?


$Revision: 1.4 $ $Date: 1995/07/26 23:24:39 $