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

Fix MDER diagnostic regression_stepwise #2545

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Fix MDER diagnostic regression_stepwise #2545

merged 1 commit into from
Feb 21, 2022

Conversation

axel-lauer
Copy link
Contributor

This PR fixes the diagnostic regression_stepwise.ncl used by recipe_wenzel16jclim.yml.
The problem is that calculation of the fitting errors fail in the original implementation, which then leads to the NCL drawing functions in mder_scatter_plot to "hang" indefinitely. In the original implementation
cfint2 := sqrt(cfint2 # xx(:, ppt))
produces nan as the argument of sqrt is negative. Changing this line to
cfint2 := sqrt(abs(cfint2 # xx(:, ppt)))
prevents this problem and the diagnostic runs fine. Output also looks fine to me but needs to be checked carefully by the author.

@axel-lauer axel-lauer changed the title update regression_stepwise.ncl Fix MDER diagnostic regression_stepwise Feb 18, 2022
Copy link
Contributor

@schlunma schlunma left a comment

Choose a reason for hiding this comment

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

Just tested this successfully! Output looks good 🎉

Thanks @axel-lauer for fixing this!!

@schlunma schlunma added the bug label Feb 21, 2022
@schlunma schlunma added this to the v2.5.0 milestone Feb 21, 2022
@schlunma schlunma merged commit b46271e into main Feb 21, 2022
@schlunma schlunma deleted the fix_wenzel16jclim branch February 21, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants