Overview of NCL(The NCAR Command Language (NCL), a product of the Computational & Information Systems Laboratory at the National Center for Atmospheric Research (NCAR) and sponsored by the National Science Foundation, is a free interpreted language designed specifically for scientific data processing and visualization.
NCL has robust file input and output. It can read and write netCDF-3, netCDF-4 classic, netCDF-4, HDF4, binary, and ASCII data. It can read HDF-EOS2, HDF-EOS5, GRIB1, GRIB2, and OGR files (shapefiles, MapInfo, GMT, Tiger). It can be built as an OPeNDAP client.
NCL visualizations are world class and highly customizable.
The software comes with useful command line tools:
- ncl_filedump - prints the contents of supported files (netCDF, HDF4/5, GRIB1, GRIB2, HDF-EOS2/5, and shapefile, and CCM History Tape)
- ncl_convert2nc - converts one or more GRIB1, GRIB2, HDF4/5, HDF-EOS2/5, or shapefile files to netCDF formatted files.
- WRAPIT - allows you to wrap Fortran 77/90 routines and call them from ncl.
NCL and NCAR Graphics run on UNIX-based operating systems, including Linux, MacOSX, and Cygwin/X running on Windows.
NCL can be run in interactive mode, where each line is interpreted as it is entered at your workstation, or it can be run in batch mode as an interpreter of complete scripts. You can also use command line options to set options or variables on the NCL command line.
The power and utility of the language are evident in three main components:
- file input and output
- data analysis
NCL has many features common to modern programming languages, including types, variables, operators, expressions, conditional statements, loops, and functions and procedures.
In addition to common programming features, NCL also has features that are not found in other programming languages, including features that handle the manipulation of metadata, the configuration of the visualizations, the import of data from a variety of data formats, and an algebra that supports array operations.
NCL comes with many useful built-in functions and procedures for processing and manipulating data. There are over 600 functions and procedures that include routines for:
- use specifically with climate and model data
- computing empirical orthogonal functions, Fourier coefficients, singular value decomposition, averages, standard deviations, sin, cosine, log, min, max, etc.
- retrieving and converting date information
- drawing primitives (lines, filled areas, and markers), wind barbs, weather map symbols, isosurfaces, and other graphical objects
- robust file handling
- 1-dimensional, 2-dimensional, and 3-dimensional interpolation, approximation, and regridding
- facilitating computer analysis of scalar and vector global geophysical quantities (most are based on the package known as Spherepack)
- retrieving environment variables and executing system commands
NCL supports calling C and Fortran external routines, which makes NCL infinitely configurable.
NCL uses several other publicly-available software packages and databases for some of its file I/O, data analyses routines, and high-resolution coastlines. These software packages include:
- cairo - a 2D graphics library with support for multiple output devices. It is used in NCL to provide PNG, PS, and PDF output.
- DCDFLIB -
cumulative distribution functions, inverses, and parameters for beta,
binomial, chi-square, noncentral chi-square, F, noncentral F, gamma,
negative binomial, normal, Poisson, Student's t. Developed by Barry
W. Brown, James Lovato, Kathy Russell
- FFTPACK5 - a Fortran subroutine library of Fast Fourier Transforms (FFT's) developed at the National Center for Atmospheric Research.
- g2clib - this library contains "C" decoder/encoder routines for GRIB edition 2.
- GDAL - Geospatial Data Abstraction Library
- GRIBEX - GRIB encoding/decoding software.
- HDF 4 - a file format for storing scientific data and a software library that provides high-level APIs and a low-level data interface.
- HDF 5 - a general purpose library and file format for storing scientific data. HDF5 addresses some of the deficiencies of HDF 4.
- HDF-EOS2 and HDF-EOS5 - software libraries built on top of HDF4 and HDF5 to support EOS-specific data structures, namely Grid, Point, and Swath.
- JasPer - an open-source initiative to provide a free software-based reference implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1). This project was started as a collaborative effort between Image Power, Inc. and the University of British Columbia.
- LAPACK - a library of Fortran 77 subroutines for solving the most commonly occurring problems in numerical linear algebra.
Copyright (c) 1992-2007. The University of Tennessee. All rights reserved.
- netCDF - a machine-independent format for representing scientific data (also, an interface for array-oriented data access and a library that provides an implementation of the interface).
- Ngmath - a collection of mathematical procedures for which there are equivalent Fortran, C, and NCL entries.
- OPeNDAP - a framework that simplifies all aspects of scientific data networking.
- PROJ.4 - Cartographic Projections Library
- RANGS (Regionally Accessible Nested Global Shorelines) - a multi-resolution coastline database developed by Rainer Feistel from Wessel and Smith's GSHHS (Global Self-consistent Hierarchical High-resolution Shoreline) database.
- Spherepack - a collection of Fortran programs that facilitates computer modeling of geophysical processes.
- SZIP - provides lossless compression of scientific data; is provided with HDF software products as of HDF5 Release 1.6.0 and HDF4 Release 2.0.
- Triangle - a two-dimensional quality mesh generator and delaunay triangulator, used in NCL's contouring package for non-uniform grids.
- UDUNITS-2 - a C/Fortran library that supports conversion of unit specifications between formatted and binary forms, arithmetic manipulation of unit specifications, and conversion of values between compatible scales of measurement. NCL uses it in particular for converting UTC-referenced time.
- UDUNITS-2 extensions - David Pierce of UCSD wrote some extensions to the "utCalendar" and "utInvCalendar" routines as part of ncview, and gave us permission to include them in NCL.
- UTM to lat/lon (and vice versa) converters - a set of routines written by Peter Daly of MIT Ocean Acoustics that convert UTM to Lat/Longitude and vice-versa, using the WGS-84 (GPS standard) or Clarke 1866 Datums.
- Vis5d+ - a free OpenGL-based volumetric visualization program for scientific datasets in 3+ dimensions.
- zlib - a Massively Spiffy Yet Delicately Unobtrusive Compression Library.
How to cite NCLIn a new NCAR initiative to promote transparent and easy access to scientific resources, NCL has been assigned a Digital Object Identifier (DOI). DOIs are persistent identifiers for web-based resources. The NCL DOI, when used in URL form, http://dx.doi.org/10.5065/D6WD3XH5, provides a persistent link to the NCL web page. The benefit of DOIs is that they are widely accepted by academic publishers as citable locators for scholarly objects.
Please cite NCL in your publications using the following citation (line breaks were added for clarification but the citation should be on one line):
The NCAR Command Language (Version 6.1.0) [Software]. (2012). Boulder, Colorado: UCAR/NCAR/CISL/VETS. http://dx.doi.org/10.5065/D6WD3XH5
You will need to update the NCL version and year as appropriate.
For more information about DOIs, see http://www.doi.org and http://en.wikipedia.org/wiki/Digital_object_identifier.
The National Center for Atmospheric Research is sponsored by the National Science Foundation. Any opinions, findings and conclusions or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.