program solard
implicit none
REAL TMAX, TMIN, E, TTHIRTY
INTEGER I, YEAR, DOY ,a, NDAYS
REAL B,delta,sita,R,Q0,Qh,womiga0,womiga1,womiga2,womiga3
REAL tuo0,alfa,C,b0,PAI,FAI,PZ,P0,TTMAX,Tfmax
real b1,b2,I0,D
tuo0=0.87
alfa=-0.000061
C=1.5
b0=0.031
b1=0.201
b2=0.185
I0=1367.0
D=86400
NDAYS=730
PAI=3.14159
FAI=38.33/(180*PAI)
PZ=90810
P0=101325
!38.33是样地纬度
DO I=1,NDAYS
OPEN (UNIT = 9, FILE = '\B90V3\DAT\SOLARDFILE.DAT')
READ (9, *) YEAR, DOY, TMAX, TMIN, E, TTHIRTY
!TTHIRTY 30日平均温差
delta=23.45*PAI/(180*sin(2*PAI*(284+i)/365))
sita=2*PAI*i/365
R=1.000109+0.033494*cos(sita)+0.001472*sin(sita)
R=R+0.000768*cos(2*sita)+0.000079*sin(2*sita)
womiga0=ABS(acos(-tan(delta)*tan(fai)))
q0=womiga0*sin(fai)*sin(delta)+cos(fai)*cos(delta)*sin(womiga0)
q0=q0*I0*D/(PAI*R*R)
womiga3=0
DO A=1,100
womiga1=-womiga0+womiga0/100+womiga0*a/50
womiga2=sin(fai)*sin(delta)+cos(fai)*cos(delta)*cos(womiga1)
womiga3=womiga3+(womiga2*tuo0**(PZ/(P0*womiga2)))*womiga0/50
ENDDO
Ttmax=womiga3/(q0*2*PAI*R*R/I0/D)+alfa*e*1000;
B=b0+b1*exp(-b2* TTHIRTY);
Tfmax=1.0-0.9*exp(-B*(Tmax-Tmin)**(C));
Qh=q0*Ttmax*Tfmax/1000000;
ENDDO
open(2,file='QH.dat')
do I=1,ndays-1
write(2,'(i4,2x,f8.1,2X,f8.1)') I,Q0(I),TTMAX(I),QH(I)
enddo
CLOSE(2)
END
微信截图_20150803180454.jpg (22.03 KB, 下载次数: 234)
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |