Skip to content

Fix nonstandard unary operator uses: *-#30

Merged
cenlinhe merged 1 commit intoNCAR:developfrom
davegill:unary_operator_bf
Jan 28, 2022
Merged

Fix nonstandard unary operator uses: *-#30
cenlinhe merged 1 commit intoNCAR:developfrom
davegill:unary_operator_bf

Conversation

@davegill
Copy link
Contributor

These were found with testing for the NCAR derecho machine by
Davide Del Vento for the WRF model. Any a * -b should be recast as a * (-b).

modified: module_sf_noahmplsm.F

These were found with testing for the NCAR derecho machine by
Davide Del Vento. Any `a * -b` should be recast as `a * (-b)`.

modified:   module_sf_noahmplsm.F
@davegill davegill changed the base branch from master to develop January 28, 2022 01:44
@davegill
Copy link
Contributor Author

@cenlinhe @davidedelvento @weiwangncar
Cenlin,
Now this is a 2-way feedback with NoahMP and WRF.

@cenlinhe
Copy link
Collaborator

@davegill Thanks. Looks good to me. By the way, what do you mean by "2-way feedback "?

@davegill
Copy link
Contributor Author

@cenlinhe

By the way, what do you mean by "2-way feedback "?

NoahMP gives code the WRF, and WRF helps with bugfixes to NoahMP: a mutually beneficial, two-way interaction.

@cenlinhe
Copy link
Collaborator

@davegill you are right! This is an excellent demonstration!

@cenlinhe cenlinhe merged commit 0c04aea into NCAR:develop Jan 28, 2022
davegill added a commit to davegill/WRF that referenced this pull request Jan 28, 2022
TYPE: bug fix

KEYWORDS: unary operator, NoahMP

SOURCE: Davide del Vento (CISL/NCAR), internal

DESCRIPTION OF CHANGES:
Problem:
Several occurences of `a * -b` were caught by the Cray compiler during routine
pre-derecho testing of WRF.

Solution:
The standard requires parentheses: `a * (-b)`.

How to fix the NoahMP version:
1. Get the WRF source code, and the right branch (let's assume `develop`
is the WRF branch).
```
git clone https://github.com/wrf-model/WRF
cd WRF
git checkout develop
git checkout -b new_noahmp_for_some_reason
```
2. Get the NoahMP repo available and in the WRF source code. Must be in the
top level of the WRF directory structure to issue this command.
```
git submodule update --init --recursive
```
3. Get the correct NoahM branch. Usually the NoahMP group tells us what to pick up.
Here, let us assume it is the `release-v4.4-WRF` branch from NoahMP.
```
cd phys/noahmp
git checkout release-v4.4-WRF
cd ..
```
4. Stage this modification.
```
git add noahmp
```

ISSUE:
Fixes wrf-model#1659

ASSOCIATED REPOSITORY CHANGE:
NCAR/noahmp#30

LIST OF MODIFIED FILES:
modified:   phys/noahmp

TESTS CONDUCTED:
1. All non-standard syntax of above form was modified.
2. All jenkins tests are PASS.
davegill added a commit to wrf-model/WRF that referenced this pull request Jan 28, 2022
TYPE: bug fix

KEYWORDS: unary operator, NoahMP

SOURCE: Davide Del Vento (CISL/NCAR), internal

DESCRIPTION OF CHANGES:
Problem:
Several occurrences of `a * -b` were caught by the Cray compiler during routine
pre-derecho testing of WRF.

Solution:
The standard requires parentheses: `a * (-b)`.

### How to get a different (probably new) NoahMP version in the WRF repository
1. Get the WRF source code, and the right branch (let's assume `develop`
is the WRF branch).
```
git clone https://github.com/wrf-model/WRF
cd WRF 
git checkout develop
git checkout -b new_noahmp_for_some_reason
```
2. Get the NoahMP repo available and in the WRF source code. You must be in the
top-most level of the WRF directory structure to issue this command on some OS.
```
git submodule update --init --recursive
```
3. Get the correct NoahMP branch. Usually the NoahMP group tells us what to pick up.
Here, let us assume it is the `release-v4.4-WRF` branch from NoahMP.
```
cd phys/noahmp
git checkout release-v4.4-WRF
cd ..
```
4. Stage this modification.
```
git add noahmp
```

ISSUE:
Fixes #1659

ASSOCIATED REPOSITORY CHANGE:
NCAR/noahmp#30

LIST OF MODIFIED FILES:
modified:   phys/noahmp

TESTS CONDUCTED:
1. All non-standard syntax of above form was modified.
2. All jenkins tests are PASS.
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
…l#1660)

TYPE: bug fix

KEYWORDS: unary operator, NoahMP

SOURCE: Davide Del Vento (CISL/NCAR), internal

DESCRIPTION OF CHANGES:
Problem:
Several occurrences of `a * -b` were caught by the Cray compiler during routine
pre-derecho testing of WRF.

Solution:
The standard requires parentheses: `a * (-b)`.

### How to get a different (probably new) NoahMP version in the WRF repository
1. Get the WRF source code, and the right branch (let's assume `develop`
is the WRF branch).
```
git clone https://github.com/wrf-model/WRF
cd WRF 
git checkout develop
git checkout -b new_noahmp_for_some_reason
```
2. Get the NoahMP repo available and in the WRF source code. You must be in the
top-most level of the WRF directory structure to issue this command on some OS.
```
git submodule update --init --recursive
```
3. Get the correct NoahMP branch. Usually the NoahMP group tells us what to pick up.
Here, let us assume it is the `release-v4.4-WRF` branch from NoahMP.
```
cd phys/noahmp
git checkout release-v4.4-WRF
cd ..
```
4. Stage this modification.
```
git add noahmp
```

ISSUE:
Fixes wrf-model#1659

ASSOCIATED REPOSITORY CHANGE:
NCAR/noahmp#30

LIST OF MODIFIED FILES:
modified:   phys/noahmp

TESTS CONDUCTED:
1. All non-standard syntax of above form was modified.
2. All jenkins tests are PASS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants