Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can "averager" average over the time axis (and other averager questions) #197

Open
jypeter opened this issue May 24, 2019 · 2 comments
Open

Comments

@jypeter
Copy link
Member

jypeter commented May 24, 2019

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 calling cdutil.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...

@doutriaux1
Copy link
Contributor

@jypeter you're right it was moved to genutil a VERY long time ago but left as an import in cdutil for backward compatibilty. The documentation indedd should be in genutil, with a reference to it from cdutil. @reshel3 could you do this? @reshel3 please let me know if you need help with @jypeter other comments. @jypeter I would trust the doc string more, but even these might be out of date 😉

@jypeter
Copy link
Member Author

jypeter commented Dec 12, 2019

Concerning averager, see also CDAT/genutil#32 and CDAT/genutil#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants