- 积分
- 401
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-29
- 最后登录
- 1970-1-1
|
发表于 2019-3-13 22:56:42
|
显示全部楼层
就修改了剖线两点的经纬度,怎么出来的图不对呢?
'reinit'
'open e:/kanu/fnl.ctl'
'open e:/kanu/orog1.ctl'
*先插值地形到所需斜线
'set dfile 2'
'set t 1'
'set x 1'
'set y 1'
'set z 1 17'
lon1=110.0
lon2=120.0
lat1=22.0
lat2=32.0
lon=lon1
'collect 3 free'
while(lon<=lon2)
lat=lat1+(lat2-lat1)*(lon-lon1)/(lon2-lon1)
'collect 3 gr2stn(orog,'lon','lat')'
lon=lon+1
endwhile
*再插值变量到所需斜线
'set dfile 1'
'set x 1 360'
'set y 1 181'
'set z 1 21'
'set t 13'
*批量描述FNL,多时次
'define alfa=atan2('lat2-lat1','lon2-lon1')'
*atan2返回的结果单位是弧度
'define uv=UGRDprs*cos(alfa)+VGRDprs*sin(alfa)'
'set x 1'
'set y 1'
'set z 1 21'
lon1=110.0
lon2=120.0
lat1=22.0
lat2=32.0
lon=lon1
'collect 1 free'
'collect 2 free'
while(lon<=lon2)
lat=lat1+(lat2-lat1)*(lon-lon1)/(lon2-lon1)
'collect 1 gr2stn(-VVELprs*100,'lon','lat')'
'collect 2 gr2stn(uv,'lon','lat')'
lon=lon+1
endwhile
'set grads off'
'set zlog on'
'set grid off'
'set lon 110 120'
'set z 1 21'
'set ylab off'
'set xlab off'
'set csmooth on'
*画地形
'set clevs 0'
'set ccols 0 1 0'
'set gxout shaded'
'd coll2gr(3,-u)'
*画变量
'set ylab on'
'set xlab on'
'set csmooth on'
*'set ylevs 1000 925 850 700 600 500 400 300 200 100'
'set xlabs 35N,70E|37N,82E|39N,94E|41N,106E|43N,118E|45N,130E'
*'set xaxis 'lon1' 'lon2''
'set gxout stream'
'set clab on'
'd coll2gr(2,-u);coll2gr(1,-u)'
'draw title along (22N,110E) to (32N,120E)'
'gxprint e:/kanu/anypoumian3.png white'
say 'ok'
;
|
-
|