- 积分
- 216
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-10-10
- 最后登录
- 1970-1-1
|
发表于 2022-6-2 22:27:28
|
显示全部楼层
本帖最后由 Bone 于 2022-6-2 22:29 编辑
楼主,我按照你的代码改了,我的目标是把大于1的区域全部打点,但是却全部都打上了点,您能帮忙看一看吗?
'reinit'
'open D:/FG/height/hgt/200.ctl'
'set lon 60 180'
'set lat 0 45'
'set lev 200'
'set t 1'
'define hgtclim=ave(hgt,t=1,t=31)'
'set t 31'
'define a=hgt-hgtclim'
'set grads off'
'set grid off'
'set xlint 10'
'set ylint 15'
'set xlopts 1 4 0.18'
'set ylopts 1 4 0.18'
'set gxout shaded'
'run define_colors.gs'
'set clevs -6 -4 -3 -2 -1 0 1 2 3 4 6 8 10 12'
'set ccols 47 46 45 43 42 41 21 22 23 24 25 26 27 28 29'
'd a/10'
'set gxout contour'
'set t 31'
'set cint 4'
'set ccolor 1'
'd hgt/10'
*打点
'open D:/FG/height/hgt/200dev.ctl'
'set lon 60 180'
'set lat 0 45'
'set lev 200'
'set t 1'
y2 = 0
while(y2<=45)
x2 = 60
while(x2<=180)
'q w2xy 'x2' 'y2''
abx = subwrd(result,3)
aby = subwrd(result,6)
'set lon 'x2''
'set lat 'y2''
'd dev.2'
aaa = subwrd(result,4)
if(aaa<0)
aaa = -aaa
endif
if(aaa>=1)
'set string 0 c 6'
'set strsiz 0.02'
'draw string 'abx' 'aby' `3D'
endif
x2 = x2+2.5
endwhile
y2 = y2+2.5
endwhile
'cbarn 1.25 0'
'printim D:\FG\height\hgt\result2\21hgt200.png white'
;
|
-
|