Est. 1995 Intermediate

NCL (NCAR Command Language)

A free, interpreted scripting language built by the National Center for Atmospheric Research for the analysis and visualization of climate, weather, and other geoscience data.

Created by National Center for Atmospheric Research (Computational and Information Systems Laboratory)

Paradigm Imperative, Array-oriented scripting
Typing Dynamic, Strong
First Appeared 1995
Latest Version NCL 6.6.2 (February 2019)

NCL, the NCAR Command Language, is a free, interpreted scripting language created by the National Center for Atmospheric Research (NCAR) specifically for the analysis and visualization of scientific data – above all climate, weather, and other geoscience datasets. Rather than being a general-purpose language that happens to be used for science, NCL was designed from the start around the realities of earth-system data: large multidimensional arrays, rich metadata, and a zoo of domain file formats. It pairs a concise array-oriented language with a “world-class” graphics engine and several hundred built-in computational functions, letting a researcher read a gridded dataset, compute a climatology, and draw a finished map in a remarkably short script.

History & Origins

NCL grew out of NCAR’s long history with scientific graphics. For decades NCAR maintained NCAR Graphics, a widely used Fortran-based plotting library. In the early 1990s, as part of a broader redesign of that system, NCAR set out to provide higher-level, more consistent interfaces on top of the underlying graphics primitives. Two of those new interfaces were the High Level Utilities (HLUs) – an object-based graphics library – and a command language to drive them interactively and in scripts: NCL.

The language became publicly available in the mid-1990s; copyright notices embedded in the software date to 1995, and NCL shipped alongside NCAR Graphics from that era onward. (Exact origin dates for NCL vary between sources, with some accounts placing early development a few years earlier, so the precise “first appeared” year is best treated as approximately the mid-1990s.) NCL is a product of NCAR’s Computational and Information Systems Laboratory (CISL) and has historically been sponsored by the U.S. National Science Foundation.

Over the late 2000s, with the 5.0.0 generation, NCL’s full source code was made openly available so users could build and inspect it themselves; today the source is distributed on GitHub under the Apache 2.0 License.

Design Philosophy

NCL was built to serve a specific community – atmospheric, oceanic, and climate scientists – and its design choices reflect that focus:

  • Data-first. The language treats multidimensional arrays and their metadata (named dimensions, coordinate variables, units, descriptive attributes) as first-class citizens. When you read a variable from a netCDF file, you get not just numbers but the coordinates and attributes attached to them.
  • Batteries included for geoscience. NCL ships with 600+ built-in functions and procedures for tasks that recur constantly in the field: interpolation and regridding, spectral analysis, EOF/empirical orthogonal function computation, smoothing, date/calendar handling, and more.
  • File-format agnostic. Robust I/O for netCDF, HDF4/HDF5, GRIB (1 and 2), and other formats is a core feature, exposed through a uniform interface so the same script logic works across formats.
  • Publication-quality visualization. NCL’s graphics, descended from NCAR Graphics and the HLUs, aim to produce finished, highly customizable two-dimensional plots – contour maps, vector and streamline plots, XY plots, and panels – suitable for papers and reports.
  • Approachability. The language is interpreted and can be used interactively or in batch, lowering the barrier for scientists who are domain experts first and programmers second.

Key Features

Variables with Metadata

In NCL, a variable carries its coordinates and attributes along with its data. Coordinate variables, named dimensions, and attributes (accessed with the @ operator) let scripts stay self-describing and reduce bookkeeping errors when slicing or plotting.

; read a variable from a netCDF file
f    = addfile("data.nc", "r")
temp = f->T                 ; T arrives with its coordinates and attributes
printVarSummary(temp)       ; show dimensions, coordinates, and attributes

; metadata is attached directly to the variable
print(temp@units)           ; e.g. "K"
print(temp&lat)             ; the latitude coordinate array

Array-Oriented Computation

Like other scientific array languages, NCL encourages whole-array operations instead of explicit element loops. Arithmetic, masking, and many built-in functions operate over entire arrays at once, which keeps scripts compact.

; convert Kelvin to Celsius across the whole array
tempC = temp - 273.15
copy_VarMeta(temp, tempC)   ; carry coordinates/attributes onto the result

; compute a time-mean using a built-in function
tbar = dim_avg_n_Wrap(temp, 0)   ; average over the first (time) dimension

Integrated Graphics

Plotting is part of the language. A workstation object is opened, plot resources are set through an attribute-style interface, and a single call renders the figure.

wks = gsn_open_wks("png", "tempmap")   ; output workstation
res = True                              ; plot resources
res@cnFillOn = True                     ; turn on color fill
plot = gsn_csm_contour_map(wks, tbar, res)

Interoperability

NCL can call external C and Fortran routines, letting performance-critical numerics or existing scientific code be wrapped and invoked from a script. It also offers command-line companions for converting and dumping data files.

