anchor.diff:              deallocate(zvar)
               
               ! Direct PC
  -            if(present(pc) .and. zusetpc)then
  +            if(zusetpc)then
               
  -                if(present(zerofill).and.zerofill==2)then
  +                if(present(zerofill).and.zerofill>=1)then
  +                    pc = 0d0
  +                else
                       pc = zmv
  -                else
  -                    pc = 0d0
                   endif
                   pc(iselect,:) = subcov
                   do im = 1, nkeep
  
positive.code:     ! Valid channels
      allocate(iselect(nc))
      iselect = pack((/(ic,ic=1,ncf)/), any(valid==1, dim=odim))
      if(nkeep>nc)then
          if(present(errmsg))then
              if(zuseteof==1)then
  
negative.code:     call dsyrk('U', trflag, nc, no, 1d0, dble(valid), nsv, 0d0, nn, nc)
      where(nn>0d0) cov = cov / nn
      deallocate(nn)
      ! Variances
      zevsums = 0d0
      do i = 1, ns
          if(any(valid(i, :)==1))then
              zevsums = zevsums + sum(zvar(i, :)**2)/ dble(sum(valid(i, :)))
          endif
      enddo
      if(zuseteof==1)then
          zevsumt = 0d0
          do i = 1, nt
              if(any(valid(:, i)==1))then
                  zevsumt = zevsumt + sum(zvar(:, i)**2)/ dble(sum(valid(:, i)))
              endif
          enddo
      endif
      if(.not.present(pc))deallocate(valid)
     
      ! Diagonalization (cov: input=cov, output=eof)
      ! --------------------------------------------
  