号的,我复制给你
[Fortran] 纯文本查看 复制代码 program ex0109
real*8:: delta(366),y(366),ws(366),sl(366)
integer n
real*8,parameter::pi=3.1415926
real*8 lat
lat=42.4025
do n=1,366
y(n)=2.0*pi*real(n-1)/366.0!年角
!delta(n)=0.006918-0.399912*cos(y(n))+0.070257*sin(y(n))-0.006758*cos(2*y(n))&
!+0.000907*sin(2*y(n))-0.002697*cos(3*y(n))+0.00148*sin(3*y(n))!太阳赤纬
delta(n)=6.918E-3-3.99912E-1*cos(y(n))+7.0257E-2*sin(y(n))-6.758E-3*cos(2*y(n))&
+9.07E-4*sin(2*y(n))-2.697E-3*cos(3*y(n))+1.48E-3*sin(3*y(n))
ws(n)=acos(-tan(lat)*tan(delta(n)))!时角(角度)
sl(n)=(1.8E2/pi)*ws(n)*(2.0E0/1.5E1)!日长
!write(*,fmt="(365f8.2)")delta(n)
open(unit=7,file="D:\Fortran读写文件\计算云量\tiwen\2012tianwen")
write(*,*)sl(n)
end do
stop
end
|