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

use tke_seed_value only when necessary #1307

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions dyn_em/module_diffusion_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -2160,9 +2160,18 @@ SUBROUTINE tke_km( config_flags, xkmh, xkmv, xkhh, xkhv, &
! tke_seed if the drag and flux are off.

c_k = config_flags%c_k
tke_seed = tke_seed_value
if( (config_flags%tke_drag_coefficient .gt. epsilon) .or. &
(config_flags%tke_heat_flux .gt. epsilon) ) tke_seed = 0.
tke_seed = 0.
IF (config_flags%isfflx .eq. 0) THEN
IF ((config_flags%diff_opt .eq. 2) .and. (config_flags%bl_pbl_physics .eq. 0)) THEN
IF( (config_flags%tke_drag_coefficient .lt. epsilon) .and. &
(config_flags%tke_heat_flux .lt. epsilon) ) THEN
tke_seed = tke_seed_value
ENDIF
ELSE
!tke_drag_coefficient and tke_heat_flux are irrelevant here
tke_seed = tke_seed_value
ENDIF
ENDIF

DO j = j_start, j_end
DO k = kts+1, ktf-1
Expand Down
15 changes: 12 additions & 3 deletions wrftladj/module_diffusion_em_ad.F
Original file line number Diff line number Diff line change
Expand Up @@ -6711,11 +6711,20 @@ SUBROUTINE a_tke_km(config_flags,xkmh,a_xkmh,xkmv,a_xkmv,xkhh,a_xkhh,xkhv, &

!LPB[12]
c_k = config_flags%c_k
tke_seed = tke_seed_value
tke_seed = 0.

!LPB[13]
if( (config_flags%tke_drag_coefficient .gt. epsilon) .or. &
(config_flags%tke_heat_flux .gt. epsilon) ) tke_seed = 0.
IF (config_flags%isfflx .eq. 0) THEN
IF ((config_flags%diff_opt .eq. 2) .and. (config_flags%bl_pbl_physics .eq. 0)) THEN
IF( (config_flags%tke_drag_coefficient .lt. epsilon) .and. &
(config_flags%tke_heat_flux .lt. epsilon) ) THEN
tke_seed = tke_seed_value
ENDIF
ELSE
!tke_drag_coefficient and tke_heat_flux are irrelevant here
tke_seed = tke_seed_value
ENDIF
ENDIF

!LPB[14]
DO j = j_start, j_end
Expand Down
17 changes: 13 additions & 4 deletions wrftladj/module_diffusion_em_tl.F
Original file line number Diff line number Diff line change
Expand Up @@ -2645,10 +2645,19 @@ SUBROUTINE g_tke_km(config_flags,xkmh,g_xkmh,xkmv,g_xkmv,xkhh,g_xkhh, &
g_c_k =0.0
c_k =config_flags%c_k

tke_seed =tke_seed_value

if( (config_flags%tke_drag_coefficient .gt. epsilon) .or. &
(config_flags%tke_heat_flux .gt. epsilon) ) tke_seed =0.
tke_seed = 0.

IF (config_flags%isfflx .eq. 0) THEN
IF ((config_flags%diff_opt .eq. 2) .and. (config_flags%bl_pbl_physics .eq. 0)) THEN
IF( (config_flags%tke_drag_coefficient .lt. epsilon) .and. &
(config_flags%tke_heat_flux .lt. epsilon) ) THEN
tke_seed = tke_seed_value
ENDIF
ELSE
!tke_drag_coefficient and tke_heat_flux are irrelevant here
tke_seed = tke_seed_value
ENDIF
ENDIF

DO j =j_start,j_end
DO k =kts+1,ktf-1
Expand Down