
NCL > Application examples > Basic examples
ContourPlot example 14
Drawing contours of wind speeds overlayed on a map plot.
This example demonstrates how to read two netCDF variables, U and V winds, and produce a contour plot of the wind speed over a map plot. The names of the example codes that create this plot are cn14c.c, cn14f.f, and cn14n.ncl.
Discussion
There is no resource file for this example, as all the resources are set in the source code.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 cn14c.c.
Creating the plot using HLU FORTRAN library calls
The HLU FORTRAN program that generates this plot is called cn14f.f.
Creating the plot using NCL
The NCL script that generates this plot is called cn14n.ncl.
The data
The data for this plot is from a netCDF file (created by NCL) called 941110_UV.cdf containing UV wind data for a series of lat/lon coordinates.The data file is located in your NCAR Graphics data directory in a subdirectory called "cdf". You can get the name of the data directory by typing "ncargpath data" at your shell prompt. If you have netCDF installed on your system, then you can change directory to where the netCDF file resides and type "ncdump -h 941110_UV.cdf" to view the header information for this data file.
How to run this example
The examples are installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn14c.c
- $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn14f.f
- $NCARG_ROOT/lib/ncarg/nclex/contourplot/cn14n.ncl
- $NCARG_ROOT/lib/ncarg/data/cdf/941110_UV.cdf