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

#timestep  = ARGV[0].to_i

x1 = 0
x2 = 256000
#x2 = 512000
#x2 = 500 * 1000 - 500 * 10
z1 = 0
z2 = 30000
t1 = 0
t2 = 2592000
#t2 = 86400 * 30
tn = 1440
#tn = 2400

files = "thermal-moist_ThermExpTerm.nc"
gphys1 = GPhys::IO.open(files, 'ThermExpTerm')

#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] )

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

gphysdisp1 = gphys1.cut( 't'=>t2 )
gphysdisp1 = gphysdisp1.cut( 'z'=>0..12000 )

#GGraph.contour( gphysdisp, true, 'transpose'=>true )
#GGraph.tone( gphysdisp1, true )
GGraph.tone( gphysdisp1, true, 
#             # レベル＆パターンを陽に指定
#           熱膨張項の寄与 at 全ケース ver.
#            'lev'=>[ 0,  4e-3, 6e-3, 8e-3, 10e-3, 12e-3,14e-3,16e-3,18e-3,20e-3,22e-3], 
#            'pat'=>[1,10999,20999,30999,40999,55999,65999,70999,75999,80999,90999,95999]       # 12 色
#            'lev'=>[ -0.20, -0.15,-0.10,-0.05,  0,  0.05, 0.10,0.15,  0.20, 0.25, 0.30], 
            'lev'=>[  -0.32,-0.24,-0.16,-0.08,  0,  0.08, 0.16,   0.24,0.32, 0.40, 0.48], 
            'pat'=>[10999,15999,20999,30999,40999,55999,65999,70999,75999,80999,90999,95999]    # 12 色
#            'lev'=>[ -0.50, -0.40, -0.30,-0.20,-0.10,  0,  0.10, 0.20,0.30,  0.40, 0.50], 
#            'pat'=>[1,10999,15999,20999,30999,40999,55999,65999,70999,75999,80999,90999]       # 12 色
)
GGraph.color_bar

DCL.grcls
