anchor.diff:  
     close(15)
   
  -  s%T = IC%T / state_0%T_0
  -  s%S = IC%Sigma / state_0%S_0 * x_state%x
  +  if (arg == 'start') then 
  +     s%T = IC%T / state_0%T_0
  +     s%S = IC%Sigma / state_0%S_0 * x_state%x
  +  elseif (arg == 'restart')then 
  +    ! call system ("rm tmp.dat")
  +     call system ("tail -n 256 output.dat > tmp.dat" )
  +     open(21, file="tmp.dat", action='read', iostat=ios)
  +     if (ios /= 0) then
  +        stop "Error while opening output file."
  +     end if
  +     do i = 1, n_cell      
  +        read(21,*)jnk1(i), s%T(i), jnk3(i), s%s(i)
  +     end do
  +     s%T = s%T / state_0%T_0
  +     s%S = s%S / state_0%S_0 * x_state%x
  +     close(21)
  +  endif
   
     !----------------------------------------------
     ! Do an initial computation of the variables
  
positive.code: 
    implicit none
  
    !--------------------------- Parameters for s_curve-----------------------
    real(x_precision), parameter         :: eps_in = 1.e-6_x_precision ! Precision required for the dichotomy
    real(x_precision), parameter         :: Tmin   = 10._x_precision**5.3_x_precision
  
negative.code: 
    real(x_precision), dimension(n_cell) :: dist_crit
  
    call getarg(1,arg)
  
    !----------------------------------------------
    ! Convergence criteria for S and T
    !----------------------------------------------
  