New high-level interfaces available in NCAR Graphics

by Bob Lackman

With Version 4.0, NCAR Graphics has taken a giant leap forward in terms of new high-level interfaces. Although the traditional interface, consisting of calls to a subroutine library, is still supported, there are also three brand new interfaces: High-Level Utilities, NCAR Command Language, and a prototype Graphical User Interface.


High-Level Utilities (HLUs)

This interface is to a set of object-oriented utilities. The paradigm is similar to that of the X Window System in that resources are modified to produce changes in the output. Most of the graphical capabilities of the Low-Level Utilities (subroutine library) are already implemented and new functionality is being developed rapidly.

Resources can be changed to alter plot output without a need to recompile any code. Both C and Fortran bindings are supported.


NCAR Command Language (ncl)

The NCAR Command Language is a powerful interpreted language for reading, writing, and manipulating scientific data. It uses an internal netCDF data model, but handles input data in a variety of formats. The command language provides many functions for manipulating data (including sorting) as well as arithmetic and trigonometric functions. As part of an integrated package, the NCAR Command Language can create any visualization supported by the High-Level Utility interface, including XY plots and contour plots with maps, legends, labelbars, and other annotations.

You can use the command language's looping constructs to create series of images which can be animated using the NCAR Graphics Interactive Display Tool (idt); you can also subscript arrays directly with latitude and longitude values. You can execute the NCAR Command Language interactively from the command line or as a batch script.

To run from the command line, issue the command ncl and wait for the prompt.

To run an ncl script, type ncl < my_ncl.

ncl is documented online via:

Check out the NCAR Graphics visualization for March.


A prototype Graphical User Interface (GUI), xproto

The command xproto will bring up the prototype NCAR Graphics GUI. xproto can do many useful functions such as create a complicated graphic and save it as an ncgm or a PostScript file. However, xproto still lacks the ability to save its current state and restart at that state, not all of the ncl script that it generates is standard ncl, and data input is via ncl, rather than a "point and click" form of input.

xproto is documented in the xproto User Guide

A complete GUI with point-and-click data input, and a save/restart capability is planned for Version 4.1 of NCAR Graphics.


NCAR Graphics home page


Back to contents