Install NCL/NCAR Graphics
Note: if you want to download NCL/NCAR Graphics (NCARG) for either Cygwin/Windows or MacOSX, there are a few things you may need to do before NCL will execute successfully. Please see the NCL/Cygwin or the NCL/MacOSX notes before you install NCL.The tar file that you download is a gzipped tar file. Let's assume it's called ncl_ncarg-5.0.0.SunOS_5.10.tar.gz and that it resides in your home directory.
To install NCL/NCARG, you need to do the following steps:
- Gunzip the file.
- Un-tar the file wherever you want the software to reside.
- Set the NCARG_ROOT environment variable and your search path to where NCL resides.
- Set the DISPLAY environment variable to indicate where to display graphics.
- Put a ".hluresfile" file in your home directory.
- Special instructions if you have an OPeNDAP-enabled version of NCL.
- Test your NCL/NCARG installation.
First gunzip the file with the UNIX command gunzip:
% gunzip ~/ncl_ncarg-5.0.0.SunOS_5.10.tar.gz
Un-tar the file wherever you want the software to resideDecide where you want NCL/NCARG to reside on your system. The tar file contains both executables and library files, so if you un-tar it, it will create a "bin" directory and a "lib" directory in your current working directory.
For example, if you want the software to reside in the parent directory "/usr/local", then do the following:
% mkdir /usr/local
% cd /usr/local
% tar -xvf ~/ncl_ncarg-5.0.0.SunOS_5.10.tar
Set the NCARG_ROOT environment variable and your search path to
where NCL/NCARG residesIn order to use the software, you must set your NCARG_ROOT environment variable to the parent directory where the NCL executables and accompanying files were installed. You also need to make sure that the directory where the NCL/NCARG executables reside are on your search path. It is best to do this from one of your .* files in your home directory. If you are not sure which shell you are running, you can do an "ls -a" in your home directory to see what kind of files you have that start with ".", and then look in these files to see how environment variables are set.
In the example above, we would set these with the following:
From C-shell (csh):
setenv NCARG_ROOT /usr/local
set path=(/usr/local/bin $path)
From bash:
export NCARG_ROOT=/usr/local
export PATH=(/usr/local/bin $PATH)
You should now be set for using NCL and/or NCAR Graphics. If you have
any problems, or questions about installing NCL from source code or
binaries, please send email to ncl-install@ucar.edu
(you need to subscribe first).Set the DISPLAY environment variable to indicate where to display graphics
This is not an NCL specific environment variable, but rather one that is used by any X11 Windows application that you run. For NCL or NCAR Graphics, it is needed when you display your graphics to an X11 window, or if you use ictrans, ctrans, or idt to view your NCGM files.
This variable must be set to the IP address or name of the machine you want to display your graphics on, for example "localhost:13.0" . If you are not running on a remote machine, then you can try setting it to ":0.0". Please contact your system administrator if you are not sure what to set it to.
For example, from C-shell (csh):
setenv DISPLAY :0.0
setenv DISPLAY 128.117.14.12:0
setenv DISPLAY localhost:13.0
From bash:
export DISPLAY=:0.0
export DISPLAY=128.117.14.12:0
export DISPLAY=localhost:13.0
Put a ".hluresfile" file in your home directory
In order to better customize the NCL graphical environment, we highly recommend that you copy a .hluresfile to your home directory. You can customize this file to your liking, but at a minimum, you want to change the default font, the default color table, and the text function code.
Special instructions if you have an OPeNDAP-enabled version of NCL
[You don't need to worry about these instructions if you are not using NCL.]
OPeNDAP-enabled binaries require some libraries to be installed on your host computer:
- Secure Sockets Layer (SSL) library
- OPeNDAP libraries
Once you have these libraries, you may be required to set the environment variable LD_LIBRARY_PATH to contain the directory where they are located on your host system in order for OPeNDAP-enabled versions of NCL to work properly.
Test your NCL/NCARG installation
You can quickly test if NCL is installed properly by typing:
ng4ex gsun01n
The ng4ex command will copy an NCL script called
gsun01n.ncl into your current working directory, and run it
through NCL. An X11 window should pop up with an XY plot drawn on it
Click on this plot with your left mouse button to advance (and thus
close) the frame.Once this file is in your directory, you can run it yourself with:
ncl gsun01n.ncl
You can similarly test NCAR Graphics with:
ncargex cpex08
Special note on installing both NCL and NCAR Graphics
As of version 5.0.0, both NCL and NCAR Graphics are combined into one package, so you no longer need to install them separately.