#Script to proccess RSS satellite temperature #text files, and produce time-smoothed output #over the desired periods. from ClimateUtilities import * def mean(dat): return sum(dat)/len(dat) def process(fname,navg=12,tag = '70S82.5N'): c = readTable(fname) time = c['year']+ (c['mon']-1.)/12. + .5/12. navg = 12 yearAv = [] datAv = [] i=0 while (i+navg) < len(time): yearAv.append(mean(time[i:i+navg])) datAv.append(mean(c[tag][i:i+navg])) i += navg c1 = Curve() c1.addCurve(yearAv,'year') c1.addCurve(datAv,'T'+tag) return c1