- 积分
- 142
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-3-25
- 最后登录
- 1970-1-1
|
发表于 2014-4-25 16:40:59
|
显示全部楼层
去下了一个。
!----------计算CAPE
total=0.0
do pp=lfcp,elp,-0.5
do i=1,z-1
if((pp-p(i))*(pp-p(i+1))<=0)then
tt=(t(i)-t(i+1))*(pp-p(i+1))/(p(i)-p(i+1))+t(i+1)
endif
enddo
call ttp(pp,thse,tt,tpp)
tppv=(tpp+273.16)*(1+0.378*(6.11*10**(a*tpp/(b+tpp)))/pp)
call tenvironment(pp,z,t,td,p,tce,tde)
tenv=(tce+273.16)*(1+0.378*(6.11*10**(a*tde/(b+tde)))/pp)
cape=(rd*(tppv-tenv)/pp)*0.5
total=total+cape
end do
100 write(*,*)"total_cape=",total,"J/KG"
stop
end
这一段就够了吧 |
|