grib-api install to climate

説明.上の手続き中,cmakeのオプションは,

https://software.ecmwf.int/wiki/spaces/flyingpdf/pdfpageexport.action?pageId=20416166

を参考にした.そこでは" -DENABLE_NETCDF=ON" も加えられているが,しかしclimateで2017/1/8に実行すると,NETCDFでエラーになってしまうので,それをはずして実行した.

なお全くオプションを付けずにcmakeを実行すると,以下のエラーとなった.

Linking C shared library ../lib/libgrib_api.so

/usr/bin/ld: /usr/local/lib/libjasper.a(jas_seq.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libjasper.a: could not read symbols: Bad value

collect2: ld はステータス 1 で終了しました

mkdir build

cd build

cmake ../ -DCMAKE_C_COMPILER=gcc -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_INSTALL_PREFIX="../grib-api" -DENABLE_JPG=OFF -DENABLE_PNG=OFF -DENABLE_PYTHON=ON -DENABLE_FORTRAN=ON -DENABLE_GRIB_OMP_THREADS=ON -DBUILD_SHARED_LIBS=OFF

make

ctest

sudo make install

climate (Cent OS 6.8) へのgrib-apiのインストール

https://software.ecmwf.int/wiki/display/GRIB/Releases

より

grib_api-1.19.0-Source.tar.gzをダウンロードして解凍.

How to install grib-api to climate (Cent OS 6.8)

Download grib_api-1.19.0-Source.tar.gz from https://software.ecmwf.int/wiki/display/GRIB/Releases, and unpack it.

mkdir build

cd build

cmake ../ -DCMAKE_C_COMPILER=gcc -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_INSTALL_PREFIX="../grib-api" -DENABLE_JPG=OFF -DENABLE_PNG=OFF -DENABLE_PYTHON=ON -DENABLE_FORTRAN=ON -DENABLE_GRIB_OMP_THREADS=ON -DBUILD_SHARED_LIBS=OFF

make

ctest

sudo make install

The options for cmake are employed according to https://software.ecmwf.int/wiki/spaces/flyingpdf/pdfpageexport.action?pageId=20416166

In this document, also there is "-DENABLE_NETCDF=ON", but with this option I got an error (Jan 8, 2017) with the netcdf and hence I dropped it.