[ncl-talk] Some operation questions about list in NCL

半个丑角 644457443 at qq.com
Wed Mar 6 20:09:54 MST 2019


Dear NCL team or users,
       Hello, every body! It's kind for you all to read my letter! 
       It was known that NCL have a data struction called list, into which we can store different types of data together. But I got confused about its operation to get an exact data from a list. To make my question more clearly, set the following codes as an example:
  
 > begin
 > a = (/1,2,3/)
 > b = (/3,4,5,6,7/)
 > c = (/"one","two"/)
 > lista = [/a,b,c/]
 > print(lista[2])
 > end 
  
 As a result, in the screen, it will be:
  
 > Variable: c
> Type: string
> Total Size: 8 bytes
>                 2 values
> Number of Dimensions: 1
> Dimensions and sizes:   [2]
> Coordinates:
> (0)     one
> (1)     two

      My question is that, list[2] will get the third array in the list, but how can I get the elements in the third array one by one? how can I index "two" in my ncl script when I need to read it out?
      I feel sorry to disturb you, but I do need a help. Again, thanks for reading my letter! 
  
 Cheers,
 Lucky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190307/52d64944/attachment.html>


More information about the ncl-talk mailing list