# -*- coding: euc-jp -*-
# Title: Ruby script drawing contour map for deepconv/arare5 output data 
#
# History: 2011/09/27 (Masatsugu Odaka)
#
require "numru/ggraph"
include NumRu

file = 'BS1998_PTempTurb.nc'
file1 = 'BS1998_PTempSfc.nc'
dens0 = GPhys::IO.open("./BS1998_restart.nc",   'DensBZ'  ).val
#file = 'gphys.nc'

turb  = GPhys::IO.open(file,   'PTempTurb'  )
sfc   = GPhys::IO.open(file1,   'PTempSfc'   )

ExnerBZ   = GPhys::IO.open("BS1998_restart.nc",   'ExnerBZ'  ).val
#denscut = dens0[1,0,5..104]
#exnercut = ExnerBZ[1,0,5..104]
#PTRad = PTRad * denscut *891.0 * exnercut
time  = GPhys::IO.open(file, 't').val

PTRad = turb

DCL.gropn(4)
for i in 1...time.length
#  GGraph.line( PTRad.cut('x'=>50.0,'y'=>100.0,'z'=>28800.0..30000.0,'t'=>time[i]), true, 'exchange'=>true)
  GGraph.line( PTRad.cut('x'=>50.0,'y'=>100.0,'t'=>time[i]), true, 'exchange'=>true)
end
DCL.grcls
