[[IT memo/GrADS memo]] * How to handle Ensemble Data with GrADS2.0 [#c79e3201] GrADS2.0からアンサンブルデータが扱えるようになりました。超便利。 #contents ** Installと旧バージョンとの並存 [#x7e5446d] - Install: Ver1.9までと同様に、http://www.iges.org/grads/downloads.htmlからダウンロードしたものを展開するだけでよい。(Linux使用時) - 旧バージョンをは別ディレクトリに展開し、GASCRPなどの環境変数は前までどおりに使うのがよさげ。(自作のスクリプトなどに互換性がない場合が考えられるため) - 旧バージョンbin内に、新バージョンcommandへのソフトリンクを貼れば便利。 (example) [kei@atlas bin]$ ln -s ~/grads-2.0.a5/bin/grads ~/GrADS/bin/grads2 [kei@atlas bin]$ ln -s ~/grads-2.0.a5/bin/gribmap ~/GrADS/bin/gribmap2 ** データファイルの形式 [#odaea2bd] これまでどおり、GRIB、NC、バイナリに対応。各アンサンブルは別ファイルに保存するのがよい。ファイル名はわかれば何でもよいが、pgb.ftXX.e01とかわかりやすくするのがよいかも。初期化時刻が同じアンサンブルメンバー、異なるアンサンブルメンバー、それぞれ取り扱い可能。 ** コントロールファイルの形式 [#kc16cda0] (注:ファイルがそれぞれ別のアンサンブルの取り扱いについてのみ記述) -EDEFにアンサンブルメンバーの数とファイルの名前を記述する。 -DSETのファイル名のアンサンブルメンバーを表すところに%eを挿入する。 -Options にtemplateを指定する。 -例:pgbNN.00 (NNは01から40のアンサンブルメンバー)のGRIBファイルについて。 dset ^pgb%e.00 index ^pgb.idx undef 9.999E+20 title pgb.ft00 options template * produced by grib2ctl v0.9.12.5p31 dtype grib 2 options yrev ydef 73 linear -90.000000 2.5 xdef 144 linear 0.000000 2.500000 tdef 1 linear 00Z01jan2000 1mo zdef 17 levels 1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30 20 10 edef 40 names 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 vars 12 ABSVprs 17 41,100,0 ** Absolute vorticity [/s] HGTsfc 0 7,1,0 ** surface Geopotential height [gpm] HGTprs 17 7,100,0 ** Geopotential height [gpm] PRESsfc 0 1,1,0 ** surface Pressure [Pa] PRESmsl 0 1,102,0 ** Pressure [Pa] PWATclm 0 54,200,0 ** atmos column Precipitable water [kg/m^2] RHprs 17 52,100,0 ** Relative humidity [%] SPFHprs 17 51,100,0 ** Specific humidity [kg/kg] TMPprs 17 11,100,0 ** Temp. [K] UGRDprs 17 33,100,0 ** u wind [m/s] VGRDprs 17 34,100,0 ** v wind [m/s] VVELprs 17 39,100,0 ** Pressure vertical velocity [Pa/s] ENDVARS ** 演算例 [#j04113f7] - Ensemble mean > d ave(hgtprs,e=1,e=40) - Standard deviation of ensemble members > d sqrt(ave(pow(hgtprs,2),e=1,e=40)-pow(ave(hgtprs,e=1,e=40),2)) # sqrt of population variance > d sqrt((ave(pow(hgtprs,2),e=1,e=40)-pow(ave(hgtprs,e=1,e=40),2))*40/39) # sqrt of sample variance