LoginSignup
2
3

More than 5 years have passed since last update.

NetCDF install

Posted at

NetCDF_setup

NetCDF C インストール
1. 用意するもの(netcdf-4.3.3.tar.gz)
○入手先 http://www.unidata.ucar.edu/software/netcdf/
○Download: NetCDF-Fortran Relaeses:
 ・The Latest Stable netCDF-Fortran Release, tar.gz form
 ・The netCDF-Fortran 4.4.2 release is the latest stable release, netcdf-fortran-4.4.2.tar.gz.
2. 展開する。
○tar -xzvf netcdf.tar できたdirectoryに移動する。
3. 環境変数の設定をする。
○export FC=ifort
○export F90=ifort
○export FFLAGS="-O -mp"
○export CPPFLAGS="-DNDEBUG -DpgiFortran"
4. configureを実行する。/home/liu/netcdf/netcdf-4.3.3_testはインストール場所。
○./configure --prefix=/home/liu/netcdf/netcdf-4.3.3_test
5. makeでインストールする。
○make
○mkdir /home/liu/netcdf/netcdf-4.3.3_test
○make install
6.環境変数の設定をする。(LD_LIBRARY_PATHが未設定の場合
○export LD_LIBRARY_PATH=/home/liu/netcdf/netcdf-4.3.3_test/lib


NetCDF-Fortran (v4.4.2)をコンパイル、/home/liu/netcdf/netcdf4/以下にインストール
1. シンボリックリンクを張る
○ ln -s /home/liu/netcdf/netcdf-4.3.3_test /home/liu/netcdf/netcdf4
2. 展開する。
○tar xzf netcdf-fortran-4.4.2.tar.gz
○cd netcdf-fortran-4.4.2
○CPPFLAGS="-I/home/liu/netcdf/netcdf-4.3.3_test/include" LDFLAGS="-L/home/liu/netcdf/netcdf-4.3.3_test/lib"
○./configure --prefix=/home/liu/netcdf/netcdf4
○make >& log_make.txt
○make check >& log_make_check.txt
○make install

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3