anchor.diff:    end do
   
     if (maxval(abs(h_norming - 1d0)) .gt. thickness_error) then
  -    write(17, "(A, F6.3, A)"), 'Inconsistency between h and eta: ', &
  +    write(17, "(A, F6.3, A)") 'Inconsistency between h and eta: ', &
           maxval(abs(h_norming - 1d0))*100d0, '%'
     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:     call read_input_fileH_2D(initEtaFile, eta, 0.d0, nx, ny)
      ! Check that depth is positive - it must be greater than zero
      if (minval(depth) .lt. 0) then
        write(17, "(A)") "Depths must be positive."
        stop 1
      end if
    end if
  