anchor.diff:            hnew(i, j, k) = hmin
             counter = counter + 1
             if (counter .eq. 1) then
  -            write(17, "(A, I0)"), &
  +            write(17, "(A, I0)") &
                   "Layer thickness dropped below hmin at time step ", n
             end if
           end if
  
positive.code:     do j = 1, ny
        do i = 1, nx
          if (data(i,j,k) .ne. data(i,j,k)) then
            write(17, "(A, I0)"), "NaN detected at time step ", n
            stop 1
          end if
        end do
  
negative.code:   end do
  
    if (maxval(abs(h_norming - 1d0)) .gt. thickness_error) then
      write(17, "(A, F6.3, A)") 'Inconsistency between h and eta: ', &
          maxval(abs(h_norming - 1d0))*100d0, '%'
    end if
  
  