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

Add Christmas Day indices, add bivariate_count_occurrences #2030

Merged
merged 20 commits into from
Jan 14, 2025

Conversation

Zeitsperre
Copy link
Collaborator

@Zeitsperre Zeitsperre commented Dec 19, 2024

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • 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?

  • Adds two new indices and indicators:
    • holiday_snow_days → units = "days"
    • holiday_snow_and_snowfall_days → units = "days"
  • Added bivariate_count_occurrences to generic indices.

Does this PR introduce a breaking change?

No.

Other information:

prsn and snd data has been added to the xclim-testdata repository: Ouranosinc/xclim-testdata#30

Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre Zeitsperre added this to the v0.55.0 milestone Dec 19, 2024
@Zeitsperre Zeitsperre requested a review from coxipi December 19, 2024 22:53
@Zeitsperre Zeitsperre self-assigned this Dec 19, 2024
@github-actions github-actions bot added the indicators Climate indices and indicators label Dec 19, 2024
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@github-actions github-actions bot added the CI Automation and Contiunous Integration label Dec 20, 2024
Copy link

github-actions bot commented Dec 20, 2024

Note

It appears that this Pull Request modifies the main.yml workflow.

On inspection, the XCLIM_TESTDATA_BRANCH environment variable is set to the most recent tag (v2025.1.8).

No further action is required.

Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre
Copy link
Collaborator Author

This is just waiting on Ouranosinc/xclim-testdata#30

@Zeitsperre Zeitsperre requested a review from aulemahal December 20, 2024 20:58
Zeitsperre and others added 3 commits January 8, 2025 12:38
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre Zeitsperre requested a review from aulemahal January 8, 2025 17:43
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre
Copy link
Collaborator Author

One thing I'm wondering about are the names of these indices/indicators. Given that they can accept an indexer, would it make more sense to general the indices more and rename the indicators to use "Christmas" as well as hardcode them to December 25th?

@tlogan2000 any opinions on this?

@aulemahal
Copy link
Collaborator

If you hardcode the date to a specific date, then there's no need for a compute function, you could simple use generic.count_occurrences. And I would argue that the more general version of holidays_snow_days is snd_days_above.

I think generalizing holidays_snow_and_snowfall_days would best be done by implementing a count_multivariate_occurrences.

Signed-off-by: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre Zeitsperre changed the title Add Christmas Day indices Add Christmas Day indices, add bivariate_count_occurrences Jan 9, 2025
Zeitsperre and others added 5 commits January 10, 2025 10:48
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
…, update nbconvert

Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@Zeitsperre Zeitsperre requested a review from aulemahal January 13, 2025 17:12
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@github-actions github-actions bot added the approved Approved for additional tests label Jan 14, 2025
@Zeitsperre Zeitsperre merged commit 4cc8b2e into main Jan 14, 2025
30 checks passed
@Zeitsperre Zeitsperre deleted the festive-indices branch January 14, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved for additional tests CI Automation and Contiunous Integration indicators Climate indices and indicators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add White Christmas and Perfect Christmas indicators
2 participants