subroutine nsumavp(wzs,aout,sdout,net,fave) use itg_data implicit none real, dimension(:) :: aout, sdout real, dimension(:,:,:) :: wzs real, dimension(:,:), allocatable :: wa real :: fave integer net ! Local vars: integer i,m,n real sdv,smax,smin,av interface subroutine timeavp(seq,av,sdv,net,fave,smin,smax) real, dimension(:) :: seq real :: av, sdv, fave, smin, smax integer net end subroutine timeavp end interface allocate (wa(net, md)) wa=0.0 do n=1,nd do m=1,md do i=1,net wa(i,m)=wa(i,m)+wzs(i,m,n) enddo enddo enddo do m=1,md call timeavp(wa(:,m),av,sdv,net,fave,smin,smax) aout(m)=av sdout(m)=sdv enddo deallocate (wa) end subroutine nsumavp