- 积分
- 72
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-27
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-7-16 10:20:25
|
显示全部楼层
river 发表于 2013-7-15 21:36
错误提示说的很明显了,变量错误:需要加减乘除符号的时候却出现一个5,错误的变量名是eqt,那就看看你eq ...
'reinit'
'sdfopen e:\2013\uwnd.2013.nc'
'sdfopen e:\2013\vwnd.2013.nc'
'sdfopen e:\2013\rhum.2013.nc'
'sdfopen e:\2013\shum.2013.nc'
'sdfopen e:\2013\omega.2013.nc'
'sdfopen e:\2013\air.2013.nc'
'set grid off'
'set grads off'
'set xlopts 1 5 0.18'
'set ylopts 1 5 0.18'
'set lon 60 150'
'set lat 0 60'
'set t 45 62'
'set lev 500'
*--------计算假相当位温----------
'define br=(0.1158*log(rhum.3)-1.5332787)*air.6-789.92816'
'define cr=789.92816*air.6'
'define tc2=(-br-sqrt(br*br-4*cr))/2.0'
'define pc2=lev*pow(tc2/air.6,3.5005574)'
'define etc2=6.1078*pow(273.16/tc2,5.1347779)*exp(3148.0973*(tc2-273.16)/(126.06334*tc2))'
'define wc2=0.622*etc2/(pc2-etc2)'
'define ed2=tc2*pow(1000.0/(pc2-etc2),0.28765924)'
'define lc2=2500.79-2.3697*(tc2-273.16)'
'define eqt1=ed2*exp(wc2*lc2/1.0048/tc2)'
*------------------
'set lev 850'
*--------计算假相当位温----------
'define br=(0.1158*log(rhum.3)-1.5332787)*air.6-789.92816'
'define cr=789.92816*air.6'
'define tc2=(-br-sqrt(br*br-4*cr))/2.0'
'define pc2=lev*pow(tc2/air.6,3.5005574)'
'define etc2=6.1078*pow(273.16/tc2,5.1347779)*exp(3148.0973*(tc2-273.16)/(126.06334*tc2))'
'define wc2=0.622*etc2/(pc2-etc2)'
'define ed2=tc2*pow(1000.0/(pc2-etc2),0.28765924)'
'define lc2=2500.79-2.3697*(tc2-273.16)'
'define eqt2=ed2*exp(wc2*lc2/1.0048/tc2)'
*---------输出图形2------------
'enable print e:\2013\jia3.gmf'
i=45
while(i<=62)
'set t 'i''
'set lon 80 140'
'set lat 10 50'
'set gxout contour'
'set cint 5'
'set cthick 11'
'draw title 'i'500-850'
'd eqt1-eqt2'
'print'
'c'
i=i+1
endwhile
'disable print'
;
最后我改成这样就OK了,但是原先的那个我还是不知道哪里有问题,改不好,郁闷死了 |
|