Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
! !
! FILE: StatReadReduceWrite.F90 !
! CONTAINS: subroutine StatReadReduceWrite !
! !
! PURPOSE: Reduce statistics across processors, read !
! old statistics if required and write them out !
! !
subroutine StatReadReduceWrite(var,filename,dsetname)
use param
use mpih
implicit none
character*30,intent(in) :: filename, dsetname
real :: var(1:nxm)
real :: var_old(1:nxm)
call MpiSumReal1D(var,nxm)
if (ismaster) then
if(readstats) then
call HdfSerialReadReal1D(dsetname,filename,var_old,nxm)
var = var + var_old
call HdfSerialWriteReal1D(dsetname,filename,var,nxm)
end if