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

sfclayrev fix for divide by zero #1029

Merged
merged 1 commit into from
Dec 17, 2019
Merged

Conversation

dudhia
Copy link
Collaborator

@dudhia dudhia commented Dec 10, 2019

TYPE: bug fix

KEYWORDS: sfclayrev scheme, divide by zero

SOURCE: internal (reported by CH Liu)

DESCRIPTION OF CHANGES:
During iterative solution for z/L there are rare cases where the same bit-for-bit value is returned for slightly different inputs to function zolri2 resulting in a divide by zero. This appears to be rare.
Fix is to return when these are found equal because solution is converged already.

LIST OF MODIFIED FILES:
phys/module_sf_sfclayrev.F

TESTS CONDUCTED:
Fix works for case that stopped.
Test on standard June case is bit-for-bit as expected
No regtests yet (Jenkins?)

RELEASE NOTE:
Fix for occasional divide-by-zero error in sfclayrev option.

@weiwangncar
Copy link
Collaborator

@dudhia If we do a test, say the Jan 2000 case, would you get bit-for-bit results with this change?

@dudhia
Copy link
Collaborator Author

dudhia commented Dec 11, 2019 via email

@weiwangncar
Copy link
Collaborator

@dudhia Thanks. Could you do a test to verify this?

@dudhia
Copy link
Collaborator Author

dudhia commented Dec 12, 2019

test of June 2001 case gives bit4bit same results with fix as expected

@weiwangncar
Copy link
Collaborator

@dudhia That's good to know. I'm ok with the fix.

@dudhia dudhia merged commit c1a4f58 into wrf-model:release-v4.1.4 Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants