further more
I tried :
flvar=gbfile->$vNames[1]$
but still failed with such a error message:
fatal:List subscripting used on non-list variable, can't continue
fatal:Execute: Error occurred at or near line 41 in file file.ncl
在 2011年11月5日 下午4:53,haohao Tsing <haohaorain@gmail.com>写道:
> hi ,ncl users:
> I want to read the variables by arrays
> gbfile = addfile("ncep_2003011200.grib.grb","r")
> vNames = getfilevarnames(gbfile)
> ; here vNames is a one-dimension array
> nNames = dimsizes (vNames)
> do i= 1,nNames
> flvar=gbfile->vNames
> printVarSummary(flvar)
> enddo
> this script failed for “gbfile->vNames" ,vNames should be the name of
> the variable in gbfile.
> Here, how can I indice the variables data in gbfile by a array or a some
> variable?
> thank you .
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 5 03:07:44 2011
This archive was generated by hypermail 2.1.8 : Tue Nov 08 2011 - 15:54:50 MST