mstMovingAvg


This tool will calculate a moving average over a time-series of maps.

Arguments

There are seven mandatory arguments and one optional argument for this tool. The optional argument is shown in the square brackets. Input files are assumed to have names in the format file_prefixXX.file_suffix, where XX is a number. Input files will be loaded in order of their numbers. Output files will be written out in the same order. As this is a simple moving average operation over a window of size n, the first and last n/2 numbers in the sequence will not be present in the outputs. All files must be in ARCGIS ASCII format.

mstMovingAvg file_prefix start_num end_num file_suffix window_size output_prefix output_suffix [round Y|N]

file_prefix prefix of the input files
start_num first number in the time-series of maps
end_num final number in the time-series of maps
file_suffix suffix of the input files
window_size size of the sliding window to apply to the moving average, that is, averages will be calculated over a window of this size
output_prefix prefix for the output files
output_suffix suffix for the output files
round if this argument is Y then the results will be rounded to the nearest integer value. If the argument is set to N or omitted no rounding will be carried out

Example

If the source time-series consisted of the maps in files source1.asc, source2.asc, source3.asc, source4.asc, source6.asc, source8.asc, source9.asc, source10.asc, the window size was set to 3, and rounding was performed, the command would be:

mstMovingAvg source 1 10 .asc 3 output .asc Y

This would output the following files: output2.asc, output3.asc, output4,asc, output5.asc, output6.asc, output7.asc, output8.asc, output9.asc




Back to MAGICC/SCENGEN Tools main page.


Maintained by Dr Michael J. Watts