[gradsusr] Invalid Line coordinate

Martin V. Mathew vmartinmathew at gmail.com
Sat Aug 31 07:17:07 EDT 2013


hi

Sometime back I prepared a script that will plot tracks of multiple
cyclones as shown in the attached pdf file. This script uses lat,
lon coordinates saved in text file as in the attached file track1.asc to
draw the track. You have to specify the coordinates of individual cyclone
tracks in seperate files.

This script also uses a function named legend_lin_mkr.gs to draw legends on
the figure. I am attaching that script also with this mail. Hope these
scripts will help you.

martin


On 27 August 2013 18:58, Lyndon Mark Olaguera <
olagueralyndonmark429 at gmail.com> wrote:

> Hi Sir James,
> The code is working now,...
> I have yet another task to do...
> I would like to plot multiple tracks in grads..I have the location of the
> eye and plotted the tracks using minimum sea level pressure..
> i have to compare 3 ctl files.
> As of now, i can only plot one..How do i plot three tracks in grads?
>
> I will appreciate any help.
> Thanks in advance,
> Lyndon
>
>
> On Sun, Aug 25, 2013 at 1:44 AM, James T. Potemra <jimp at hawaii.edu> wrote:
>
>> Lydon:
>>
>> Is this the entire script?  I think you will need to first open a
>> file and display something.  This will set the scaling environment
>> in the display.  As the script is, your query statement is likely
>> not returning a number but an error, e.g.,
>>
>> 'q w2xy 'lon1' 'lat1
>>
>> returns:
>> "No scaling environment"
>>
>> and thus lon1 is set to "environment".  Try to open a data
>> set first, set the lat/lon/time/alt, display a variable, then run
>> your script below.
>>
>> Jim
>>
>> On 8/23/13 11:32 PM, Lyndon Mark Olaguera wrote:
>> > i=0
>> > res=read('urbeye4.txt')
>> > while(sublin(res,1)!=2)
>> >   line = sublin(res,2)
>> >   lat1=subwrd(res,3)
>> >   lon1=subwrd(res,4)
>> >  'q w2xy 'lon1' 'lat1
>> >   xpos1 = subwrd(result,3)
>> >   ypos1 = subwrd(result,6)
>> > res=read('urbeye4.txt')
>> > 'draw wxsym 41 'xpos1' 'ypos1' 0.3 1'
>> > if (i>0)
>> > 'set line 1 1 3'
>> > 'draw line 'xpos1' 'ypos1' 'xpos2' 'ypos2
>> > endif
>> >   xpos2=xpos1
>> >   ypos2=ypos1
>> >  i=i+1
>> > endwhile
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Martin V. Mathew
Research scholar
Centre for Oceans, Rivers, Atmosphere and Land Sciences (CORAL)
IIT Kharagpur
India.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130831/89d25560/attachment-0003.html 
-------------- next part --------------
%track1
91.81 08.26 
91.27 08.82  
90.60 10.10  
90.26 10.79  
90.19 11.75  
89.64 13.86
90.04 15.89  
91.05 18.84  
92.03 20.81
93.00 22.20  
93.08 22.29  
93.66 23.13 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyclone_tracks.pdf
Type: application/pdf
Size: 27874 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130831/89d25560/attachment-0003.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_track.gs
Type: application/octet-stream
Size: 9497 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130831/89d25560/attachment-0006.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legend_lin_mkr.gs
Type: application/octet-stream
Size: 4425 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130831/89d25560/attachment-0007.obj 


More information about the gradsusr mailing list