require "numru/ggraph"
include NumRu

iws = (ARGV[0] || 1).to_i

#< sample : replace the vertical axis >

gp  = GPhys::IO.open("air.2010JanFeb.nc", "air")
p = gp.axis(2).pos             # coordinate variable (equiv to p = gp.coord(2))
ppa = p.convert_units("Pa")
ppa.long_name = "pressure"
gp.axis(2).set_pos(ppa)        # replace the 2nd (vertical) axis      

gporg = GPhys::IO.open("air.2010JanFeb.nc", "air")   # original: for comparison

#< graphic >
DCL.swpset('iwidth',800)    # image width
DCL.swpset('iheight',400)   # image height
DCL.swpset('ldump',true) if iws==4
DCL.gropn(iws)
DCL.sldiv('y',2,1)
DCL.sgpset('isub', 96)      # control character of subscription: '_' --> '`'
DCL.glpset('lmiss',true)
[gporg,gp].each do |g|
  GGraph.line g.cut("lon"=>140,"lat"=>40),true,"exchange"=>true
end
DCL.grcls

