GrADSでは基本的にグリッドデータしか読めないが、離散データでも読む方法が存在する。
GrADSのサイトに載っているC言語プログラムをちょっと変えて使う。Fortranも載ってるけどわかりにくい...。
プログラム(GrADS本家のものから入出力のファイル名を変えただけ): stationT.c
サンプルデータ: Temdata.txt
stationT.cの出力データ: tem.dat
ctlファイル: tem.ctl
stnmapの出力ファイル: tem.map
stationT.c
を実行
>gcc stationT.c >./a.out
tem2.datが作成される。引き続き stnmap コマンドを実行。
>stnmap -i tem.ctl
ずらずらと表示される。
Name of binary data set: tem.dat Number of times in the data set: 1 Number of surface variables: 1 Number of level dependent variables: 0 Starting scan of station data binary file. Binary data file open: tem.dat Processing time step 1 Time = 1 has stn count = 11 : :
あとは、GrADSで表示するだけ
>open tem.ctl >set display color white >c >set mpdset hires >set lon 136.6 137.8 >set lat 34.4 35.4 >d t
Station dataが表示された。
これをグリッドデータに補完する。コマンドとしては、oacres()を用いる。
これはCressman内挿に基づき、離散データをグリッドデータにするコマンドである。
単純に、GMTで補完してから読み込むことほうが簡単??