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

ref & hist times in bias adjustment methods must match #1995

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coxipi
Copy link
Contributor

@coxipi coxipi commented Nov 13, 2024

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 a method to bias adjustment classes to raise an error if ref and hist times do not match

Does this PR introduce a breaking change?

Other information:

@github-actions github-actions bot added the sdba Issues concerning the sdba submodule. label Nov 13, 2024
Comment on lines +267 to +269
if cls._allow_diff_calendars is False:
cls._check_matching_time(ref, hist)

Copy link
Contributor Author

@coxipi coxipi Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aulemahal was this more or less the intent behind _allow_diff_calendars? Or is this just a condition so that map_groups is easier to operate? It seems to be applied pretty broadly, e.g. in Scaling where we would in principle not need such a constraint in this case.

Perhaps I should add a new variable _allow_diff_training_time that would be True for Scaling, but False for the Quantile methods (instead of re-using _allow_diff_calendars?

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

Successfully merging this pull request may close these issues.

1 participant