Skip to content

Commit

Permalink
fix bug in windspeed calc for ysu
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Aug 12, 2024
1 parent 9609852 commit 517c13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Diffusion/PBLModels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel,
while (!above_critical and bx.contains(i,j,kpbl+1)) {
kpbl += 1;
const Real zval = use_terrain ? Compute_Zrel_AtCellCenter(i,j,kpbl,z_nd_arr) : gdata.ProbLo(2) + (kpbl + 0.5)*gdata.CellSize(2);
const Real ws2_level = (uvel(i,j,kpbl)+uvel(i+1,j,kpbl))*(uvel(i,j,kpbl)+uvel(i+1,j,kpbl)) + (vvel(i,j,kpbl)+vvel(i,j+1,kpbl))*(uvel(i,j,kpbl)+uvel(i,j+1,kpbl));
const Real ws2_level = 0.25*((uvel(i,j,kpbl)+uvel(i+1,j,kpbl))*(uvel(i,j,kpbl)+uvel(i+1,j,kpbl)) + (vvel(i,j,kpbl)+vvel(i,j+1,kpbl))*(uvel(i,j,kpbl)+uvel(i,j+1,kpbl)));
const Real theta = cell_data(i,j,kpbl,RhoTheta_comp) / cell_data(i,j,kpbl,Rho_comp);
Rib_dn = Rib_up;
Rib_up = (theta-base_theta)/base_theta * CONST_GRAV * zval / ws2_level;
Expand Down

0 comments on commit 517c13c

Please sign in to comment.