知識の箱

主に気象を研究する上で得た知識と、WEBページ作成のために得た知識を記録しています。

ncviewのインストール

netcdfのデータを画像で表示できるソフトncviewのインストール

ソースファイルのダウンロード:
ftp://cirrus.ucsd.edu/pub/ncview/

configureの実行

(x86-64 linux用)
> ./configure –with-netcdf_incdir=(netcdf include ディレクトリ) –with-netcdf_libdir=(netcdf lib ディレクトリ) –with-udunits_incdir=(udunits include ディレクトリ) –with-udunits_libdir=(udunits lib ディレクトリ) –x-libraries=(lib64 ディレクトリ)

(例)
> ./configure –with-netcdf_incdir=/usr/local/netcdf-3.6.2/include –with-netcdf_libdir=/usr/local/netcdf-3.6.2/lib –with-udunits_incdir=/usr/local/udunits-1.12.9/include –with-udunits_libdir=/usr/local/udunits-1.12.9/lib –x-libraries=/usr/lib64

makeの実行

> make all

※udunitsのインストールはこちらを参照


************************************************
Note: the -frames option is NOT enabled, because I could not find the
location of the PPM include file ‘ppm.h’ or library file
‘libppm.a’. Ncview uses the ppm package to dump out the frames viewed,
which is an easy way to make an mpeg video of the data if you want.
If you do not want this feature, then don’t worry about the lack
of ppm support. If you DO want this, then you must tell me where to find
the ppm package by giving arguments to configure, as follows:
./configure -with-ppm_incdir=include_directory -with-ppm_libdir=library_directory
************************************************

と出た時は、ppm.hがあるディレクトリを指定する。
たとえば、–with-ppm-incdir=/usr/include

pbm.hがない場合、取得する必要がある。

> yum install netpbm
> yum install netpbm-devel

これで、/usr/include/netpbm/の下にppm.hができる。

/usr/libと/usr/includeにppm.hのリンクを貼っておく。

※下記のようなエラーが出た場合、

ncview.includes.h:51:26: 致命的エラー: X11/Xaw/Form.h: そのようなファイルやディレクトリはありません

> yum install libXt-devel
> yum install libXaw-devel