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

Make sure correct zerovalue is used for precip_models_cascade in blending code #438

Open
mats-knmi opened this issue Oct 29, 2024 · 0 comments

Comments

@mats-knmi
Copy link
Contributor

During a recent performance improvement, there was some uncertainty on how to deal with computing the zerovalue for precip_models_cascade: #435 (comment). There is some code there that is supposed to get this zerovalue when precip_cascade is completely filled with nan's.

In the new code, it is not the case that the entire precip_models_cascade is stored in RAM at that time, so just taking the nanmin over that entire array is not possible anymore. I have solved it by looping over precip_models until we find a timestamp and member that has rain and decompose that and take the nanmin to get the zerovalue. This differs from the old code, but should not be functionally different.

When discussing this some other questions arose. Namely: since this part of the code is supposed to catch the case where precip_cascade is completely filled with nan's, why is this not checked? And is this the best way to get a zerovalue for precip_cascade?

This also ties in with 2 other issues: #396 and #384

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

No branches or pull requests

1 participant