Skip navigation
NASA Logo, National Aeronautics and Space Administration
Modeling Guru Banner
Currently Being Moderated

Using NCL on Discover

VERSION 4  Click to view document history
Created on: May 3, 2013 1:40 PM by bvanaart - Last Modified:  Nov 21, 2013 11:48 AM by bvanaart

NCL (NCAR Command language) is a free interpreted language designed specifically for scientific data processing and visualization. It can read and write netCDF-3, netCDF-4 classic, HDF4, binary, and ASCII data. It can also read HDF-EOS2, HDF-EOS5, GRIB1, GRIB2, and OGR files.


Environment Setup

As of Sept. 2013, the latest NCL version on Discover is 6.1.2.   To use this version, you can set up your environment with these two commands:


module purge

module load comp/intel- other/ncl-6.1.2


Or if you prefer the hard way, you can set the following environment variables:

For bash shell:

export NCARG_ROOT=/usr/local/other/SLES11.1/ncl/6.1.2/intel-
export PATH=/usr/local/other/SLES11.1/ncl/6.1.2/intel-$PATH
export PATH=/usr/local/other/SLES11.1/netcdf4/4.1.3/intel-$PATH
export LD_LIBRARY_PATH=/usr/local/other/SLES11.1/proj/4.7.0/intel-${LD_ LIBRARY_PATH}
export LD_LIBRARY_PATH=/usr/local/other/SLES11.1/gdal/1.9.2/intel-${LD_ LIBRARY_PATH}


For csh shell:

setenv NCARG_ROOT /usr/local/other/SLES11.1/ncl/6.1.2/intel-
set path=(/usr/local/other/SLES11.1/ncl/6.1.2/intel- $path)
set path=(/usr/local/other/SLES11.1/netcdf4/4.1.3/intel- $path)
setenv LD_LIBRARY_PATH /usr/local/other/SLES11.1/proj/4.7.0/intel-$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH /usr/local/other/SLES11.1/gdal/1.9.2/intel-$LD_LIBRARY_PATH


Using NCL

NCL includes over 600 built-in functions and procedures that you can use to build a script for processing, manipulating, and visualizing data. It also has two very useful command-line tools:


ncl_filedump - Allows you to view the attributes of  GRIB1, GRIB2 file, netCDF, HDF4, HDF-EOS2, HDF-EOS5, and shapefiles.  Useful for examing content of output files generated from WRF, GFS, etc.


ncl_convert2nc - Converts GRIB1, GRIB2, HDF4, HDFEOS2, HDFEOS5, and shapefiles into netcdf files.


For further information, see

Comments (0)
USAGov logo NASA Logo -