Evolution

NCL matured steadily through the 2000s and 2010s as the 5.x and then 6.x series, expanding its function library, file-format support, and graphics capabilities with each release. Notable points along the 6.x line include 6.4.0 (February 28, 2017) and 6.5.0 (July 16, 2018).

The decisive turn came in 2019. On February 6, 2019, NCAR published an open letter announcing a strategic pivot to Python: future development of analysis and visualization tools would target the Python ecosystem, and NCL would move into maintenance mode. Later that month, on February 28, 2019, NCAR released version 6.6.2 – the final major release of NCL. (Versions 6.6.0 and 6.6.1 were prepared but not officially released because of bugs that 6.6.2 fixed.)

To carry NCL’s capabilities into Python, NCAR organized successor efforts under the GeoCAT (Geoscience Community Analysis Toolkit) umbrella, including computational tools (GeoCAT-comp), example galleries that reproduce NCL plots, and the older PyNGL (graphics) and PyNIO (file I/O) packages that bridge NCL’s libraries into Python.

Current Relevance

NCL today occupies an interesting position: officially in maintenance mode, yet still installed and used. A vast amount of existing geoscience analysis – diagnostic packages, lab workflows, course materials, and the scripts behind countless published figures – was written in NCL, and that body of work does not disappear when a new tool is recommended. Many researchers continue to run NCL for established pipelines while gradually adopting Python-based tools (xarray, matplotlib, cartopy, and GeoCAT) for new work.

For newcomers, NCAR now steers users toward the Python ecosystem, and projects like GeoCAT and Project Pythia explicitly aim to help the community make that transition. NCL itself remains freely downloadable – including via conda – and its source remains available, but it is no longer receiving new feature development.

Why It Matters

NCL is a clear, successful example of a domain-specific scientific language: rather than asking earth scientists to assemble a general-purpose toolchain, it baked the field’s data model, file formats, computations, and plotting conventions directly into the language. That integration – especially the idea that a variable should carry its coordinates and metadata everywhere it goes – made it possible for scientists to move from raw model output to a finished map in just a few lines, and it arguably helped shape the expectations around labeled, metadata-aware arrays that are now common in the broader Python geoscience stack.

Its trajectory is also instructive. NCL shows both the strength of a tightly focused, institution-backed tool and the eventual pull of a larger, general-purpose ecosystem: when the surrounding scientific-Python community reached critical mass, even a beloved specialized language was deliberately wound down in favor of interoperability and a shared toolset. For anyone studying the history of scientific computing, NCL stands as a well-engineered answer to a hard, specific problem – and a case study in how such tools are succeeded.

Timeline

Early 1990s
Development of NCL begins at NCAR as part of a redesign of NCAR Graphics, introducing a high-level command language alongside the High Level Utilities (HLUs) graphics library
1995
NCL becomes publicly available, bundled with NCAR Graphics; copyright notices in the software date to this year
Late 2000s
The version 5.0.0 generation makes NCL's full source code openly available for users to build and inspect
2017
Version 6.4.0 is released (February 28, 2017), continuing the actively maintained 6.x series
2018
Version 6.5.0 is released (July 16, 2018)
2019
On February 6, NCAR announces a strategic pivot to Python for future analysis and visualization tools and places NCL into maintenance mode
2019
Version 6.6.2 is released (February 28, 2019), the final major release of NCL
2019
NCAR establishes the GeoCAT (Geoscience Community Analysis Toolkit) team to lead the Pivot to Python effort, building Python successors alongside the existing PyNGL and PyNIO packages

Notable Uses & Legacy

Community Earth System Model (CESM)

NCL has been widely used in the climate-modeling community to post-process, diagnose, and visualize output from large coupled models such as NCAR's CESM, including standard diagnostic packages that summarize long model runs.

WRF Model Output Analysis

Researchers running the Weather Research and Forecasting (WRF) model commonly relied on NCL (and its dedicated WRF functions) to read native model files and produce maps of forecast and simulation fields before the Python-based wrf-python successor emerged.

Climate Reanalysis and Observational Data

Atmospheric and ocean scientists use NCL to read reanalysis and observational datasets in formats like netCDF, GRIB, and HDF, compute climatologies and anomalies, and generate publication-quality figures.

University Earth-System Courses

NCL has been taught in graduate-level atmospheric, oceanic, and climate science courses as an accessible way for students to manipulate gridded geoscience data and create standard plots without writing low-level graphics code.

Model Intercomparison and Diagnostics

Diagnostic and intercomparison workflows -- comparing multiple models or experiments against observations -- frequently used NCL scripts to regrid fields, compute statistics, and render comparison panels.

Running Today

Run examples using the official Docker image:

docker pull
Last updated: