anchor.diff:  implicit none
   
   ! Local variables
  -integer :: i, j, ninputs, luin, luout
  +integer :: i, j, ninputs, luin, luout, ios
   double precision :: input_values(12), output_values(12)
  -character(len=512) :: tmp_file
  +character(len=512) :: tmp_file, input_line
   
   
   ! Initialize variables
  
positive.code: 
  ! Read the inputs and run specified calculation
  do i = 1,ninputs
      read(luin,*,end=1001) (input_values(j),j=1,nvals_input)
      ! write(0,*) input_values(1:nvals_input)
      if (mtutil_mode.eq.'mag2mom') then
          call mag2mom(input_values(1),output_values(1))
  
negative.code: !     Ternary characterization (after Frohlich, 1992)
  !----
  
  use io, only: stdin, stdout, stderr, fileExists, line_count
  use eq, only: mag2mom, &
                mom2mag, &
                mij2dcp, &
  