Skip to content

Add diagnostic to calculate hour of maximum precipitation#4334

Open
schlunma wants to merge 15 commits intomainfrom
hour_of_max_pr
Open

Add diagnostic to calculate hour of maximum precipitation#4334
schlunma wants to merge 15 commits intomainfrom
hour_of_max_pr

Conversation

@schlunma
Copy link
Contributor

@schlunma schlunma commented Feb 11, 2026

Description

This PR adds a diagnostic and example recipe to calculate the maximum hour of precipitation. The following methods can be selected in the recipe:

  • Link to documentation:

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

New or updated recipe/diagnostic


To help with the number of pull requests:

@schlunma schlunma added this to the v2.14.0 milestone Feb 11, 2026
@schlunma schlunma added diagnostic new recipe Use this label if you are adding a new recipe labels Feb 11, 2026
@schlunma
Copy link
Contributor Author

Doc build fail not related to this PR: #4333

@LisaBock
Copy link
Member

I get this error message from the diagnostic: AttributeError: module 'numpy' has no attribute 'atan2'. Did you mean: 'arctan2'?
@schlunma Do you know about this issue?

@schlunma
Copy link
Contributor Author

Interesting, maybe it's because of an old version of numpy. numpy.atan2 actually exists: https://numpy.org/doc/stable//reference/generated/numpy.atan2.html.

Nevertheless, I replaced it with arctan2 in the code because the handling of special input values seems to be better.

Copy link
Member

@LisaBock LisaBock left a comment

Choose a reason for hiding this comment

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

Works fo me now! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostic new recipe Use this label if you are adding a new recipe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants