# -*- 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_PTempRad.nc'
#file = 'gphys.nc'

PTRad   = GPhys::IO.open(file,   'PTempRad'  )
#PTRad_N   = PTRad.convert_units("K/day")

#p PTRad_N.units
# <Open DCL>
#DCL.swlset( 'ldump', true )
DCL.gropn(2)

# <Drawing data by GGraph>
#  GGraph.line( var.cut(5500,100,true,time[i]) )

GGraph.line( PTRad.cut('x'=>50.0,'y'=>100.0,'t'=>0), true, 'exchange'=>true)
#GGraph.line( PTRad , true, 'exchange'=>true )
#GGraph.line( PTRad.cut(1000.0,100.0,true,0.0) ,true, 'exchange'=>true )
#             true, 'exchange'=>false , 'index'=>22, 'label'=>'PTempRad', \
#             'title'=>'Potential Temperature', 'max'=>3.0e-2, 'min'=>0.0)

# <Close DCL>
DCL.grcls
