Skip to content

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 requested a review from schlunma February 18, 2022 19:21
@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.

2 participants