-
Notifications
You must be signed in to change notification settings - Fork 10
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
PresRat correction #215
PresRat correction #215
Conversation
3106f0b
to
310d280
Compare
To keep the following PR cleaner, this commit moves and combines a few ruff setup from that PR into here. style: Adding 'F' into ruff's checks It seems to be the only one conforming. cfg: Missing to ignore F401 Following @bnb32 setup. style: Ignore F401 only on __init__ Thanks to @ppinchuk 's tip! I missed that before. Ignoring unused import in docs Including Warning (W) rules
d916ea9
to
8823368
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the details of the presrat implementation but the mechanics here look good to me. Just a couple tweaks. Also, let's add a fwp integration test like with qdm.
f4e53bb
to
8a5d7b7
Compare
To keep everyone in the same page. This PR is still missing a couple of tests and a cleanup. I'll remove the draft state when it's ready. |
A reminder for myself. A small edition in the documentation, as suggested by @grantbuster: |
It was missing to force K=1, otherwise any difference in the means would result in a K that would change the unbiased.
Removing apply_zero_precipitation_rate() as requested by @grantbuster
If no_trend is True, skip zero rate and k-factor corrections. As requested by @grantbuster
@castelao, i took another look and the implementation looks great. I know you're adding a presrat-motivation test (e.g., testing the reason why we're doing presrat) which should be great. Could you also clean up docstrings in There is also one outstanding comment on |
Thanks to @grantbuster who noticed that.
Some information for future refactoring.
I missed this method from an early stage implementation. Thanks to @grantbuster who noticed that! Also defining default `zero_rate_threshold` to zero as requested by Grant.
The rate should be <= otherwise we would miss completely the case of a threshold equal to zero. Thanks to @grantbuster who noticed that.
PresRat correction
Implementing PresRat for precipitation.