Powerful, free NCL software makes it easy to access, process, and visualize geoscientific data

By Brian Bevirt
03/01/2006 - 12:00am


  The Real-Time Weather Data site of NCAR's Research Applications Laboratory displays weather maps showing short and long-term forecasts and current conditions such as temperature, moisture, and winds across the U.S. These maps are produced with NCL, a programming language developed by NCAR’s Scientific Computing Division. Current 12-hour weather forecast

On a given day, especially during hurricane season, the Real-Time Weather Data Web site at the National Center for Atmospheric Research (NCAR) can get one to two million hits. With the exception of the satellite and radar images, most of the weather maps served by the site are created by a programming language called the NCAR Command Language, or NCL.

NCL is a powerful software tool that allows researchers to easily and effectively access, process, and visualize geoscientific data. Developed by NCAR’s Scientific Computing Division (SCD), NCL has been enhanced through ongoing collaboration between SCD and NCAR's Climate and Global Dynamics Division.

Although NCL was designed primarily for weather and climate research, it is used today in fields as diverse as forestry, space monitoring, disaster prevention, applied insurance, genetic studies, aircraft data analysis, renewable energy, wildfires, animal disease modeling, and Mideast water studies.

Free, portable, and simple to install—NCL runs on platforms ranging from laptops to supercomputers and can be downloaded from the Web—the programming language is an important part of Earth systems science in 51 countries. It is used at a wide variety of sites, from universities, national labs, and supercomputing centers to government, military, and commercial institutions.

“We’ve had more than 8,000 downloads of NCL since we made the source code available in December 2000―3,000 downloads in the last year alone,” says Mary Haley, SCD's project leader for NCL.

The appeal of NCL

One thing that sets NCL apart from other visualization software is its extensive geoscientific data ingest capabilities. NCL makes it easy to access and browse data in multiple file formats, including netCDF, GRIB-1, HDF4, HDF-EOS, ASCII, and binary. (Interfaces for netCDF4, GRIB-2, and HDF5 formats are coming soon.) “Data formats that contain metadata are converted to a uniform-variable interface similar to netCDF, which is quite convenient for scientists,” says Haley. “Likewise, you can write NCL output to various data formats.”

Mary Haley and So-Young H   
Instructor Mary Haley, an SCD software engineer, helps So-Young Ha, an NCAR postdoc, during a hands-on laboratory at the February 2006 NCL workshop.  

NCL also comes with many useful built-in functions for processing and manipulating data. Researchers can compute statistics and correlations, perform regridding and interpolation, use constructs to support simple array operations, or employ advanced mathematical functions such as spherical harmonics.

“We have upwards of 600 functions for data analysis,” Haley observes. “Some are really basic, like doing averages or computing standard deviations; others are more complicated, like empirical orthogonal functions and singular-value decompositions.”

Yet another NCL strength is its ability to deliver superior 2D visualizations in PDF, Postscript, X11, and NCGM formats. These images are suitable for publication in peer-reviewed journals or for presentations at scientific conferences.

Two new modules allow users of Python, a mainstream programming language, to directly interface with some of NCL's capabilities. PyNGL, which stands for the Python interface to the NCL Graphics Library, provides access to NCL visualization capabilities via Python scripts. PyNIO, the Python interface to NCL I/O, does the same for NCL scientific data input/output.

Popular workshops

To help users learn NCL and get the most benefit from its capabilities, four-day workshops are offered every few months—some at NCAR, some at universities and research centers around the U.S. Workshops are offered at no cost to attendees.

Vani Cheruvu and Dennis Shea   
Vani Cheruvu, an NCAR postdoc, receives advice on coding scientific visualizations from instructor Dennis Shea, an NCAR associate scientist, during the February 2006 NCL workshop.  

Upcoming workshops will be held at NCAR on April 4-7, June 27-30, and Oct. 3-6, 2006. Each workshop includes an overview of NCL language basics followed by talks on file input/output, data processing, and scientific visualization.

“When people sign up, we send them a survey to find out their interests. We tailor the lectures to the attendees,” says Dennis Shea, an NCL workshop instructor and an associate scientist in NCAR’s Climate and Global Dynamics Division. “If people are interested in specific applications―volumetric flows, for instance, or reading GRIB or EOS-DIS data―we’ll try to incorporate that in a natural manner, so everyone feels they’ve come out of the class with something.”

Workshops also include popular hands-on laboratory sessions where users can bring in their own processing and visualization problems to receive one-on-one attention.

“I liked the lab sessions a lot—the instructors helped me with coding,” notes Vani Cheruvu, a postdoc with NCAR’s Advanced Study Program, who attended the February 2006 workshop. “The class was very good; it was interactive. We could ask questions at any time.”

Cheruvu, who is researching high-order numerical methods to study atmospheric transport problems, plans to use NCL to visualize the results of her computations on bluesky, NCAR’s IBM p690 clustered supercomputer. Familiar with other visualization packages such as MATLAB and IDL, she found NCL easy to learn.

  These graphics show some of NCL's capabilities for visualizing scientific data. Larger image

Although Cheruvu was a first-time user of NCL, “we have repeat attendees who come back and take the class again to touch up some of their skills," says Haley. "They have a specific script they’re working on and want to take to the next level. They bring that to the lab and we help them work on it.”