anchor.diff:  c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   c
   c
  -      subroutine write_ucd_header(istatoutc,nstatestot,kucd)
  +      subroutine write_ucd_header(istatoutc,nstatestot,kucd,iucd)
   c
   c...subroutine to write the header for a UCD file containing state
   c   variables
  
positive.code: c
  c...  subroutine arguments
  c
        integer nstatestot,kucd
        integer istatoutc(nstatestot)
  c
  c... included dimension and type statements
  c
        include "labels_dim.inc"
  c
  c...  local variables
  c
        integer i
        integer iout(3*nstatesmax)
  c
  c...  included variable definitions
  c
  
negative.code:         iout(i)=ione
        end do
  c
        if(iucd.eq.ione) then
          write(kucd,"(100i5)") nstatestot,(iout(i),i=1,nstatestot)
  c
          do i=1,nstatestot
            write(kucd,"(a11)") labels(istatoutc(i))
          end do
        else if(iucd.eq.itwo) then
          indl=ione
          indu=ione
          ibyte=ione
          do i=1,nstatestot
            nlabels(indl:indl+11)=labels(istatoutc(i))//"."
            indl=indl+12
            if(istatoutc(i).le.nstatesmax) then
              nunits(indu:indu+6)=stress//"."
              indu=indu+7
            else if(istatoutc(i).le.2*nstatesmax) then
              nunits(indu:indu+4)=strain//"."
              indu=indu+5
            else
              nunits(indu:indu+9)=strate//"."
              indu=indu+10
            end if
          end do
          nlabels(1024:1024)="0"
          nunits(1024:1024)="0"
          write(kucd,rec=ibyte) nlabels,nunits
          ibyte=ibyte+2048
          write(kucd,rec=ibyte) nstatestot,(iout(i),i=1,nstatestot)
        end if
  c
        return
        end
  