Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support freq="W" in standardized indices (#1952)
<!--Please ensure the PR fulfills the following requirements! --> <!-- If this is your first PR, make sure to add your details to the AUTHORS.rst! --> ### Pull Request Checklist: - [ ] This PR addresses an already opened issue (for bug fixes / features) - This PR fixes #xyz - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] (If applicable) Documentation has been added / updated (for bug fixes / features) - [ ] CHANGELOG.rst has been updated (with summary of main changes) - [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added ### What kind of change does this PR introduce? * Add support for weekly standardized indices ### Does this PR introduce a breaking change? No ### Other information: I realize that xclim and climate_indices treat zero-inflated distributions differently. I will investigate which library does it correctly and include changes if needed EDIT: I believe `xclim` has the correct implementation. The probability of zeroes should be determined in the fitting procedure, not by using the full dataset. The idea is when you compute a CDF, a zero value should be mapped to the `prob_of_zero` in the calibration period. That is the same logic as using the fitting params of the distribution in the calibration period to compute the CDF in the full dataset. I confirmed this is also how it's done in the case of the R package (SPEI), although I find some steps a bit weird, but I'm not too familiar with R.
- Loading branch information