Tutorial : installation of NCL (new NCAR Graphics) for WRF vizualisation

NCL is a vizualisation software commonly used for scientific vizualisation of meteorology or air quality datasets in NetCDF format. NCL is used for vizualising results of the WRF model. For installing WRF software refer to : Tutorial : installing WRF on Google Compute Engine Linux / Debian / Ubuntu

Installin NCL using precompiled binaries

Under Debian, installing NCAR Graphics/NCL with NCL installing tutorial.

Install some additonal packages in order NCL to run :

 sudo apt-get install libcairo2-dev libxt-dev libbz2-dev flex libxmu-dev libxaw7-dev libzip-dev libgdal-dev libgdal1-dev 

Be aware to install development pakages PROJ4 et GDAL if these options are activated at compilation.

Some recent Linux distributions like Ubuntu or Debian (9.2) propose direct installation. Try :

sudo apt-get install ncl-ncarg

Installing NCL from code source

For recent versions of Linux (for example Ubuntu), it is necessary to install NCL from code source. Go to the NCL page on the NCAR web site : http://www.ncl.ucar.edu/Download/

First install packages from first list, them install NCL from source code:

 export nclversion=6.2.1 # last NCL version available
 cd ../archive-src/
 tar zxvf ../archive-src/ncl_ncarg-${nclversion}.tar.gz
 cd ../archive-src/ncl_ncarg-${nclversion}
 ./Configure 
# options :
 Build NCL (y)? y
 Parent installation directory : /opt/ncl
 System temp space directory   : /tmp (default)
 Build NetCDF4 feature support (optional)? (y)
 Build HDF4 support (optional) into NCL? (y)
 Also build HDF4 support (optional) into raster library? (y)
 Build Triangle support (optional) into NCL (n)
 If you are using NetCDF V4.x, did you enable NetCDF-4 support ? (y)
 Did you build NetCDF with OPeNDAP support ? (n)
 Build GDAL support (optional) into NCL? (y)
 Build Udunits-2 support (optional) into NCL (n)
 Build Vis5d+ support (optional) into NCL (n)
 Build HDF-EOS2 support (optional) into NCL (n)
 Build HDF5 support (optional) into NCL (y)
 Build HDF-EOS5 support (optional) into NCL (n)
 Build GRIB2 support (optional) into NCL (n)
 Enter local library search path(s) : /opt/netcdf-gfortran/lib 
                                      /opt/hdf5-gfortran/lib
                                      /opt/hdf-gfortran/lib
 Enter local include search path(s) : /opt/netcdf-gfortran/include 
                                      /opt/hdf5-gfortran/include 
                                      /opt/hdf-gfortran/include 
                                      /usr/include/gdal 
                                      /usr/include/freetype2
Go back and make more changes or review? (n)
 Save current configuration ? (y)

File ./config/Site.local gives the path of the libraries, includes and compiling options.

It is sometimes necessary to delete the occurence of the library -lsz (SZIP) in the file ./config/Project : this library of HDF 5 is not compulsory if HDF5 has been compiled with.

Compilation of  NCL is launched with:

 make Everything >& make-output &

After compiling the executable ncl should be in the /bin repertory (/opt/ncl/bin).

For setting up your environment to run NCL, add in your .bashrc or .profile :

 export NCARG_ROOT=/opt/ncl
 export PATH=$PATH:$NCARG_ROOT/bin

NCL is now installed on your system.