Netcdf4 interface module reproduced from netcdf-fortran as an fpm package.
ubuntu-latest |
ifort 2021.2.0 |
gfortran 10.2.0 |
---|
Prerequisites: The following should already be installed on your system, see each package for their respective installation instructions.
To use within your fpm project, add the following to your package manifest file (fpm.toml
):
[dependencies]
netcdf-interfaces = { git = "https://github.com/LKedward/netcdf-interfaces.git" }
NOTE: when building with gfortran-10
you need to use --flag -fallow-argument-mismatch
in order to compile correctly.
e.g
$ fpm build --profile debug --flag -fallow-argument-mismatch
$ fpm run --profile debug --flag -fallow-argument-mismatch
与conda存在冲突,一定不能使用conda的netcdf
export LD_LIBRARY_PATH="/usr/local/lib"
sudo apt-get install libhdf5-dev libcurl4-openssl-dev --yes
git clone https://github.com/Unidata/netcdf-c.git
cd netcdf-c
mkdir build; cd build
cmake ..
make -j
sudo make install