-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Pull Request Checklist: - [ ] 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_var_name}\_clim\_{op} to facilitate combining output from multiple operations in one ds. - flag 'horizons_as_dim' == True will restructure the output with horizons and {freq} != 'year' as new coordinates and dimensions. Modifies the "2 Getting Started" and "6 Config" notebooks 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 replaced for a single test for the future warning. ### Other information: Uses a wrapper for scipy.stats.linregress for trend calculation with xarray.
- Loading branch information
Showing
9 changed files
with
831 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.