- 积分
- 109
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-1-7
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
SUBROUTINE HDJW(TONEYEAR,IDAYS)
REAL TONEYEAR(366),XAVE(IDAYS),JIWEN
INTEGER XSHI,XZHONG
XAVE=0.
XAVE(1)=(TONEYEAR(1)+TONEYEAR(2)+TONEYEAR(3))/FLOAT(3)
XAVE(2)=(TONEYEAR(1)+TONEYEAR(2)+TONEYEAR(3)+TONEYEAR(4))/FLOAT(4)
XAVE(IDAYS)=(TONEYEAR(IDAYS-2)+TONEYEAR(IDAYS-1)+TONEYEAR(IDAYS))/FLOAT(3)
XAVE(IDAYS-1)=(TONEYEAR(IDAYS-3)+TONEYEAR(IDAYS-2)+TONEYEAR(IDAYS-1)+TONEYEAR(IDAYS))/FLOAT(4)
DO K=3,IDAYS-2
XAVE(K)=(TONEYEAR(K-2)+TONEYEAR(K-1)+TONEYEAR(K)+TONEYEAR(K+1)+TONEYEAR(K+2))/FLOAT(5)
ENDDO
XSHI=0
XZHONG=0
loop1: DO K=1,IDAYS,1
IF(XAVE(K).GE.FLOAT(10))THEN
DO M=-2,2,1
IF(TONEYEAR(K+M).GE.FLOAT(10))THEN
XSHI=K+M
EXIT loop1
ENDIF
ENDDO
ENDIF
ENDDO loop1
loop2: DO K=IDAYS,XSHI,-1
IF(XAVE(K).GE.FLOAT(10))THEN
DO M=2,-2,-1
IF(TONEYEAR(K+M).GE.FLOAT(10))THEN
XZHONG=K+M
EXIT loop2
ENDIF
ENDDO
ENDIF
ENDDO loop2
JIWEN=0.
DO K=XSHI,XZHONG
JIWEN=JIWEN+TONEYEAR(K)
ENDDO
OPEN(2,FILE='E:\result.txt')
WRITE(2,100)'起点温度:',TONEYEAR(XSHI), ' 终点温度:',TONEYEAR(XZHONG),' 积温:',JIWEN
100 format(1x,3(a,f8.1))
END
|
|