1 #ifndef ERF_TURB_STRUCT_H_
2 #define ERF_TURB_STRUCT_H_
4 #include <AMReX_ParallelDescriptor.H>
24 AMREX_ENUM(PBLType,
None, MYJ, MYNN25, MYNNEDMF, YSU, YSUNew, MRF, SHOC, EAMXX_SHOC, NATIVE_SHOC);
44 const amrex::ParmParse&
pp,
45 const char* query_string,
50 int count =
pp.countval(query_string);
53 }
else if (count == 1) {
55 return pp.query(query_string, query_var);
56 }
else if (count >= maxlev + 1) {
60 return pp.query(query_string, query_var, lev);
67 "For parmparse variable " +
pp.prefixedName(query_string) +
68 ": if specified, specify once total or at least once for each level");
86 const amrex::ParmParse&
pp,
87 const char* query_string,
92 int count =
pp.countval(query_string);
95 }
else if (count == 1) {
97 return pp.query_enum_case_insensitive(query_string, query_var);
98 }
else if (count >= maxlev + 1) {
102 return pp.query_enum_case_insensitive(query_string, query_var, lev);
109 "For parmparse variable " +
pp.prefixedName(query_string) +
110 ": if specified, specify once total or at least once for each level");
129 amrex::ParmParse
pp(pp_prefix);
143 if (
les_type == LESType::Smagorinsky2D) {
152 amrex::Error(
"Hybrid RANS-LES not implemented");
158 static bool warned_legacy_shoc =
false;
159 if (!warned_legacy_shoc) {
160 amrex::Warning(
"erf.pbl_type = SHOC is deprecated; use erf.pbl_type = EAMXX_SHOC");
161 warned_legacy_shoc =
true;
170 amrex::Print() <<
"Selected a PBL model and an LES model: "
171 <<
"Using PBL for vertical transport, LES for horizontal"
174 if (
les_type == LESType::Smagorinsky) {
176 amrex::Error(
"If using Smagorinsky with a PBL model, the 2-D "
177 "formulation should be used");
178 }
else if (
les_type == LESType::Deardorff) {
180 "It is not recommended to use Deardorff LES and a PBL model");
186 amrex::Error(
"erf.rans_type = kEqn cannot be combined with erf.pbl_type = " +
187 std::string(amrex::getEnumNameString(
pbl_type)) +
188 ": both transport the turbulent kinetic energy");
195 amrex::Error(
"erf.pbl_mynn_Lt_taper_exp must be >= 0 "
196 "(0 disables the taper)");
221 if (
pp.contains(
"pbl_mynn_diffuse_moistvars")) {
222 amrex::Abort(
"erf.pbl_mynn_diffuse_moistvars has been removed. "
223 "MYNN always diffuses the moisture variables now, as "
224 "MYJ, YSU, MRF and SHOC always have; there is no "
225 "longer a way to turn it off.");
246 pp,
"pbl_ysu_use_consistent_coriolis",
257 if (
pp.contains(
"enable_ysu_liquid_theta")) {
258 amrex::Abort(
"erf.enable_ysu_liquid_theta has been removed. YSU uses "
259 "theta_v (all condensate loading) for the bulk Richardson "
260 "number and clear-sky entrainment, and theta_l (cloud "
261 "liquid and ice) for the cloud-top extension scan and "
262 "cloudy entrainment, as WRF does with thvx and thlix.");
290 if (amrex::ParallelDescriptor::IOProcessor()) {
291 amrex::Print() <<
"WARNING: erf.ysu_rad_tend_limiter_magnitude = "
293 <<
" is not positive; using the default of 1.0 K/s\n";
311 amrex::Error(
"pblh_smoothing_weight must be in [0, 1]");
324 }
else if (
pbl_type == PBLType::MRF) {
376 amrex::Error(
"pblh_smoothing_weight must be in [0, 1]");
380 #ifndef ERF_USE_EAMXX_SHOC
381 amrex::Abort(
"PBLType::EAMXX_SHOC requested, but ERF was not built with ERF_ENABLE_EAMXX_SHOC=ON");
386 std::string zlo_bc =
"none";
387 amrex::ParmParse pp_bc(
"zlo");
388 pp_bc.get(
"type",zlo_bc);
389 if (amrex::toLower(zlo_bc) !=
"surface_layer") {
390 amrex::Abort(
"You must use the surface_layer BC at zlo with the selected PBL.");
421 if (
les_type == LESType::Deardorff) {
428 const bool strat_type_set = (
pp.countval(
"thermal_stratification") > 0);
437 amrex::Print() <<
"PBL thermal stratification variable: "
440 amrex::Print() <<
"Thermal stratification based on gradient of potential temperature" << std::endl;
442 amrex::Print() <<
"Thermal stratification based on gradient of virtual potential temperature" << std::endl;
444 amrex::Print() <<
"Thermal stratification based on gradient of linearized liquid-water potential temperature" << std::endl;
462 amrex::Error(
"erf.rans_realizability must be 0 (off) or in [0.01, 10]; Cmu0^2 = 0.309 is the neutral equilibrium value");
469 amrex::Vector<amrex::Real> all_levels;
470 pp.getarr(
"rans_realizability", all_levels);
472 for (
auto v : all_levels) { uniform = uniform && (v == all_levels[0]); }
474 amrex::Print() <<
"erf.rans_realizability reset to 0 on level " << lev
475 <<
" (no k-eqn closure there)" << std::endl;
478 amrex::Error(
"erf.rans_realizability needs erf.rans_type = kEqn (it caps the k-eqn eddy viscosity; level "
479 + std::to_string(lev) +
")");
486 amrex::Error(
"erf.rans_realizability needs erf.pbl_type = None: a PBL scheme overwrites the vertical "
487 "diffusivities the cap acts on (level " + std::to_string(lev) +
")");
490 amrex::Error(
"erf.rans_lscale_min must be > 0 with erf.rans_lscale_from_pblh");
499 if (!(
Cmu0 > 0)) { amrex::Error(
"erf.Cmu0 must be > 0 for the k-eqn RANS"); }
500 if (!(
Cb > 0)) { amrex::Error(
"erf.Cb must be > 0 for the k-eqn RANS"); }
501 if (!(
l_g_max > 0)) { amrex::Error(
"erf.max_geom_lscale must be > 0 for the k-eqn RANS"); }
502 if (!(
Rt_crit <= 0)) { amrex::Error(
"erf.Rt_crit must be <= 0 for the k-eqn RANS"); }
503 if (!(
Rt_min <
Rt_crit)) { amrex::Error(
"erf.Rt_min must be < erf.Rt_crit for the k-eqn RANS"); }
505 std::ostringstream msg;
507 <<
" for the k-eqn RANS: the momentum stability function cmu has a pole at Rt = -3.5986889850,"
508 <<
" and just below it cmu and the eddy viscosity are negative (level " << lev <<
")";
509 amrex::Error(msg.str());
512 std::ostringstream msg;
514 <<
" for the k-eqn RANS: below it the numerator Cmu0 + 0.108 Rt of cmu is negative;"
515 <<
" raise erf.Cmu0 or erf.Rt_min (level " << lev <<
")";
516 amrex::Error(msg.str());
519 if (
tke_floor < 0) { amrex::Error(
"erf.tke_floor must be >= 0"); }
523 amrex::Print() <<
"Overriding default sigma_k for k-eqn RANS" << std::endl;
548 if (
les_type == LESType::Smagorinsky) {
550 amrex::Error(
"Need to specify Cs for Smagorsinky LES");
553 amrex::Print() <<
"Turning off mix_isotropic for 2-D Smagorinsky" << std::endl;
565 amrex::Error(
"erf.smag2d_kh_cap must be >= 0 (0 = no cap; WRF uses 10 m/s)");
575 amrex::Error(
"erf.smag2d_slope_limiter and erf.smag2d_kh_cap apply only to "
576 "erf.les_type = Smagorinsky2D (level " + std::to_string(lev) +
")");
585 void check_params (amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& phys_bc_type)
589 phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::surface_layer ) {
590 amrex::Abort(
"The selected PBL model requires MOST at lower boundary");
593 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::surface_layer) &&
594 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::slip_wall) &&
595 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::no_slip_wall) )
597 amrex::Warning(
"Deardorff LES assumes wall at zlo when applying Ce_wall");
607 amrex::Print() <<
"Turbulence Settings at level " << lev << std::endl;
612 amrex::Print() <<
" Using DNS model at level " << lev << std::endl;
613 }
else if (
les_type == LESType::Smagorinsky) {
615 amrex::Print() <<
" Using 2D Smagorinsky LES model at level " << lev << std::endl;
617 amrex::Print() <<
" Using Smagorinsky LES model at level " << lev << std::endl;
620 amrex::Print() <<
" Smagorinsky uses Richardson number correction with Ri_crit = "
626 amrex::Print() <<
" K_h cap : " <<
smag2d_kh_cap <<
" * Delta_h" << std::endl;
628 amrex::Print() <<
" K_h cap : none" << std::endl;
631 }
else if (
les_type == LESType::Deardorff) {
632 amrex::Print() <<
" Using Deardorff LES model at level " << lev << std::endl;
633 }
else if (
rans_type == RANSType::kEqn) {
635 <<
" Using Axell & Liungman one-equation RANS k model at level " << lev
637 }
else if (
pbl_type == PBLType::MYJ) {
638 amrex::Print() <<
" Using MYJ PBL model at level " << lev << std::endl;
639 }
else if (
pbl_type == PBLType::MYNN25) {
640 amrex::Print() <<
" Using MYNN2.5 PBL model at level " << lev << std::endl;
641 }
else if (
pbl_type == PBLType::MYNNEDMF) {
642 amrex::Print() <<
" Using MYNNEDMF PBL model at level " << lev << std::endl;
643 }
else if (
pbl_type == PBLType::YSU) {
644 amrex::Print() <<
" Using YSU PBL model at level " << lev << std::endl;
645 }
else if (
pbl_type == PBLType::YSUNew) {
646 amrex::Print() <<
" Using YSU PBL model at level " << lev << std::endl;
647 }
else if (
pbl_type == PBLType::MRF) {
648 amrex::Print() <<
" Using MRF PBL model at level " << lev << std::endl;
649 }
else if (
pbl_type == PBLType::EAMXX_SHOC) {
650 amrex::Print() <<
" Using EAMxx SHOC PBL model at level " << lev << std::endl;
651 }
else if (
pbl_type == PBLType::NATIVE_SHOC) {
652 amrex::Print() <<
" Using native SHOC PBL model at level " << lev << std::endl;
654 amrex::Error(
"Unknown turbulence model");
658 if (
les_type == LESType::Smagorinsky) {
659 amrex::Print() <<
" Cs : " <<
Cs << std::endl;
661 if (
les_type == LESType::Deardorff) {
662 amrex::Print() <<
" Ce : " <<
Ce << std::endl;
663 amrex::Print() <<
" Ce at wall : " <<
Ce_wall << std::endl;
664 amrex::Print() <<
" Ck : " <<
Ck << std::endl;
665 amrex::Print() <<
" sigma_k : " <<
sigma_k << std::endl;
669 amrex::Print() <<
" equivalent Cs : " << Cs_equiv
678 amrex::Print() <<
"Cmu0 : " <<
Cmu0 << std::endl;
679 amrex::Print() <<
"sigma_k : " <<
sigma_k << std::endl;
680 amrex::Print() <<
"Cb : " <<
Cb << std::endl;
681 amrex::Print() <<
"Rt_crit : " <<
Rt_crit << std::endl;
682 amrex::Print() <<
"Rt_min : " <<
Rt_min << std::endl;
683 amrex::Print() <<
"max_geom_lscale : " <<
l_g_max << std::endl;
685 amrex::Print() <<
"dirichlet_k : " <<
dirichlet_k << std::endl;
686 amrex::Print() <<
"tke_floor : " <<
tke_floor << std::endl;
694 if ((
les_type == LESType::Deardorff) ||
697 amrex::Print() <<
" reference theta : " <<
theta_ref << std::endl;
699 amrex::Print() <<
" reference theta : n/a" << std::endl;
704 amrex::Print() <<
" Pr_t : " <<
Pr_t << std::endl;
705 amrex::Print() <<
" Sc_t : " <<
Sc_t << std::endl;
709 amrex::Print() <<
" pbl_mynn_Lt_taper_exp : "
711 amrex::Print() <<
" pbl_mynn_config : "
713 amrex::Print() <<
" pbl_mynn_Lt_alpha : " <<
pbl_mynn.
Lt_alpha << std::endl;
714 amrex::Print() <<
" pbl_mynn_A1 : " <<
pbl_mynn.
A1 << std::endl;
715 amrex::Print() <<
" pbl_mynn_A2 : " <<
pbl_mynn.
A2 << std::endl;
716 amrex::Print() <<
" pbl_mynn_B1 : " <<
pbl_mynn.
B1 << std::endl;
717 amrex::Print() <<
" pbl_mynn_B2 : " <<
pbl_mynn.
B2 << std::endl;
718 amrex::Print() <<
" pbl_mynn_C1 : " <<
pbl_mynn.
C1 << std::endl;
719 amrex::Print() <<
" pbl_mynn_C2 : " <<
pbl_mynn.
C2 << std::endl;
720 amrex::Print() <<
" pbl_mynn_C3 : " <<
pbl_mynn.
C3 << std::endl;
721 amrex::Print() <<
" pbl_mynn_C4 : " <<
pbl_mynn.
C4 << std::endl;
722 amrex::Print() <<
" pbl_mynn_C5 : " <<
pbl_mynn.
C5 << std::endl;
724 amrex::Print() <<
" pbl_ysu_coriolis_freq : "
726 amrex::Print() <<
" pbl_ysu_use_consistent_coriolis : "
728 amrex::Print() <<
" pbl_ysu_force_over_water : "
730 amrex::Print() <<
" pbl_ysu_land_Ribcr : "
732 amrex::Print() <<
" pbl_ysu_unst_Ribcr : "
734 amrex::Print() <<
" enable_ysu_countergradient : "
736 amrex::Print() <<
" enable_ysu_terrain_pblh_floor : "
738 amrex::Print() <<
" enable_ysu_sat_limiter : "
740 amrex::Print() <<
" enable_ysu_topdown : "
742 amrex::Print() <<
" enable_ysu_entrainment : "
744 amrex::Print() <<
" enable_ysu_cloud_pblh : "
746 amrex::Print() <<
" ysu_qcloud_threshold : "
748 amrex::Print() <<
" ysu_moistvars : "
750 amrex::Print() <<
" pbl_ysunew_highres_bounds : "
753 amrex::Print() <<
" enable_ysu_rad_tend_limiter : "
755 amrex::Print() <<
" ysu_rad_tend_limiter_magnitude : "
757 amrex::Print() <<
" enable_vh96_shear_correction : "
759 amrex::Print() <<
" vh96_shear_const_b : "
761 amrex::Print() <<
" enable_pblh_smoothing : "
763 amrex::Print() <<
" pblh_smoothing_passes : "
765 amrex::Print() <<
" pblh_smoothing_weight : "
767 amrex::Print() <<
" enable_mrf_unbounded_vpert : "
769 amrex::Print() <<
" enable_qnse_stable_functions : "
772 amrex::Print() <<
" qnse_am (momentum coeff) : " <<
qnse_am << std::endl;
773 amrex::Print() <<
" qnse_bm (momentum coeff) : " <<
qnse_bm << std::endl;
774 amrex::Print() <<
" qnse_ah (heat coeff) : " <<
qnse_ah << std::endl;
775 amrex::Print() <<
" qnse_bh (heat coeff) : " <<
qnse_bh << std::endl;
777 }
else if (
pbl_type == PBLType::MRF) {
784 amrex::Print() <<
" pbl_mrf_sf : " <<
pbl_mrf_sf
814 amrex::Print() <<
" enable_qnse_stable_functions : "
817 amrex::Print() <<
" qnse_am (momentum coeff) : " <<
qnse_am << std::endl;
818 amrex::Print() <<
" qnse_bm (momentum coeff) : " <<
qnse_bm << std::endl;
819 amrex::Print() <<
" qnse_ah (heat coeff) : " <<
qnse_ah << std::endl;
820 amrex::Print() <<
" qnse_bh (heat coeff) : " <<
qnse_bh << std::endl;
917 return pbl_type == PBLType::EAMXX_SHOC;
926 return pbl_type == PBLType::NATIVE_SHOC;
956 return (
pbl_type == PBLType::MYNN25) ||
constexpr amrex::Real three
Definition: ERF_NumericalConstants.H:39
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real fourth
Definition: ERF_NumericalConstants.H:42
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_ENUM(LESType, None, Smagorinsky, Smagorinsky2D, Deardorff)
Large-eddy simulation closure type.
int query_one_or_per_level_enum_case_insensitive(const amrex::ParmParse &pp, const char *query_string, T &query_var, const int lev, const int maxlev)
Query a scalar or per-level enum input value using case-insensitive matching.
Definition: ERF_TurbStruct.H:85
int query_one_or_per_level(const amrex::ParmParse &pp, const char *query_string, T &query_var, const int lev, const int maxlev)
Query a scalar or per-level input value.
Definition: ERF_TurbStruct.H:43
constexpr amrex::Real Rt_min_lower_bound
Definition: ERF_RANSClosure.H:142
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real cmu_numerator_root(amrex::Real Cmu0)
Definition: ERF_RANSClosure.H:148
@ None
Definition: ERF_LSM_Types.H:6
@ theta
Definition: ERF_Kessler.H:26
@ T
Definition: ERF_IndexDefines.H:168
Coefficients and stability functions for the Level 2.5 MYNN closure.
Definition: ERF_MYNNStruct.H:18
amrex::Real SMmax
Definition: ERF_MYNNStruct.H:65
amrex::Real SHmax
Definition: ERF_MYNNStruct.H:67
amrex::Real Lt_alpha
Definition: ERF_MYNNStruct.H:77
amrex::Real SQfac
Definition: ERF_MYNNStruct.H:61
amrex::Real C4
Definition: ERF_MYNNStruct.H:57
amrex::Real C1
Definition: ERF_MYNNStruct.H:54
MYNNConfigType config
Definition: ERF_MYNNStruct.H:71
amrex::Real C3
Definition: ERF_MYNNStruct.H:56
amrex::Real C2
Definition: ERF_MYNNStruct.H:55
amrex::Real A2
Definition: ERF_MYNNStruct.H:51
amrex::Real SHmin
Definition: ERF_MYNNStruct.H:66
amrex::Real B1
Definition: ERF_MYNNStruct.H:52
amrex::Real Lt_taper_exp
Definition: ERF_MYNNStruct.H:89
amrex::Real B2
Definition: ERF_MYNNStruct.H:53
amrex::Real C5
Definition: ERF_MYNNStruct.H:58
amrex::Real SMmin
Definition: ERF_MYNNStruct.H:64
amrex::Real A1
Definition: ERF_MYNNStruct.H:50
amrex::Real SQmax
Definition: ERF_MYNNStruct.H:69
Coefficients and stability functions for the Level 2 MYNN closure.
Definition: ERF_MYNNStruct.H:95
void init_coeffs(amrex::Real A1_lvl25, amrex::Real A2_lvl25, amrex::Real B1, amrex::Real B2, amrex::Real C1, amrex::Real C2, amrex::Real C3, amrex::Real, amrex::Real C5)
Initialize Level 2 closure coefficients from Level 2.5 coefficients.
Definition: ERF_MYNNStruct.H:107
Definition: ERF_TurbStruct.H:119
bool advect_tke
Whether TKE/QKE is advected.
Definition: ERF_TurbStruct.H:1065
bool pbl_ysu_force_over_water
Whether YSU is forced to use over-water behavior.
Definition: ERF_TurbStruct.H:1001
bool implicit_tke_dissipation
Definition: ERF_TurbStruct.H:888
StratType strat_type
Thermodynamic variable used for stability stratification.
Definition: ERF_TurbStruct.H:866
bool rans_consistent_diffusivities
Definition: ERF_TurbStruct.H:893
amrex::Real Ce
Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:848
bool enable_mrf_unbounded_vpert
Whether MRF leaves VPERT unlimited by GAMCRT.
Definition: ERF_TurbStruct.H:1050
amrex::Real Sc_t
Turbulent Schmidt number.
Definition: ERF_TurbStruct.H:833
MYNNLevel2 pbl_mynn_level2
MYNN level-2 closure coefficients for limiting.
Definition: ERF_TurbStruct.H:974
bool diffuse_tke_3D
Whether three-dimensional numerical diffusion is applied to TKE/QKE.
Definition: ERF_TurbStruct.H:1067
bool use_tke
Whether any TKE or QKE closure is active.
Definition: ERF_TurbStruct.H:983
amrex::Real sigma_k
TKE diffusivity coefficient denominator.
Definition: ERF_TurbStruct.H:861
bool use_Ri_correction
Whether Richardson-number correction is applied.
Definition: ERF_TurbStruct.H:873
bool pbl_ysu_use_consistent_coriolis
Whether YSU uses the ERF Coriolis frequency.
Definition: ERF_TurbStruct.H:998
amrex::Real pbl_blend_length
Boutle blending length L [m]. 0 = off.
Definition: ERF_TurbStruct.H:1041
amrex::Real Ck
Deardorff eddy-viscosity coefficient.
Definition: ERF_TurbStruct.H:850
bool pbl_mrf_use_zero_ri_extent
Whether MRF uses the Ri=0 K-profile extent.
Definition: ERF_TurbStruct.H:1051
amrex::Real Ce_wall
Wall value for the Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:849
amrex::Real qnse_ah
Definition: ERF_TurbStruct.H:1061
RANSType rans_type
Selected RANS closure.
Definition: ERF_TurbStruct.H:877
StratType pbl_strat_type
Definition: ERF_TurbStruct.H:868
void check_params(amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
Validate turbulence options against physical boundary conditions.
Definition: ERF_TurbStruct.H:585
bool enable_vh96_shear_correction
Whether Vogelezang & Holtslag (1996) shear-correction term is enabled.
Definition: ERF_TurbStruct.H:1028
amrex::Real theta_ref
Reference potential temperature for stable stratification.
Definition: ERF_TurbStruct.H:864
amrex::Real Sc_t_inv
Inverse turbulent Schmidt number.
Definition: ERF_TurbStruct.H:834
amrex::Real l_g_max
Maximum geometric length scale.
Definition: ERF_TurbStruct.H:857
bool enable_mrf_cloud_adjustment
Whether MRF cloud-aware stability adjustments are enabled.
Definition: ERF_TurbStruct.H:1048
bool use_keqn
Whether a microscale TKE closure is active.
Definition: ERF_TurbStruct.H:978
bool uses_eamxx_shoc() const noexcept
Query whether this level uses the EAMxx SHOC PBL scheme.
Definition: ERF_TurbStruct.H:915
bool enable_ysu_entrainment
Whether YSU entrainment-layer parameterization is enabled.
Definition: ERF_TurbStruct.H:1016
bool enable_ysu_sat_limiter
Whether YSU applies a saturation limiter to moisture countergradient terms.
Definition: ERF_TurbStruct.H:1012
bool enable_ysu_cloud_pblh
Whether YSU cloud-based PBL-height detection is enabled.
Definition: ERF_TurbStruct.H:1018
amrex::Real pbl_mrf_const_b
MRF constant used to compute PBL height.
Definition: ERF_TurbStruct.H:1036
amrex::Real pblh_smoothing_weight
Center-cell weight in PBLH smoothing stencil (must be in [0,1]).
Definition: ERF_TurbStruct.H:1032
amrex::Real pbl_blend_cs
Smagorinsky coeff for K_h ceiling.
Definition: ERF_TurbStruct.H:1042
amrex::Real tke_floor
Definition: ERF_TurbStruct.H:884
bool uses_shoc_family() const noexcept
Query whether this level uses any SHOC-family PBL scheme.
Definition: ERF_TurbStruct.H:933
amrex::Real ysu_qcloud_threshold
Cloud liquid water threshold for YSUNew [kg/kg].
Definition: ERF_TurbStruct.H:1020
amrex::Real qnse_bm
Definition: ERF_TurbStruct.H:1060
amrex::Real pbl_blend_c_max
Power-law ceiling coeff [m^(2/3)/s].
Definition: ERF_TurbStruct.H:1043
bool init_tke_from_ustar
Whether initial TKE/QKE profiles are based on surface friction velocity.
Definition: ERF_TurbStruct.H:988
amrex::Real qnse_bh
Definition: ERF_TurbStruct.H:1062
bool enable_qnse_stable_functions
Definition: ERF_TurbStruct.H:1057
bool enable_mrf_countergradient
Whether MRF countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:1045
bool enable_ysu_countergradient
Whether YSU countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:1008
bool mix_isotropic
Whether subgrid mixing uses isotropic length scales.
Definition: ERF_TurbStruct.H:871
bool enable_pblh_smoothing
Whether spatial smoothing of diagnosed PBLH is enabled.
Definition: ERF_TurbStruct.H:1030
bool uses_native_shoc() const noexcept
Query whether this level uses the native SHOC PBL scheme.
Definition: ERF_TurbStruct.H:924
amrex::Real smag2d_kh_cap
Cap K_h <= smag2d_kh_cap * Delta_h for Smagorinsky-2D (m/s); 0 means no cap.
Definition: ERF_TurbStruct.H:842
bool kh_kv_can_differ() const noexcept
Query whether the horizontal and vertical eddy viscosities can differ on this level.
Definition: ERF_TurbStruct.H:943
bool dirichlet_k
Whether TKE uses Dirichlet boundary treatment.
Definition: ERF_TurbStruct.H:879
int pblh_smoothing_passes
Number of PBLH smoothing iterations to apply.
Definition: ERF_TurbStruct.H:1031
LESType les_type
Selected LES closure.
Definition: ERF_TurbStruct.H:826
amrex::Real rans_realizability
Definition: ERF_TurbStruct.H:906
void init_params(int lev, int max_level, std::string pp_prefix)
Read turbulence options for one AMR level from the input parameter database.
Definition: ERF_TurbStruct.H:127
amrex::Real pbl_ib_z0
Definition: ERF_TurbStruct.H:1047
bool enable_ysu_topdown
Whether YSU top-down mixing is enabled.
Definition: ERF_TurbStruct.H:1014
bool rans_lscale_from_pblh
Definition: ERF_TurbStruct.H:898
bool pbl_ib_aware
Definition: ERF_TurbStruct.H:1046
amrex::Real ysu_rad_tend_limiter_magnitude
Definition: ERF_TurbStruct.H:1026
amrex::Real rans_lscale_min
Definition: ERF_TurbStruct.H:899
bool pbl_mrf_highres_bounds
Whether MRF applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:1049
amrex::Real Rt_min
Minimum turbulent Reynolds number.
Definition: ERF_TurbStruct.H:856
bool pbl_blend_use_smag
Use Smagorinsky ceiling (else power-law).
Definition: ERF_TurbStruct.H:1044
MYNNLevel25 pbl_mynn
MYNN level-2.5 closure coefficients.
Definition: ERF_TurbStruct.H:973
amrex::Real pbl_ysu_land_Ribcr
Critical bulk Richardson number over land for stable YSU conditions.
Definition: ERF_TurbStruct.H:1004
amrex::Real Cb
One-equation RANS buoyancy coefficient.
Definition: ERF_TurbStruct.H:854
amrex::Real Ri_crit
Critical Richardson number for stability correction.
Definition: ERF_TurbStruct.H:874
amrex::Real pbl_ysu_unst_Ribcr
Critical bulk Richardson number for unstable YSU conditions.
Definition: ERF_TurbStruct.H:1006
amrex::Real Rt_crit
Critical turbulent Reynolds number.
Definition: ERF_TurbStruct.H:855
amrex::Real vh96_shear_const_b
Vogelezang & Holtslag (1996) shear-correction constant b.
Definition: ERF_TurbStruct.H:1029
bool smag2d_limits_requested
Whether either Smagorinsky-2D limit was given as on for this level.
Definition: ERF_TurbStruct.H:845
bool pbl_suppresses_microphysics_condensation() const noexcept
Query whether the selected PBL scheme suppresses microphysics condensation.
Definition: ERF_TurbStruct.H:968
amrex::Real pbl_mrf_Ribcr
Critical bulk Richardson number for the MRF PBL scheme.
Definition: ERF_TurbStruct.H:1035
amrex::Real qnse_am
Definition: ERF_TurbStruct.H:1059
amrex::Real pbl_mrf_sf
MRF surface flux value used to compute PBL height.
Definition: ERF_TurbStruct.H:1037
amrex::Real Cmu0
One-equation RANS Cmu0 coefficient.
Definition: ERF_TurbStruct.H:853
amrex::Real Cs
Smagorinsky model coefficient.
Definition: ERF_TurbStruct.H:837
amrex::Real Pr_t
Turbulent Prandtl number.
Definition: ERF_TurbStruct.H:829
bool smag2d_slope_limiter
Apply WRF's Smagorinsky-2D slope limiter (K_h / alpha or / alpha^2) on terrain-fitted meshes.
Definition: ERF_TurbStruct.H:841
amrex::Real pbl_mrf_coriolis_freq
Coriolis frequency used by the MRF PBL scheme.
Definition: ERF_TurbStruct.H:1034
bool pbl_ysunew_highres_bounds
Whether YSUNew applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:1023
amrex::Real tke_min
Minimum TKE/QKE value.
Definition: ERF_TurbStruct.H:991
amrex::Real pbl_ysu_coriolis_freq
Coriolis frequency used by YSU-family PBL schemes.
Definition: ERF_TurbStruct.H:995
void display(int lev)
Print turbulence settings for one AMR level.
Definition: ERF_TurbStruct.H:605
bool use_kturb
Whether any turbulence model is active.
Definition: ERF_TurbStruct.H:977
bool ysu_moistvars
Whether YSU applies turbulence to moisture variables.
Definition: ERF_TurbStruct.H:1022
PBLType pbl_type
Selected PBL closure.
Definition: ERF_TurbStruct.H:909
amrex::Real Pr_t_inv
Inverse turbulent Prandtl number.
Definition: ERF_TurbStruct.H:830
bool enable_ysu_terrain_pblh_floor
Whether YSU applies a terrain-following PBL-height floor.
Definition: ERF_TurbStruct.H:1010
bool smag2d
Whether the 2-D Smagorinsky formulation is used.
Definition: ERF_TurbStruct.H:838
bool enable_ysu_rad_tend_limiter
Definition: ERF_TurbStruct.H:1025
bool pbl_requires_surface_layer() const noexcept
Query whether the selected PBL scheme requires surface-layer boundary conditions.
Definition: ERF_TurbStruct.H:954
bool use_pbl_tke
Whether a mesoscale PBL TKE closure is active.
Definition: ERF_TurbStruct.H:981