| smurray444 2007-04-29, 7:04 pm |
| Dear all,
Many thanks for your help. I've attempted to construct a program based
on my interpretations of your advice, but have come up against a
series of errors upon compilation. These are mostly 'invalid first
character at ^' errors, which appear for example under the the first
letter of the commands 'PROGRAM', 'IMPLICIT', 'OPEN', 'READ', 'PRINT'
and 'END'... so I'm not sure what I've done wrong there...
The program to 'reformat' the data is as follows (obviously I can't
move onto the interpolation stage before achieveing this):
PROGRAM table
IMPLICIT none
DIMENSION DATA(73,83,102)
DIMENSION TEMP(102)
OPEN (4,file=transts.arunoff.out',status='old')
READ (4,*)TEMP
DATA (TEMP(I),I=4,102)
PRINT*,TEMP
END PROGRAM table
Before initially messaging the group, I'd had a few other attempts at
getting this to work, with one program successfully compiling without
doing as I'd hoped it would! This is shown below:
PROGRAM readone
IMPLICIT none
INTEGER numdata, I
PARAMETER (numdata=6059)
REAL table(6059,6059)
REAL*8 x(105,numdata)
REAL*8 lat(numdata), long(numdata), runoff(numdata,102)
OPEN (4,file='transts.arunoff.out',status='old')
READ (4,*) x
DO I = 1,6059,1
PRINT*,100,table,long,lat,runoff
100 FORMAT (F7.2,I4,F6.2,I4,F9.4)
END DO
END PROGRAM readone
This program merely produces a seemingly endless series of zeros (0.)
in 19 columns (even though I don't want 19 columns!). I can't seem to
read the data in, in the correct format as hoped. I don't know if you
think I'm anywhere close though, and if a combined approach of the two
programs might be useful? As I said, I'm a complete beginner, picking
up bits and pieces from textbooks and the internet and not really
understanding some of the things I input (e.g. the '*8' in the command
REAL*8 in the previous program!), so you know much better than me...!
I hope by providing these details you will be able to help get this
working for me, with any luck...
Thanks again, and have a good w ,
smurray444
|