program readtextfile
real, dimension (14244,2) :: A
integer :: row, col, max_row, max_col
max_row=14244
max_col=2
open(2,file='MET0001432_1.txt',status='old')
do row=1,max_row
read(2,*) (A(row,col), col=1,max_col)
!enddo
!print*, A(1,1)
sumj=0.0
start=1
end1=31
J=2
do I=start, end1
sumj=sumj+A(I,J)
enddo
sumf=0.0
start=end1+1
end1=start+27
do I=start,end1
sumf=sumf+A(I,J)
enddo
enddo
print*, sumj, sumf
end
Is this right appraoch to calculate monthly average for daily data.
real, dimension (14244,2) :: A
integer :: row, col, max_row, max_col
max_row=14244
max_col=2
open(2,file='MET0001432_1.txt',status='old')
do row=1,max_row
read(2,*) (A(row,col), col=1,max_col)
!enddo
!print*, A(1,1)
sumj=0.0
start=1
end1=31
J=2
do I=start, end1
sumj=sumj+A(I,J)
enddo
sumf=0.0
start=end1+1
end1=start+27
do I=start,end1
sumf=sumf+A(I,J)
enddo
enddo
print*, sumj, sumf
end
Is this right appraoch to calculate monthly average for daily data.