require "numru/ggraph"
require "narray"
include NumRu

gphys1 = GPhys::IO.open("./src/nu_010.nc","u").cut("lat"=>0..90).cut("t"=>1000).cut("height"=>0)
gphys2 = GPhys::IO.open("./src/nu_050.nc","u").cut("lat"=>0..90).cut("t"=>1000).cut("height"=>0)
gphys3 = GPhys::IO.open("./src/nu_250.nc","u").cut("lat"=>0..90).cut("t"=>1000).cut("height"=>0)
gphys4 = GPhys::IO.open("./src/theory.nc","u_0_theo").cut("lat"=>0..90)

Lat_mat = gphys1.axis('lat').pos.val
line = NArray.float(96).fill(0.0)

Lat_va = VArray.new(Lat_mat,{"long_name"=>"Latitude","units"=>"degree"},"lat")
line = VArray.new(line,{"long_name"=>"zonal wind","units"=>"m/s"},"u")
Lat_new = Axis.new.set_pos(Lat_va)
gphys5 = GPhys.new( Grid.new(Lat_new),line)

DCL.gropn(1)

DCL.uzfact(0.6)

GGraph.set_fig("itr"=>1,"viewport"=>[0.1,0.7,0.2,0.6])
GGraph.set_axes("ytitle"=>"zonal velocity (m/s)","yunits"=>"","xtitle"=>"Latitude (deg)","xunits"=>"")

rmiss = DCL.glpget('rmiss')

GGraph.line(gphys1,true,"exchange"=>false,"annotate"=>false,"title"=>"","index"=>20,"min"=>-13,"max"=>12)
GGraph.line(gphys2,false,"exchange"=>false,"annotate"=>false,"index"=>40)
GGraph.line(gphys3,false,"exchange"=>false,"annotate"=>false,"index"=>30)
GGraph.line(gphys4,false,"exchange"=>false,"annotate"=>false,"index"=>12)
GGraph.line(gphys5,false,"exchange"=>false,"annotate"=>false,"index"=>10)

DCL.grcls

