HPC tutorial heading HPC tutorial heading
Last update: 01/24/2006

HPC tutorial contents

Visualizing results

Plots and animations of model results can help scientists gain insight into the processes they are studying.

NCAR Command Language (NCL) is a useful scripting language built on top of NCAR Graphics that can be used to make plots. NCL is freely available for many platforms at:

A getting started guide is located at:

Below are some example NCL scripts used to make the plots shown here. These scripts use a module of NCL user routines from the getting started guide called "gsn_code.ncl", which is required to run these scripts, in addition to NCL.

Two-dimensional contour plot of the pressure (P) variable. Sample plot.

Streamline diagram of the U and V velocity components (both are two-dimensional arrays). Sample plot.

Can results be animated?

Yes. In fact, an animation made by concatening all of the pressure plots could show the oscillations between high and low values. One way to do this would be to save the plots for each record of the data into a file (rather than displaying them to an X Window screen). Then the plots can be animated using a tool such as IDT (part of NCL). Example movie created by saving images to PostScript using NCL and then converting to mpg using the "convert" utility of ImageMagick. Another way would be to use a tool such as Ncview to display the contents of the netCDF file itself in a loop.

Note that this model was originally developed for benchmarking, so although it solves the shallow water equations, it is designed to come to a steady-state solution quickly. Thus, the results are rather boring for an animation. One way to make the results more "interesting" is to perturb the initial P and PSI in loop 50 (setting psi(i,j) = 0.). Reducing the 50000 in the same loop also helps create a nonsteady solution. By running the code longer, such as 4,000 iterations, the oscillations can more readily be seen. For now, this is left as an exercise.

If you have questions about this document, please contact SCD Customer Support. You can also reach us by telephone 24 hours a day, seven days a week at 303-497-1278. Additional contact methods: consult1@ucar.edu and during business hours in NCAR Mesa Lab Suite 39.

© Copyright 2006. University Corporation for Atmospheric Research (UCAR). All Rights Reserved.