NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Jan 1 Feb -1 Mar 2 Apr 0 May 3 Jun -2 Jul 0 Aug 2 Sep 1 Oct 2 Nov -4 Dec 0then I need TREFAVG for the grid cell over Chicago in December to contain 0.33 (=sum(Jan-Dec)/12)). That same cell for Jan would contain sum(Feb-Jan)/12, etc.
I'm guessing the general strategy should be to define a new Jython function that calculates the average of the current value plus the preceding 11, then to use the applyToRange function to run it on the entire data series. But despite combing through the User's Guide section on the Jython Library and searching for relevant code examples, I can't seem to figure out the right syntax.
Any pointers would be most appreciated! Wayt Gibbs Intellectual Ventures
idvusers
archives: