require "numru/ggraph"
include NumRu


x1 = 0
x2 = 512000
#x2 = 500 * 1000 - 500 * 10
z1 = 0
z2 = 30000


#files = /thermal-moist_H2O-l-Rain_rank(\d\d\d\d\d\d).nc/
#gphys  = GPhys::IO.open(files, 'H2O-l-Rain')
#files = /thermal-moist_H2O-l-Rain_Fall_rank(\d\d\d\d\d\d).nc/
#gphys  = GPhys::IO.open(files, 'H2O-l-Rain_Fall')
files = /thermal-moist_H2O-l-Rain_FallFluxAtLB_rank(\d\d\d\d\d\d).nc/
gphys  = GPhys::IO.open(files, 'H2O-l-Rain_FallFluxAtLB')


DCL.gropn(1)
#DCL.gropn(2)
#DCL.sldiv('y',1,3)
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] )

#xax = gphys1.coord(0)
#zax = gphys1.coord(2)


gphysdisp0 = -gphys
gphysdisp0 = gphysdisp0.mean( 'y' )
#gphysdisp0 = gphysdisp0.cut( 'z'=>0 )
gphysdisp0 = gphysdisp0.cut( 't'=>2e6..2.2e6 )
gphysdisp  = gphysdisp0

#GGraph.tone( gphysdisp, true )
GGraph.tone( gphysdisp, 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.0e3,5.5e-3,6.0e-3,6.5e-3,7.0e-3,7.5e-3],
#             # レベル＆パターンを陽に指定
#             'pat'=>[1,10999,15999,20999,25999,30999,35999,40999,45999,50999,60999,65999,70999,80999,90999]
            'lev'=>[1.0e-4,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],
             # レベル＆パターンを陽に指定
             'pat'=>[1,10999,15999,20999,30999,40999,50999,60999,70999,80999,90999]
 )
GGraph.color_bar

DCL.grcls
