 ! Write a 4-D NetCDF file with a string variable.

sp rm -f string4d.nc

def axis/x=1:2:1 x2ax
def axis/y=1:3:1 y3ax
def axis/z=1:4:1 z4ax
def axis/t=1:2:1 t2ax

let a = {"alpha","a2","a3","a4","a5","a6","a7","a8","a9","a10",\
"bravo","b2","b3","b4","b5","b6","b7","b8","b9","b10",\
"c1","c2","c3","c4","c5","c6","c7","c8","c9","c10",\
"d1","d2","d3","d4","d5","d6","d7","d8","d9","d10",\
"echo","e2","e3","e4","e5","e6","e7","e8"}

let rvar = x[gx=x2ax] + y[gy=y3ax] + z[gz=z4ax] + t[gt=t2ax]
stat rvar

let axy = reshape (a,rvar)
!list axy
stat axy
save/clobber/file=string4d.nc axy

can var/all
can data/all
use string4d.nc
sh data
list axy
