- 积分
- 923
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-12-21
- 最后登录
- 1970-1-1
|
发表于 2014-12-18 09:28:25
|
显示全部楼层
请问楼主,我这样对高度进行循环行不行?个人觉得比单独每层简单(我有27层)
j = 2
while(j <= 26)
'set lon 70 140'
'set lat 10 60'
'set z 'j-1''
'define lev2=lev'
'define u2=u'
'define v2=v'
'define thse2=thse'
'set z 'j+1''
'define lev3=lev'
'define u3=u'
'define v3=v'
'define thse3=thse'
'set z 'j''
'define lev1=lev'
'define u1=u'
'define v1=v'
'define thse1=thse'
'define vo=hcurl(u1,v1)'
'define f=2*7.292*sin(lat*3.14159/180.0)*0.00001'
'define g=9.8'
'define dp=100.0*(lev2-lev3)'
'define dthse=thse2-thse3'
'define du=u2-u3'
'define dv=v2-v3'
'define dx=2.0*6370949.0*cos(lat*3.14159/180.0)*3.14159/180.0'
'define dy=2.0*6370949.0*3.14159/180.0'
'define dtx=cdiff(thse,x)'
'define dty=cdiff(thse,y)'
'define mpv1=-g*(vo+f)*dthse/dp'
'define mpv2=g*((dv/dp)*(dtx/dx)-(du/dp)*(dty/dy))'
'define mpv=mpv1+mpv2'
'd mpv1*1000000'
|
|