NcView

From GHER

Jump to: navigation, search

NcView is visual browser for NetCDF format files. It is the perfect tool to get an idea of what is in a file, whatever its size.

Contents

Installation

Linux

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

http://meteora.ucsd.edu/~pierce/ncview_home_page.html

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

Windows

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

  1. 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)
  2. Edit ncview.c:
  • add the line
#include "colormaps_redblue.h"

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.
Personal tools