require "numru/ggraph" include NumRu ### ARGV[0] は引数をもってくるときつかう time = ARGV[0].to_i #time = 1200 ### 範囲指定 x1 = 10000 x2 = 30000 z1 = 0 z2 = 20000 #ymid =10000 files = "thermal1_VelX.nc" gphys = GPhys::IO.open(files, 'VelX') #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 = gphys.axis(2) #p xax #p zax xax = xax.to_gphys.cut('x'=>x1..x2) zax = zax.to_gphys.cut('z'=>z1..z2) gphys = gphys.cut( 'x'=>x1..x2 ) gphys = gphys.cut( 'z'=>z1..z2 ) ### 時間でカット gphysdisp0 = gphys.cut( 't'=>time ) gphysdisp0 = gphysdisp0.mean( 'y' ) #gphysdisp0 = gphysdisp0.cut( 'y'=>ymid ) #gphysdisp = gphysdispt.mean( 'x' ) #gphysdisp = gphysdispd.mean( 'x' ) #gphysdisp.long_name = '' gphysdisp = gphysdisp0 GGraph.fig( xax, zax, 'new_frame'=>true ) ## new_frame fales の場合 'viewport'=>[0.25,0.9,vpy1,vpy2], 'window'=>[x1,x2,z1,z2] ) GGraph.tone( gphysdisp, false, 'lev'=>[ -3.5, -3, -2.5, -2.0, -1.5, -1.0, -0.5, 0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5], # レベル&パターンを陽に指定 'pat'=>[ 7999,20999,25999,32999,35999,45999,65999,70999,73999,75999,80999,85999,92999,95999,99999] ) GGraph.axes( xax, zax ) GGraph.title( gphysdisp.long_name ) GGraph.color_bar ( 'vlength'=>0.24, 'inffact'=>0.5 ) GGraph.annotate ( [ time.to_s + ' s' ] ) DCL.grcls