简单备份netcdf4.5以上版本安装

参考https://forum.mmm.ucar.edu/threads/full-wrf-and-wps-installation-example-gnu.12385/

intel编译器设置如下,个别参数设置会提示warning,问题不大:

export PATH=/public/home/chenjq93/software/Cmake/bin/bin:$PATH

export PATH=/public/home/chenjq93/software/Make/bin/bin:$PATH

source mpi_intelmpi-2021.3.0.sh

source compiler_intel-2021.3.0.sh

export DIR=/public/home/chenjq93/models/SWAN/netcdf_forswan

export NETCDF=$DIR/netcdf

export LD_LIBRARY_PATH=$NETCDF/lib:$DIR/grib2/lib

export PATH=$NETCDF/bin:$DIR/mpich/bin:${PATH}

export JASPERLIB=$DIR/grib2/lib

export JASPERINC=$DIR/grib2/include

export CC=icc

export CXX=icpc

export FC=ifort

export FCFLAGS="-m64 -fallow-argument-mismatch"

export F77=ifort

export FFLAGS="-m64 -fallow-argument-mismatch"

export LDFLAGS="-L$NETCDF/lib -L$DIR/grib2/lib"

export CPPFLAGS="-I$NETCDF/include -I$DIR/grib2/include -fcommon"

tar xzvf zlib-1.2.11.tar.gz

cd zlib-1.2.11

./configure --prefix=$DIR/grib2

make -j 4

make install

cd ..

rm -rf zlib*

export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH

tar xzvf hdf5-1.10.5.tar.gz

cd hdf5-1.10.5

./configure --prefix=$DIR/netcdf --with-zlib=$DIR/grib2 --enable-fortran --enable-shared

make -j 4

make install

cd ..

rm -rf hdf5*

tar xzvf v4.7.2.tar.gz

cd netcdf-c-4.7.2

./configure --prefix=$DIR/netcdf --disable-dap --enable-netcdf4 --enable-hdf5 --enable-shared

make -j 4

make install

cd ..

rm -rf v4.7.2.tar.gz netcdf-c*

export LIBS="-lnetcdf -lz"

tar xzvf v4.5.2.tar.gz

cd netcdf-fortran-4.5.2

./configure --prefix=$DIR/netcdf --disable-hdf5 --enable-shared

make -j 4

make install

cd ..

rm -rf netcdf-fortran* v4.5.2.tar.gz

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容