安装zlib
下载地址:ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/
Shell下安装指令:
wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.11.tar.gz
tar -zxf zlib-1.2.11.tar.gz
sudo ./configure
sudo make && make install
安装curl
安装hdf5
hdf5是为了使用netcdf-4特性,这个特性需要hdf5来支持,这个特性支持2G以上的文件。
下载地址:[ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/]
Shell下安装指令:
cd hdf5-X.Y.Z
./configure --prefix=/path/to/hdf5 --with-zlib=/path/to/zlib#安装路径
make
make check # run test suite.
make install
make check-install # verify installation.
安装netcdf-c
下载地址 ftp://ftp.unidata.ucar.edu/pub/netcdf/old/
Shell下安装指令:
CPPFLAGS=-I/path/to/netcdf4-needed/include
LDFLAGS=-L/path/to/netcdf4-needed/lib
./configure --prefix=/usr/local/netcdf4-needed --disable-dap
注意:此处如果没有输入 --disable-dap的话,要预先安装curl. dap应该是用于远程数据处理相关的,这里不安装也行。
安装fftw
wget http://www.fftw.org/fftw-3.3.8.tar.gz
tar xzvf fftw-3.3.8.tar.gz
cd ./fftw-3.3.8
./configure --enable-shared
make
sudo make install
sudo ldconfig
安装petsc
参考文献
[1] ubuntu18.04下安装zlib方法
[2]Netcdf4.4的安装过程(附netcdf4.1.3的安装过程)
[3]ubuntu下安装NetCDF之HDF4/HDF5对NetCDF的支持