Build netcdf-c and netcdf-fortran with Github Action
陆面模式的编译与运行,解决依赖环境netcdf, pnetcdf配置的问题。
CLM5
CoLM
openmpi
gcc
: 11.4.0
curl
: 8.6.0zlib
: 1.3hdf5
: 1.14.0pnetcdf
: 1.12.3netcdf
: 4.9.2netcdff
: 4.6.0
- 安装与移植
文件路径一定要放对。否则需要修复rpath。
建议使用并行版本的。 享用方法:
unzip Ubuntu2204_openmpi_netcdf-v4.9.2.zip -d /opt/netcdf_v4.9.2_openmpi
# export NETCDF="/home/kong/github/CUG-hydro/CoLM202X/netcdf"
export NETCDF="/opt/netcdf_v4.9.2_openmpi"
export LD_LIBRARY_PATH="$NETCDF/lib:$NETCDF/hdf5/lib:$NETCDF/zlib/lib"
export NETCDF_LIB=$NETCDF/lib
export NETCDF_INC=$NETCDF/include
echo $LD_LIBRARY_PATH
/opt/netcdf_4.9.2_openmpi
/opt/netcdf_4.9.2_gcc11