Last modified 9 years ago Last modified on 10/09/12 15:07:53

Notes on Building NCL from Source

NOTE: The information below includes some of my experiences building the NCL source. These steps are NOT the only way to build NCL but are the ones that I used when building NCL for ParGAL development. - Jayesh Krishna

The definitive source on how to build NCL is the information available at the NCAR website (Building NCL and NCAR Graphics from source).
You can go through the information in INSTALL.txt for information on how to install NCL.

Pre-requisite Software for building NCL

The following external packages are required before building NCL.

  • JPEG
  • ZLIB
  • NetCDF
    • szip
    • HDF-5
    • libcurl
  • HDF-4

Please install the software packages mentioned here before installing NCL.


  • Now you are ready to install NCL
  • Do not install NCL to <NCL-SOURCE-DIR>/install . Choose another directory as your install directory.
  • Set "$NCARG" environment variable to point to your NCL install directory.
  • I did not have to install libcurl since it was already present in the system. You might have to install libcurl version 7.16.4 or later by obtaining the source from CURL website.
  • Run "./Configure -v" that will guide you through the process of installing NCL.
    • Only enable support for NetCDF4, OpenDAP and HDF5. Disable support for other optional software packages/features (like GRIB, HDF-EOS, Cairo, UDUNITS, Vis5D etc)
  • After running configure make sure that your system is recognized by using the following commands,
       cd $NCARG/config
       make -f Makefile.ini
       ./ymake -config `pwd`
    • By grep'ing for SYSTEM_INCLUDE in your Makefile you can find out the name of the configuration file used for your system. The configuration file is a file of the same name (output of "grep SYSTEM_INCLUDE Makefile") in $NCARG/config directory
    • If you want to modify the compiler flags you can do so by editing the config file above (See NCL INSTALL.txt for details).
  • Run "make Everything |& tee make.log" to make and install NCL