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: obs_increment_bounded_norm_rhf does not check for error returned from bnrh_cdf #784

Open
jlaucar opened this issue Dec 23, 2024 · 0 comments

Comments

@jlaucar
Copy link
Contributor

jlaucar commented Dec 23, 2024

obs_increment_bounded_norm_rhf calls bnrh_cdf to get the quantiles for a prior ensemble. bnrh_cdf can fail if the computed prior standard deviation is not positive. If it fails, it returns a large negative value for tail_sd_left and tail_sd_right. There is no check for this failure in obs_increment_bounded_norm_rhf which proceeds to do a Bayes product and an inversion of the posterior quantiles. There is a check for negative variance at the start of obs_increment_bounded_norm_rhf that results in an error failure. However, the ways in which the prior variance are computed and the way the prior standard deviation is computed in bnrh_cdf are different. While I have not been able to create a test case that is a problem here, it seems like it could be possible.

The simple solution is to have obs_increment_bounded_norm_rhf fail if bnrh_cdf returns the large negative for tail_sd_left.

If this ever occured, a more subtle study of the actual case that results in the problem could advise a solution that would not involve failure.

In the long-term, it would be good to have consistent computation of the measure of the prior ensemble second moment (variance or standard deviation).

If the possible bug did manage to occur, the increments from a previously assimilated observation would be used for the current observation which could possibly lead to large, inappropriate increments to state or observation priors in the filter_assim.

This problem can be seen in v11.8.6-3-g942b02432 but has existed since the original QCEFF implementation.

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

No branches or pull requests

1 participant