ncview的安装

2019-07-24 16:51:26 浏览数 (2)

完整安装版

下载依赖库

代码语言:javascript复制
wget https://www.zlib.net/zlib-1.2.11.tar.gz
wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.37.tar.gz
wget https://s3.amazonaws.com/hdf-wordpress-1/wp-content/uploads/manual/HDF5/HDF5_1_10_5/source/hdf5-1.10.5.tar.bz2
wget ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz
wget https://github.com/Unidata/netcdf-c/archive/v4.6.3.tar.gz
wget ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz

编译安装依赖库

zlib

代码语言:javascript复制
tar -xvf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure --prefix=${HOME}/tools/zlib/1.2.11
make && make install

export LDFLAGS="-L${HOME}/tools/zlib/1.2.11/lib"
export CPPFLAGS="-I${HOME}/tools/zlib/1.2.11/include"

libpng

代码语言:javascript复制
tar -xvf libpng-1.6.37.tar.gz
cd libpng-1.6.37/
./configure --prefix=${HOME}/tools/libpng/1.6.37
make && make install

hdf5

代码语言:javascript复制
tar -xvf hdf5-1.10.5.tar.bz2
cd hdf5-1.10.5
./configure --prefix=${HOME}/tools/hdf5/1.10.5/ --with-zlib=${HOME}/tools/zlib/1.2.11
make && make install

netcdf-c

代码语言:javascript复制
export LDFLAGS="-L${HOME}/tools/zlib/1.2.11/lib -L${HOME}/tools/hdf5/1.10.5/lib"
export CPPFLAGS="-I${HOME}/tools/zlib/1.2.11/include -I${HOME}/tools/hdf5/1.10.5/include"

./configure --prefix=${HOME}/tools/netcdf-c/4.6.3 --enable-netcdf-4 --with-hdf5=${HOME}/tools/hdf5/1.10.5 --disable-dap
make && make install

udunits

代码语言:javascript复制
tar -xvf udunits-2.2.26.tar.gz
cd udunits-2.2.26/
./configure --prefix=${HOME}/tools/udunits2/2.2.26
make && make install

ncview

代码语言:javascript复制
tar -xvf ncview-2.1.7.tar.gz
cd ncview-2.1.7
./configure --prefix=${HOME}/tools/ncview/2.1.7 --with-nc-config=${HOME}/tools/netcdf-c/4.6.3/bin/nc-config --with-udunits2_incdir=${HOME}/tools/udunits2/2.2.26/include/ --with-udunits2_libdir=${HOME}/tools/udunits2/2.2.26/lib/ --with-png_incdir=${HOME}/tools/libpng/1.6.34/include/ --with-png_libdir=${HOME}/tools/libpng/1.6.34/lib/
make && make install

简易版安装

直接使用Anaconda/Miniconda的包管理器conda进行安装即可,安装命令如下:

代码语言:javascript复制
conda install -c eumetsat ncview

此方法仅支持linux系统。

0 人点赞