# -*- 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


cpdry = 891.0
file = '../time_000000000-000172000/BS1998-all_PTempRad.nc'
file_dens0 = './restart_long-DensBZ.nc'
file_exner0 = './restart_long-ExnerBZ.nc'


dens0 = GPhys::IO.open( file_dens0,   'DensBZ'  )
exner0 = GPhys::IO.open( file_exner0,   'ExnerBZ'  )
ptRad   = GPhys::IO.open(file,   'PTempRad'  )

ptRad = exner0 * cpdry * dens0 * ptRad

DCL.gropn(2)
GGraph.set_axes('xunit'=>'W.m-3', 'yunit'=>'m', 'xtitle'=>'PTempRad')
GGraph.line( ptRad.cut('x'=>50.0,'y'=>100.0,'z'=>0..20000, 't'=>0), true, 'exchange'=>true, 'title'=>'PTempRad (W m-3)')
DCL.grcls
