hbm

导航

 

终于安装成功,记录如下,以供他人参考:
1.下载netcdf安装包,from:
http://www.unidata.ucar.edu/downloads/netcdf/index.jsp 
我下载的目前最新版本4.1.3,但是其实4.1.1就够用了,因为安装过程中我disable掉了4.1.3中比4.1.1改进的地方,比如,hdf4.
2.解压 tar -zxvf netcdf-4.1.3.tar.gz
3. 在解压后的netcdf-4.1.3所在目录执行:
./configure --disable-dap --disable-netcdf-4 --prefix=/usr/local/netcdf
注意:上面红色的两个选项是他人很多次实验后证明必须的(参考资料1)。--disable-dap的原因是缺少一个‘curl’的lib, --disable-netcdf-4是报错中提出的解决办法,尽管我个人暂时没有搞清楚为什么。不写这两个,在configure的时候就会报错,导致后面make失败。
4. make
5. make install,提示安装成功的同时,还会提醒make check,下一步进行。
6. make check

备注:以下为各个步骤执行命令的解释:

 $ ./configure

 The configuration script will set up the Makefiles that will be used to build the NetCDF libraries and utilities. It will also set up the installation directory for the default location of /usr/local.

 If you would like to install the libraries in another location, use this configure command:

$ ./configure --prefix=/your/desired/install/directory)

$ make----Make the libraries

When the configuration step completes successfully, you can build the libraries using ‘make’.

$ make check-----Testing NetCDF on Linux*

You can test your NetCDF libraries using ‘make check’.

$ make install------Installing NetCDF on Linux*

Install NetCDF libraries using ‘make install’.

 This will install the NetCDF libraries, include files, and utilities in the default location of /usr/local or the location specified in the configuration step with the --prefix= option.

Congratulations! You have successfully installed netCDF!    |
|                                                             |
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so. It does not take very long.            |
|                                                             |
| Before using netCDF to store important data, test your      |
| build with "make check".                                    |
|                                                             |
| NetCDF is tested nightly on many platforms at Unidata       |
| but your platform is probably different in some ways.       |
|                                                             |
| If any tests fail, please see the netCDF web site:          |
| http://www.unidata.ucar.edu/software/netcdf/                |
|                                                             |
| NetCDF is developed and maintained at the Unidata Program   |
| Center. Unidata provides a broad array of data and software |
| tools for use in geoscience education and research.         |
| http://www.unidata.ucar.edu    

### set for netcdf
setenv NETCDF /$M3LIB/netcdf
setenv PATH $NETCDF/bin:$NETCDF/lib:$NETCDF/include:$NETCDF/man:$PATH
setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1

终端输入ncdump显示版本信息安装成功

 

posted on 2015-01-21 09:29  hbm  阅读(3796)  评论(1编辑  收藏  举报