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

file1 = 'odaka1998_1_Exner.nc'
varname = 'Exner'


var = GPhys::IO.open(file1,varname)
time  = GPhys::IO.open(file1, 't').val

GGraph.set_linear_contour_options( 'min'=>-1.0e-3, 'max'=>8.0e-3, 'interval'=>1.0e-3 )  
GGraph.set_linear_tone_options( 'min'=>-1.0e-3, 'max'=>8.0e-3, 'interval'=>2.0e-4 )  

# <Open DCL>
DCL.swlset( 'ldump', true )
DCL.gropn(4)
GGraph.set_fig('viewport'=>[0.1,0.8,0.3,0.7])

GGraph.tone( var.cut(true,100,100,true), true, \
             'title'=>'Nondimensional Pressure', 'exchange'=>true)
GGraph.contour( var.cut(true,100,100,true), false, 'exchange'=>true)
GGraph.color_bar( 'tickintv'=>5 )

# <Close DCL>
DCL.grcls
