Add aggregate_time support to convert_and_aggregate#491
Add aggregate_time support to convert_and_aggregate#491FabianHofmann merged 4 commits intomasterfrom
Conversation
brynpickering
left a comment
There was a problem hiding this comment.
Definitely needed - all my students have been confused by the existing arguments when first working with atlite. My comments are mostly for maintainability but the choice of aggregate_time options for backwards-compatibility might need discussion.
…te_time helper, consistent keep_attrs, use fixtures in tests
|
Thanks for the review @brynpickering! I've addressed all your comments:
|
brynpickering
left a comment
There was a problem hiding this comment.
This makes more sense to me now. The option one needs to give to ensure backwards-compatibility is much clearer. The next feature release, I would raise an exception on use of capacity_factor and capacity_factor_timeseries but possibly keep legacy, only removing legacy on the subsequent feature release.
Side note: should the use of capacity_factor=True in example notebooks already be converted to using aggregate_time?
good point, will do that |
Closes #489.
Changes proposed in this Pull Request
aggregate_time={"sum", "mean", None}toconvert_and_aggregateto control temporal aggregation explicitlyaggregate_time="legacy", which preserves historical context-dependent behavior (sum without spatial agg, full timeseries with spatial agg) and emits aFutureWarningnudging users to pick an explicit optionNonemeans "no temporal aggregation"capacity_factorandcapacity_factor_timeseriesin favor ofaggregate_time_aggregate_time()helper for consistent temporal aggregation withkeep_attrs=Truein both code pathswind()andpv()examples to useaggregate_time=NoneChecklist
doc.environment.yaml,environment_docs.yamlandsetup.py(if applicable).doc/release_notes.rstof the upcoming release is included.