Syntax errors in physics routines: *- and *+#1577
Syntax errors in physics routines: *- and *+#1577davegill merged 1 commit intowrf-model:release-v4.3.2from
Conversation
TYPE: bug fix KEYWORDS: HPE, CCE, syntax SOURCE: Tricia Balle (HPE) DESCRIPTION OF CHANGES: Problem: There were three types of syntax errors that were uncovered by the HPE CCE compiler. 1. Open statement used `action="append"`. 2. Multiple unary operators next to each other `*+` 3. Multiple unary operators next to each other `*-`. Solution: 1. The correct usage is `position="append"`. 2. Not sure what is intended. Need to get the developer to weigh in on `GS3*+SASR1`. 3. Typically, `*(-1)` is intended, and this looks to be the case. LIST OF MODIFIED FILES: modified: phys/module_mp_nssl_2mom.F modified: phys/module_mp_ntu.F modified: phys/module_sf_noahmplsm.F TESTS CONDUCTED: 1. Fixes all the WRF code to build with the CCE compiler. 2. Hoping that all Jenkins tests are a PASS. RELEASE NOTE: A few syntax errors in NSSL, NTU, an NoahMP were fixed. Most compilers skipped over them. No impact for users for whom the code already compiled.
|
@weiwangncar @dudhia |
| QCLsh = QCLS1*ESH*VTQSH*NH1D*(SASR2*GSM3+SASR1*2.*GH2*GSM2+& | ||
| GH3*GSM1) | ||
| NCLsh = NCLS1*ESH*VTNSH*NH1D*(SASR2*GS3*+SASR1*2.*GH2*GS2+ & | ||
| NCLsh = NCLS1*ESH*VTNSH*NH1D*(SASR2*GS3 +SASR1*2.*GH2*GS2+ & |
There was a problem hiding this comment.
@weiwangncar @dudhia
This one is the biggy
There was a problem hiding this comment.
@davegill This looks good to me. I'll ask the author to approve it too.
There was a problem hiding this comment.
Thanks Wei.
Could we also ask the author to comment on the likely impact of multiplying, instead of adding those terms? That might be significant.
There was a problem hiding this comment.
@davegill I sent him this page, and hopefully he will see your comment.
|
jenkins is OK |
FWIW, we just hit this with the IBM compiler (xlf). Errors like this can be caught by CI, for example by disabling non-standard extensions with gfortran: I tried looking for a similar option with the Intel compiler and couldn't find it. At least |
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
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: HPE, CCE, syntax SOURCE: Tricia Balle (HPE) DESCRIPTION OF CHANGES: Problem: There were three types of syntax errors that were uncovered by the HPE CCE compiler. 1. Open statement used `action="append"`. 2. Multiple unary operators next to each other `*+` 3. Multiple unary operators next to each other `*-1`. Solution: 1. The correct usage is `position="append"`. 2. The developer agrees with the new modification to `GS3*+SASR1` was the original intent. 3. Typically, `*(-1)` is intended, and this is the case. Via some grep'ing, no other occurrences of `*+` or `*-` exist in the physics directory in the compilable source code. Syntactically OK source code with `/-` (such as for DATA statements) were the only compilable examples found. So, we fixed the above problems identified in this PR, and we could not find any other similar examples in the source code. LIST OF MODIFIED FILES: modified: phys/module_mp_nssl_2mom.F modified: phys/module_mp_ntu.F modified: phys/module_sf_noahmplsm.F TESTS CONDUCTED: 1. These fixes allow the WRF code to build with the CCE compiler. 2. Jenkins tests are all PASS. 3. One of the errors was a typo in the sink term of aggregates number from hail. A quick evaluation of its impact was quite minor from the 2D idealized simulation (the figure is not shown). RELEASE NOTE: A few syntax errors in NSSL, NTU, an NoahMP were fixed. Most compilers skipped over them. Either "small impact" or "no impact" for users for whom the code already compiled.
) 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
TYPE: bug fix
KEYWORDS: HPE, CCE, syntax
SOURCE: Tricia Balle (HPE)
DESCRIPTION OF CHANGES:
Problem:
There were three types of syntax errors that were uncovered by the HPE CCE compiler.
action="append".*+*-1.Solution:
position="append".GS3*+SASR1was the original intent.*(-1)is intended, and this is the case.Via some grep'ing, no other occurrences of
*+or*-exist in the physics directory in the compilablesource code. Syntactically OK source code with
/-(such as for DATA statements) were the only compilableexamples found. So, we fixed the above problems identified in this PR, and we could not find any other
similar examples in the source code.
LIST OF MODIFIED FILES:
modified: phys/module_mp_nssl_2mom.F
modified: phys/module_mp_ntu.F
modified: phys/module_sf_noahmplsm.F
TESTS CONDUCTED:
quite minor from the 2D idealized simulation (the figure is not shown).
RELEASE NOTE: A few syntax errors in NSSL, NTU, an NoahMP were fixed. Most compilers skipped over them. No impact for users for whom the code already compiled.