require 'numru/gphys'
include NumRu
nx = NArray.float(10).indgen! # 0,1,2,..
ny = NArray.float(10).indgen! # 0,1,2,..
nz = NArray.float(10).indgen! # 0,1,2,..
nt = NArray.float(10).indgen! # 0,1,2,..
nm = NArray.float(10).indgen! # 0,1,2,..
vx = VArray.new( nx, {"long_name"=>"x coord","units"=>"m"}, "x")
vy = VArray.new( ny, {"long_name"=>"y coord","units"=>"m"}, "y")
vz = VArray.new( nz, {"long_name"=>"z coord","units"=>"m"}, "z")
vt = VArray.new( nt, {"long_name"=>"time","units"=>"s"}, "t")
vm = VArray.new( nm, {"long_name"=>"member","units"=>""}, "m")
xax = Axis.new.set_pos(vx)
yax = Axis.new.set_pos(vy)
zax = Axis.new.set_pos(vz)
tax = Axis.new.set_pos(vt)
max = Axis.new.set_pos(vm)
grid = Grid.new(xax, yax, zax, tax, max)
ndata = NArray.float(vx.length, vy.length, vz.length, vt.length, vm.length).indgen!
vdata = VArray.new(ndata, {'long_name'=>"dummy data"}, "z")
gdata = GPhys.new(grid, vdata)
cut_gdata = gdata[0, false, 0, 0]
p gdata + cut_gdata # パッチを当てないとここでエラーが出ます
---------- ここまで ----------