[gradsusr] ineffective IF (-ELSE) STATEMENT of GRADS-2.a8.oga.1 on BOUNDARY MARKS/ EXCLUSION OF BOUNDARY MARKS

Morwakoma Matabane Morwakoma.Matabane at weathersa.co.za
Wed Jul 6 03:53:43 EDT 2011


I have tried to avoid the page (X,Y) boundary markings by using the attached script but the marks always appears. The IF STATEMENT  does not appear to do the trick; how do I make sure that the marks at the boundaries do not appear but only the interior marks appear?
For instance,

1)      if('bcx'!='xx1'| 'bcx'!='xx2' | 'bcy'!='yy1' | 'bcy'!='yy2')
'draw mark 4 'bcx' 'bcy' .1'
else
'draw mark 0 'bcx' 'bcy' .1'
Endif
RESULT IN MARKINGS ANYWAY,




2)if('bcx'='xx1'| 'bcx'='xx2' | 'bcy'='yy1' | 'bcy'='yy2')
'draw mark 0 'bcx' 'bcy' .1'
else
'draw mark 4 'bcx' 'bcy' .1'
Endif
STILL RESULT IN THE MARKINGS, AND

 3) if('bcx'>'xx1'| 'bcx'<'xx2' | 'bcy'>'yy1' | 'bcy'<'yy2')
'draw mark 4 'bcx' 'bcy' .1'
Endif

MARKINGS STILL AT THE BOUNDARIES.

NOTE: For testing choose boundary points like BCX=XX1,BCY=YY1 or BCX=XX1,BCY=YY2 or BCX=XX2, BCY=YY1, or BCX=XX2, BCY=YY2, and
             interior points like BCX=2.0 and BCY=5.0, and BCX=5.5 and BCY=6.8.

***************************************************************************************************************
*Marking.gs
******************************************************************************************************************
'reinit'
'open e.t00z.ctl'
lat1=-60 ; lat2=0
lon1=-30 ; lon2=60
'set lat 'lat1' 'lat2
'set lon 'lon1' 'lon2
'set t 2'
'set gxout shaded'
'd apcp'
'cbarn'
*********************************************************
* Page boundaries
********************************************************
'q gxinfo'
rec1=sublin(result,3)
xx1=subwrd(rec1,4)
say 'xx1 is 'xx1
xx2=subwrd(rec1,6)
say 'xx2 is 'xx2

rec2=sublin(result,4)
yy1=subwrd(rec2,4)
say 'yy1 is 'yy1
yy2=subwrd(rec2,6)
say 'yy2 is 'yy2
*************************************************************
prompt "Enter bcx:  "
pull bcx
say 'bcx is 'bcx

prompt "Enter bcy:  "
pull bcy
say 'bcy is 'bcy

if('bcx'!='xx1'| 'bcx'!='xx2' | 'bcy'!='yy1' | 'bcy'!='yy2')
'draw mark 4 'bcx' 'bcy' .1'
else
'draw mark 0 'bcx' 'bcy' .1'
endif

'set lat 'lat1' 'lat2
'set lon 'lon1' 'lon2


'printim xx.gif gif -x1400 -y1200 white'

'quit'

Regards
Morwakoma M Matabane
Scientist ( South African Weather Service)


This e-mail is subject to the South African Weather Service e-mail legal notice, to view please visit:
http://www.weathersa.co.za/legal/email.asp
-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110706/7b9cc569/attachment-0003.html 


More information about the gradsusr mailing list