Skip to content

Commit 73fce27

Browse files
authored
Initialize shear squared and Richardson number to zeroes outside of turbulence region in the HB PBL scheme (ESCOMP#314)
Originator(s): @jimmielin @peverwhee Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number): - Proposed fix for ESCOMP/CAM-SIMA#429 List all namelist files that were added or changed: N/A List all files eliminated and why: N/A List all files added and what they do: N/A List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) ``` M schemes/holtslag_boville/holtslag_boville_diff.F90 - fix initialization outside of turbulence region for s2, ri ``` List all automated tests that failed, as well as an explanation for why they weren't fixed: Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc? Uninitialized regions in HB_ri should now be zeroes If yes to the above question, describe how this code was validated with the new/modified features: - create test `SMS_D_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hb_vdiff_derecho` run twice to check consistency - observe outside of turbulence region (basically just at `pver`) that values are now correctly zero vs. garbage
1 parent 72632b9 commit 73fce27

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

schemes/holtslag_boville/holtslag_boville_diff.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ pure subroutine hb_pbl_independent_coefficients_run( &
214214
kbfs(:ncol) = calc_kinematic_buoyancy_flux(khfs(:ncol), zvir, th(:ncol,pver), kqfs(:ncol))
215215
obklen(:ncol) = calc_obukhov_length(thv(:ncol,pver), ustar(:ncol), gravit, karman, kbfs(:ncol))
216216

217+
! Initialize output arrays outside of turbulence region to zeroes
218+
s2(:,:) = 0._kind_phys
219+
ri(:,:) = 0._kind_phys
220+
217221
! Compute s^2 (shear squared), n^2 (brunt vaisaila frequency), and ri (Richardson number = n^2/s^2)
218222
! using virtual temperature
219223
! (formerly trbintd)

0 commit comments

Comments
 (0)