- #1
youngfreedman
Hi everyone.
I'm trying to write a program that reads data from 2 files and then calculates the mean, standard deviation and standard error of both files (separate values for each). I'm struggling to get my head around simple I/O, so excuse the poor attempt, but this is what I have so far: (I'm only attempting to just print out each value for now.)
If it helps, the file is a list of monthly rainfalls for a year.
Thanks for any help!
I'm trying to write a program that reads data from 2 files and then calculates the mean, standard deviation and standard error of both files (separate values for each). I'm struggling to get my head around simple I/O, so excuse the poor attempt, but this is what I have so far: (I'm only attempting to just print out each value for now.)
Code:
program data
implicit none
integer :: j
double precision :: test
open(unit = 100, file = 'tmax_1910.txt', status = 'old', action = 'read')
do j = 1, 12
read(100,*) test
print *, 'N1=', test
end do
end program data
If it helps, the file is a list of monthly rainfalls for a year.
Thanks for any help!
Last edited by a moderator: