INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# How to obtain monthly data for each year from daily data

## How to obtain monthly data for each year from daily data

(OP)
Hi Programmer

I wrote the program to add daily data to monthly data for 30 years data but my program shows only repeated results of the first year months data for all other years. How I can overcome this problem.

real, dimension (10958,2) :: A
integer :: row, col, max_row, max_col
max_row=10958
max_col=2

open(2,file='MET000143F_1.txt',status='old')

do row=1,max_row

!enddo
!print*, A(1,1)
do year=1,30
sumj=0.0
start=1
end1=31
J=1
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

summ=0.0
start=end1+1
end1=start+30
do I=start,end1
summ=summ+A(I,J)
enddo

suma=0.0
start=end1+1
end1=start+29
do I=start,end1
suma=suma+A(I,J)
enddo

summy=0.0
start=end1+1
end1=start+30
do I=start,end1
summy=summy+A(I,J)
enddo

sumju=0.0
start=end1+1
end1=start+29
do I=start,end1
sumju=sumju+A(I,J)
enddo

sumjy=0.0
start=end1+1
end1=start+30
do I=start,end1
sumjy=sumjy+A(I,J)
enddo

sumag=0.0
start=end1+1
end1=start+30
do I=start,end1
sumag=sumag+A(I,J)
enddo

sums=0.0
start=end1+1
end1=start+29
do I=start,end1
sums=sums+A(I,J)
enddo

sumo=0.0
start=end1+1
end1=start+30
do I=start,end1
sumo=sumo+A(I,J)
enddo

sumn=0.0
start=end1+1
end1=start+30
do I=start,end1
sumn=sumn+A(I,J)
enddo

sumd=0.0
start=end1+1
end1=start+30
do I=start,end1
sumd=sumd+A(I,J)
enddo

!start=end1+1
!end1=start+30

enddo
print*, sumj, sumf, summ, suma, summy, sumju, sumjy, sumag, '&'
print*, sums, sumo, sumn, sumd
enddo
end

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!