here is my program:
real a(2,240)
integer i,j
if (TIME(2).EQ.0) then
!读入温度数据
open(12,file='temperature.txt')
do i=1,240
read(12,*) a(:,i)
print*, a(:,i)
end do
close(12)
end if
! 对应时间步长
do j = 1,240
if (TIME(2).EQ.a(1,j)) then
SINK = a(2,j)
exit
else
SINK = 0
end if
end do
but in the job.log i find the result of print is all zero. why!?
here is my txt:
0 28.7100000000000
0.500000000000000 28.3600000000000
1 28.0300000000000
1.50000000000000 27.6100000000000
2 27.4900000000000
2.50000000000000 27.0800000000000
3 26.7400000000000
3.50000000000000 26.7200000000000
....
119.500000000000 24.3700000000000
120 24.3300000000000