###
### $BCM$N<hF@(B
###
var      = "PotTemp"
PotTemp    = GPhys::IO.open(ARGV[0],var).cut('z'=>0..zlev)
PotTempAnm = PotTemp - PotTemp.mean('x')
 
if ( $OPT_max )
  maximum = $OPT_max.to_f
else
  maximum = 2.0
end

if ( $OPT_min )
  minimum = $OPT_min.to_f
else
  minimum = -2.0
end


###
### $B?^$N:n@.(B
###
WindowOpen( aspect, $OPT_dump, true )

GGraph.set_axes('ytitle'=>'Height','xtitle'=>'')
GGraph.set_axes('xunits'=>'km','yunits'=>'km')


for i in 0..num
  time = time0 + i * deltime
  p time

#  DCL::uzlset('LABELYR', true)
  
  #$B%(%/%9%J!<4X?t(B  
  GGraph.tone( PotTempAnm.cut('t'=>time), 
               true, 
               'title' => 'Potential Temperature Deviation',
               'annotate'=>infosw,
               'levels' =>[-10000,minimum],
               'pat'=>[14999]
               )
  GGraph.tone( PotTempAnm.cut('t'=>time), 
               false, 
               'annotate'=>infosw,
               'levels' =>[maximum,1000],
               'pat'=>[96999]
               )
  GGraph.tone( PotTempAnm.cut('t'=>time), 
               false, 
               'annotate'=>infosw,
               'nlev' => 50,
               'max' => maximum,
               'min' => minimum
               )
  GGraph.color_bar
#  GGraph.color_bar('vlength'=>0.275)
#  GGraph.color_bar( 'landscape' => true )

end

DCL.grcls


if ( $OPT_dump )

  DumpPNG( time0, deltime, num )

end
