Calculating stdev of time series using Fortran