require "numru/ggraph"
include NumRu
### xt 方向描画
### surface flux

### x 領域
x1 = 0
x2 = 128000
#x2 = 500 * 1000 - 500 * 10
#z1 = 0
#z2 = 30000

files = "Nakajima1994_PTempSfcFlux.nc"
gphys  = GPhys::IO.open(files, 'PTempSfcFlux')


DCL.gropn(2)
DCL.sgpset('lfull',true)
DCL.sgpset('lcntl', false)
DCL.uzfact(0.6)
GGraph.set_fig( 'viewport'=>[0.15, 0.75, 0.2, 0.5] )
#GGraph.set_fig( 'viewport'=>[0.25,0.7,0.15,0.6] )

xax = gphys.coord(2)
zax = gphys.coord(0)


#gphysdisp0 = -gphys
gphysdisp0 = gphys.mean( 'y' )
#gphysdisp0 = gphysdisp0.cut( 'z'=>0 )
gphysdisp0 = gphysdisp0.cut( 't'=>0..216000 )

### 名前
gphysdisp0.long_name = 'H2O-l-Rain Mixing Ratio'
gphysdisp  = gphysdisp0

#GGraph.tone( gphysdisp, true )
GGraph.tone( gphysdisp, true,'transpose'=>true,  #軸を逆にする　
             # レベル＆パターンを陽に指定
           'lev'=>[      0,  2.5e-3, 5.0e-3, 7.5e-3, 1.0e-2, 2.0e-2, 3.0e-2, 4e-2, 5e-2],
             # レベル＆パターンを陽に指定
           'pat'=>[10999, 15999, 20999,  30999,  40999,  50999,  60999,  70999, 80999,90999]
 )

#GGraph.axes( zax, xax )
GGraph.color_bar ( 'vlength'=>0.24, 'inffact'=>0.5 )

DCL.grcls
