[ ] This PR addresses an already opened issue (for bug fixes / features)
This PR fixes #xyz
[ ] (If applicable) Documentation has been added / updated (for bug fixes / features).
[x] (If applicable) Tests have been added.
[x] This PR does not seem to break the templates.
[x] HISTORY.rst has been updated (with summary of main changes).
[x] Link to issue (:issue:number) and pull request (:pull:number) has been added.
What kind of change does this PR introduce?
xscen.aggregate.climatological_mean is replaced by xscen.aggregate.climatological_op.
climatological_op permits to apply operations ('op') other than 'mean' to the input dataset.
operations implemented: ['max', 'mean', 'median', 'min', 'std', 'sum', 'var', 'linregress']
other additions:
argument 'min_periods' can be passed as a 0 < real value <= 1 to restrict calculation to a percentage of available values in a period.
argument 'interval' has been renamed to 'stride'
flag 'rename_variables' == True will rename variables in output to {input_varname}_clim\{op} to facilitate combining output from multiple operations in one ds.
flag 'periods_as_dim' == True will restructure the output with periods and {freq} as new coordinates and dimensions.
Modifiede the "Getting Started" notebook to use climatological_op with option 'mean'.
Does this PR introduce a breaking change?
No, climatological_mean is retained and calls climatological_op.
Tests for climatological_mean were adjusted for minor changes in attribute values.
Other information:
Uses a wrapper for scipy.stats.linregress for trend calculation with xarray.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
xscen.aggregate.climatological_mean is replaced by xscen.aggregate.climatological_op.
climatological_op permits to apply operations ('op') other than 'mean' to the input dataset. operations implemented: ['max', 'mean', 'median', 'min', 'std', 'sum', 'var', 'linregress']
other additions:
Modifiede the "Getting Started" notebook to use climatological_op with option 'mean'.
Does this PR introduce a breaking change?
No, climatological_mean is retained and calls climatological_op. Tests for climatological_mean were adjusted for minor changes in attribute values.
Other information:
Uses a wrapper for scipy.stats.linregress for trend calculation with xarray.