|||
NetCDF安装摘记(包括c库和fortran库)
1、安装环境
(系统环境:Centos 7+bash
(编译器:gcc 4.8.5 20150623
(C库版本:netcdf-4.6.1.tar.gz
(Fortran库版本:netcdf-fortran-4.4.4.tar.gz
2、C库安装(without netCDF4 and HDF5support)
(1)设定环境变量
export CC=gcc
export CPPFLAGS='-DNDEBUG –DgFortran'
export FC=gfortran
export FFLAGS='-0-w'
export CXX=g++
(2)安装C库(安装至/opt/netcdf)
tar -xzvfnetcdf-4.6.1.tar.gz
cd netcdf-4.6.1
sudo ./configure--disable-netcdf-4 --disable-dap --prefix=/opt/netcdf
sudo make
sudo make check
sudo make install
3、Fortran库安装(安装至/opt/netcdf)
tar -xzvfnetcdf-fortran-4.4.4.tar.gz
cdnetcdf-fortran-4.4.4
sudo CPPFLAGS=-I/opt/netcdf/include LD_LIBRARY_PATH=/opt/netcdf/lib:${LD_LIBRARY_PATH} LDFLAGS=-L/opt/netcdf/lib ./configure --prefix=/opt/netcdf
sudo make
sudo make check
sudo make install
4、参考文献
(1)CMAQ_GettingStarted.md(CMAQ5.2 Tutorials)
(2)模式学习之netcdf,netcdf-fortran,pgi安装(CSDN博客)
(3)NetCDF安装记录(科学网博客)
(4)编译安装Vim 7.4,编译错误error:cannot compute sizeof (off_t)解决方法(知识蚂蚁)
NetCDF安装摘记(包括c库和fortran库)
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-18 11:20
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社