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

bug: normal CDF not enough precision #416

Closed
hkershaw-brown opened this issue Oct 20, 2022 · 3 comments
Closed

bug: normal CDF not enough precision #416

hkershaw-brown opened this issue Oct 20, 2022 · 3 comments
Labels
back burner very low priority. Future work? QCEFF quantile conserving filters

Comments

@hkershaw-brown
Copy link
Member

🐛

Describe the bug

  1. List the steps someone needs to take to reproduce the bug.
    Run filter using the RHF (lorenz_96)

  2. What was the expected outcome?
    Precision of the results for norm_cdf calculation using the Abramowitz and Stegun approach matches results from Matlab.

  3. What actually happened?
    Lower precision results than expected. Here is the comparison to Matlab:
    10^-8 differences
    Screen Shot 2022-10-20 at 11 11 21 AM

Error Message

No error

Which model(s) are you working with?

Lorenz_96 but will apply to any model if running with RHF.

Notes:

We believe it is only RHF that is effected.
To test: other filter options to confirm, where else is norm_cdf used.

Screenshots

Here is an improved norm_cdf method using Fortran erf and erfc intrinsics comparison to matlab
10^-16 differences

Screen Shot 2022-10-20 at 11 14 51 AM

Version of DART

Which version of DART are you using?
v10.X.X

Have you modified the DART code?

No, but the improved method is available on request (from Jeff)

Build information

Please describe:

  1. mac
  2. gfortran

To test:

  • different compilers (intel, nvhpc)
  • new method effect on other filters (confirm no effect).
  • unit test for norm_cdf
@hkershaw-brown
Copy link
Member Author

hkershaw-brown commented Oct 28, 2022

@hkershaw-brown
Copy link
Member Author

From Jeff: no rush on this to get to main, since it is need for the new filter stuff, not the current main branch.

@hkershaw-brown hkershaw-brown added the back burner very low priority. Future work? label Nov 11, 2022
@hkershaw-brown hkershaw-brown added the QCEFF quantile conserving filters label May 31, 2023
@hkershaw-brown
Copy link
Member Author

hkershaw-brown commented Jun 23, 2023

closing as this is fixed on quantile_methods since at least
f4b97de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back burner very low priority. Future work? QCEFF quantile conserving filters
Projects
None yet
Development

No branches or pull requests

2 participants