Chapter 5: Introducing the tutorial chapters

Previous chapter          LLUs Home          Next chapter          Index

Purpose of the tutorial chapters

The following chapters are brief tutorials to help you get started using all of the major features of NCAR Graphics. Since we cannot provide examples and detailed documentation on how to use all of the functionality in NCAR Graphics, we present only the most important features of each of the utilities. For this reason, please study this document to learn how each utility operates, then use the man pages for more complete information about additional functionality.

NCAR Graphics software is most commonly used for drawing contours over geographic maps, then filling the resulting regions. The NCAR Graphics utilities most critical to these operations, Areas, Ezmap, and Conpack, require more documentation than the other utilities presented in this guide. We provide a separate document, NCAR Graphics Contouring and Mapping Tutorial, that contains much more detail and many more examples than we can offer here. This separate document is available in hardcopy only; ordering instructions appear at the end of the preface of this guide.

The following sections of this guide each discuss a major graphics function like "Drawing lines and curves" and "Drawing text and symbols." Each section contains modules that demonstrate how to perform a specific task in NCAR Graphics like "How to set a dash pattern." The modules are organized as shown on the next two pages: most are laid out as two-page spreads so that all relevant information is available to you at a glance.

Generally, the first modules in a section explain basic functionality, then later modules build increasingly complex examples.

Reference guides throughout

Each section starts with a series of quick reference tables that show all user entry points and parameters for the utility or function being described. More detailed reference materials are included as appendixes.

Instructions for performing tasks

Each module that describes a specific task is structured in a consistent way. The following describes the guidelines used in creating each part of a task-oriented module. This will be useful if you have a question about the way information is presented in any of these modules.

Other resources to use with this manual

Other documentation is also available to help you use NCAR Graphics: the NCAR Graphics Contouring and Mapping Tutorial, a full set of man pages, and Programmer Documents from the package developers. Examples are also provided to show you NCAR Graphics capabilities and to help you understand and use the code that produces the examples.

Understanding the layout of tutorial modules


Details about how tutorial information is presented

Module title and description

The title of the module defines the concept or task that is discussed in it. The text below the title briefly introduces the concept or task.

Graphic example

The graphic illustrates the task discussed in the module. The graphic is produced by the example program named in the code segment that follows.

All color graphics in this guide are printed in gray scale to minimize printing costs. Please run the example, then view the color graphic on your screen for a better understanding of the text.

Code segment

This excerpt from the Fortran code that generates the graphic example shows how the task being explained by the module is accomplished. The numbers at the beginning of each line are for reference in the text only. These numbers have nothing to do with the line numbers in the actual example.

The heading "Code segment from example.f" gives you the name of the example file. To obtain files that contain the Fortran code, compile and execute the code, and create the NCGM, type:

ncargex example
Do not type the ".f" extension; "example.f" denotes the file that contains the Fortran code. All files generated by ncargex are placed in your current directory.

All Fortran code is printed in this manual with the Courier (typewriter) font. This monospaced type font preserves the correct relationships of Fortran columns.


This line of code demonstrates the calling sequence of the routines or parameters discussed in the module.


This part of the module is a detailed description of every element in the synopsis. This part typically describes each argument to or parameter for the Fortran routine(s) in the synopsis.

Two important pieces of information follow the argument name: its Fortran type and its function in the program. When parameters are listed under the Arguments heading, only their Fortran type is given.

Fortran types include INTEGER, REAL, and CHARACTER, plus arrays of these types (the dimension of any array is always indicated). The argument's function in the program may be as input (the user supplies a value for the argument), output (the routine returns information to the user or the program in the argument), workspace (a scratch array for the routines to use in manipulating information, but that the user must declare), or subroutine (a special-purpose routine that the user typically creates or modifies to produce a desired result).

Wherever it is appropriate, specific values and ranges of values are explained in text that is indented from the text describing arguments and parameters.

Characters used as variables to represent a number (n or m for example) are printed in italics.


This part of a module provides a line-by-line analysis of how the code segment functions in the program. Discussion may also include other useful information, such as frequently seen error messages or common problems.

All references to example names, filenames, and commands are printed with bold characters.

Previous chapter          LLUs Home          Next chapter          Index