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

km_opt=5 causes several divide by 0 #1304

Merged

Conversation

matzegoebel
Copy link
Contributor

@matzegoebel matzegoebel commented Oct 23, 2020

TYPE: bug fix

KEYWORDS: 3D TKE, km_opt, divide by zero

SOURCE: Matthias Göbel (University of Innsbruck)

DESCRIPTION OF CHANGES:
Problem:
When compiling WRF with the -D option, several divide-by-zero errors happen in the km_opt=5 scheme. Some of these are the same as in the Shin-Hong PBL scheme (see pull request #1219). I tried to fix all the appearing errors, but some of them are not so straightforward to fix (see annotations in the code).

LIST OF MODIFIED FILES:
dyn_em/module_diffusion_em.F

TESTS CONDUCTED:

  1. Jenkins testing is all PASS.

RELEASE NOTE: fixed divide by zero in km_opt=5

@matzegoebel matzegoebel changed the base branch from master to release-v4.2.2 October 23, 2020 16:12
@davegill davegill changed the title Km opt5 divide by 0 km_opt=5 causes several divide by 0 Oct 23, 2020
@weiwangncar
Copy link
Collaborator

@zhangxsms Can you please review this fix?

dyn_em/module_diffusion_em.F Show resolved Hide resolved
dyn_em/module_diffusion_em.F Show resolved Hide resolved
dyn_em/module_diffusion_em.F Show resolved Hide resolved
dyn_em/module_diffusion_em.F Show resolved Hide resolved
dyn_em/module_diffusion_em.F Show resolved Hide resolved
@davegill
Copy link
Contributor

Jenkins testing is OK

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: d420eb17d920a89cb3879bf73f18a15f4bf35bd6, requested by: matzegoebel for PR: https://github.com/wrf-model/WRF/pull/1304. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           18
    Number of Builds       : 48           46
    Number of Simulations  : 166           164        0
    Number of Comparisons  : 105           104        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

Copy link
Contributor

@zhangxsms zhangxsms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed them and the suggested fixes are all physically correct.
Thanks for Matthias's careful inspection!

@weiwangncar
Copy link
Collaborator

I'm ok with this PR. Is there anything else that needs to be done for this PR?

@davegill davegill marked this pull request as ready for review October 27, 2020 15:37
@davegill
Copy link
Contributor

@weiwangncar @dudhia @matzegoebel
Matthias,
I have marked this PR as ready for review.

@matzegoebel
Copy link
Contributor Author

what are we actually waiting for here?

@dudhia
Copy link
Collaborator

dudhia commented Dec 15, 2020

I will approve

@weiwangncar weiwangncar merged commit 93ccd18 into wrf-model:release-v4.2.2 Dec 29, 2020
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: 3D TKE, km_opt, divide by zero

SOURCE: Matthias Göbel (University of Innsbruck)

DESCRIPTION OF CHANGES:
Problem:
When compiling WRF with the -D option, several divide-by-zero errors happen in the km_opt=5 scheme. This PR fixes the problems, and the changes are approved by the developer.

LIST OF MODIFIED FILES:
dyn_em/module_diffusion_em.F

TESTS CONDUCTED:
Jenkins testing is all PASS.

RELEASE NOTE: Fixed divide by zero in the 3D-TKE option km_opt=5.
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.

5 participants