      subroutine p_ts_z0lnj(ns,nq,nrpt,zlna,zlnj,zlnj_dif)
c copyright bernd berg, jul 9 2000.  potts model, jackknife 
c       time series partition function fractions at beta0=0.
      include 'implicit.sta'
      include 'constants.par'
      dimension zlna(nrpt),zlnj(0:nrpt),zlnj_dif(0:nrpt)
c
      zlnj(0)=zlna(1)
      do irpt=2,nrpt
        zlnj(0)=addln(zlnj(0),zlna(irpt))
      end do
c
      do irpt=1,nrpt
        isgn=-1
        call addln2(zlnj(0),zlna(irpt),zlnj(irpt),isgn)
        if(isgn.ne.1) stop "p_ts_z0lnj: zlnj negativ."
      end do
c
      zln0=ns*log(one*nq)
      do irpt=0,nrpt
        zlnj_dif(irpt)=zln0-zlnj(irpt) ! =zln(beta=0)-zln.
      end do
c
      return
      end
