Skip to content

use function of derivative rather than differentiate#604

Merged
remicousin merged 1 commit into
masterfrom
fcstval
Mar 20, 2026
Merged

use function of derivative rather than differentiate#604
remicousin merged 1 commit into
masterfrom
fcstval

Conversation

@remicousin
Copy link
Copy Markdown
Contributor

This PR was meant to fix the problem with different physical values in the local distributions, but given the seemingly lack of concern from the Climate Group on the matter during the meeting, I'll just push what I've done here and we'll get back to it with another PR when they provide some inputs on what to do next.

pdf is the derivative of cdf. I originally computed it by using differentiate function against cdf data. But the function to calculate the cdf is a combination of exp so it's also trivial to calculate on paper the derivative function, and then use that function instead. That's what I am doing now and ELR_poe returns both cdf and pdf. I obtained the same results using either way.

ELR_pdf is no more used. I also tried different ways to calculate it this way when exploring problems. I also like better the new way so I kept it and kept the ELR_pdf function for the record. Keeping its old way commented for the record as well.

The change in ELR_quantity is actually not a change : log(a/b) = log(a) - log(b). I didn't realize that right away when I made the change looking for errors. I like better the new version so I kept it. Obviously it doesn't change the results.

@remicousin remicousin requested a review from xchourio March 13, 2026 15:12
@remicousin remicousin self-assigned this Mar 13, 2026
@remicousin remicousin merged commit b4c4b10 into master Mar 20, 2026
1 check passed
@remicousin remicousin deleted the fcstval branch March 20, 2026 12:18
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.

2 participants