In some Linux distributions, it is directly available through the package manager. If it is not the case, follow the procedure below.
- Download the sources from
You can chose the most recent version ncview-2.1.1.tar.gz (August 1, 2011).
or if you don't need HDR library, prefer the older version ncview-1.93g.tar.gz
- Extract the archive
tar -xvf ncview-2.1.1.tar.gz
- Install the software: the complete instruction are described in the file INSTALL.
Installation on nic3
Here we describe the procedure applied to install NcView on nic3.
It is preferable to work with the same compilation options used for the installation of NetCDF library, so we type:
export CC=icc export FC=ifort
The configure script requires the specification of the NetCDF library and include directories:
./configure --with-netcdf_incdir=/u/mc/include/ \ --with-netcdf_libname=libnetcdf.a \ --with-netcdf_libdir=/u/mc/lib/ \ --with-nc-config=/u/mc/bin/nc-config
Don't worry about the lack of ppm support, it is not necessary for NcView to work.
To finish the installation simply type
make make install
The installation of ncview on Windows machines is also possible, but it requires the installation of [Cygwin http://www.cygwin.com/].
When you run setup.exe (installation and update of cygwin installation), don't forget to install
- a fortran compiler
- the X11 libraries
More information about the installation is available here.
Adding personnal colormaps
- Create a text file, called colormaps_redblue.h for example, with a format similar to the other colormap files (e.g. colormaps_3gauss.h, colormaps_default.h, etc)
- Edit ncview.c:
- add the line
in the beginning of the file
- add the line
init_cmap_from_data( "redblue", cmap_redblue );
in the field init_cmaps_from_data()
- Finally compile the code again, following the previous instructions.