PBLH Corrections - #3486
Open
hgopalan wants to merge 42 commits into
Open
Conversation
…SUNew PBL schemes Co-authored-by: hgopalan <1108371+hgopalan@users.noreply.github.com>
Co-authored-by: hgopalan <1108371+hgopalan@users.noreply.github.com>
Add Vogelezang & Holtslag (1996) shear-correction and PBLH spatial smoothing for MRF and YSUNew PBL schemes
Contributor
Author
|
#3541 will be resolved here. |
9 tasks
AMLattanzi
reviewed
Aug 13, 2026
|
|
||
| // Swap arrays for next iteration (or final result) | ||
| if (pass < passes - 1) { | ||
| pblh_fab.copy(pblh_temp, 0, 0, 1); |
Collaborator
There was a problem hiding this comment.
The copies at L482 and 485 need a template parameter for where they should be executed --- e.g., pblh_fab.copy<RunOn::Device>(pblh_temp, 0, 0, 1);
This should fix the GPU compilation failures shown in the workflow.
AMLattanzi
reviewed
Aug 13, 2026
| const int hgam_comp = (stagdir == 0) ? EddyDiff::HGAMU_v : EddyDiff::HGAMV_v; | ||
| const Real gam_hi = myhalf * (mu_turb(i,j,klo,hgam_comp) + mu_turb(i,j,klo+1,hgam_comp)); | ||
| RHS_a(i,j,klo) += Fact * gfac * rhoAlpha_hi * gam_hi / met_h_zeta_hi; | ||
| RHS_a(i,j,klo) -= Fact * gfac * rhoAlpha_hi * gam_hi / met_h_zeta_hi; |
Collaborator
There was a problem hiding this comment.
All of the met_h_zeta divisions need removing. This includes the state and momentum diffusion.
AMLattanzi
reviewed
Aug 13, 2026
| const int hgam_comp = (stagdir == 0) ? EddyDiff::HGAMU_v : EddyDiff::HGAMV_v; | ||
| const Real gam_hi = myhalf * (mu_turb(i,j,klo,hgam_comp) + mu_turb(i,j,klo+1,hgam_comp)); | ||
| RHS_a(i,j,klo) += Fact * gfac * dz_inv * rhoAlpha_hi * gam_hi; | ||
| RHS_a(i,j,klo) += Fact * gfac * rhoAlpha_hi * gam_hi; |
Collaborator
There was a problem hiding this comment.
Need to flip the sign to -=
AMLattanzi
self-requested a review
August 13, 2026 16:29
AMLattanzi
requested changes
Aug 13, 2026
AMLattanzi
left a comment
Collaborator
There was a problem hiding this comment.
See comments at respective lines
AMLattanzi
reviewed
Aug 17, 2026
| const Real gam_hi = myhalf * (gam_k + gam_kp1); | ||
| const Real gam_lo = myhalf * (gam_k + gam_km1); | ||
| RHS_a(i,j,k) += Fact * gfac * (rhoAlpha_hi * gam_hi / met_h_zeta_hi - rhoAlpha_lo * gam_lo / met_h_zeta_lo); | ||
| RHS_a(i,j,k) -= Fact * gfac * (rhoAlpha_hi * gam_hi / met_h_zeta_hi - rhoAlpha_lo * gam_lo / met_h_zeta_lo); |
Collaborator
There was a problem hiding this comment.
The met_h_zeta still needs removing. There is no vertical derivative that needs correcting here.
AMLattanzi
requested changes
Aug 17, 2026
AMLattanzi
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MRF and YSU depend on planetary boundary layer height to compute the turbulent viscosity. The variable becomes prognostic instead of diagnostic. So we have to modify the calculation and filling up the surface layer. Few other changes: