Skip to content

PBLH Corrections - #3486

Open
hgopalan wants to merge 42 commits into
erf-model:developmentfrom
hgopalan:ERF-PBLH
Open

PBLH Corrections#3486
hgopalan wants to merge 42 commits into
erf-model:developmentfrom
hgopalan:ERF-PBLH

Conversation

@hgopalan

@hgopalan hgopalan commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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:

  1. Fixed the low wind speed limits for MRF and YSU. A geostrophic wind speed of 0.1 m/s will be still stable.
  2. Added PBLH smoothing between neighbouring cells and improved PBLH diagnosis for unstable ABL
  3. Added QNSE stability condition for very stable ABL for MRF/YSUNew. This prevents the collapse of the very stable ABL under low geostrophic winds and high cooling rate.

@hgopalan

hgopalan commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

#3541 will be resolved here.

Comment thread Source/PBL/ERF_PBLModels.H Outdated

// Swap arrays for next iteration (or final result)
if (pass < passes - 1) {
pblh_fab.copy(pblh_temp, 0, 0, 1);

@AMLattanzi AMLattanzi Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Source/Diffusion/ERF_ImplicitDiff_T.cpp Outdated
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;

@AMLattanzi AMLattanzi Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the met_h_zeta divisions need removing. This includes the state and momentum diffusion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread Source/Diffusion/ERF_ImplicitDiff_N.cpp Outdated
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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to flip the sign to -=

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@AMLattanzi
AMLattanzi self-requested a review August 13, 2026 16:29

@AMLattanzi AMLattanzi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments at respective lines

Comment thread Source/Diffusion/ERF_ImplicitDiff_T.cpp Outdated
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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The met_h_zeta still needs removing. There is no vertical derivative that needs correcting here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

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