#author("2020-11-30T15:42:02+09:00","default:Miyashita","Miyashita")
#author("2020-11-30T15:43:14+09:00","default:Miyashita","Miyashita")
* grdconvert コマンド メモ [#xf5986f3]
公式doc → [[grdconvert>https://docs.generic-mapping-tools.org/latest/grdconvert.html]]~
~
grdmath のように演算をしたいわけではなく,単にファイルのフォーマット変換をしたい場合に使う.~
~

** GMT のファイルフォーマットの識別子 [#k2ba3736]
[[Format Identifier>https://docs.generic-mapping-tools.org/latest/grdconvert.html#format-identifier]] に書いてある通り,GMT でサポートしているフォーマットの種類はたくさんある.~
GMT のコマンドでは識別のため,ファイル名の後に =cf や =nf などを付ける.~
~

** 使用例 [#m7c8f220]
nf フォーマット(NetCDF, 32-bit float)から bf フォーマット(GMT native, C-binary 32-bit float)に変換したいとき.
#codeprettify{{
gmt grdconvert input.grd=nf -Goutput.grd=bf
}}
input ファイルの方は何のフォーマットか自動で認識できればよいので, =nf は付けなくても大抵問題なく実行できる.
input ファイルの方は何のフォーマットか自動で認識できればよいので, =nf は付けなくても大抵問題なく実行できる.~
~

Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes