# -*- coding: euc-jp -*-
require "numru/ggraph"
include NumRu

timestep  = ARGV[0].to_i

files  = "thermal-moist_Int-H2O-l-Rain_FallFluxAtLB.nc"
gphys1 = GPhys::IO.open(files, 'Int-H2O-l-Rain_FallFluxAtLB')
#files  = "thermal-moist_H2O-l-Rain_FallFluxAtLB_TET_CtlPress_atSfcFlux_x256km_z48km.nc"
#gphys2 = GPhys::IO.open(files, 'H2O-l-Rain_FallFluxAtLB')

#DCL.gropn(1)
DCL.gropn(2)
#DCL.sldiv('y',1,2)
DCL.sgpset('lfull',true)
DCL.sgpset('lcntl',false)
DCL.uzfact(0.7)
#DCL.uzfact(0.3)
GGraph.set_fig( 'viewport'=>[0.25,0.7,0.15,0.6] )
# アスペクト比をそれっぽくする
#GGraph.set_fig( 'viewport'=>[0.1,0.85,0.15,0.6] ) 
#GGraph.set_fig( 'viewport'=>[0.25,0.8,0.10,0.275] )

gphysdisp = gphys1
#gphysdisp0 = gphysdisp0.mean( 'x' )
#gphysdisp0 = gphysdisp0.mean( 'y' )
#gphysdisp0 = gphysdisp0.cut( 't'=>0..t2 )
##gphysdisp0 = gphysdisp0 * dt
##gphysdisp0 = gphysdisp0.sum( 't' )
#gphysdisp2  = gphysdisp0

#GGraph.line( gphysdisp, true )
GGraph.line( gphysdisp, true, 'min' => -6.0, 'max' => 0.0, 'type'=>1 )
#GGraph.line( gphysdisp1, true, 'min' => -9.0e-4, 'max' => 0.0, 'type'=>1 )
#GGraph.line( gphysdisp2, false, 'min' => -9.0e-4, 'max' => 0.0, 'type'=>2 )
#GGraph.line( gphysdisp, true )
#GGraph.tone( gphysdisp, true, 'transpose'=>true )
#GGraph.tone( gphysdisp, true, 'transpose'=>true, 
#            'lev'=>[0,0.5e-3,1.0e-3,1.5e-3,2.0e-3,2.5e-3,3.0e-3,3.5e-3,4.0e-3,4.5e-3,5.0e-3,5.5e-3,6.0e-3,6.5e-3,7.0e-3],
#             # レベル＆パターンを陽に指定
#             'pat'=>[10999,12999,15999,20999,25999,30999,35999,40999,55999,65999,70999,75999,80999,90999,95999]
#             'lev'=>[   0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60,  0.65,  0.70, 0.75, 0.80, 0.85,  0.90],
#             'pat'=>[10999,15999,20999,25999,30999,35999,40999,45999,50999,67999,70999,80999,85999,90999]
#)
#GGraph.color_bar
#GGraph.color_bar( 'vlength'=>0.07, 'inffact'=>0.5 )
#GGraph.color_bar( 'vlength'=>0.12, 'inffact'=>1.0 )

DCL.grcls

exit
