- 积分
- 8822
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-9-19
- 最后登录
- 1970-1-1

|
发表于 2015-12-15 22:41:35
|
显示全部楼层
麻烦版主帮我看看,哪里有问题,没有出图。我用的是模式run出来的数据,模式分辨率是3km, lon=lon+0.5也应该有4个点的数据呀,先不考虑地形的问题。谢谢~~
代码如下:
'reinit'
'open /nfs/Duhuiyun/test3.ctl'
'set grads off'
'set zlog off'
'set csmooth on'
lon1 =114
lon2 =116
lat1 =38
lat2 =40
'define alfa=atan2('lat2-lat1','lon2-lon1')'
'set x 1'
'set y 1'
'set t 1'
'set z 1 30'
lon = lon1
'collect 1 free'
'collect 2 free'
'collect 3 free'
while (lon <= lon2)
lat = lat1 + (lat2-lat1)*(lon-lon1)/(lon2-lon1)
'collect 1 gr2stn(w(t=1),'lon','lat')'
'collect 2 gr2stn(u*cos(alfa)+v*sin(alfa),'lon','lat')'
'collect 3 gr2stn(h,'lon','lat')'
lon = lon + 0.5
endwhile
'set lon 114 116'
'set t 1'
'set z 1 30'
'set gxout vector'
'd coll2gr(1,-u);coll2gr(2,-u);mag(coll2gr(2,-u),coll2gr(1,-u))'
'set gxout contour'
'd coll2gr(3,-u)'
'draw title along (38N,114E) to (39N,116E)'
'printim .\section.gif white'
'c'
;
|
|