1 #ifndef ERF_TURB_STRUCT_H_
2 #define ERF_TURB_STRUCT_H_
4 #include <AMReX_ParallelDescriptor.H>
20 AMREX_ENUM(PBLType,
None, MYJ, MYNN25, MYNNEDMF, YSU, YSUNew, MRF, SHOC, EAMXX_SHOC, NATIVE_SHOC);
40 const amrex::ParmParse&
pp,
41 const char* query_string,
46 int count =
pp.countval(query_string);
49 }
else if (count == 1) {
51 return pp.query(query_string, query_var);
52 }
else if (count >= maxlev + 1) {
56 return pp.query(query_string, query_var, lev);
63 "For parmparse variable " +
pp.prefixedName(query_string) +
64 ": if specified, specify once total or at least once for each level");
82 const amrex::ParmParse&
pp,
83 const char* query_string,
88 int count =
pp.countval(query_string);
91 }
else if (count == 1) {
93 return pp.query_enum_case_insensitive(query_string, query_var);
94 }
else if (count >= maxlev + 1) {
98 return pp.query_enum_case_insensitive(query_string, query_var, lev);
105 "For parmparse variable " +
pp.prefixedName(query_string) +
106 ": if specified, specify once total or at least once for each level");
125 amrex::ParmParse
pp(pp_prefix);
139 if (
les_type == LESType::Smagorinsky2D) {
148 amrex::Error(
"Hybrid RANS-LES not implemented");
154 static bool warned_legacy_shoc =
false;
155 if (!warned_legacy_shoc) {
156 amrex::Warning(
"erf.pbl_type = SHOC is deprecated; use erf.pbl_type = EAMXX_SHOC");
157 warned_legacy_shoc =
true;
166 amrex::Print() <<
"Selected a PBL model and an LES model: "
167 <<
"Using PBL for vertical transport, LES for horizontal"
170 if (
les_type == LESType::Smagorinsky) {
172 amrex::Error(
"If using Smagorinsky with a PBL model, the 2-D "
173 "formulation should be used");
174 }
else if (
les_type == LESType::Deardorff) {
176 "It is not recommended to use Deardorff LES and a PBL model");
182 amrex::Error(
"erf.rans_type = kEqn cannot be combined with erf.pbl_type = " +
183 std::string(amrex::getEnumNameString(
pbl_type)) +
184 ": both transport the turbulent kinetic energy");
191 amrex::Error(
"erf.pbl_mynn_Lt_taper_exp must be >= 0 "
192 "(0 disables the taper)");
217 if (
pp.contains(
"pbl_mynn_diffuse_moistvars")) {
218 amrex::Abort(
"erf.pbl_mynn_diffuse_moistvars has been removed. "
219 "MYNN always diffuses the moisture variables now, as "
220 "MYJ, YSU, MRF and SHOC always have; there is no "
221 "longer a way to turn it off.");
242 pp,
"pbl_ysu_use_consistent_coriolis",
279 if (amrex::ParallelDescriptor::IOProcessor()) {
280 amrex::Print() <<
"WARNING: erf.ysu_rad_tend_limiter_magnitude = "
282 <<
" is not positive; using the default of 1.0 K/s\n";
300 amrex::Error(
"pblh_smoothing_weight must be in [0, 1]");
313 }
else if (
pbl_type == PBLType::MRF) {
365 amrex::Error(
"pblh_smoothing_weight must be in [0, 1]");
367 }
else if (
pbl_type == PBLType::SHOC) {
369 amrex::Abort(
"You set use_shoc to true but didn't build with SHOC; you must rebuild the executable");
373 #ifndef ERF_USE_EAMXX_SHOC
374 amrex::Abort(
"PBLType::EAMXX_SHOC requested, but ERF was not built with ERF_ENABLE_EAMXX_SHOC=ON");
379 std::string zlo_bc =
"none";
380 amrex::ParmParse pp_bc(
"zlo");
381 pp_bc.get(
"type",zlo_bc);
382 if (amrex::toLower(zlo_bc) !=
"surface_layer") {
383 amrex::Abort(
"You must use the surface_layer BC at zlo with the selected PBL.");
414 if (
les_type == LESType::Deardorff) {
421 const bool strat_type_set = (
pp.countval(
"thermal_stratification") > 0);
430 amrex::Print() <<
"PBL thermal stratification variable: "
433 amrex::Print() <<
"Thermal stratification based on gradient of potential temperature" << std::endl;
435 amrex::Print() <<
"Thermal stratification based on gradient of virtual potential temperature" << std::endl;
437 amrex::Print() <<
"Thermal stratification based on gradient of linearized liquid-water potential temperature" << std::endl;
453 amrex::Error(
"erf.rans_lscale_min must be > 0 with erf.rans_lscale_from_pblh");
460 if (!(
Cmu0 > 0)) { amrex::Error(
"erf.Cmu0 must be > 0 for the k-eqn RANS"); }
461 if (!(
Cb > 0)) { amrex::Error(
"erf.Cb must be > 0 for the k-eqn RANS"); }
462 if (!(
l_g_max > 0)) { amrex::Error(
"erf.max_geom_lscale must be > 0 for the k-eqn RANS"); }
463 if (!(
Rt_crit <= 0)) { amrex::Error(
"erf.Rt_crit must be <= 0 for the k-eqn RANS"); }
464 if (!(
Rt_min <
Rt_crit)) { amrex::Error(
"erf.Rt_min must be < erf.Rt_crit for the k-eqn RANS"); }
466 amrex::Error(
"erf.Rt_min must be > -3.6 for the k-eqn RANS (stability functions have poles near -3.61)");
469 if (
tke_floor < 0) { amrex::Error(
"erf.tke_floor must be >= 0"); }
473 amrex::Print() <<
"Overriding default sigma_k for k-eqn RANS" << std::endl;
498 if (
les_type == LESType::Smagorinsky) {
500 amrex::Error(
"Need to specify Cs for Smagorsinky LES");
503 amrex::Print() <<
"Turning off mix_isotropic for 2-D Smagorinsky" << std::endl;
515 amrex::Error(
"erf.smag2d_kh_cap must be >= 0 (0 = no cap; WRF uses 10 m/s)");
525 amrex::Error(
"erf.smag2d_slope_limiter and erf.smag2d_kh_cap apply only to "
526 "erf.les_type = Smagorinsky2D (level " + std::to_string(lev) +
")");
535 void check_params (amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& phys_bc_type)
539 phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::surface_layer ) {
540 amrex::Abort(
"The selected PBL model requires MOST at lower boundary");
543 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::surface_layer) &&
544 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::slip_wall) &&
545 (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] !=
ERF_BC::no_slip_wall) )
547 amrex::Warning(
"Deardorff LES assumes wall at zlo when applying Ce_wall");
557 amrex::Print() <<
"Turbulence Settings at level " << lev << std::endl;
562 amrex::Print() <<
" Using DNS model at level " << lev << std::endl;
563 }
else if (
les_type == LESType::Smagorinsky) {
565 amrex::Print() <<
" Using 2D Smagorinsky LES model at level " << lev << std::endl;
567 amrex::Print() <<
" Using Smagorinsky LES model at level " << lev << std::endl;
570 amrex::Print() <<
" Smagorinsky uses Richardson number correction with Ri_crit = "
576 amrex::Print() <<
" K_h cap : " <<
smag2d_kh_cap <<
" * Delta_h" << std::endl;
578 amrex::Print() <<
" K_h cap : none" << std::endl;
581 }
else if (
les_type == LESType::Deardorff) {
582 amrex::Print() <<
" Using Deardorff LES model at level " << lev << std::endl;
583 }
else if (
rans_type == RANSType::kEqn) {
585 <<
" Using Axell & Liungman one-equation RANS k model at level " << lev
587 }
else if (
pbl_type == PBLType::MYJ) {
588 amrex::Print() <<
" Using MYJ PBL model at level " << lev << std::endl;
589 }
else if (
pbl_type == PBLType::MYNN25) {
590 amrex::Print() <<
" Using MYNN2.5 PBL model at level " << lev << std::endl;
591 }
else if (
pbl_type == PBLType::MYNNEDMF) {
592 amrex::Print() <<
" Using MYNNEDMF PBL model at level " << lev << std::endl;
593 }
else if (
pbl_type == PBLType::YSU) {
594 amrex::Print() <<
" Using YSU PBL model at level " << lev << std::endl;
595 }
else if (
pbl_type == PBLType::YSUNew) {
596 amrex::Print() <<
" Using YSU PBL model at level " << lev << std::endl;
597 }
else if (
pbl_type == PBLType::MRF) {
598 amrex::Print() <<
" Using MRF PBL model at level " << lev << std::endl;
599 }
else if (
pbl_type == PBLType::EAMXX_SHOC) {
600 amrex::Print() <<
" Using EAMxx SHOC PBL model at level " << lev << std::endl;
601 }
else if (
pbl_type == PBLType::NATIVE_SHOC) {
602 amrex::Print() <<
" Using native SHOC PBL model at level " << lev << std::endl;
604 amrex::Error(
"Unknown turbulence model");
608 if (
les_type == LESType::Smagorinsky) {
609 amrex::Print() <<
" Cs : " <<
Cs << std::endl;
611 if (
les_type == LESType::Deardorff) {
612 amrex::Print() <<
" Ce : " <<
Ce << std::endl;
613 amrex::Print() <<
" Ce at wall : " <<
Ce_wall << std::endl;
614 amrex::Print() <<
" Ck : " <<
Ck << std::endl;
615 amrex::Print() <<
" sigma_k : " <<
sigma_k << std::endl;
619 amrex::Print() <<
" equivalent Cs : " << Cs_equiv
628 amrex::Print() <<
"Cmu0 : " <<
Cmu0 << std::endl;
629 amrex::Print() <<
"sigma_k : " <<
sigma_k << std::endl;
630 amrex::Print() <<
"Cb : " <<
Cb << std::endl;
631 amrex::Print() <<
"Rt_crit : " <<
Rt_crit << std::endl;
632 amrex::Print() <<
"Rt_min : " <<
Rt_min << std::endl;
633 amrex::Print() <<
"max_geom_lscale : " <<
l_g_max << std::endl;
634 amrex::Print() <<
"dirichlet_k : " <<
dirichlet_k << std::endl;
635 amrex::Print() <<
"tke_floor : " <<
tke_floor << std::endl;
643 if ((
les_type == LESType::Deardorff) ||
646 amrex::Print() <<
" reference theta : " <<
theta_ref << std::endl;
648 amrex::Print() <<
" reference theta : n/a" << std::endl;
653 amrex::Print() <<
" Pr_t : " <<
Pr_t << std::endl;
654 amrex::Print() <<
" Sc_t : " <<
Sc_t << std::endl;
658 amrex::Print() <<
" pbl_mynn_Lt_taper_exp : "
660 amrex::Print() <<
" pbl_mynn_config : "
662 amrex::Print() <<
" pbl_mynn_Lt_alpha : " <<
pbl_mynn.
Lt_alpha << std::endl;
663 amrex::Print() <<
" pbl_mynn_A1 : " <<
pbl_mynn.
A1 << std::endl;
664 amrex::Print() <<
" pbl_mynn_A2 : " <<
pbl_mynn.
A2 << std::endl;
665 amrex::Print() <<
" pbl_mynn_B1 : " <<
pbl_mynn.
B1 << std::endl;
666 amrex::Print() <<
" pbl_mynn_B2 : " <<
pbl_mynn.
B2 << std::endl;
667 amrex::Print() <<
" pbl_mynn_C1 : " <<
pbl_mynn.
C1 << std::endl;
668 amrex::Print() <<
" pbl_mynn_C2 : " <<
pbl_mynn.
C2 << std::endl;
669 amrex::Print() <<
" pbl_mynn_C3 : " <<
pbl_mynn.
C3 << std::endl;
670 amrex::Print() <<
" pbl_mynn_C4 : " <<
pbl_mynn.
C4 << std::endl;
671 amrex::Print() <<
" pbl_mynn_C5 : " <<
pbl_mynn.
C5 << std::endl;
673 amrex::Print() <<
" pbl_ysu_coriolis_freq : "
675 amrex::Print() <<
" pbl_ysu_use_consistent_coriolis : "
677 amrex::Print() <<
" pbl_ysu_force_over_water : "
679 amrex::Print() <<
" pbl_ysu_land_Ribcr : "
681 amrex::Print() <<
" pbl_ysu_unst_Ribcr : "
683 amrex::Print() <<
" enable_ysu_liquid_theta : "
685 amrex::Print() <<
" enable_ysu_countergradient : "
687 amrex::Print() <<
" enable_ysu_terrain_pblh_floor : "
689 amrex::Print() <<
" enable_ysu_sat_limiter : "
691 amrex::Print() <<
" enable_ysu_topdown : "
693 amrex::Print() <<
" enable_ysu_entrainment : "
695 amrex::Print() <<
" enable_ysu_cloud_pblh : "
697 amrex::Print() <<
" ysu_qcloud_threshold : "
699 amrex::Print() <<
" ysu_moistvars : "
701 amrex::Print() <<
" pbl_ysunew_highres_bounds : "
704 amrex::Print() <<
" enable_ysu_rad_tend_limiter : "
706 amrex::Print() <<
" ysu_rad_tend_limiter_magnitude : "
708 amrex::Print() <<
" enable_vh96_shear_correction : "
710 amrex::Print() <<
" vh96_shear_const_b : "
712 amrex::Print() <<
" enable_pblh_smoothing : "
714 amrex::Print() <<
" pblh_smoothing_passes : "
716 amrex::Print() <<
" pblh_smoothing_weight : "
718 amrex::Print() <<
" enable_mrf_unbounded_vpert : "
720 amrex::Print() <<
" enable_qnse_stable_functions : "
723 amrex::Print() <<
" qnse_am (momentum coeff) : " <<
qnse_am << std::endl;
724 amrex::Print() <<
" qnse_bm (momentum coeff) : " <<
qnse_bm << std::endl;
725 amrex::Print() <<
" qnse_ah (heat coeff) : " <<
qnse_ah << std::endl;
726 amrex::Print() <<
" qnse_bh (heat coeff) : " <<
qnse_bh << std::endl;
728 }
else if (
pbl_type == PBLType::MRF) {
735 amrex::Print() <<
" pbl_mrf_sf : " <<
pbl_mrf_sf
765 amrex::Print() <<
" enable_qnse_stable_functions : "
768 amrex::Print() <<
" qnse_am (momentum coeff) : " <<
qnse_am << std::endl;
769 amrex::Print() <<
" qnse_bm (momentum coeff) : " <<
qnse_bm << std::endl;
770 amrex::Print() <<
" qnse_ah (heat coeff) : " <<
qnse_ah << std::endl;
771 amrex::Print() <<
" qnse_bh (heat coeff) : " <<
qnse_bh << std::endl;
861 return pbl_type == PBLType::EAMXX_SHOC;
870 return pbl_type == PBLType::NATIVE_SHOC;
900 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:81
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:39
@ None
Definition: ERF_LSM_Types.H:6
@ theta
Definition: ERF_Kessler.H:26
@ T
Definition: ERF_IndexDefines.H:131
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:115
bool advect_tke
Whether TKE/QKE is advected.
Definition: ERF_TurbStruct.H:1011
bool pbl_ysu_force_over_water
Whether YSU is forced to use over-water behavior.
Definition: ERF_TurbStruct.H:945
bool implicit_tke_dissipation
Definition: ERF_TurbStruct.H:839
StratType strat_type
Thermodynamic variable used for stability stratification.
Definition: ERF_TurbStruct.H:817
bool rans_consistent_diffusivities
Definition: ERF_TurbStruct.H:844
amrex::Real Ce
Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:799
bool enable_mrf_unbounded_vpert
Whether MRF leaves VPERT unlimited by GAMCRT.
Definition: ERF_TurbStruct.H:996
amrex::Real Sc_t
Turbulent Schmidt number.
Definition: ERF_TurbStruct.H:784
MYNNLevel2 pbl_mynn_level2
MYNN level-2 closure coefficients for limiting.
Definition: ERF_TurbStruct.H:918
bool diffuse_tke_3D
Whether three-dimensional numerical diffusion is applied to TKE/QKE.
Definition: ERF_TurbStruct.H:1013
bool use_tke
Whether any TKE or QKE closure is active.
Definition: ERF_TurbStruct.H:927
amrex::Real sigma_k
TKE diffusivity coefficient denominator.
Definition: ERF_TurbStruct.H:812
bool use_Ri_correction
Whether Richardson-number correction is applied.
Definition: ERF_TurbStruct.H:824
bool pbl_ysu_use_consistent_coriolis
Whether YSU uses the ERF Coriolis frequency.
Definition: ERF_TurbStruct.H:942
amrex::Real pbl_blend_length
Boutle blending length L [m]. 0 = off.
Definition: ERF_TurbStruct.H:987
amrex::Real Ck
Deardorff eddy-viscosity coefficient.
Definition: ERF_TurbStruct.H:801
bool pbl_mrf_use_zero_ri_extent
Whether MRF uses the Ri=0 K-profile extent.
Definition: ERF_TurbStruct.H:997
amrex::Real Ce_wall
Wall value for the Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:800
amrex::Real qnse_ah
Definition: ERF_TurbStruct.H:1007
RANSType rans_type
Selected RANS closure.
Definition: ERF_TurbStruct.H:828
StratType pbl_strat_type
Definition: ERF_TurbStruct.H:819
void check_params(amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
Validate turbulence options against physical boundary conditions.
Definition: ERF_TurbStruct.H:535
bool enable_vh96_shear_correction
Whether Vogelezang & Holtslag (1996) shear-correction term is enabled.
Definition: ERF_TurbStruct.H:974
amrex::Real theta_ref
Reference potential temperature for stable stratification.
Definition: ERF_TurbStruct.H:815
amrex::Real Sc_t_inv
Inverse turbulent Schmidt number.
Definition: ERF_TurbStruct.H:785
amrex::Real l_g_max
Maximum geometric length scale.
Definition: ERF_TurbStruct.H:808
bool enable_mrf_cloud_adjustment
Whether MRF cloud-aware stability adjustments are enabled.
Definition: ERF_TurbStruct.H:994
bool use_keqn
Whether a microscale TKE closure is active.
Definition: ERF_TurbStruct.H:922
bool uses_eamxx_shoc() const noexcept
Query whether this level uses the EAMxx SHOC PBL scheme.
Definition: ERF_TurbStruct.H:859
bool enable_ysu_entrainment
Whether YSU entrainment-layer parameterization is enabled.
Definition: ERF_TurbStruct.H:962
bool enable_ysu_sat_limiter
Whether YSU applies a saturation limiter to moisture countergradient terms.
Definition: ERF_TurbStruct.H:958
bool enable_ysu_cloud_pblh
Whether YSU cloud-based PBL-height detection is enabled.
Definition: ERF_TurbStruct.H:964
amrex::Real pbl_mrf_const_b
MRF constant used to compute PBL height.
Definition: ERF_TurbStruct.H:982
amrex::Real pblh_smoothing_weight
Center-cell weight in PBLH smoothing stencil (must be in [0,1]).
Definition: ERF_TurbStruct.H:978
amrex::Real pbl_blend_cs
Smagorinsky coeff for K_h ceiling.
Definition: ERF_TurbStruct.H:988
amrex::Real tke_floor
Definition: ERF_TurbStruct.H:835
bool uses_shoc_family() const noexcept
Query whether this level uses any SHOC-family PBL scheme.
Definition: ERF_TurbStruct.H:877
amrex::Real ysu_qcloud_threshold
Cloud liquid water threshold for YSUNew [kg/kg].
Definition: ERF_TurbStruct.H:966
amrex::Real qnse_bm
Definition: ERF_TurbStruct.H:1006
amrex::Real pbl_blend_c_max
Power-law ceiling coeff [m^(2/3)/s].
Definition: ERF_TurbStruct.H:989
bool init_tke_from_ustar
Whether initial TKE/QKE profiles are based on surface friction velocity.
Definition: ERF_TurbStruct.H:932
amrex::Real qnse_bh
Definition: ERF_TurbStruct.H:1008
bool enable_qnse_stable_functions
Definition: ERF_TurbStruct.H:1003
bool enable_mrf_countergradient
Whether MRF countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:991
bool enable_ysu_countergradient
Whether YSU countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:954
bool mix_isotropic
Whether subgrid mixing uses isotropic length scales.
Definition: ERF_TurbStruct.H:822
bool enable_pblh_smoothing
Whether spatial smoothing of diagnosed PBLH is enabled.
Definition: ERF_TurbStruct.H:976
bool uses_native_shoc() const noexcept
Query whether this level uses the native SHOC PBL scheme.
Definition: ERF_TurbStruct.H:868
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:793
bool kh_kv_can_differ() const noexcept
Query whether the horizontal and vertical eddy viscosities can differ on this level.
Definition: ERF_TurbStruct.H:887
bool dirichlet_k
Whether TKE uses Dirichlet boundary treatment.
Definition: ERF_TurbStruct.H:830
int pblh_smoothing_passes
Number of PBLH smoothing iterations to apply.
Definition: ERF_TurbStruct.H:977
LESType les_type
Selected LES closure.
Definition: ERF_TurbStruct.H:777
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:123
amrex::Real pbl_ib_z0
Definition: ERF_TurbStruct.H:993
bool enable_ysu_topdown
Whether YSU top-down mixing is enabled.
Definition: ERF_TurbStruct.H:960
bool rans_lscale_from_pblh
Definition: ERF_TurbStruct.H:849
bool pbl_ib_aware
Definition: ERF_TurbStruct.H:992
amrex::Real ysu_rad_tend_limiter_magnitude
Definition: ERF_TurbStruct.H:972
amrex::Real rans_lscale_min
Definition: ERF_TurbStruct.H:850
bool pbl_mrf_highres_bounds
Whether MRF applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:995
amrex::Real Rt_min
Minimum turbulent Reynolds number.
Definition: ERF_TurbStruct.H:807
bool pbl_blend_use_smag
Use Smagorinsky ceiling (else power-law).
Definition: ERF_TurbStruct.H:990
MYNNLevel25 pbl_mynn
MYNN level-2.5 closure coefficients.
Definition: ERF_TurbStruct.H:917
amrex::Real pbl_ysu_land_Ribcr
Critical bulk Richardson number over land for stable YSU conditions.
Definition: ERF_TurbStruct.H:948
amrex::Real Cb
One-equation RANS buoyancy coefficient.
Definition: ERF_TurbStruct.H:805
amrex::Real Ri_crit
Critical Richardson number for stability correction.
Definition: ERF_TurbStruct.H:825
amrex::Real pbl_ysu_unst_Ribcr
Critical bulk Richardson number for unstable YSU conditions.
Definition: ERF_TurbStruct.H:950
amrex::Real Rt_crit
Critical turbulent Reynolds number.
Definition: ERF_TurbStruct.H:806
amrex::Real vh96_shear_const_b
Vogelezang & Holtslag (1996) shear-correction constant b.
Definition: ERF_TurbStruct.H:975
bool smag2d_limits_requested
Whether either Smagorinsky-2D limit was given as on for this level.
Definition: ERF_TurbStruct.H:796
bool pbl_suppresses_microphysics_condensation() const noexcept
Query whether the selected PBL scheme suppresses microphysics condensation.
Definition: ERF_TurbStruct.H:912
amrex::Real pbl_mrf_Ribcr
Critical bulk Richardson number for the MRF PBL scheme.
Definition: ERF_TurbStruct.H:981
amrex::Real qnse_am
Definition: ERF_TurbStruct.H:1005
amrex::Real pbl_mrf_sf
MRF surface flux value used to compute PBL height.
Definition: ERF_TurbStruct.H:983
amrex::Real Cmu0
One-equation RANS Cmu0 coefficient.
Definition: ERF_TurbStruct.H:804
amrex::Real Cs
Smagorinsky model coefficient.
Definition: ERF_TurbStruct.H:788
amrex::Real Pr_t
Turbulent Prandtl number.
Definition: ERF_TurbStruct.H:780
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:792
amrex::Real pbl_mrf_coriolis_freq
Coriolis frequency used by the MRF PBL scheme.
Definition: ERF_TurbStruct.H:980
bool pbl_ysunew_highres_bounds
Whether YSUNew applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:969
amrex::Real tke_min
Minimum TKE/QKE value.
Definition: ERF_TurbStruct.H:935
amrex::Real pbl_ysu_coriolis_freq
Coriolis frequency used by YSU-family PBL schemes.
Definition: ERF_TurbStruct.H:939
void display(int lev)
Print turbulence settings for one AMR level.
Definition: ERF_TurbStruct.H:555
bool use_kturb
Whether any turbulence model is active.
Definition: ERF_TurbStruct.H:921
bool ysu_moistvars
Whether YSU applies turbulence to moisture variables.
Definition: ERF_TurbStruct.H:968
PBLType pbl_type
Selected PBL closure.
Definition: ERF_TurbStruct.H:853
amrex::Real Pr_t_inv
Inverse turbulent Prandtl number.
Definition: ERF_TurbStruct.H:781
bool enable_ysu_terrain_pblh_floor
Whether YSU applies a terrain-following PBL-height floor.
Definition: ERF_TurbStruct.H:956
bool enable_ysu_liquid_theta
Whether YSU uses liquid-water virtual potential temperature for stability.
Definition: ERF_TurbStruct.H:952
bool smag2d
Whether the 2-D Smagorinsky formulation is used.
Definition: ERF_TurbStruct.H:789
bool enable_ysu_rad_tend_limiter
Definition: ERF_TurbStruct.H:971
bool pbl_requires_surface_layer() const noexcept
Query whether the selected PBL scheme requires surface-layer boundary conditions.
Definition: ERF_TurbStruct.H:898
bool use_pbl_tke
Whether a mesoscale PBL TKE closure is active.
Definition: ERF_TurbStruct.H:925