anchor.diff:  
     write (un,100) T_global_max
     write (un,100) rho_global_max
  +  write (un,100) ts_te_global_max
   
     close (un)
   
  
positive.code:   integer :: int_dir_name(len)
    character (len=len) :: dir
  
    integer :: i, un
  
    ! dir will be the string name of the checkpoint directory
    do i = 1, len
  
negative.code: 
    if (problem .eq. 3) then
  
       open (unit=un, file=trim(dir)//"/Rotation", status="old", IOSTAT = stat)
  
       if (stat .eq. 0) then
  
          read (un,100) rot_period
  
          close (un)
  
       else
  
          rot_period = -1.0d0
  
       endif
  
    endif
  
  
  
    open (unit=un, file=trim(dir)//"/Extrema", status="old", IOSTAT = stat)
  
    if (stat .eq. 0) then
  
       read (un,100) T_global_max
       read (un,100) rho_global_max
       read (un,100) ts_te_global_max
  
       close(un)
  
    else
  
       T_global_max = 0.0d0
       rho_global_max = 0.0d0
       ts_te_global_max = 0.0d0
  
    endif
  
  end subroutine problem_restart
  
  