- 积分
 - 7955
 
	- 贡献
 -  
 
	- 精华
 
	- 在线时间
 -  小时
 
	- 注册时间
 - 2011-12-27
 
	- 最后登录
 - 1970-1-1
 
 
 
 
 
 
 | 
	
 
 
发表于 2017-9-8 22:14:25
|
显示全部楼层
 
 
 
 本帖最后由 小其其格 于 2017-9-8 22:15 编辑  
 
照着绘制流场图,最后用'd coll2gr(1);coll2gr(2)'绘制图形,显示错误ERROR from COLL2GR,invalid dimension environment。gs文件如下: 
 
************************************************************************************** 
* 
*本脚本用于绘制任意两点的垂直剖面流场图 
*详细见http://bbs.06climate.com/forum.p ... 10966&extra=&page=1 
* 
*************************************************************************************** 
 
  
'reinit' 
'open F:\fnl\GFS\2017\0712\VerticalProfile\gfsanl_4_20170712_0600_000.ctl' 
'open F:\fnl\GFS\2017\0712\VerticalProfile\NCEP_org_0.5x0.5\orog0.5x0.5.ctl' 
'set mpdset cnworld' 
'set grads off' 
'set grid off' 
 
*'set parea 1 10.2 0.8 7.8' 
 
'set cthick 1' 
 
 
**U,V单位是0.1m/s 
'define u=UGRDprs.1' 
'define v=VGRDprs.1' 
*垂直速度pa/s转化为0.1m/s,omega的单位是0.001Pa/s 
'define w=VVELprs.1*(-100)' 
'define t=TMPprs.1-273.15' 
 
 
'set zlog on' 
'set csmooth on' 
'set clab off' 
 
lon1=120 
lon2=123 
lat1=29.8 
lat2=29.8 
'define alfa=atan2('lat2-lat1','lon2-lon1')' 
 
'set x 1' 
'set y 1' 
'set t 1' 
'set lev 1000 200' 
 
lon=lon1 
lat=lat1 
 
'collect 1 free' 
'collect 2 free' 
'collect 3 free' 
 
while(lon<=lon2) 
lat=lat1+(lat2-lat1)*(lon-lon1)/(lon2-lon1) 
'collect 1 gr2stn(w*20,'lon','lat')' 
'collect 2 gr2stn(u*cos(alfa)+v*sin(alfa),'lon','lat')' 
'collect 3 gr2stn(orog.2(t=1),'lon','lat')' 
say lon 
say lat 
lon=lon+0.1 
endwhile 
 
 
'set lon 120 123' 
'set lev 1000 200' 
'set ylevs 1000 925 850 700 600 500 400 300 200' 
 
'set xlabs 29.8N,120.0E|29.8N,120.5E|29.8N,121.0E|29.8N,121.5E|29.8N,122.0E|29.8N,122.5E|29.8N,123.0E' 
 
*'set xlabs 25N,121.5E|28N,121.5E|31N,121.5E|34N,121.5E|37N,121.5E|40N,121.5E' 
 
 
**绘制地形数据 
'set gxout shaded' 
'set csmooth on' 
'set clab off' 
'set clevs 0' 
'set ccols 0 5 0' 
'd coll2gr(3,-u)' 
 
*strmden后面的第三个数值是箭头大小,第四个是线类型*** 
'set gxout stream' 
'set strmden 5.0 0.6 0.08 1' 
'set ccolor 1' 
'set cthick 8' 
'set cstyle 1' 
'set csmooth on' 
'd coll2gr(1);coll2gr(2)' 
*'d maskout(coll2gr(2,-u),-coll2gr(3,-u));maskout(coll2gr(1,-u),-coll2gr(3,-u));mag(coll2gr(2,-u),coll2gr(1,-u))' 
 
 
'run cbarn 1 0' 
 
**设置字体大小,类型(roman font),颜色 
'set font 1' 
'set strsiz 0.3 0.3' 
'set string 1' 
**添加上标 
*'draw string 1.8 7.8 (b)' 
 
**坐标标注要在变量输出之后 
*'draw xlab lon/lat' 
'draw ylab height/hPa' 
 
 
'printim F:\fnl\GFS\2017\0712\VerticalProfile\UW_LonLat\UW.png white' 
'enable print F:\fnl\GFS\2017\0712\VerticalProfile\UW_LonLat/UW.gmf white' 
 
say 'ok' 
 
'print' 
'c' 
'disable print' 
; 
 
 |   
 
 
 
 |