操作系统:
软件包版本:
hdf5-1.8.13
zlib-1.2.8
netcdf-4.1.3
jasper-1.900.1
cdo-1.9.1
安装依赖包:
[root@localhost hdf5-1.8.13]# yum install gcc gcc-c++ -y
依赖包版本:
前期准备工作:
[root@localhost share]# mkdir /share/software_package #新建文件夹software_package,来存放压缩包
[root@localhost share]# ls
software_package
[root@localhost share]# mkdir /share/lib-all #新建lib-all文件目录
[root@localhost share]# ls
lib-all software_package
[root@localhost share]# CDO=/share/lib-all #设置环境变量
[root@localhost share]# echo $CDO #打印环境变量
/share/lib-all
[root@localhost software_package]# ls
cdo-1.9.1.tar.gz hdf5-1.8.13.tar.gz jasper-1.900.1.zip netcdf-4.1.3.tar.gz zlib-1.2.8.tar.gz
zlib安装:
[root@localhost software_package]# wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.8.tar.gz #下包
[root@localhost software_package]# tar -xzvf zlib-1.2.8.tar.gz #解压
[root@localhost software_package]# cd zlib-1.2.8 #进入解压目录
[root@localhost zlib-1.2.8]# mkdir /share/lib-all/zlib #新建zlib文件目录
[root@localhost zlib-1.2.8]# ./configure --prefix=$CDO/zlib #创建makefile文件
[root@localhost zlib-1.2.8]# make -j 4 #编译
[root@localhost zlib-1.2.8]# make check #检查
[root@localhost zlib-1.2.8]# make install #安装
hdf5安装:
[root@localhost software_package]# wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.13.tar.gz #下包
[root@localhost software_package]# tar -xzvf hdf5-1.8.13.tar.gz #解压
[root@localhost hdf5-1.8.13]# cd hdf5-1.8.13 #进入解压文件
[root@localhost hdf5-1.8.13]# mkdir /share/lib-all/hdf5 #新建hdf5文件目录
[root@localhost hdf5-1.8.13]# ./configure -with-zlib=$CDO/hdf5 --prefix=$CDO/hdf5 CFLAGS=-fPIC #创建makefile文件
[root@localhost hdf5-1.8.13]# make -j 4 #编译
[root@localhost hdf5-1.8.13]# make check #检查
[root@localhost hdf5-1.8.13]# make install
netcdf安装:
[root@localhost software_package]# wget https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/netcdf-4.1.3.tar.gz #下包
[root@localhost software_package]# tar -xzvf netcdf-4.1.3.tar.gz #解压
[root@localhost netcdf-4.1.3]# cd netcdf-4.1.3 #进入解压文件
[root@localhost netcdf-4.1.3]# mkdir /share/lib-all/netcdf #新建netcdf文件目录
[root@localhost netcdf-4.1.3]# ./configure --disable-dap --disable-netcdf-4 --prefix=$CDO/netcdf #创建makefile文件
[root@localhost netcdf-4.1.3]# make -j 4 #编译
[root@localhost netcdf-4.1.3]# make check #检查
[root@localhost netcdf-4.1.3]# make install #安装
jasper安装:
[root@localhost software_package]# wget http://www.ece.uvic.ca/~frodo/jasper/software/jasper-1.900.1.zip #下包
[root@localhost software_package]# unzip jasper-1.900.1.zip #解压
[root@localhost software_package]# cd jasper-1.900.1 #进入解压文件
[root@localhost jasper-1.900.1]# mkdir /share/lib-all/jasper #新建jasper文件目录
[root@localhost jasper-1.900.1]# ./configure --prefix=$CDO/jasper CFLAGS=-fPIC #创建makefile文件
[root@localhost jasper-1.900.1]# make -j 4 #编译
[root@localhost jasper-1.900.1]# make check #检查
[root@localhost jasper-1.900.1]# make install #安装
cdo安装:
[root@localhost software_package]# wget https://code.mpimet.mpg.de/attachments/download/15653/cdo-1.9.1.tar.gz #下包
[root@localhost software_package]# tar -xvzf cdo-1.9.1.tar.gz #解压
[root@localhost cdo-1.9.1]# cd cdo-1.9.1 #进入解压文件
[root@localhost cdo-1.9.1]# mkdir /share/lib-all/cdo #新建cdo文件目录
[root@localhost cdo-1.9.1]# ./configure --prefix=$CDO/cdo CFLAGS=-fPIC -with-netcdf=$CDO/netcdf -with-jasper=$CDO/jasper -with-hdf5=$CDO/hdf5 #创建makefile文件
[root@localhost cdo-1.9.1]# make -j 4 #编译
[root@localhost cdo-1.9.1]# make check #检查
[root@localhost cdo-1.9.1]# make install #安装
版本查询:
[root@localhost bin]# ./cdo -V #查看cdo版本
执行cdo,启动命令:
[root@localhost share]# cd /share/lib-all/cdo/bin #进入cdo目录下
[root@localhost bin]# ls
cdo
[root@localhost bin]# ./cdo #执行cdo命令