- 积分
- 2505
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-5-2
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用在论坛上下的画螺旋度的gs文件,可是一直提示出现问题undefine warning:name not found;non-numeric args to numeric operation;error occurred on line 51;in file f:\x\luoxuandu1.gs。知道这个上面说的是错误在51行,不过我看不出来51行有什么错误啊,求大神帮忙看看。下面是我的gs文件:
*水平螺旋度的gs文件:*
'reinit'
'clear'
prefix.1='u' ; prefix.2='v'
pi=3.1415926
'open f:\x\fnl.ctl'
levstr=' 850 700 600 500 400 300 '
'set lon 80 110'
'set lat 30 50'
'set time 00Z15jul2010'
'define cr=ugrdprs'
**************************************************************************************************
i=1
while(i<=9)
j=1
while(j<=13)
uave.i.j=0.0
vave.i.j=0.0
k=1
while(k<=5)
'set lev 'subwrd(levstr,k)
'undefine fld'
'define fld=ugrdprs.1'
'q defval fld '32+j' '48+i
nwval=subwrd(result,3)
uave.i.j=uave.i.j+nwval 这就是51行的位置
'undefine fld'
'define fld=vgrdprs.2'
'q defval fld '32+j' '48+i
nwval=subwrd(result,3)
vave.i.j=vave.i.j+nwval
* say ' nwval='nwval ' vave.'i'.'j'='vave.i.j
k=k+1
endwhile
uave.i.j=uave.i.j/5
vave.i.j=vave.i.j/5
if(vave.i.j!=0)
qq.i.j=math_atan(math_abs(vave.i.j/uave.i.j))
else
if(uave.i.j>0)
qq.i.j=0
endif
if(uave.i.j<0)
qq.i.j=pi
endif
if(uave.i.j=0)
say ' chaos has arrised!'
endif
endif
if(uave.i.j>=0 & vave.i.j>=0);qq.i.j=qq.i.j-40.0 ;endif;
if(uave.i.j<0 & vave.i.j>=0) ;qq.i.j=180-40.0-qq.i.j;endif;
if(uave.i.j<=0 & vave.i.j<=0);qq.i.j=180-40.0+qq.i.j;endif;
if(uave.i.j>0 & vave.i.j<=0) ;qq.i.j=270-40.0+qq.i.j;endif;
* if(uave.i.j>=0 & vave.i.j>=0);qq.i.j=qq.i.j-40.0*3.1415926/180.0 ;endif;
* if(uave.i.j<0 & vave.i.j>=0) ;qq.i.j=(180-40.0)*3.1415926/180.0-qq.i.j;endif;
* if(uave.i.j<=0 & vave.i.j<=0) ;qq.i.j=(180-40.0)*3.1415926/180.0+qq.i.j;endif;
* if(uave.i.j>0 & vave.i.j<=0) ;qq.i.j=(270-40.0)*3.1415926/180.0+qq.i.j;endif;
uave.i.j=math_sqrt(uave.i.j*uave.i.j+vave.i.j*vave.i.j)*math_cos(qq.i.j*3.1415926/180.0)*0.75
vave.i.j=math_sqrt(uave.i.j*uave.i.j+vave.i.j*vave.i.j)*math_sin(qq.i.j*3.1415926/180.0)*0.75
* uave.i.j=math_sqrt(uave.i.j*uave.i.j+vave.i.j*vave.i.j)*math_cos(qq.i.j)*0.75
* vave.i.j=math_sqrt(uave.i.j*uave.i.j+vave.i.j*vave.i.j)*math_sin(qq.i.j)*0.75
j=j+1
endwhile
i=i+1
endwhile
*************************************************************************************************************************************
*************************************************************************************************************************************
i=1
while(i<=9)
j=1
while(j<=13)
hd.i.j=0.
k=1
while(k<=5)
'set lev 'subwrd(levstr,k)
'undefine fld'
'define fld=ugrdprs.1'
'q defval fld '32+j' '48+i
u0=subwrd(result,3)
'undefine fld'
'define fld=vgrdprs.2'
'q defval fld '32+j' '48+i
v0=subwrd(result,3)
'set lev 'subwrd(levstr,k+1)
'undefine fld'
'define fld=ugrdprs.1'
'q defval fld '32+j' '48+i
u1=subwrd(result,3)
'undefine fld'
'define fld=vgrdprs.2'
'q defval fld '32+j' '48+i
v1=subwrd(result,3)
hd.i.j=hd.i.j+(u1-uave.i.j)*(v0-vave.i.j)-(v1-vave.i.j)*(u0-uave.i.j)
k=k+1
endwhile
'set defval cr '32+j' '48+i' 'hd.i.j
* say 'set defval sucess' ; pull c
* 'd 'hd.i.j
* 'print '
j=j+1
endwhile
i=i+1
endwhile
'enable print f:\x\luoxuandu.gmf'
'set cint 40'
'd cr'
'print '
'disable print'
* 'reinit'
* say 'u0='u0' u1='u1
* say 'v0='v0' v1='v1
* say ' i='i' j='j
* say ' hd.'i'.'j'='hd.i.j
|
|