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

bug fixes in ugwp and gsl drag suites #107

Closed
wants to merge 1 commit into from

Conversation

mdtoy
Copy link

@mdtoy mdtoy commented Oct 13, 2021

This PR fixes 3 bugs in the ugwpv1/gsl drag suites:

  1. drag_suite.F90: The modifications fix a failure to pass "decomposition change" regression tests. The "scale aware" variables "ls_taper" and "ss_taper" had been scalars based on the grid size at position "i=1" of the block, therefore, the results changed for each change in decomposition. Instead these variables are now 1D vectors that take into account the grid size at each grid point. There are other associated variables that changed from 1D vectors to 2D vectors as a result of the change, e.g., dxy4 and dxy4p. There were significant changes in loop structures as a result of this fix.

  2. cires_ugwpv1_oro.F90: The calculation of the final u and v tendencies had been mixed up. This simple bug fix corrects the issue.

  3. ugwpv1_gsldrag.F90: This fixes a logic error associated with the "do_ugwp" namelist switches.

The mods were regression-tested and the log file is on Hera at:
/scratch1/BMC/wrfruc/mtoy/git_local/ufs-weather-model.gsl_develop/tests/RegressionTests_hera.intel.m.log

@DomHeinzeller
Copy link

@mdtoy Didn't we already merge this into the authoritative repositories?

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@climbfuji
Copy link

Yes, but it didn’t seem to make it into the NOAA-GSL repo.

Are these commits cherry-picked from the authoritative repositories?

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@DomHeinzeller
Copy link

I am afraid we can't merge this. It will lead to lots of merge conflicts once we update gsl/develop from the authoritative repositories. There are two ways to do this:

  1. Cherry pick the original commits to the authoritative repositories (if possible)
  2. Update gsl/develop from the authoritative repositories

The latter is obviously preferred, because it will have to happen anyway sooner or later, and the former would just be an unnecessary duplication of efforts.

I started the update already, see the following draft PRs:

NOAA-GSL/fv3atm#111
NOAA-GSL/ccpp-framework#19
#109
NOAA-GSL/ufs-weather-model#105

I expect these to go in immediately after Hannah's GF tuning PRs are merged.

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@climbfuji
Copy link

climbfuji commented Oct 19, 2021 via email

@DomHeinzeller
Copy link

Also, this PR won't be needed as soon as the PRs that I listed above are merged.

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@climbfuji
Copy link

By “original” commits, do you mean the commits I made in the NCAR/ccpp-physics repo (and that were merged)? It seems like that would be more of a spaghetti mess then the small manual deltas I made within the NOAA-GSL/ccpp-physics repo.

It won't be straightforward unless these commits were a few small and clean commits that only did what you are trying to do here. But again, we cannot merge new commits and then manually resolve all merge conflicts later. That is not how things work with git.

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@climbfuji
Copy link

Does it help that the three ccpp-physics files that are affected by this PR: drag_suite.F90, cires_ugwpv1_oro.F90, and ugwpv1_gsldrag.F90 are identical to the ones in the NCAR/ccpp-physics repo? What I did, actually now that I remember, was just to copy them over from NCAR/ccpp-physics to my branch of NOAA-GSL/ccpp-physics. So effectively, they are already “merged" into the authoritative repository. Am I getting this right? If not, I’ll cry uncle. :)

No need to cry ;-) they are identical but they are not merged, because a merge would mean that the commit history for these files is identical. In other words, after merging this PR, I would be able to merge ccpp-physics main as a whole and it would recognize that the changes had already been applied. This is not the case here, however, because GitHub doesn't inspect line by line differences and realizes that they are the same. It looks at the commit history. If the hash of a certain commit is not present, then it will try to apply it. Since you already applied it manually (in another commit), it will cause a merge conflict.

@mdtoy
Copy link
Author

mdtoy commented Oct 19, 2021 via email

@DomHeinzeller
Copy link

This PR is not necessary, because the updates will be brought over from the authoritative repositories in PR #109.

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.

4 participants