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

firm can now take a list of xr.datarrays for the thresholds #661

Merged

Conversation

nicholasloveday
Copy link
Collaborator

No description provided.

@nicholasloveday nicholasloveday linked an issue Sep 6, 2024 that may be closed by this pull request
@@ -216,8 +219,10 @@ def _single_category_score(
# Bring back NaNs
condition1 = condition1.where(~np.isnan(fcst))
condition1 = condition1.where(~np.isnan(obs))
condition1 = condition1.where(~np.isnan(categorical_threshold))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note to check this extra line doesn't have any problems running when categorical_threshold is a sequence of floats. Presumably this would be covered by the pre-existing tests so may not actually need more tests, but it should be confirmed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There are tests for sequences of floats

@tennlee
Copy link
Collaborator

tennlee commented Sep 7, 2024

This all looks good to me. @rob-taggart , it would be nice if you could either review the tests or do some manual testing to make sure the new functionality is working as expected and also make sure there are no issues, but nothing jumped out at me as being a problem in that regard.

@tennlee
Copy link
Collaborator

tennlee commented Sep 7, 2024

It's not required, but I could imagine a worked example showing say two stations from different climate zones with different thresholds, to make it clear to people why they might want to do this. On the other hand, notebooks can't cover absolutely everything in detail, and it's mentioned, so I would only do this if you felt motivated to do so.

@rob-taggart
Copy link
Collaborator

Thanks for doing this @nicholasloveday . Docstring looks good and tests are reasonable. Happy for this to be merged, @tennlee

@tennlee tennlee merged commit 2480bc1 into nci:develop Sep 9, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIRM using array-like categorical thresholds
3 participants