- 积分
- 1247
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-11-18
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-9-26 10:56:36
|
显示全部楼层
下面是相关程序,还望您能指点指点,谢谢啦
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 grads off'
'set map 1 1 8'
'set lon 102 118'
'set lat 11 23'
'set xlopts 1 8 0.17'
'set ylopts 1 8 0.17'
'set ylint 1.7'
'set xlint 2'
'set cthick 8'
'set cmin 10000'
*'set parea 1 5 4.5 8.5'
*'set parea 1 5 0.25 4.4'
'set parea 6 10 4.5 8.5'
*'set parea 6 10 0.25 4.4'
'd TMP2m'
i=1
strong1=1
c1=1
c2=1
c3=1
c4=1
c5=1
c6=1
lat0=18.2
lon0=114.8
'q w2xy 114.8 18.2'
x0=subwrd(result,3)
y0=subwrd(result,6)
while(1)
info=read('D:\test\20110923\nasha.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.18 0.18'
'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'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=2)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=3)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=4)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=5)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
if(strong0=6)
'set string 1 l 6 1'
'draw string 'x' 'y' 'st'('subwrd(info,5)')'
'draw wxsym 41 'x' 'y' 0.3 1 2'
endif
endif
i=i+1
endwhile
|
|