@BeginModule @NewPage @Name = Runstat @Title = Running statistical values @Section = Statistical values @Class = Statistic @Arguments = infile outfile @Operators = runmin runmax runrange runsum runmean runavg runstd runstd1 runvar runvar1 @BeginDescription This module computes running statistical values over a selected number of timesteps. Depending on the chosen operator the minimum, maximum, range, sum, average, variance or standard deviation of a selected number of consecutive timesteps read from @file{infile} is written to @file{outfile}. The time of @file{outfile} is determined by the time in the middle of all contributing timesteps of @file{infile}. @EndDescription @EndModule @BeginOperator_runmin @Title = Running minimum @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = min{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{min}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runmax @Title = Running maximum @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = max{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{max}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runrange @Title = Running range @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = range{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{range}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runsum @Title = Running sum @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = sum{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{sum}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runmean @Title = Running mean @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = mean{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{mean}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runavg @Title = Running average @Parameter = nts @BeginDescription @IfMan o(t+(nts-1)/2,x) = avg{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{avg}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runvar @Title = Running variance @Parameter = nts @BeginDescription Normalize by n. @IfMan o(t+(nts-1)/2,x) = var{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{var}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runvar1 @Title = Running variance (n-1) @Parameter = nts @BeginDescription Normalize by (n-1). @IfMan o(t+(nts-1)/2,x) = var1{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{var1}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runstd @Title = Running standard deviation @Parameter = nts @BeginDescription Normalize by n. @IfMan o(t+(nts-1)/2,x) = std{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{std}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginOperator_runstd1 @Title = Running standard deviation (n-1) @Parameter = nts @BeginDescription Normalize by (n-1). @IfMan o(t+(nts-1)/2,x) = std1{i(t,x), i(t+1,x), ..., i(t+nts-1,x)} @EndifMan @IfDoc @BeginMath o(t+(nts-1)/2,x) = \mbox{\textbf{std1}}\{i(t,x), i(t+1,x), ..., i(t+nts-1,x)\} @EndMath @EndifDoc @EndDescription @EndOperator @BeginParameter @Item = nts INTEGER Number of timesteps @EndParameter @BeginEnvironment @Item = CDO_TIMESTAT_DATE Sets the time stamp in outfile to the "first", "middle" or "last" contributing timestep of infile. @EndEnvironment @BeginExample To compute the running mean over 9 timesteps use: @BeginVerbatim cdo runmean,9 infile outfile @EndVerbatim @EndExample