require "numru/gphys"
include NumRu

g = GPhys::IO.open("rst_d2000_org/rst.nc", "PsB")

fname = "aa.nc"
file = NetCDF.create(fname)

GPhys::IO.write_grid(file, g)
file.sync

GPhys::IO.write(file, g.mean(0))

file.close
