如何使用nf-config来定位netcdf库

问题描述 投票:0回答:1

有一个脚本需要我输入netcdf库位置。但脚本文件却指出

# Where is the NetCDF library root located? Hopefully nf-config can tell us
# but you might need an appropriate "module load netcdf***" beforehand
NETCDF_HOME=$(nf-config --prefix)

我尝试搜索如何使用模块加载 netcdf 和 nf-config 但找不到任何帮助。我正在使用 linux mint 和 gfortran。

netcdf linux-mint
1个回答
0
投票

您需要通常与 netcdf-fortran 一起安装的

nf-config
脚本。使用您使用的任何包管理器安装 netcdf (C) 和 netcdf-fortran,例如,

brew install netcdf netcdf-fortran
conda install libnetcdf netcdf-fortran
sudo port install netcdf netcdf-fortran
sudo dnf install netcdf netcdf-devel netcdf-fortran netcdf-fortran-devel
sudo aptitude install netcdf-bin

一旦您的路径上有 nf-config,您上面粘贴的脚本应该可以正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.