replicated_ntimes=0
replicated_ntimes=
if (replicated_ntimes*replicated_nrec.LT.endrec)
& replicated_ntimes=replicated_ntimes+1
if (replicated_ntimes*replicated_nrec.GT.endrec)
& replicated_ntimes=replicated_ntimes-1
DO jrec = 1, replicated_ntimes
integer replicated_ntimes
DO jrec = 1, replicated_ntimes+1
IF (replicated_ntimes.GT.0) THEN