Re: Coordinate subscripts

From: Mateus da Silva Teixeira <mtex2k3_at_nyahnyahspammersnyahnyah>
Date: Wed, 28 Mar 2007 18:37:01 -0300

Ozan,

Thank you so much be the help!

Mateus

ozan mert gokturk escreveu:
> Hi Mateus,
>
> You can do this just like in standard subscripting, if I got the question
> correct. Just give the dimension name, and coordinates, enclosed in curly
> braces:
>
> ncl 0> a = (/10,20,30,40,50,60,70,80,90/)
> ncl 1> a!0 = "X"
> ncl 2> a&X = (/3,6,9,12,15,18,21,24,27/)
> ncl 3> print(a({X|(/6,18/)}))
>
>
> Variable: a (subsection)
> Type: integer
> Total Size: 8 bytes
> 2 values
> Number of Dimensions: 1
> Dimensions and sizes: [X | 2]
> Coordinates:
> X: [6..18]
> (0) 20
> (1) 60
>
>
> Hope this helps..
>
> --Ozan
>
>
>
> Quoting Mateus da Silva Teixeira <mtex2k3_at_yahoo.com.br>:
>
>> Dear NCL users,
>>
>> I'm trying to do something that I am not sure if I can.
>> I saw in reference manual that I can use a vector as a subscript. It is
>> possible to do the same thing with coordinate subscritps?
>> By examples is more simple to show:
>> With index subscript:
>> > a=(/1,2,3,4,5,6,7,8,9/)
>> > a!0 = "X"
>> > a&X = (/1,2,3,4,5,6,7,8,9/)
>> > a((/0,4,7/)) = -9999
>> > print(a)
>> (0) -9999
>> (1) 2
>> (2) 3
>> (3) 4
>> (4) -9999
>> (5) 6
>> (6) 7
>> (7) -9999
>> (8) 9
>>
>> But, I want to do it by passing the coordinates of the variable.
>> Is it possible?
>>
>> Thanks
>> Mateus
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 28 2007 - 15:37:01 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 28 2007 - 16:24:59 MDT