OK. Well, at fist I thought if I had to include any flag in the makefile. You can find below the code.Note that neither the output file is written properly. Thank you!!
integer :: ncellmax,ncell,write_ncell
real :: h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13,h14,h15,h16,h17,h18,h19,h20,h21,h22,h23,h24
real, allocatable, dimension(:) :: sum_hours, vct_h1,vct_h2,vct_h3,vct_h4 ......etc
allocate (sum_hours(ncellmax))
allocate (vct_h1(ncellmax))......
open(100,file=fname)
do ncell=1, ncellmax
read(100,'(24e10.2)') h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13,h14,h15,h16,h17,h18, &
h19,h20,h21,h22,h23,h24
vct_h1(ncell)=h1
vct_h2(ncell)=h2
.....etc to vct_h24
sum_hours(ncell)=vct_h1(ncell)+vct_h2(cell)+....
write(50,'(1I1,A,e10.2)') (write_ncell,tab,sum_hours(write_ncell),write_ncell=1,ncellmax)