Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | aver(iis:iif) | ||||
integer | :: | iis | ||||
integer | :: | iif | ||||
real | :: | var(ib:ie,jb:je,kb:ke) | ||||
integer | :: | ib | ||||
integer | :: | ie | ||||
integer | :: | jb | ||||
integer | :: | je | ||||
integer | :: | kb | ||||
integer | :: | ke | ||||
integer | :: | ibs | ||||
integer | :: | ies | ||||
integer | :: | jbs | ||||
integer | :: | jes | ||||
integer | :: | kbs | ||||
integer | :: | kes |
subroutine slabsumi(aver,iis,iif,var,ib,ie,jb,je,kb,ke,ibs,ies,jbs,jes,kbs,kes) implicit none integer :: iis,iif integer :: ib,ie,jb,je,kb,ke,ibs,ies,jbs,jes,kbs,kes real :: aver(iis:iif) real :: var (ib:ie,jb:je,kb:ke) real :: averl(iis:iif) real :: avers(iis:iif) integer :: i averl = 0. avers = 0. do i=ibs,ies averl(i) = sum(var(i,jbs:jes,kbs:kes)) enddo call MPI_ALLREDUCE(averl, avers, iif-iis+1, MY_REAL, & MPI_SUM, comm3d,mpierr) aver = aver + avers return end subroutine slabsumi