知識の箱

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

netcdf3.6.0のインストール

1.netcdfのホームページ
(http://www.unidata.ucar.edu/software/netcdf/)
(ftp://ftp.unidata.ucar.edu/pub/netcdf/)
からソースをダウンロード

2.netcdf.tar.gzを解凍
>tar xzvf netcdf.tar.gz

3.環境変数の設定
参考)
http://www.unidata.ucar.edu/software/netcdf/builds/
http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html

(intel compilerの場合)

> cp -r netcdf-*.*.* /usr/local
> cd /usr/local/netcdf-*.*.*/src

> export FC=ifort
> export F90=ifort
> export FFLAGS=”-O -mp”
> export CPPFLAGS=”-DNDEBUG -DpgiFortran”
> export CC=gcc
> export CXX=g++
> export CFLAGS=”-g -O2″
>
> ./configure –prefix=/usr/local/netcdf-*.*.*
> make
> make install

環境変数の設定。
/etc/profile.local(SUSE LINUXの場合)に、

### NetCDF *.*.* ###
export NETCDF=/usr/local/netcdf-*.*.*
export NETCDFHOME=${NETCDF}
export PATH=${PATH}:${NETCDF}/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NETCDF}/lib
export MANPATH=${MANPATH}:${NETCDF}/man