模式学习之netcdf,netcdf-fortran,pgi安装

金慈
2023-12-01

安装环境linux centos 6.5

netcdf的安装

1. 在安装netcdf之前,要安装zlib和hdf5

    下载zlib包, 解压,进入目录

    ./configure --prefix=/home/ed/local

    make check install

    下载hdf5包,解压,进入目录

    ./configure --with-zlib=/home/ed/local --prefix=/home/ed/local

    make check install

2.正式安装

    在命令行中输入

    CPPFLAGS=-I/home/ed/local/include LDFLAGS=-L/home/ed/local/lib ./configure --prefix=/home/ed/local

    make check install


netcdf-fortran的安装

1.下载,安装,进入解压后目录

    CPPFLAGS=-I/home/ed/include LD_LIBRARY_PATH=/home/ed/lib:/home/ed/local/lib:${LD_LIBRARY_PATH} LDFLAGS=-L/home/ed/local/lib LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl" ./configure --disable -shared --prefix=/home/ed/local

    make check

    sudo make install


配置netcdf环境变量

1. 命令行输入vi ~/.bashrc

    export NETCDF=/home/ed/local/netcdf

    export PATH=$PATH:$NETCDF/bin:$NETCDF/include:$NETCDF/lib

    export MANPATH=$MANPATH:$NETCDF/share/man

2. 回到命令行,输入$source ~/.bashrc使更改生效


配置PGI环境变量

1. 解压,安装,安装比较简单,然后进入./bashrc进行如下修改

    export PGI=/opt/pgi/linux86-64/10.6

    export MANPATH=$MANPATH:$PGI/man

    export LM_LICENSE_FILE=/opt/pgi/license.dat

    export PATH=$PATH:$PGI/bin

2. source使之更改生效


检查netcdf是否安装成功

命令行中输入ndcump


检查pgi是否安装成功

命令行中输入$pdf90,如果出现$pdf90-Warning-No files to process即为安装成功

 类似资料: