Gallery
■HDF5ライブラリをUNIXにインストール
Step.1 ダウンロード & インストール
これまでに入れようとして上手くいかなかったのですが,何故かこちらの方法でサクッといけました. 自分でも何故上手くいったのか,良くわかっていない. バージョンの問題? 環境設定の問題 ? なお,その前に, こちら を参考に色々いじってたので,この辺の環境設定が効いたのかも. どうやら,szip や zlib 系のインストールは必要な模様.
$wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.13.tar.bz2
$sh configure
$make
$make check
$make install
$sh configure
$make
$make check
$make install
Step.2 環境変数設定
これも良くわかんないけど,最初からパスが通っている.
一応,パスらしきものを通しておく.
setenv PATH "${PATH}:/usr/local/hdf5/bin"
setenv PATH "${PATH}:/usr/local/hdf5/include"
setenv PATH "${PATH}:/usr/local/hdf5/include"
export PATH=$PATH:/usr/local/hdf5/bin"
export PATH=$PATH:/usr/local/hdf5/include"
export PATH=$PATH:/usr/local/hdf5/include"
Step.3 バイナリへの変換
h5dumpコマンドで,中身を見たり,バイナリへの変換が可能.
$h5dump -n GPMCOR_GMI_1403312327_0100_000503_L2S_GL2_02A.h5
こんなのが見える.
HDF5 "GPMCOR_GMI_1403312327_0100_000503_L2S_GL2_02A.h5" {
FILE_CONTENTS {
group /
group /GprofDHeadr
dataset /GprofDHeadr/clusterProfiles
dataset /GprofDHeadr/hgtTopLayer
dataset /GprofDHeadr/speciesDescription
dataset /GprofDHeadr/temperatureDescriptions
group /S1
dataset /S1/Latitude
dataset /S1/Longitude
group /S1/SCstatus
dataset /S1/SCstatus/FractionalGranuleNumber
dataset /S1/SCstatus/SCaltitude
dataset /S1/SCstatus/SClatitude
dataset /S1/SCstatus/SClongitude
dataset /S1/SCstatus/SCorientation
group /S1/ScanTime
dataset /S1/ScanTime/DayOfMonth
dataset /S1/ScanTime/DayOfYear
dataset /S1/ScanTime/Hour
dataset /S1/ScanTime/MilliSecond
dataset /S1/ScanTime/Minute
dataset /S1/ScanTime/Month
dataset /S1/ScanTime/Second
dataset /S1/ScanTime/SecondOfDay
dataset /S1/ScanTime/Year
dataset /S1/cloudWaterPath
dataset /S1/convectPrecipFraction
dataset /S1/databaseExpansionIndex
dataset /S1/iceWaterPath
dataset /S1/liquidPrecipFraction
dataset /S1/mixedWaterPath
dataset /S1/mostLikelyPrecipitation
dataset /S1/numOfSignificantProf
dataset /S1/orographicLiftIndex
dataset /S1/pixelStatus
dataset /S1/precip1stTertial
dataset /S1/precip2ndTertial
dataset /S1/probabilityOfPrecip
dataset /S1/profileNumber
dataset /S1/profileScale
dataset /S1/qualityFlag
dataset /S1/rainWaterPath
dataset /S1/retrievalType
dataset /S1/snowCoverIndex
dataset /S1/spare
dataset /S1/spareIndex
dataset /S1/sunGlintAngle
dataset /S1/surfacePrecipitation
dataset /S1/surfaceSkinTempIndex
dataset /S1/surfaceTypeIndex
dataset /S1/temp2mIndex
dataset /S1/totalColumnWaterVapor
dataset /S1/totalColumnWaterVaporIndex
}
}
FILE_CONTENTS {
group /
group /GprofDHeadr
dataset /GprofDHeadr/clusterProfiles
dataset /GprofDHeadr/hgtTopLayer
dataset /GprofDHeadr/speciesDescription
dataset /GprofDHeadr/temperatureDescriptions
group /S1
dataset /S1/Latitude
dataset /S1/Longitude
group /S1/SCstatus
dataset /S1/SCstatus/FractionalGranuleNumber
dataset /S1/SCstatus/SCaltitude
dataset /S1/SCstatus/SClatitude
dataset /S1/SCstatus/SClongitude
dataset /S1/SCstatus/SCorientation
group /S1/ScanTime
dataset /S1/ScanTime/DayOfMonth
dataset /S1/ScanTime/DayOfYear
dataset /S1/ScanTime/Hour
dataset /S1/ScanTime/MilliSecond
dataset /S1/ScanTime/Minute
dataset /S1/ScanTime/Month
dataset /S1/ScanTime/Second
dataset /S1/ScanTime/SecondOfDay
dataset /S1/ScanTime/Year
dataset /S1/cloudWaterPath
dataset /S1/convectPrecipFraction
dataset /S1/databaseExpansionIndex
dataset /S1/iceWaterPath
dataset /S1/liquidPrecipFraction
dataset /S1/mixedWaterPath
dataset /S1/mostLikelyPrecipitation
dataset /S1/numOfSignificantProf
dataset /S1/orographicLiftIndex
dataset /S1/pixelStatus
dataset /S1/precip1stTertial
dataset /S1/precip2ndTertial
dataset /S1/probabilityOfPrecip
dataset /S1/profileNumber
dataset /S1/profileScale
dataset /S1/qualityFlag
dataset /S1/rainWaterPath
dataset /S1/retrievalType
dataset /S1/snowCoverIndex
dataset /S1/spare
dataset /S1/spareIndex
dataset /S1/sunGlintAngle
dataset /S1/surfacePrecipitation
dataset /S1/surfaceSkinTempIndex
dataset /S1/surfaceTypeIndex
dataset /S1/temp2mIndex
dataset /S1/totalColumnWaterVapor
dataset /S1/totalColumnWaterVaporIndex
}
}
あとはこいつでバイナリに変換(1行です). -o は出力ファイル, -bは入力ファイル, -dはデータのディレクトリを指定する.
$h5dump -d /S1/surfacePrecipitation
-o XPre_GPMCOR_GMI_1403312327_0100_000503_L2S_GL2_02A.bin
-b GPMCOR_GMI_1403312327_0100_000503_L2S_GL2_02A.h5