# ライン描画 require "numru/ggraph" include NumRu ### ARGV[0] は引数をもってくるときつかう #time = ARGV[0].to_i #time = 1200 ### 範囲指定 z1 = 0 z2 = 8000 files = "VPTdist.nc" gphysEPT = GPhys::IO.open(files, 'VPTdist') #files2 = "satEPT.nc" #gphyssatEPT = GPhys::IO.open(files2, 'satEPT') DCL.gropn(1) #DCL.gropn(2) #DCL.sldiv('y',1,2) # 複数枚のときにいる( 'y方向に'1x2') で分割 DCL.sgpset('lfull',true) DCL.sgpset('lcntl', false) #DCL.sgpset('lclip', true) DCL.uzfact(0.6) GGraph.set_fig( 'viewport'=>[0.3, 0.6, 0.2, 0.5] ) #xmin,xmax,ymin,ymax #-- 軸情報を取り出す #-- axis じゃないとだめ. coord では to_gphys が通らない #xax = gphys.axis(0) zax = gphysEPT.axis(2) #-- gphysオブジェクトにする #xax = xax.to_gphys.cut('x'=>x1..x2) zax = zax.to_gphys.cut('z'=>z1..z2) #-- z でカット gphysEPT = gphysEPT.cut( 'z'=>z1..z2 ) #gphyssatEPT = gphyssatEPT.cut( 'z'=>z1..z2 ) #-- y でカット #gphysEPT0 = gphysdispEPT.cut( 'y'=>10000 ) #gphyssatEPT0 = gphysdispsatEPT.cut( 'y'=>10000 ) gphysEPT = gphysEPT.mean( 'y' ) #gphyssatEPT = gphyssatEPT.mean( 'y' ) #-- 時間でカット initEPT = gphysEPT.cut( 't'=>0 ) gphysEPT = gphysEPT.cut( 'x'=>20000 ) #gphysEPTa = gphysEPT.cut( 't'=>1200 ) gphysEPTb = gphysEPT.cut( 't'=>1560 ) gphysEPTc = gphysEPT.cut( 't'=>1920 ) gphysEPTd = gphysEPT.cut( 't'=>2280 ) gphysEPTe = gphysEPT.cut( 't'=>2640 ) gphysEPTf = gphysEPT.cut( 't'=>3000 ) gphysEPTg = gphysEPT.cut( 't'=>3360 ) gphysEPTh = gphysEPT.cut( 't'=>3720 ) #gphysEPTi = gphysEPT.cut( 't'=>4080 ) #initsatEPT = gphyssatEPT.cut( 't'=>0 ) #-- x でカット/平均 initEPT = initEPT.cut( 'x'=>0 ) #initsatEPT = initsatEPT.cut( 'x'=>0 ) #GGraph.fig( valax, zax, 'new_frame'=>true ) ## new_frame fales の場合 'viewport'=>[0.25,0.9,vpy1,vpy2], 'window'=>[x1,x2,z1,z2] ) GGraph.line( gphysEPTb, true, 'exchange'=>true,'min'=>-5,'max'=>5, 'index'=>22,'title'=>gphysEPTb.long_name,'legend'=>true, 'annotate'=>false ) #GGraph.line( gphysEPTb, false, 'exchange'=>true,'min'=>320,'max'=>370, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( initEPT, false,'exch'=>true,'legend'=>true, 'min'=>300,'max'=>335, 'index'=>42,'legend_vy'=>0.3 ,'annotate'=>false) GGraph.line( gphysEPTc, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( gphysEPTd, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( gphysEPTe, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( gphysEPTf, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( gphysEPTg, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) GGraph.line( gphysEPTh, false, 'exchange'=>true,'min'=>300,'max'=>335, 'index'=>22,'legend'=>true, 'annotate'=>false ) #GGraph.line( gphysEPTi, false, 'exchange'=>true,'min'=>320,'max'=>370, 'index'=>22,'legend'=>true, 'annotate'=>false ) #GGraph.line( initsatEPT, false,'exch'=>true,'legend'=>true, 'min'=>330,'max'=>370, 'index'=>62,'legend_vy'=>0.8 ,'annotate'=>false) DCL.grcls