[ncl-talk] trajectories with annotate_4.ncl script

Henri Rossi Pinheiro henrirpinheiro at gmail.com
Wed Sep 23 10:11:30 MDT 2015


hi Rick

I'm sorry forgot to say that the original script is setup as the following
way as you comment:

   xp = new((/5,4/),float)            ; allocate memory
   yp = new((/5,4/),float)

But how would you do if having two tracks with different lengths for example

;best track
   yp(0,:) = (/ 29.1,   30.3,   31.7,   33.5/)
   xp(0,:) = (/-94.6,  -95.2,  -95.3,  -94.9/)
;da
   yp(1,:) = (/ 29.12,  30.02,  31.29,  33.05,  34.20/)
   xp(1,:) = (/-94.87, -95.08, -95.13, -94.65, -94.50/)

Regards

Henri




On 23 September 2015 at 17:00, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi,
>
> If I were to guess, you have this declaration of these two arrays:
>
>    xp = new((/6,5/),float)            ; allocate memory
>    yp = new((/6,5/),float)
>
> But then you have three instances were you attempt to assign the righthand
> side of the arrays to an array of dimension 4, not 5:
>
> ;best track
>    yp(0,:) = (/ 29.1,   30.3,   31.7,   33.5/)
>    xp(0,:) = (/-94.6,  -95.2,  -95.3,  -94.9/)
> ;da
>
>
> Hope that helps...
> Rick
>
> On Wed, Sep 23, 2015 at 9:23 AM, Henri Rossi Pinheiro <
> henrirpinheiro at gmail.com> wrote:
>
>> hi users
>>
>> I have used the classic example to plot trajectories with the
>> annotate_4.ncl script (attached) and it works. The problem is when one or
>> more lat-lon points are added to a single trajectory, so would anyone know
>> how to deal with this?
>>
>> the error message is
>>
>>       fatal:Dimension size mismatch on subscript #1, left-hand and
>> right-hand side dimensions do  not match
>>
>> Henri
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/03c2f8c9/attachment.html 


More information about the ncl-talk mailing list