-
Notifications
You must be signed in to change notification settings - Fork 145
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: inflation creating out-of-bounds values qceff #749
Comments
there are some early returns in probit_transform_mod DART/assimilation_code/modules/assimilation/probit_transform_mod.f90 Lines 350 to 353 in 464aa57
|
whole ensemble: before line 559 "i","value" after inflation "i","value" |
from_probit_bounded_normal_rh state_ens gets set to probit_ens not sure why the more_params(7) tail_sd_eft is negative? get_bnrh_sd(p) DART/assimilation_code/modules/assimilation/bnrh_distribution_mod.f90 Lines 91 to 100 in 464aa57
|
The sd == 0 so you never transform into (or back out of) probit space. Inflation pushes the
|
note there is issue #748 which is a different inflation QCEFF bug which looks like it may create out-of-bounds values also. |
This bug impacted the application of inflation, but it was potentially much more insidious. As noted by Helen, the problem occured when the bnrh transform was unable to complete because the ensemble standard deviation was not positive. This same problem can arise for all of the other places in assim_tools_mod.f90 where transforms are made. The most straightforward solution begins by having an error return from the probit transform. Only the bnrh can fail so all other types of distributions always complete and do not need to be considered. The original code design assumed that if the standard deviation was not positive, that all ensemble members must have the same value. However, as noted in Helen's examples, if the differences between ensemble members are very small, computational precision limits can result in a computed standard deviation that is not positive. The assumption for the inflation and the other parts of assim_tools was that any distribution with all members identical could not be changed so it didn't matter if the failure of the transform was just ignored. Note that the numerical analysis is very complex for the case where the computed SD for the bnrh transform is very small but non-zero. A number of tests suggest that this does not have inappropriate results, but I would not be shocked if something bad could happen in unusual cases. |
🐛 Your bug may already be reported!
Please search on the issue tracker before creating a new issue.
Describe the bug
List the steps someone needs to take to reproduce the bug.
Run CAM-FV reanalysis single run of filter example /glade/derecho/scratch/hkershaw/DART/CAM-out-of-bounds/Rean_run
inf_flavor 2
What was the expected outcome?
Run to completion
What actually happened?
filter errors out:
Error Message
Please provide any error messages.
Which model(s) are you working with?
CAM-FV
Screenshots
Here are the lines of code:
DART/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90
Lines 559 to 560 in 464aa57
Version of DART
Which version of DART are you using?
v11.8.1
Have you modified the DART code?
No
Here is a small reproducer
Or you can run CAM-FV filter
/glade/derecho/scratch/hkershaw/DART/CAM-out-of-bounds/Rean_run
The numbers for the test_maths.f90 program are from proc3 (out of 128) j==61138
Build information
Please describe:
also mac gfortran GNU Fortran (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
The text was updated successfully, but these errors were encountered: