'open /home/grads/scripts/modelos/ctl/cptec5001.ctl'
'set gxout shaded'
* foi colocado o box pois o line nao esta funcionando bem!
'set rband 2 box 0 0 11.0 8.5'
x1=subwrd(result,3)
x2=subwrd(result,8)
y1=subwrd(result,4)
y2=subwrd(result,9)
'q xy2w 'x1' 'y1
lon1=subwrd(result,3)
lat1=subwrd(result,6)
'q xy2w 'x2' 'y2
lon2=subwrd(result,3)
lat2=subwrd(result,6)
'set lev 1000 250'
'var=hcurl(u,v)'
'set grads off'
'set zlog on'
'set x 1'
'set y 1'
'set lev 1000 250'
*lon1 = -95.0
*lon2 = -90.0
*lat1 = 55.0
*lat2 = 15.0
lon = lon1
'collect 1 free'
while (lon<=lon2)
  lat = lat1 + (lat2-lat1)*(lon-lon1) / (lon2-lon1)
  'collect 1 gr2stn(var,'lon','lat')'
  lon = lon + 1
  say lat
  say lon
endwhile
'q xy2gr 'x1' 'y1
x1=subwrd(result,3)
y1=subwrd(result,6)
'q xy2gr 'x2' 'y2
x2=subwrd(result,3)
y2=subwrd(result,6)
say 'set x 'x1' 'x2
'set x 'x1' 'x2
'c'
*'set xaxis 'lon1' 'lon2
'set clab on'
'set gxout shaded'
*'set clevs 0 .5 15'
*'set ccols 0 0 7 0'
'd coll2gr(1,-u)'
'set gxout contour'
'set cint .5'
'd coll2gr(1,-u)'

