Description
I have used cdutil.averager
the last 2 days, and checked some of its documentation, because this is one of the (many) important (and specific) functions of CDAT, and I have several questions/remarks below
-
averager
used to be in cdutil, and the documentation still places it in the cdutil documentation. But I have checked a bit after noticing that it was available in both cdutil and genutil, and found out that it is coded in genutil. So should it also be moved to genutil in the documentation? -
I have used averager to average all the time steps and all the longitudes of a variable with
cdutil.averager(data_diff, axis='tx', weights=['weighted', 'weighted'])
, after callingcdutil.setTimeBoundsMonthly
to make sure I had correct time bonds. Is the temporal average weighted correctly, even-though the TOC and averager documentation only mention Spatial Averaging? If averager can correctly perform a weighted time average over all time steps when the bounds are correctly defined, this should probably be mentioned in the documentation. And the documentation can mention the other functions available for doing more fancy time averaging -
The web documentation and the doc string both mention giving you control over the order of operations but nothing else about that, so there is some ambiguity! Maybe there should be a note that the averaging will be performed left to right (or right to left?) of what is specified in the
axis
parameter -
The docstring for the
weights
parameter starts with String specifying weight options. It should probably more something like A list of strings specifying weight options, in the same order as the axes specified in the axis parameter -
The current averager docststring is not consistent any more with the web documentation...