- 积分
- 1247
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-11-18
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2016-9-23 16:07:13
|
显示全部楼层
function path(args)
'reinit'
infile=subwrd(args,1)
outpng=subwrd(args,2)
say infile
say outpng
'open d:\test\20110923\fnl_20110923_00_00.ctl'
'set parea 1 11 1 8'
'set grads off'
'set grid off'
'set lon 100 120'
'set lat 14 26'
'set cmin 10000'
'set parea 1 10.5 0.5 8'
'set map 1 1 6'
'set ccolor 1'
*'draw map'
'set xlopts 1 8 0.17'
'set ylopts 1 8 0.17'
'set ylint 2'
'set xlint 2'
'set cthick 6'
'd TMP2m'
i=1
strong1=1
c1=1
c2=1
c3=1
c4=1
c5=1
c6=1
lat0=16
lon0=116.7
'q w2xy 116.7 16'
x0=subwrd(result,3)
y0=subwrd(result,6)
while(1)
info=read('D:\test\20110923\we.txt')
code=sublin(info,1)
if(code!=0)
break
endif
info=sublin(info,2)
latty=subwrd(info,3)*0.1
lonty=subwrd(info,4)*0.1
tim=subwrd(info,1)
wind=subwrd(info,6)
strong0=subwrd(info,2)
'q w2xy 'lonty' 'latty
x=subwrd(result,3)
y=subwrd(result,6)
'set string 2 l 2 0'
'set strsiz 0.12 0.12'
'set line 1 1 10'
'draw line 'x0' 'y0' 'x' 'y
x0=x
y0=y
st=substr(tim,7,4)
if(wind>10&wind<=17.1&c1=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c1=c1+1
endif
if(wind>17.1&wind<=24.4&c2=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c2=c2+1
endif
if(wind>24.4&wind<=32.6&c3=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c3=c3+1
endif
if(wind>32.6&wind<=41.4&c4=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c4=c4+1
endif
if(wind>41.4&wind<=50.9&c5=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c5=c5+1
endif
if(wind>50.9&c6=1)
'draw wxsym 41 'x' 'y' 0.3 1 2'
c6=c6+1
endif
*if(math_fmod(i,4)=0)
if(strong0!=strong1|i=1)
strong1=strong0
if(strong0=1)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st''
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=2)
'set string 1 l 6 1'
'draw string 'x+0.1' 'y' 'st''
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=3)
'set string 1 l 6 1'
'draw string 'x+0.1' 'y' 'st''
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=4)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'(TY)'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=5)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st''
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=6)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st''
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
endif
i=i+1
endwhile
'set display color white'
'gxprint'
'printim d:\test\20110923\we.png white'
'disable gxprint' |
|