I have an large txt-file which contains measurements an the longitude/latitude of different stations, like:
1 1 bwb02 52.38783333 13.40266667 LR 0.2
2 2 bwb04 52.53716667 13.22583333 P1 0
3 3 bwb05 52.55516667 13.202 SP 0
4 4 bwb07 52.48433333 13.4385 N1 0
I just want to read the 4,5 and 7 column and put them into a matrix, like:
do j = 1,n
read(12,200) latB,lonB,r
200 Format (12x,f11.9,1x,f11.9,4x,f5.3)
beo_data(j,1) = j
beo_data(j,2) = lonB
beo_data(j,3) = latB
beo_data(j,4) = r
end do
But my format isn't working and i get an error: Fortran runtime error: Bad value during floating point read
The problem seems to be that the format of the longitude and latitude is changing. Could you tell me how i can read and work with such a file?