how to indice the data arrays in file by variable?

From: haohao Tsing <haohaorain_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 05 2011 - 02:53:06 MDT

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 02:53:14 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 08 2011 - 15:54:50 MST