
###
### $BCM$N<hF@(B
###

/.*_(.*)\.nc/ =~ ARGV[0]
MixRt = GPhys::IO.open(ARGV[0], $1).cut('z'=>0..zlev).cut("x"=>0..xlev)

if ( $OPT_max )
  maximum = $OPT_max.to_f
else
  maximum = MixRt.max * 0.8
end

if ( $OPT_min )
  minimum = $OPT_min.to_f
else
  minimum = 0
end

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

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

for i in 0..num
  time = time0 + i * deltime
  DCL::slsttl( "TIME = "+time.to_s,  "B", 0.0, 1.0, 0.02, 1)
  
  # $B:.9gHf(B
  if ($OPT_lin)
    GGraph.tone( MixRt.cut('t'=>time), 
                 true, 
                 'title' => $1+' Mixing Ratio [kg/kg]', 
                 'annotate' => infosw,
                 'nlev'=>50,
                 'max'=>maximum,
                 'min'=>minimum
                 )	
    
    GGraph.color_bar( 'constwidth' => true )
    #  GGraph.color_bar( 'constwidth' => true, 
    #                    'vlength'=>0.275
    #                    )

  else
    GGraph.tone( MixRt.cut('t'=>time), 
                 true, 
                 'title' => $1+' Mixing Ratio [kg/kg]', 
                 'annotate' => infosw,
                 'levels'=>[1e-8,2e-8,5e-8,1e-7,2e-7,5e-7,1e-6,2e-6,5e-6,1e-5,2e-5,5e-5,1e-4,2e-4,5e-4,1e-3,2e-3,5e-3,1e-2]
                 )	
    
    GGraph.color_bar( 'constwidth' => true )
    #  GGraph.color_bar( 'constwidth' => true, 
    #                    'vlength'=>0.275
    #                    )
  end
end

DCL.grcls


if ( $OPT_dump )

  DumpPS( time0, deltime, num )

end
