Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Invalid number: incomprehensible list input ERROR

  1. Mar 18, 2009 #1
    "invalid number: incomprehensible list input" ERROR

    Hello, I'm beginning to code in FORTRAN 77 so be patient please.

    I'm trying to read a plain text file (*.txt) wich has 6000+ rows and 56 columns, this is the code I've been written so far:

    Code (Text):
          program segmente
          implicit real*8 (a-h,o-y)

          parameter (Ndat=300000, nca=56)
          parameter (length=2000, kshift=1000)

          dimension daten(Ndat,nca)

          character*1 b1,b2,b3,s1,s2,s3

          open(unit=1,file='LV_Sz1_data.txt',status='old')

          do nt=1,ndat
            read(1,*) dummy,(daten(nt,nc),nc=1,nca)
          enddo

          kens=(Ndat-length)/kshift+1

          do k=1,kens
            write(*,*) 'Segment ',k

        a1=int(k/100)
        a2=int((k-a1*(100))/10)
        a3=int(k-a1*(100)-a2*(10))
        a7=a1+48
        a8=a2+48
        a9=a3+48
        b1=char(int(a7))
            b2=char(int(a8))
            b3=char(int(a9))

            ki=(k-1)*(length-kshift)+1
            kf=ki+length-1

            open(51,file=
         &'INTRA_SEG/IC56/Seg'//b1//b2//b3,status='unknown')
            do kt=ki,kf
              write(51,'(99E16.6)') (daten(kt,nc),nc=1,nca)
            enddo
            close(51)
          enddo

    C
          END
    When I compile this code nothing wrong happens, but when I try to run it appears the following errors:

    So, What I'm doing wrong here?

    Thanks in advance.

    A. Marin.
     
  2. jcsd
  3. Mar 19, 2009 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: "invalid number: incomprehensible list input" ERROR

    That probably means that the format of the input is not what you have told the computer to expect.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook