Skip to content

Another physics syntax error#1594

Merged
davegill merged 1 commit intowrf-model:release-v4.3.2from
davegill:ntu2
Dec 9, 2021
Merged

Another physics syntax error#1594
davegill merged 1 commit intowrf-model:release-v4.3.2from
davegill:ntu2

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Dec 9, 2021

TYPE: bug fix

KEYWORDS: syntax, physics *+

SOURCE: Patricia Balle (HPE)

DESCRIPTION OF CHANGES:
Problem:
As in hash 7c6fd57, PR #1577 "Syntax errors in physics routines: *- and *+", there is a single
remaining example of the unary operators next to each other.

Solution:
The author agreed that the *+ combination was supposed to be just +.

I searched the WRF code for instances of this *+ in PR #1577. When I did not find any, I put back one of them from
NTU code to make sure that my grep was working. It found that example, and no others that I cared about. I forgot
to undo that change before the git add, git commit.

LIST OF MODIFIED FILES:
modified: phys/module_mp_ntu.F

TESTS CONDUCTED:

  1. Passes Cray compiler.
  2. Jenkins tests are OK

TYPE: bug fix

KEYWORDS: syntax, physics *+

SOURCE: Patricia Balle (HPE)

DESCRIPTION OF CHANGES:
Problem:
As in hash 7c6fd57, PR wrf-model#1577 "Syntax errors in physics routines: *- and *+", there is a single
remaining example of the unary operators next to each other.

Solution:
The author agreed that the `*+` combination was suppoed to be just `+`.

LIST OF MODIFIED FILES:
modified:   phys/module_mp_ntu.F

TESTS CONDUCTED:
1. Passes Cray compiler
2. Jenkins tests are OK
@davegill
Copy link
Contributor Author

davegill commented Dec 9, 2021

@smileMchen @kkeene44
Folks,
Would you please review this MASSIVE PR that has a single character change?

@smileMchen
Copy link
Collaborator

smileMchen commented Dec 9, 2021

@davegill
Dave,
This change is fine. I will approve it soon.
Just one quick question:
The old code SASR2*GS3*+SASR1*2.*GH2*GS2+GH3 works, indicating that GS3* is treated as GS3, is this right?
Ming

@davegill
Copy link
Contributor Author

davegill commented Dec 9, 2021

@smileMchen
Ming,
The developer agreed that the *+ was supposed to be replaced by +.
The compilers treat *+ as a multiplication AND that the second argument has a positive sign. The actual code is treated as a multiplication, when it should be an addition.

@smileMchen
Copy link
Collaborator

smileMchen commented Dec 9, 2021

@davegill
Dave,
Thanks for the clarification. This change will give us the correct results, while the previous one actually is wrong.

@davegill davegill merged commit 238a7d2 into wrf-model:release-v4.3.2 Dec 9, 2021
@davegill
Copy link
Contributor Author

davegill commented Dec 9, 2021

@pkb99
Tricia,
Thanks again for finding this for us.

vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
)

TYPE: bug fix

KEYWORDS: syntax, physics, *+

SOURCE: Patricia Balle (HPE)

DESCRIPTION OF CHANGES:
Problem:
As in hash 7c6fd57, PR wrf-model#1577 "Syntax errors in physics routines: *- and *+", there is a single
remaining example of the unary operators next to each other.

Solution:
The author agreed that the `*+` combination was supposed to be just `+`.

I searched the WRF code for instances of this `*+` in PR wrf-model#1577. When I did not find any, I put back one of them from 
NTU code to make sure that my grep was working. It found that example, and no others that I cared about. I forgot
to undo that change before the `git add`, `git commit`.

LIST OF MODIFIED FILES:
modified:   phys/module_mp_ntu.F

TESTS CONDUCTED:
1. Passes Cray compiler.
2. Jenkins tests are OK
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