-
Notifications
You must be signed in to change notification settings - Fork 383
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
Make bgc balance_check_tolerance a nml variable and increase the default #6651
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing balance_check_tolerance
to bgc_balance_check_tolerance
?
Good idea to add a distinction at the component model level. I opt to rename the |
This change is missing from some of the balance check routines. For example, |
Indeed @peterdschwartz . The original hardwired tolerance uses the same 1e-8 for C, N, and P balance errors. The changes here were mainly targeting the nbalance issue encountered during v3.LR simulations. Do you feel safe to also apply the increased tolerance to C and P balance check? It may sound good to do so as the nml variable was not specifically named for 'N' balance check. |
@bishtgautam or @peterdschwartz do you want further changes to this PR? Its the last one for v3.0.1. |
I think that C,N,P should have the same threshold for balance errors as the model treats them symmetrically whenever it can. If applying the change consistently creates more issues, then that could be indicating a real error rather than accumulation of floating point errors. |
@peterdschwartz Are you suggesting the following additional changes?
If yes, I agree with you that those should be changed too. |
@wlin7 , What do you think? |
Sounds good to me to apply the threshold to all - C.N.P. It is done. Thank you @peterdschwartz @bishtgautam . |
@wlin7 Did you verify this doesn't change answers? |
@rljacob , the changes will not change answer for successful runs. All those balance checks would end the runs if the error threshold is exceeded. No C and P balance errors have been reported in simulation campaigns or regular tests. In theory, if runs are not aborted when threshold is exceeded, varying threshold could lead to NBFB. |
@bishtgautam can you merge this to next today? |
This enables namelist control for the balance_check_tolerance. The hardwired default of balance_check_tolerance is increased from 1e-8 to 1e-7 for C, N and P based on testing results from investigating a runtime failure due to grid and column nbalance errors exceeding specified threshold. [BFB] for tests never having nbalance issue [NML] no NML diff for tests as default is not set via nml.
This enables namelist control for the balance_check_tolerance.
The hardwired default of balance_check_tolerance is increased from
1e-8 to 1e-7 for C, N and P based on testing results from investigating a runtime
failure due to grid and column nbalance errors exceeding specified
threshold.
[BFB] for tests never having nbalance issue
[NML] no NML diff for tests as default is not set via nml.
Tested for the v3.LR.historical_0201 case that failed in 1996-02 with the original threshold, confirm the effectiveness of the nml control and the new default value for overcoming the nbalance issue.
Previous testings showed the error can reach more than 5e-8 but sufficiently distant from the new default of 1e-7