def timeStepSum(field, offset=-1): """set the value of each time step N: D(N)= D(N) + D(N+offset) where offset should be negative """ offset = int(offset) return GridMath.timeStepSum(field, offset)
def timeStepSum(field,offset=-1): """set the value of each time step N: D(N)= D(N) + D(N+offset) where offset should be negative """ offset = int(offset) return GridMath.timeStepSum(field,offset);
def runave(grid, nave=3, option=0): """generate a running average: <div class=jython> Where:<br> grid = grid to average<br> nave - number of steps to average over<br> option - option for unsmoothed end points<br> 0 - set to missing<br> 1 - use symmetry<br> -1 - assume cyclic <br> </div> """ steps = int(nave) opt = int(option) return GridMath.timeRunningAverage(grid, steps, opt)
def runave(grid, nave=3, option=0): """generate a running average: <div class=jython> Where:<br> grid = grid to average<br> nave - number of steps to average over<br> option - option for unsmoothed end points<br> 0 - set to missing<br> 1 - use symmetry<br> -1 - assume cyclic <br> </div> """ steps = int(nave) opt = int(option) return GridMath.timeRunningAverage(grid,steps,opt)
def wgt_runave(grid, wgts, option=0): """generate a weighted running average: <div class=jython> Where:<br> grid = grid to average<br> wgts - comma separated list of weights<br> option - option for unsmoothed end points<br> 0 - set to missing<br> 1 - use symmetry<br> -1 - assume cyclic <br> </div> """ from ucar.unidata.util import Misc weights = Misc.parseFloats(wgts) opt = int(option) return GridMath.timeWeightedRunningAverage(grid, weights, opt)
def wgt_runave(grid, wgts, option=0): """generate a weighted running average: <div class=jython> Where:<br> grid = grid to average<br> wgts - comma separated list of weights<br> option - option for unsmoothed end points<br> 0 - set to missing<br> 1 - use symmetry<br> -1 - assume cyclic <br> </div> """ from ucar.unidata.util import Misc weights = Misc.parseFloats(wgts) opt = int(option) return GridMath.timeWeightedRunningAverage(grid,weights,opt)
def sumFromBaseTime(field): """set the value of each time step N: D(N)= D(N) + D(0) """ return GridMath.sumFromBaseTime(field)
def differenceFromBaseTime(field): """set the value of each time step N: D(N)= D(N) - D(0) """ return GridMath.differenceFromBaseTime(field)
def averageOverTime(field, makeTimes=0): """Average the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the average """ return GridMath.averageOverTime(field, makeTimes)
def sumFromBaseTime(field): """set the value of each time step N: D(N)= D(N) + D(0) """ return GridMath.sumFromBaseTime(field);
def differenceFromBaseTime(field): """set the value of each time step N: D(N)= D(N) - D(0) """ return GridMath.differenceFromBaseTime(field);
def averageOverTime(field,makeTimes=0): """Average the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the average """ return GridMath.averageOverTime(field,makeTimes);