- 积分
- 55622
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-1-21
- 最后登录
- 1970-1-1
|
发表于 2017-5-1 07:40:24
|
显示全部楼层
***画sty路径*****
'enable print e:\track\STY_track.gmf'
'open e:\track\aa.ctl'
*************需要打开一个空的格点数据生成底图
'set font 1'
***************设置循环
mon=1
while(mon<=12)
'set lon 91 205'
'set lat 0 60'
*'set parea 0.5 8.2 0.4 9.5'
'set clevs 100000000'
'set grid off'
'set grads off'
'd nn'
if(mon<10)
filename='e:\track\0'mon'.txt'
else
filename='e:\track\'mon'.txt'
endif
***********图例
'SET STRSIZ 0.12 0.12'
'set line 15 1 6'
'draw line 1 7.2 2 7.2'
'draw string 2.3 7.2 <34knots'
'set line 3 1 6'
'draw line 1 7.0 2 7.0'
'draw string 2.3 7.0 34-63knots'
'set line 7 1 6'
'draw line 1 6.8 2 6.8'
'draw string 2.3 6.8 64-82knots'
'set line 5 1 6'
'draw line 1 6.6 2 6.6'
'draw string 2.3 6.6 83-95knots'
'set line 4 1 6'
'draw line 1 6.4 2 6.4'
'draw string 2.3 6.4 96-112knots'
'set line 8 1 6'
'draw line 1 6.2 2 6.2'
'draw string 2.3 6.2 113-135knots'
'set line 2 1 6'
'draw line 1 6.0 2 6.0'
'draw string 2.3 6.0 >135knots'
'draw title TY-4&TY-5 over WNP('mon')'
**************
i=1
while(i>0)
********读入数据
result=read(filename)
a1=sublin(result,2)
lat1=subwrd(a1,3)
lon1=subwrd(a1,4)
v1=subwrd(a1,5)
year=subwrd(a1,1)
r=sublin(result,1)
if(r=2);break;endif;
'q w2xy 'lon1' 'lat1''
x1=subwrd(result,3)
y1=subwrd(result,6)
'set font 1'
'set strsiz 0.07'
'draw string 'x1' 'y1' 'year''
t=1
while(t<=n)
result=read(filename)
a2=sublin(result,2)
lat2=subwrd(a2,3)
lon2=subwrd(a2,4)
v2=subwrd(a2,5)
if(lat2<-500 | lon2<-500);break;endif;
'q w2xy 'lon2' 'lat2''
x2=subwrd(result,3)
y2=subwrd(result,6)
if(v2<34)
ncol=17
endif
if(v2<64 &v2>=34)
ncol=3
endif
if(v2<83 &v2>=64)
ncol=7
endif
if(v2<96 &v2>=83)
ncol=5
endif
if(v2<113 &v2>=96)
ncol=4
endif
if(v2>=113 &v2<135)
ncol=8
endif
if(v2>=135)
ncol=2
endif
'set line 'ncol' 1 4'
if( lon2>90 & lat2 <60)
'draw line 'x1' 'y1' 'x2' 'y2''
'draw mark 3 'x2' 'y2' 0.05'
endif
x1=x2
y1=y2
endwhile
******结束每个台风记录
endwhile
*******结束每月的记录
'print'
'c'
mon=mon+1
endwhile
'disable print'
'reinit'
|
|