I wanted to open two files in Fortran, but get the following error message:
Fortran Runtime Error: End of line
infile_T contains years from 1970 to 2100 and temperature values for these years. Infile_CO2 contains years for the same time period and CO2-values. I only want to load in the years and temperature values from 1970 to 1998.
Here is my code:
integer j,p, Jahre_CO2
character*20 infile_T, infile_CO2
parameter(infile_T='temp2m.obs',
1 infile_CO2='yco2.sze',
1 anfja=0,
1 endja=29,
1 nt=endja-anfja+1)
real T_beob(anfja:endja),Jahre_T, CO2_beob(anfja:endja)
open(11,file=infile_T)
do ja=anfja,endja
read(11,*) Jahre_T,T_beob(ja)
enddo
close(11)
print *,Jahre_T
open(12, file=infile_CO2)
do p=anfja,endja
read(12,*) Jahre_CO2,CO2_beob(p)
enddo
close(12)
write(6,*) 'Daten eingelesen !',T_beob