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

Conversation

matzegoebel
Copy link
Contributor

@matzegoebel matzegoebel commented Oct 29, 2020

TYPE: bug fix

KEYWORDS: tke, isfflx, tke_heat_flux, tke_drag_coefficient, tke_seed

SOURCE: Matthias Göbel (University of Innsbruck)

DESCRIPTION OF CHANGES:
Problem:
The tke seed value is used in the absence of surface drag or a surface heat flux, since there is no way to generate tke without pre-existing tke. So far the usage of the seed value is only tied to the namelist variables tke_drag_coefficient and tke_heat_flux being greater than 0. However, these namelist variables are only applied if no PBL scheme is used, diff_opt=2, and isfflx=0.

If a PBL scheme is used or diff_opt=1, then isfflx=0 is a sufficient condition to get zero fluxes (see also technical notes).

Solution:
Fixed the if statements to enforce a correct setting of the tke seed value that fits to the purpose of the seed.

LIST OF MODIFIED FILES:
dyn_em/module_diffusion_em.F
wrftladj/module_diffusion_em_ad.F
wrftladj/module_diffusion_em_tl.F

TESTS CONDUCTED:

  1. Jenkins testing is all pass.

RELEASE NOTE: corrected the tke seed value to be non-zero if and only if the surface heat and momentum fluxes are zero depending on isfflx, diff_opt, and bl_pbl_physics

@dudhia
Copy link
Collaborator

dudhia commented Oct 29, 2020

I would note that diff_opt=1 would not be a normal choice without a PBL because its vertical diffusion is fixed and would not use tke. Even mixing the tke scheme with a PBL scheme is a little hard to justify.

@matzegoebel
Copy link
Contributor Author

You're definitely right on the first one. The diff_opt condition is only there for completeness, because diff_opt=1 + km_opt=2 is in principle allowed. Mixing a PBL scheme with a TKE based scheme for horizontal diffusion, on the other hand, is used in a number of studies. Whether that's appropriate is a different question.
Anyway, this code modification just aims at finding out whether the surface fluxes are zero, in which case you need a tke seed value, or not. I don't know if the seed does any harm, but in case you use an LES with isfflx=1 or 2, you don't need any seed, no matter the values of tke_heat_flux or tke_drag_coefficient. In case you use a PBL scheme and isfflx=0, on the other hand, you do need a seed, no matter the values of tke_heat_flux or tke_drag_coefficient. Or am I mistaken?

@weiwangncar
Copy link
Collaborator

@dudhia Can I say this for a release message:
Corrected the tke seed value to be non-zero for km_opt 2 and 5 if and only if the surface heat and momentum fluxes are zero depending on isfflx, diff_opt, and bl_pbl_physics.

@dudhia
Copy link
Collaborator

dudhia commented Dec 29, 2020 via email

@weiwangncar weiwangncar merged commit e5755c1 into wrf-model:release-v4.2.2 Dec 29, 2020
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
)

TYPE: bug fix

KEYWORDS: tke, isfflx, tke_heat_flux, tke_drag_coefficient, tke_seed

SOURCE: Matthias Göbel (University of Innsbruck)

DESCRIPTION OF CHANGES:
Problem:
The tke seed value is used in the absence of surface drag or a surface heat flux, since there is no way to generate tke without pre-existing tke. So far the usage of the seed value is only tied to the namelist variables tke_drag_coefficient and tke_heat_flux being greater than 0. However, these namelist variables are only applied if no PBL scheme is used, diff_opt=2, and isfflx=0.

If a PBL scheme is used or diff_opt=1, then isfflx=0 is a sufficient condition to get zero fluxes (see also technical notes).

Solution:
Fixed the if statements to enforce a correct setting of the tke seed value that fits to the purpose of the seed.

LIST OF MODIFIED FILES:
dyn_em/module_diffusion_em.F
wrftladj/module_diffusion_em_ad.F
wrftladj/module_diffusion_em_tl.F

TESTS CONDUCTED:
Jenkins testing is all pass.

RELEASE NOTE: Corrected the tke seed value for km_opt 2 and 5 to be non-zero if and only if the surface heat and momentum fluxes are zero depending on isfflx, diff_opt, and bl_pbl_physics (Thanks to Matthias Göbel of University of Innsbruck).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants