http://bbs.06climate.com/forum.php?mod=viewthread&tid=15197
截止netcdf4.1.3版本,C lib和fortran lib没有分开。从4.2版本开始分开。这就导致了netcdf-fortran-4.2的安装麻烦了一点。先安装zlib和hdf5.
CPPFLAGS=-I/path/netcdf4.3-C/include LDFLAGS=-L/path/netcdf4.3-C/lib ./configure --prefix=/path/netcdf4.3-C CC=icc FC=ifort
--with-zlib=。。。。。
make
make check
sudo make install
2,For fortran-netcdf
export LD_LIBRARY_PATH=/path/netcdf4.3-all/lib:${LD_LIBRARY_PATH}(重要)
CPPFLAGS=-I/path/netcdf4.3-C/include LDFLAGS=-L/path/netcdf4.3-C/lib ./configure --prefix=/path/netcdf4.3-C CC=icc FC=ifort
make
make check
sudo make install
make install check
在.bashrc中设置一下就好了~~~
详细可参考:http://www.unidata.ucar.edu/soft ... ortran-install.html
推荐一种简易方法:哈佛大学GEOS_CHEM研究小组比较好~~~他把这些都集成了~~~你需要的话,可以去下载安装,一个命令,netcdf4.2-c,netcdf4.2-fortran和hdf5等等都安装好了~~~
-------+---------+-------------------------------------
Config | Install | Package
-------+---------+-------------------------------------
ok | ok | zlib-1.2.6
ok | ok | hdf5-1.8.8
ok | ok | netcdf-4.2
ok | ok | netcdf-fortran-4.2
-------+---------+-------------------------------------
http://acmg.seas.harvard.edu/geos/doc/man/index.htmlor http://acmg.seas.harvard.edu/geos/doc/man/
安装方法如下: