require "numru/ggraph"
include NumRu

time_start=360
time_end=720

PI = acos(-1.0)
a=6.4*(10**6)
H=15000
Ro=0.0283
Omega=(2.0*PI)/(8.64*(10**4))
U=2.0*Omega*a*Ro

gphys = GPhys::IO.open("./src/c_5d-3/msf_mu.nc","msf").cut("t"=>time_start..time_end)
gphys = gphys.mean("t")
gphys=gphys/(H*U)

DCL.gropn(1)
DCL.uzfact(0.6)
GGraph.set_axes("xlabelint"=>0.1,"xunits"=>"","yunits"=>"","ytitle"=>"z/H","xtitle"=>"sin(Lat)")
GGraph.set_fig("itr"=>1,"viewport"=>[0.1,0.7,0.2,0.7])
rmiss = DCL.glpget('rmiss')

#GGraph.tone(gphys,true,"exchange"=>false,"title"=>"","annotate"=>false,"levels"=>[rmiss,max*0,max*0.1,max*0.2,max*0.3,max*0.4,max*0.5,max*0.6,max*0.7,max*0.8,max*0.9,max,rmiss])
GGraph.tone(gphys,true,"exchange"=>false,"title"=>"","annotate"=>false)
GGraph.color_bar
#GGraph.contour(gphys,false,"exchange"=>false,"title"=>"","levels"=>[rmiss,max*0,max*0.1,max*0.2,max*0.3,max*0.4,max*0.5,max*0.6,max*0.7,max*0.8,max*0.9,max,rmiss])
GGraph.contour(gphys,false,"exchange"=>false,"title"=>"")

DCL.grcls

