[gradsusr] plot more than 2 constant field in plot

Nibin Gopi nibingopi10 at gmail.com
Tue Dec 27 03:24:09 EST 2016


i have do the follwing code for ploting constant field according to some
condition satisfied. but it only shows one green color plot all over the
map(i attched the fig)

the code is



'open cnt_2014-09-25_d03.ctl'
'set t 1'
'define var = t2'
'define var1=rh2'
'define var2=rainc+rainnc'
i=1
while(i<=324)
j=1
while(j<=324)
'q defval var 'i' 'j
'q defval var1 'i' 'j
'q defval var2 'i' 'j
val = subwrd(result,3)
val2=subwrd(result,3)
val3=subwrd(result,3)

if (val > 295.0 & val < 298 )
  'set defval var 'i' 'j' '1
endif
if (val > 298.0 )
  'set defval var 'i' 'j' '0
endif
if (val1 > 50.0 & val1 < 60.0 )
  'set defval var1 'i' 'j' '2
endif

if (val1 > 60 )
  'set defval var1 'i' 'j' '3
endif
if (val2 > 75.0 & val2 < 175.0 )
  'set defval var2 'i' 'j' '4
endif

if (val2 > 175.0 )
  'set defval var2 'i' 'j' '5
endif
j=j+2
endwhile
i=i+1
endwhile
'set gxout grfill'
'set clevs 0 1 2 3 4 5'
'set ccols 2 3 10 6 8 15'
'd var'
'd var1'
'd var2'
'run cbarn.gs'
'printim 1.png white'
'quit'


please give me some solution




[image: Inline image 1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161227/68cb7836/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 121556 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20161227/68cb7836/attachment-0001.png 


More information about the gradsusr mailing list