ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TurbChoice Struct Reference

#include <ERF_TurbStruct.H>

Collaboration diagram for TurbChoice:

Public Member Functions

void init_params (int lev, int max_level, std::string pp_prefix)
 Read turbulence options for one AMR level from the input parameter database. More...
 
void check_params (amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
 Validate turbulence options against physical boundary conditions. More...
 
void display (int lev)
 Print turbulence settings for one AMR level. More...
 
bool uses_eamxx_shoc () const noexcept
 Query whether this level uses the EAMxx SHOC PBL scheme. More...
 
bool uses_native_shoc () const noexcept
 Query whether this level uses the native SHOC PBL scheme. More...
 
bool uses_shoc_family () const noexcept
 Query whether this level uses any SHOC-family PBL scheme. More...
 
bool pbl_requires_surface_layer () const noexcept
 Query whether the selected PBL scheme requires surface-layer boundary conditions. More...
 
bool pbl_suppresses_microphysics_condensation () const noexcept
 Query whether the selected PBL scheme suppresses microphysics condensation. More...
 

Public Attributes

LESType les_type = LESType::None
 Selected LES closure. More...
 
amrex::Real Pr_t = one / three
 Turbulent Prandtl number. More...
 
amrex::Real Pr_t_inv = three
 Inverse turbulent Prandtl number. More...
 
amrex::Real Sc_t = one
 Turbulent Schmidt number. More...
 
amrex::Real Sc_t_inv = one
 Inverse turbulent Schmidt number. More...
 
amrex::Real Cs = zero
 Smagorinsky model coefficient. More...
 
bool smag2d = false
 Whether the 2-D Smagorinsky formulation is used. More...
 
amrex::Real Ce = amrex::Real(0.93)
 Deardorff dissipation coefficient. More...
 
amrex::Real Ce_wall = zero
 Wall value for the Deardorff dissipation coefficient. More...
 
amrex::Real Ck = amrex::Real(0.1)
 Deardorff eddy-viscosity coefficient. More...
 
amrex::Real Cmu0 = amrex::Real(0.5562)
 One-equation RANS Cmu0 coefficient. More...
 
amrex::Real Cb = amrex::Real(0.35)
 One-equation RANS buoyancy coefficient. More...
 
amrex::Real Rt_crit = -one
 Critical turbulent Reynolds number. More...
 
amrex::Real Rt_min = -three
 Minimum turbulent Reynolds number. More...
 
amrex::Real l_g_max = amrex::Real(30.0)
 Maximum geometric length scale. More...
 
amrex::Real sigma_k = amrex::Real(0.5)
 TKE diffusivity coefficient denominator. More...
 
amrex::Real theta_ref = zero
 Reference potential temperature for stable stratification. More...
 
StratType strat_type = StratType::theta
 Thermodynamic variable used for stability stratification. More...
 
bool mix_isotropic = true
 Whether subgrid mixing uses isotropic length scales. More...
 
bool use_Ri_correction = true
 Whether Richardson-number correction is applied. More...
 
amrex::Real Ri_crit = fourth
 Critical Richardson number for stability correction. More...
 
RANSType rans_type = RANSType::None
 Selected RANS closure. More...
 
bool dirichlet_k = false
 Whether TKE uses Dirichlet boundary treatment. More...
 
PBLType pbl_type = PBLType::None
 Selected PBL closure. More...
 
MYNNLevel25 pbl_mynn
 MYNN level-2.5 closure coefficients. More...
 
MYNNLevel2 pbl_mynn_level2
 MYNN level-2 closure coefficients for limiting. More...
 
bool use_kturb = false
 Whether any turbulence model is active. More...
 
bool use_keqn
 Whether a microscale TKE closure is active. More...
 
bool use_pbl_tke
 Whether a mesoscale PBL TKE closure is active. More...
 
bool use_tke = false
 Whether any TKE or QKE closure is active. More...
 
bool init_tke_from_ustar = false
 Whether initial TKE/QKE profiles are based on surface friction velocity. More...
 
amrex::Real tke_min = amrex::Real(1.e-6)
 Minimum TKE/QKE value. More...
 
amrex::Real pbl_ysu_coriolis_freq
 Coriolis frequency used by YSU-family PBL schemes. More...
 
bool pbl_ysu_use_consistent_coriolis
 Whether YSU uses the ERF Coriolis frequency. More...
 
bool pbl_ysu_force_over_water
 Whether YSU is forced to use over-water behavior. More...
 
amrex::Real pbl_ysu_land_Ribcr
 Critical bulk Richardson number over land for stable YSU conditions. More...
 
amrex::Real pbl_ysu_unst_Ribcr
 Critical bulk Richardson number for unstable YSU conditions. More...
 
bool enable_ysu_liquid_theta
 Whether YSU uses liquid-water virtual potential temperature for stability. More...
 
bool enable_ysu_countergradient
 Whether YSU countergradient corrections are enabled. More...
 
bool enable_ysu_terrain_pblh_floor
 Whether YSU applies a terrain-following PBL-height floor. More...
 
bool enable_ysu_sat_limiter
 Whether YSU applies a saturation limiter to moisture countergradient terms. More...
 
bool enable_ysu_topdown
 Whether YSU top-down mixing is enabled. More...
 
bool enable_ysu_entrainment
 Whether YSU entrainment-layer parameterization is enabled. More...
 
bool enable_ysu_cloud_pblh
 Whether YSU cloud-based PBL-height detection is enabled. More...
 
amrex::Real ysu_qcloud_threshold
 Cloud liquid water threshold for YSUNew [kg/kg]. More...
 
bool ysu_moistvars = false
 Whether YSU applies turbulence to moisture variables. More...
 
bool pbl_ysunew_highres_bounds = false
 Whether YSUNew applies high-resolution grid-dependent diffusivity bounds. More...
 
amrex::Real pbl_mrf_coriolis_freq = amrex::Real(1.0e-4)
 Coriolis frequency used by the MRF PBL scheme. More...
 
amrex::Real pbl_mrf_Ribcr = amrex::Real(0.5)
 Critical bulk Richardson number for the MRF PBL scheme. More...
 
amrex::Real pbl_mrf_const_b = amrex::Real(7.8)
 MRF constant used to compute PBL height. More...
 
amrex::Real pbl_mrf_sf = amrex::Real(0.1)
 MRF surface flux value used to compute PBL height. More...
 
amrex::Real pbl_blend_length = amrex::Real(0.0)
 Boutle blending length L [m]. 0 = off. More...
 
amrex::Real pbl_blend_cs = amrex::Real(0.17)
 Smagorinsky coeff for K_h ceiling. More...
 
amrex::Real pbl_blend_c_max = amrex::Real(0.1)
 Power-law ceiling coeff [m^(2/3)/s]. More...
 
bool pbl_blend_use_smag = true
 Use Smagorinsky ceiling (else power-law). More...
 
bool mrf_moistvars = false
 Whether MRF applies turbulence to moisture variables. More...
 
bool enable_mrf_countergradient = false
 Whether MRF countergradient corrections are enabled. More...
 
bool enable_mrf_cloud_adjustment = false
 Whether MRF cloud-aware stability adjustments are enabled. More...
 
bool pbl_mrf_highres_bounds = false
 Whether MRF applies high-resolution grid-dependent diffusivity bounds. More...
 
bool enable_mrf_unbounded_vpert = false
 Whether MRF leaves VPERT unlimited by GAMCRT. More...
 
bool pbl_mrf_use_zero_ri_extent = false
 Whether MRF uses the Ri=0 K-profile extent. More...
 
bool advect_tke = true
 Whether TKE/QKE is advected. More...
 
bool diffuse_tke_3D = true
 Whether three-dimensional numerical diffusion is applied to TKE/QKE. More...
 

Detailed Description

Container holding quantities related to turbulence parametrizations

Member Function Documentation

◆ check_params()

void TurbChoice::check_params ( amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &  phys_bc_type)
inline

Validate turbulence options against physical boundary conditions.

Parameters
phys_bc_typePhysical boundary-condition types.
374  {
375  // BC compatibility
377  phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::surface_layer ) {
378  amrex::Abort("The selected PBL model requires MOST at lower boundary");
379  }
380  if ( (les_type == LESType::Deardorff) && (Ce_wall > 0) &&
381  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::surface_layer) &&
382  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::slip_wall) &&
383  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::no_slip_wall) )
384  {
385  amrex::Warning("Deardorff LES assumes wall at zlo when applying Ce_wall");
386  }
387  }
@ no_slip_wall
@ surface_layer
amrex::Real Ce_wall
Wall value for the Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:573
LESType les_type
Selected LES closure.
Definition: ERF_TurbStruct.H:557
bool pbl_requires_surface_layer() const noexcept
Query whether the selected PBL scheme requires surface-layer boundary conditions.
Definition: ERF_TurbStruct.H:637
Here is the call graph for this function:

◆ display()

void TurbChoice::display ( int  lev)
inline

Print turbulence settings for one AMR level.

Parameters
levAMR level index.
394  {
395  amrex::Print() << "Turbulence Settings at level " << lev << std::endl;
396 
397  if (
398  les_type == LESType::None && rans_type == RANSType::None &&
399  pbl_type == PBLType::None) {
400  amrex::Print() << " Using DNS model at level " << lev << std::endl;
401  } else if (les_type == LESType::Smagorinsky) {
402  if (smag2d) {
403  amrex::Print() << " Using 2D Smagorinsky LES model at level " << lev << std::endl;
404  } else {
405  amrex::Print() << " Using Smagorinsky LES model at level " << lev << std::endl;
406  }
407  if (use_Ri_correction) {
408  amrex::Print() << " Smagorinsky uses Richardson number correction with Ri_crit = "
409  << Ri_crit << std::endl;
410  }
411  } else if (les_type == LESType::Deardorff) {
412  amrex::Print() << " Using Deardorff LES model at level " << lev << std::endl;
413  } else if (rans_type == RANSType::kEqn) {
414  amrex::Print()
415  << " Using Axell & Liungman one-equation RANS k model at level " << lev
416  << std::endl;
417  } else if (pbl_type == PBLType::MYJ) {
418  amrex::Print() << " Using MYJ PBL model at level " << lev << std::endl;
419  } else if (pbl_type == PBLType::MYNN25) {
420  amrex::Print() << " Using MYNN2.5 PBL model at level " << lev << std::endl;
421  } else if (pbl_type == PBLType::MYNNEDMF) {
422  amrex::Print() << " Using MYNNEDMF PBL model at level " << lev << std::endl;
423  } else if (pbl_type == PBLType::YSU) {
424  amrex::Print() << " Using YSU PBL model at level " << lev << std::endl;
425  } else if (pbl_type == PBLType::YSUNew) {
426  amrex::Print() << " Using YSU PBL model at level " << lev << std::endl;
427  } else if (pbl_type == PBLType::MRF) {
428  amrex::Print() << " Using MRF PBL model at level " << lev << std::endl;
429  } else if (pbl_type == PBLType::EAMXX_SHOC) {
430  amrex::Print() << " Using EAMxx SHOC PBL model at level " << lev << std::endl;
431  } else if (pbl_type == PBLType::NATIVE_SHOC) {
432  amrex::Print() << " Using native SHOC PBL model at level " << lev << std::endl;
433  } else {
434  amrex::Error("Unknown turbulence model");
435  }
436 
437  if (les_type != LESType::None) {
438  if (les_type == LESType::Smagorinsky) {
439  amrex::Print() << " Cs : " << Cs << std::endl;
440  }
441  if (les_type == LESType::Deardorff) {
442  amrex::Print() << " Ce : " << Ce << std::endl;
443  amrex::Print() << " Ce at wall : " << Ce_wall << std::endl;
444  amrex::Print() << " Ck : " << Ck << std::endl;
445  amrex::Print() << " sigma_k : " << sigma_k << std::endl;
446 
447  // Sullivan et al 1994, Eqn 14
448  amrex::Real Cs_equiv = std::sqrt(Ck * std::sqrt(Ck / Ce));
449  amrex::Print() << " equivalent Cs : " << Cs_equiv
450  << std::endl;
451  }
452  amrex::Print() << " isotropic mixing : " << mix_isotropic
453  << std::endl;
454  }
455 
456  if (rans_type != RANSType::None) {
457  if (rans_type == RANSType::kEqn) {
458  amrex::Print() << "Cmu0 : " << Cmu0 << std::endl;
459  amrex::Print() << "sigma_k : " << sigma_k << std::endl;
460  amrex::Print() << "Cb : " << Cb << std::endl;
461  amrex::Print() << "Rt_crit : " << Rt_crit << std::endl;
462  amrex::Print() << "Rt_min : " << Rt_min << std::endl;
463  amrex::Print() << "max_geom_lscale : " << l_g_max << std::endl;
464  }
465  }
466 
467  if ((les_type == LESType::Deardorff) ||
468  (rans_type == RANSType::kEqn)) {
469  if (theta_ref > 0) {
470  amrex::Print() << " reference theta : " << theta_ref << std::endl;
471  } else {
472  amrex::Print() << " reference theta : n/a" << std::endl;
473  }
474  }
475 
476  if ((les_type != LESType::None) || (rans_type != RANSType::None)) {
477  amrex::Print() << " Pr_t : " << Pr_t << std::endl;
478  amrex::Print() << " Sc_t : " << Sc_t << std::endl;
479  }
480 
481  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
482  amrex::Print() << " pbl_mynn_A1 : " << pbl_mynn.A1 << std::endl;
483  amrex::Print() << " pbl_mynn_A2 : " << pbl_mynn.A2 << std::endl;
484  amrex::Print() << " pbl_mynn_B1 : " << pbl_mynn.B1 << std::endl;
485  amrex::Print() << " pbl_mynn_B2 : " << pbl_mynn.B2 << std::endl;
486  amrex::Print() << " pbl_mynn_C1 : " << pbl_mynn.C1 << std::endl;
487  amrex::Print() << " pbl_mynn_C2 : " << pbl_mynn.C2 << std::endl;
488  amrex::Print() << " pbl_mynn_C3 : " << pbl_mynn.C3 << std::endl;
489  amrex::Print() << " pbl_mynn_C4 : " << pbl_mynn.C4 << std::endl;
490  amrex::Print() << " pbl_mynn_C5 : " << pbl_mynn.C5 << std::endl;
491  } else if (pbl_type == PBLType::YSU || pbl_type == PBLType::YSUNew) {
492  amrex::Print() << " pbl_ysu_coriolis_freq : "
493  << pbl_ysu_coriolis_freq << std::endl;
494  amrex::Print() << " pbl_ysu_use_consistent_coriolis : "
495  << pbl_ysu_use_consistent_coriolis << std::endl;
496  amrex::Print() << " pbl_ysu_force_over_water : "
497  << pbl_ysu_force_over_water << std::endl;
498  amrex::Print() << " pbl_ysu_land_Ribcr : "
499  << pbl_ysu_land_Ribcr << std::endl;
500  amrex::Print() << " pbl_ysu_unst_Ribcr : "
501  << pbl_ysu_unst_Ribcr << std::endl;
502  amrex::Print() << " enable_ysu_liquid_theta : "
503  << enable_ysu_liquid_theta << std::endl;
504  amrex::Print() << " enable_ysu_countergradient : "
505  << enable_ysu_countergradient << std::endl;
506  amrex::Print() << " enable_ysu_terrain_pblh_floor : "
507  << enable_ysu_terrain_pblh_floor << std::endl;
508  amrex::Print() << " enable_ysu_sat_limiter : "
509  << enable_ysu_sat_limiter << std::endl;
510  amrex::Print() << " enable_ysu_topdown : "
511  << enable_ysu_topdown << std::endl;
512  amrex::Print() << " enable_ysu_entrainment : "
513  << enable_ysu_entrainment << std::endl;
514  amrex::Print() << " enable_ysu_cloud_pblh : "
515  << enable_ysu_cloud_pblh << std::endl;
516  amrex::Print() << " ysu_qcloud_threshold : "
517  << ysu_qcloud_threshold << std::endl;
518  amrex::Print() << " ysu_moistvars : "
519  << ysu_moistvars << std::endl;
520  amrex::Print() << " pbl_ysunew_highres_bounds : "
521  << pbl_ysunew_highres_bounds << std::endl;
522  amrex::Print() << " enable_mrf_unbounded_vpert : "
523  << enable_mrf_unbounded_vpert << std::endl;
524  } else if (pbl_type == PBLType::MRF) {
525  amrex::Print() << " pbl_mrf_coriolis_freq : " << pbl_mrf_coriolis_freq
526  << std::endl;
527  amrex::Print() << " pbl_mrf_Ribcr : " << pbl_mrf_Ribcr
528  << std::endl;
529  amrex::Print() << " pbl_mrf_const_b : " << pbl_mrf_const_b
530  << std::endl;
531  amrex::Print() << " pbl_mrf_sf : " << pbl_mrf_sf
532  << std::endl;
533  amrex::Print() << " mrf_moistvars : " << mrf_moistvars
534  << std::endl;
535  amrex::Print() << " enable_mrf_countergradient : " << enable_mrf_countergradient
536  << std::endl;
537  amrex::Print() << " enable_mrf_cloud_adjustment : " << enable_mrf_cloud_adjustment
538  << std::endl;
539  amrex::Print() << " pbl_mrf_highres_bounds : " << pbl_mrf_highres_bounds
540  << std::endl;
541  amrex::Print() << " enable_mrf_unbounded_vpert : " << enable_mrf_unbounded_vpert
542  << std::endl;
543  amrex::Print() << " pbl_mrf_use_zero_ri_extent : " << pbl_mrf_use_zero_ri_extent
544  << std::endl;
545  amrex::Print() << " pbl_blend_length : " << pbl_blend_length
546  << std::endl;
547  amrex::Print() << " pbl_blend_cs : " << pbl_blend_cs
548  << std::endl;
549  amrex::Print() << " pbl_blend_c_max : " << pbl_blend_c_max
550  << std::endl;
551  amrex::Print() << " pbl_blend_use_smag : " << pbl_blend_use_smag
552  << std::endl;
553  }
554  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19
amrex::Real C4
Definition: ERF_MYNNStruct.H:50
amrex::Real C1
Definition: ERF_MYNNStruct.H:47
amrex::Real C3
Definition: ERF_MYNNStruct.H:49
amrex::Real C2
Definition: ERF_MYNNStruct.H:48
amrex::Real A2
Definition: ERF_MYNNStruct.H:44
amrex::Real B1
Definition: ERF_MYNNStruct.H:45
amrex::Real B2
Definition: ERF_MYNNStruct.H:46
amrex::Real C5
Definition: ERF_MYNNStruct.H:51
amrex::Real A1
Definition: ERF_MYNNStruct.H:43
bool pbl_ysu_force_over_water
Whether YSU is forced to use over-water behavior.
Definition: ERF_TurbStruct.H:684
amrex::Real Ce
Deardorff dissipation coefficient.
Definition: ERF_TurbStruct.H:572
bool enable_mrf_unbounded_vpert
Whether MRF leaves VPERT unlimited by GAMCRT.
Definition: ERF_TurbStruct.H:725
amrex::Real Sc_t
Turbulent Schmidt number.
Definition: ERF_TurbStruct.H:564
amrex::Real sigma_k
TKE diffusivity coefficient denominator.
Definition: ERF_TurbStruct.H:585
bool use_Ri_correction
Whether Richardson-number correction is applied.
Definition: ERF_TurbStruct.H:595
bool pbl_ysu_use_consistent_coriolis
Whether YSU uses the ERF Coriolis frequency.
Definition: ERF_TurbStruct.H:681
amrex::Real pbl_blend_length
Boutle blending length L [m]. 0 = off.
Definition: ERF_TurbStruct.H:717
amrex::Real Ck
Deardorff eddy-viscosity coefficient.
Definition: ERF_TurbStruct.H:574
bool pbl_mrf_use_zero_ri_extent
Whether MRF uses the Ri=0 K-profile extent.
Definition: ERF_TurbStruct.H:726
RANSType rans_type
Selected RANS closure.
Definition: ERF_TurbStruct.H:599
amrex::Real theta_ref
Reference potential temperature for stable stratification.
Definition: ERF_TurbStruct.H:588
amrex::Real l_g_max
Maximum geometric length scale.
Definition: ERF_TurbStruct.H:581
bool enable_mrf_cloud_adjustment
Whether MRF cloud-aware stability adjustments are enabled.
Definition: ERF_TurbStruct.H:723
bool enable_ysu_entrainment
Whether YSU entrainment-layer parameterization is enabled.
Definition: ERF_TurbStruct.H:701
bool enable_ysu_sat_limiter
Whether YSU applies a saturation limiter to moisture countergradient terms.
Definition: ERF_TurbStruct.H:697
bool enable_ysu_cloud_pblh
Whether YSU cloud-based PBL-height detection is enabled.
Definition: ERF_TurbStruct.H:703
amrex::Real pbl_mrf_const_b
MRF constant used to compute PBL height.
Definition: ERF_TurbStruct.H:712
bool mrf_moistvars
Whether MRF applies turbulence to moisture variables.
Definition: ERF_TurbStruct.H:721
amrex::Real pbl_blend_cs
Smagorinsky coeff for K_h ceiling.
Definition: ERF_TurbStruct.H:718
amrex::Real ysu_qcloud_threshold
Cloud liquid water threshold for YSUNew [kg/kg].
Definition: ERF_TurbStruct.H:705
amrex::Real pbl_blend_c_max
Power-law ceiling coeff [m^(2/3)/s].
Definition: ERF_TurbStruct.H:719
bool enable_mrf_countergradient
Whether MRF countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:722
bool enable_ysu_countergradient
Whether YSU countergradient corrections are enabled.
Definition: ERF_TurbStruct.H:693
bool mix_isotropic
Whether subgrid mixing uses isotropic length scales.
Definition: ERF_TurbStruct.H:593
bool enable_ysu_topdown
Whether YSU top-down mixing is enabled.
Definition: ERF_TurbStruct.H:699
bool pbl_mrf_highres_bounds
Whether MRF applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:724
amrex::Real Rt_min
Minimum turbulent Reynolds number.
Definition: ERF_TurbStruct.H:580
bool pbl_blend_use_smag
Use Smagorinsky ceiling (else power-law).
Definition: ERF_TurbStruct.H:720
MYNNLevel25 pbl_mynn
MYNN level-2.5 closure coefficients.
Definition: ERF_TurbStruct.H:656
amrex::Real pbl_ysu_land_Ribcr
Critical bulk Richardson number over land for stable YSU conditions.
Definition: ERF_TurbStruct.H:687
amrex::Real Cb
One-equation RANS buoyancy coefficient.
Definition: ERF_TurbStruct.H:578
amrex::Real Ri_crit
Critical Richardson number for stability correction.
Definition: ERF_TurbStruct.H:596
amrex::Real pbl_ysu_unst_Ribcr
Critical bulk Richardson number for unstable YSU conditions.
Definition: ERF_TurbStruct.H:689
amrex::Real Rt_crit
Critical turbulent Reynolds number.
Definition: ERF_TurbStruct.H:579
amrex::Real pbl_mrf_Ribcr
Critical bulk Richardson number for the MRF PBL scheme.
Definition: ERF_TurbStruct.H:711
amrex::Real pbl_mrf_sf
MRF surface flux value used to compute PBL height.
Definition: ERF_TurbStruct.H:713
amrex::Real Cmu0
One-equation RANS Cmu0 coefficient.
Definition: ERF_TurbStruct.H:577
amrex::Real Cs
Smagorinsky model coefficient.
Definition: ERF_TurbStruct.H:568
amrex::Real Pr_t
Turbulent Prandtl number.
Definition: ERF_TurbStruct.H:560
amrex::Real pbl_mrf_coriolis_freq
Coriolis frequency used by the MRF PBL scheme.
Definition: ERF_TurbStruct.H:710
bool pbl_ysunew_highres_bounds
Whether YSUNew applies high-resolution grid-dependent diffusivity bounds.
Definition: ERF_TurbStruct.H:708
amrex::Real pbl_ysu_coriolis_freq
Coriolis frequency used by YSU-family PBL schemes.
Definition: ERF_TurbStruct.H:678
bool ysu_moistvars
Whether YSU applies turbulence to moisture variables.
Definition: ERF_TurbStruct.H:707
PBLType pbl_type
Selected PBL closure.
Definition: ERF_TurbStruct.H:604
bool enable_ysu_terrain_pblh_floor
Whether YSU applies a terrain-following PBL-height floor.
Definition: ERF_TurbStruct.H:695
bool enable_ysu_liquid_theta
Whether YSU uses liquid-water virtual potential temperature for stability.
Definition: ERF_TurbStruct.H:691
bool smag2d
Whether the 2-D Smagorinsky formulation is used.
Definition: ERF_TurbStruct.H:569

◆ init_params()

void TurbChoice::init_params ( int  lev,
int  max_level,
std::string  pp_prefix 
)
inline

Read turbulence options for one AMR level from the input parameter database.

Parameters
levAMR level index.
max_levelMaximum AMR level configured for the run.
pp_prefixParmParse prefix for the ERF input namespace.
123  {
124  amrex::ParmParse pp(pp_prefix);
125 
126  // Which LES closure?
127  query_one_or_per_level(pp, "les_type", les_type, lev, max_level);
128 
129  // Handle 2-D Smag
130  if (les_type == LESType::Smagorinsky2D) {
131  les_type = LESType::Smagorinsky;
132  smag2d = true;
133  }
134 
135  // Which RANS closure?
136  query_one_or_per_level(pp, "rans_type", rans_type, lev, max_level);
137 
138  if ((rans_type != RANSType::None) && (les_type != LESType::None)) {
139  amrex::Error("Hybrid RANS-LES not implemented");
140  }
141 
142  // Which PBL Closure
143  query_one_or_per_level_enum_case_insensitive(pp, "pbl_type", pbl_type, lev, max_level);
144  if (pbl_type == PBLType::SHOC) {
145  static bool warned_legacy_shoc = false;
146  if (!warned_legacy_shoc) {
147  amrex::Warning("erf.pbl_type = SHOC is deprecated; use erf.pbl_type = EAMXX_SHOC");
148  warned_legacy_shoc = true;
149  }
150  pbl_type = PBLType::EAMXX_SHOC;
151  }
152 
153  // Do some more stuff for PBL Modeling
154  if (pbl_type != PBLType::None) {
155  // Check for compatibility between PBL, LES, Molec Transport
156  if (les_type != LESType::None) {
157  amrex::Print() << "Selected a PBL model and an LES model: "
158  << "Using PBL for vertical transport, LES for horizontal"
159  << std::endl;
160  }
161  if (les_type == LESType::Smagorinsky) {
162  if (!smag2d)
163  amrex::Error("If using Smagorinsky with a PBL model, the 2-D "
164  "formulation should be used");
165  } else if (les_type == LESType::Deardorff) {
166  amrex::Error(
167  "It is not recommended to use Deardorff LES and a PBL model");
168  }
169 
170  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
171  query_one_or_per_level(pp, "pbl_mynn_A1", pbl_mynn.A1, lev, max_level);
172  query_one_or_per_level(pp, "pbl_mynn_A2", pbl_mynn.A2, lev, max_level);
173  query_one_or_per_level(pp, "pbl_mynn_B1", pbl_mynn.B1, lev, max_level);
174  query_one_or_per_level(pp, "pbl_mynn_B2", pbl_mynn.B2, lev, max_level);
175  query_one_or_per_level(pp, "pbl_mynn_C1", pbl_mynn.C1, lev, max_level);
176  query_one_or_per_level(pp, "pbl_mynn_C2", pbl_mynn.C2, lev, max_level);
177  query_one_or_per_level(pp, "pbl_mynn_C3", pbl_mynn.C3, lev, max_level);
178  query_one_or_per_level(pp, "pbl_mynn_C4", pbl_mynn.C4, lev, max_level);
179  query_one_or_per_level(pp, "pbl_mynn_C5", pbl_mynn.C5, lev, max_level);
184  pp, "pbl_mynn_diffuse_moistvars", pbl_mynn.diffuse_moistvars, lev,
185  max_level);
187  pp, "pbl_mynn_SMmin", pbl_mynn.SMmin, lev, max_level);
189  pp, "pbl_mynn_SMmax", pbl_mynn.SMmax, lev, max_level);
191  pp, "pbl_mynn_SHmin", pbl_mynn.SHmin, lev, max_level);
193  pp, "pbl_mynn_SHmax", pbl_mynn.SHmax, lev, max_level);
195  pp, "pbl_mynn_SQfactor", pbl_mynn.SQfac, lev, max_level);
196  } else if (pbl_type == PBLType::YSU || pbl_type == PBLType::YSUNew) {
198  pp, "pbl_ysu_coriolis_freq", pbl_ysu_coriolis_freq, lev, max_level);
200  pp, "pbl_ysu_use_consistent_coriolis",
201  pbl_ysu_use_consistent_coriolis, lev, max_level);
203  pp, "pbl_ysu_force_over_water", pbl_ysu_force_over_water, lev,
204  max_level);
206  pp, "pbl_ysu_land_Ribcr", pbl_ysu_land_Ribcr, lev, max_level);
208  pp, "pbl_ysu_unst_Ribcr", pbl_ysu_unst_Ribcr, lev, max_level);
210  pp, "enable_ysu_liquid_theta", enable_ysu_liquid_theta, lev, max_level);
212  pp, "enable_ysu_countergradient", enable_ysu_countergradient, lev, max_level);
214  pp, "enable_ysu_terrain_pblh_floor", enable_ysu_terrain_pblh_floor, lev, max_level);
216  pp, "enable_ysu_sat_limiter", enable_ysu_sat_limiter, lev, max_level);
218  pp, "enable_ysu_topdown", enable_ysu_topdown, lev, max_level);
220  pp, "enable_ysu_entrainment", enable_ysu_entrainment, lev, max_level);
222  pp, "enable_ysu_cloud_pblh", enable_ysu_cloud_pblh, lev, max_level);
224  pp, "enable_mrf_unbounded_vpert", enable_mrf_unbounded_vpert, lev, max_level);
226  pp, "ysu_qcloud_threshold", ysu_qcloud_threshold, lev, max_level);
228  pp, "ysu_moistvars", ysu_moistvars, lev, max_level);
230  pp, "pbl_ysunew_highres_bounds", pbl_ysunew_highres_bounds, lev, max_level);
231  } else if (pbl_type == PBLType::MRF) {
233  pp, "pbl_mrf_coriolis_freq", pbl_mrf_coriolis_freq, lev, max_level);
235  pp, "pbl_mrf_Ribcr", pbl_mrf_Ribcr, lev, max_level);
237  pp, "pbl_mrf_const_b", pbl_mrf_const_b, lev, max_level);
238  query_one_or_per_level(pp, "pbl_mrf_sf", pbl_mrf_sf, lev, max_level);
240  pp, "mrf_moistvars", mrf_moistvars, lev, max_level);
242  pp, "enable_mrf_countergradient", enable_mrf_countergradient, lev, max_level);
244  pp, "enable_mrf_cloud_adjustment", enable_mrf_cloud_adjustment, lev, max_level);
246  pp, "pbl_mrf_highres_bounds", pbl_mrf_highres_bounds, lev, max_level);
248  pp, "enable_mrf_unbounded_vpert", enable_mrf_unbounded_vpert, lev, max_level);
250  pp, "pbl_mrf_use_zero_ri_extent", pbl_mrf_use_zero_ri_extent, lev, max_level);
251  // Scale-aware PBL-LES blending parameters.
253  pp, "pbl_blend_length", pbl_blend_length, lev, max_level);
255  pp, "pbl_blend_cs", pbl_blend_cs, lev, max_level);
257  pp, "pbl_blend_c_max", pbl_blend_c_max, lev, max_level);
259  pp, "pbl_blend_use_smag", pbl_blend_use_smag, lev, max_level);
260  } else if (pbl_type == PBLType::SHOC) {
261 #ifndef ERF_USE_SHOC
262  amrex::Abort("You set use_shoc to true but didn't build with SHOC; you must rebuild the executable");
263  }
264 #endif
265  if (uses_eamxx_shoc()) {
266 #ifndef ERF_USE_EAMXX_SHOC
267  amrex::Abort("PBLType::EAMXX_SHOC requested, but ERF was not built with ERF_ENABLE_EAMXX_SHOC=ON");
268 #endif
269  }
270 
272  std::string zlo_bc = "none";
273  amrex::ParmParse pp_bc("zlo");
274  pp_bc.get("type",zlo_bc);
275  if (amrex::toLower(zlo_bc) != "surface_layer") {
276  amrex::Abort("You must use the surface_layer BC at zlo with the selected PBL.");
277  }
278  }
279  }
280 
281  // Flags for QKE/TKE equation
282  if (pbl_type == PBLType::MYJ || pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
283  // Add sources/sinks to QKE/TKE? (MYJ does this inline)
284  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
285  use_pbl_tke = true;
286  }
287  // Advect QKE/TKE?
288  query_one_or_per_level(pp, "advect_tke" , advect_tke , lev, max_level);
289  // Apply numerical diffusion to QKE/TKE?
290  query_one_or_per_level(pp, "diffuse_tke_3D", diffuse_tke_3D, lev, max_level);
291  }
292 
293  // There is a default value of 1e-6 but the user can override the value here,
294  // and in addition can add perturbational values. and in addition can add perturbational values.
295  pp.query("tke_min",tke_min);
296 
297  // LES constants...
298  query_one_or_per_level(pp, "Cs", Cs, lev, max_level);
299 
300  query_one_or_per_level(pp, "Pr_t", Pr_t, lev, max_level);
301  query_one_or_per_level(pp, "Sc_t", Sc_t, lev, max_level);
302 
303  // Compute relevant forms of diffusion parameters
304  Pr_t_inv = one / Pr_t;
305  Sc_t_inv = one / Sc_t;
306 
307  if (les_type == LESType::Deardorff) {
308  query_one_or_per_level(pp, "Ck", Ck, lev, max_level);
309  query_one_or_per_level(pp, "Ce", Ce, lev, max_level);
310  query_one_or_per_level(pp, "Ce_wall", Ce_wall, lev, max_level);
311  }
312 
313  // To quantify atmospheric stability for subgrid modeling
314  query_one_or_per_level(pp, "thermal_stratification", strat_type, lev, max_level);
315  if (strat_type == StratType::theta) {
316  amrex::Print() << "Thermal stratification based on gradient of potential temperature" << std::endl;
317  } else if (strat_type == StratType::thetav) {
318  amrex::Print() << "Thermal stratification based on gradient of virtual potential temperature" << std::endl;
319  } else if (strat_type == StratType::thetal) {
320  amrex::Print() << "Thermal stratification based on gradient of linearized liquid-water potential temperature" << std::endl;
321  }
322 
323  // k-eqn constants
324  query_one_or_per_level(pp, "Cmu0", Cmu0, lev, max_level);
325  query_one_or_per_level(pp, "Cb", Cb, lev, max_level);
326  query_one_or_per_level(pp, "Rt_crit", Rt_crit, lev, max_level);
327  query_one_or_per_level(pp, "Rt_min", Rt_min, lev, max_level);
328  query_one_or_per_level(pp, "max_geom_lscale", l_g_max, lev, max_level);
329  query_one_or_per_level(pp, "dirichlet_k", dirichlet_k, lev, max_level);
330 
331  // Common inputs (LES or RANS)
332  if (!query_one_or_per_level(pp, "sigma_k", sigma_k, lev, max_level) && rans_type == RANSType::kEqn) {
333  amrex::Print() << "Overriding default sigma_k for k-eqn RANS" << std::endl;
334  sigma_k = one;
335  };
336  query_one_or_per_level(pp, "theta_ref", theta_ref, lev, max_level);
337 
338  query_one_or_per_level(pp, "mix_isotropic", mix_isotropic, lev, max_level);
339  query_one_or_per_level(pp, "use_Ri_correction", use_Ri_correction, lev, max_level);
340  query_one_or_per_level(pp, "Ri_crit", Ri_crit, lev, max_level);
341 
342  // Set common flags
343  use_kturb =
344  ((les_type != LESType::None) || (rans_type != RANSType::None) ||
345  (pbl_type != PBLType::None));
346  use_keqn =
347  ((les_type == LESType::Deardorff) || (rans_type == RANSType::kEqn));
348  use_tke =
349  ((les_type == LESType::Deardorff) || (rans_type == RANSType::kEqn) ||
350  (pbl_type == PBLType::MYJ) || (pbl_type == PBLType::MYNN25) ||
351  (pbl_type == PBLType::MYNNEDMF) || uses_shoc_family());
352 
353  if (use_tke) {
354  query_one_or_per_level(pp, "init_tke_from_ustar", init_tke_from_ustar, lev, max_level);
355  }
356 
357  // Validate inputs
358  if (les_type == LESType::Smagorinsky) {
359  if (Cs == 0) {
360  amrex::Error("Need to specify Cs for Smagorsinky LES");
361  }
362  if (smag2d && mix_isotropic) {
363  amrex::Print() << "Turning off mix_isotropic for 2-D Smagorinsky" << std::endl;
364  mix_isotropic = false;
365  }
366  }
367  }
constexpr amrex::Real one
Definition: ERF_Constants.H:9
ParmParse pp("prob")
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:80
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:38
@ theta
Definition: ERF_SLM.H:20
amrex::Real SMmax
Definition: ERF_MYNNStruct.H:58
amrex::Real SHmax
Definition: ERF_MYNNStruct.H:60
amrex::Real SQfac
Definition: ERF_MYNNStruct.H:54
amrex::Real SHmin
Definition: ERF_MYNNStruct.H:59
amrex::Real SMmin
Definition: ERF_MYNNStruct.H:57
bool diffuse_moistvars
Definition: ERF_MYNNStruct.H:67
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)
Definition: ERF_MYNNStruct.H:71
bool advect_tke
Whether TKE/QKE is advected.
Definition: ERF_TurbStruct.H:729
StratType strat_type
Thermodynamic variable used for stability stratification.
Definition: ERF_TurbStruct.H:590
MYNNLevel2 pbl_mynn_level2
MYNN level-2 closure coefficients for limiting.
Definition: ERF_TurbStruct.H:657
bool diffuse_tke_3D
Whether three-dimensional numerical diffusion is applied to TKE/QKE.
Definition: ERF_TurbStruct.H:731
bool use_tke
Whether any TKE or QKE closure is active.
Definition: ERF_TurbStruct.H:666
amrex::Real Sc_t_inv
Inverse turbulent Schmidt number.
Definition: ERF_TurbStruct.H:565
bool use_keqn
Whether a microscale TKE closure is active.
Definition: ERF_TurbStruct.H:661
bool uses_eamxx_shoc() const noexcept
Query whether this level uses the EAMxx SHOC PBL scheme.
Definition: ERF_TurbStruct.H:610
bool uses_shoc_family() const noexcept
Query whether this level uses any SHOC-family PBL scheme.
Definition: ERF_TurbStruct.H:628
bool init_tke_from_ustar
Whether initial TKE/QKE profiles are based on surface friction velocity.
Definition: ERF_TurbStruct.H:671
bool dirichlet_k
Whether TKE uses Dirichlet boundary treatment.
Definition: ERF_TurbStruct.H:601
amrex::Real tke_min
Minimum TKE/QKE value.
Definition: ERF_TurbStruct.H:674
bool use_kturb
Whether any turbulence model is active.
Definition: ERF_TurbStruct.H:660
amrex::Real Pr_t_inv
Inverse turbulent Prandtl number.
Definition: ERF_TurbStruct.H:561
bool use_pbl_tke
Whether a mesoscale PBL TKE closure is active.
Definition: ERF_TurbStruct.H:664
Here is the call graph for this function:

◆ pbl_requires_surface_layer()

bool TurbChoice::pbl_requires_surface_layer ( ) const
inlinenoexcept

Query whether the selected PBL scheme requires surface-layer boundary conditions.

Returns
True if the PBL scheme requires a lower surface-layer boundary.
638  {
639  return (pbl_type == PBLType::MYNN25) ||
640  (pbl_type == PBLType::MYNNEDMF) ||
641  (pbl_type == PBLType::YSU) ||
642  (pbl_type == PBLType::YSUNew) ||
643  (pbl_type == PBLType::MRF) ||
645  }

Referenced by check_params(), and init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pbl_suppresses_microphysics_condensation()

bool TurbChoice::pbl_suppresses_microphysics_condensation ( ) const
inlinenoexcept

Query whether the selected PBL scheme suppresses microphysics condensation.

Returns
True when the PBL scheme owns condensation handling.
652  {
653  return uses_shoc_family();
654  }
Here is the call graph for this function:

◆ uses_eamxx_shoc()

bool TurbChoice::uses_eamxx_shoc ( ) const
inlinenoexcept

Query whether this level uses the EAMxx SHOC PBL scheme.

Returns
True if PBLType::EAMXX_SHOC is selected.
611  {
612  return pbl_type == PBLType::EAMXX_SHOC;
613  }

Referenced by erf_slow_rhs_post(), erf_slow_rhs_pre(), init_params(), and uses_shoc_family().

Here is the caller graph for this function:

◆ uses_native_shoc()

bool TurbChoice::uses_native_shoc ( ) const
inlinenoexcept

Query whether this level uses the native SHOC PBL scheme.

Returns
True if PBLType::NATIVE_SHOC is selected.
620  {
621  return pbl_type == PBLType::NATIVE_SHOC;
622  }

Referenced by erf_slow_rhs_post(), erf_slow_rhs_pre(), and uses_shoc_family().

Here is the caller graph for this function:

◆ uses_shoc_family()

bool TurbChoice::uses_shoc_family ( ) const
inlinenoexcept

Query whether this level uses any SHOC-family PBL scheme.

Returns
True if native or EAMxx SHOC is selected.
629  {
630  return uses_eamxx_shoc() || uses_native_shoc();
631  }
bool uses_native_shoc() const noexcept
Query whether this level uses the native SHOC PBL scheme.
Definition: ERF_TurbStruct.H:619

Referenced by ComputeTurbulentViscosity(), init_params(), pbl_requires_surface_layer(), and pbl_suppresses_microphysics_condensation().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ advect_tke

TurbChoice::advect_tke = true

Whether TKE/QKE is advected.

Referenced by erf_slow_rhs_post(), and init_params().

◆ Cb

TurbChoice::Cb = amrex::Real(0.35)

One-equation RANS buoyancy coefficient.

Referenced by ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ Ce

TurbChoice::Ce = amrex::Real(0.93)

Deardorff dissipation coefficient.

Referenced by ComputeTurbulentViscosityLES(), display(), and init_params().

◆ Ce_wall

TurbChoice::Ce_wall = zero

Wall value for the Deardorff dissipation coefficient.

Referenced by check_params(), ComputeTurbulentViscosityLES(), display(), and init_params().

◆ Ck

TurbChoice::Ck = amrex::Real(0.1)

Deardorff eddy-viscosity coefficient.

Referenced by ComputeTurbulentViscosityLES(), display(), and init_params().

◆ Cmu0

TurbChoice::Cmu0 = amrex::Real(0.5562)

One-equation RANS Cmu0 coefficient.

Referenced by ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ Cs

TurbChoice::Cs = zero

Smagorinsky model coefficient.

Referenced by ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), display(), and init_params().

◆ diffuse_tke_3D

TurbChoice::diffuse_tke_3D = true

Whether three-dimensional numerical diffusion is applied to TKE/QKE.

Referenced by init_params(), and make_sources().

◆ dirichlet_k

TurbChoice::dirichlet_k = false

Whether TKE uses Dirichlet boundary treatment.

Referenced by init_params().

◆ enable_mrf_cloud_adjustment

TurbChoice::enable_mrf_cloud_adjustment = false

Whether MRF cloud-aware stability adjustments are enabled.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ enable_mrf_countergradient

TurbChoice::enable_mrf_countergradient = false

Whether MRF countergradient corrections are enabled.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ enable_mrf_unbounded_vpert

TurbChoice::enable_mrf_unbounded_vpert = false

Whether MRF leaves VPERT unlimited by GAMCRT.

Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_cloud_pblh

TurbChoice::enable_ysu_cloud_pblh
Initial value:
=
true

Whether YSU cloud-based PBL-height detection is enabled.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_countergradient

TurbChoice::enable_ysu_countergradient
Initial value:
=
true

Whether YSU countergradient corrections are enabled.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_entrainment

TurbChoice::enable_ysu_entrainment
Initial value:
=
true

Whether YSU entrainment-layer parameterization is enabled.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_liquid_theta

TurbChoice::enable_ysu_liquid_theta
Initial value:
=
true

Whether YSU uses liquid-water virtual potential temperature for stability.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_sat_limiter

TurbChoice::enable_ysu_sat_limiter
Initial value:
=
false

Whether YSU applies a saturation limiter to moisture countergradient terms.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_terrain_pblh_floor

TurbChoice::enable_ysu_terrain_pblh_floor
Initial value:
=
true

Whether YSU applies a terrain-following PBL-height floor.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ enable_ysu_topdown

TurbChoice::enable_ysu_topdown
Initial value:
=
true

Whether YSU top-down mixing is enabled.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ init_tke_from_ustar

TurbChoice::init_tke_from_ustar = false

Whether initial TKE/QKE profiles are based on surface friction velocity.

Referenced by init_params().

◆ l_g_max

TurbChoice::l_g_max = amrex::Real(30.0)

Maximum geometric length scale.

Referenced by ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ les_type

◆ mix_isotropic

TurbChoice::mix_isotropic = true

Whether subgrid mixing uses isotropic length scales.

Referenced by ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), display(), and init_params().

◆ mrf_moistvars

TurbChoice::mrf_moistvars = false

Whether MRF applies turbulence to moisture variables.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_blend_c_max

amrex::Real TurbChoice::pbl_blend_c_max = amrex::Real(0.1)

Power-law ceiling coeff [m^(2/3)/s].

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_blend_cs

amrex::Real TurbChoice::pbl_blend_cs = amrex::Real(0.17)

Smagorinsky coeff for K_h ceiling.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_blend_length

amrex::Real TurbChoice::pbl_blend_length = amrex::Real(0.0)

Boutle blending length L [m]. 0 = off.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_blend_use_smag

bool TurbChoice::pbl_blend_use_smag = true

Use Smagorinsky ceiling (else power-law).

Referenced by display(), and init_params().

◆ pbl_mrf_const_b

TurbChoice::pbl_mrf_const_b = amrex::Real(7.8)

MRF constant used to compute PBL height.

Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ pbl_mrf_coriolis_freq

TurbChoice::pbl_mrf_coriolis_freq = amrex::Real(1.0e-4)

Coriolis frequency used by the MRF PBL scheme.

Referenced by display(), and init_params().

◆ pbl_mrf_highres_bounds

TurbChoice::pbl_mrf_highres_bounds = false

Whether MRF applies high-resolution grid-dependent diffusivity bounds.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_mrf_Ribcr

TurbChoice::pbl_mrf_Ribcr = amrex::Real(0.5)

Critical bulk Richardson number for the MRF PBL scheme.

Referenced by ComputeDiffusivityMRF(), display(), and init_params().

◆ pbl_mrf_sf

TurbChoice::pbl_mrf_sf = amrex::Real(0.1)

MRF surface flux value used to compute PBL height.

Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ pbl_mrf_use_zero_ri_extent

TurbChoice::pbl_mrf_use_zero_ri_extent = false

Whether MRF uses the Ri=0 K-profile extent.

Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ pbl_mynn

TurbChoice::pbl_mynn

MYNN level-2.5 closure coefficients.

Referenced by ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), display(), and init_params().

◆ pbl_mynn_level2

TurbChoice::pbl_mynn_level2

MYNN level-2 closure coefficients for limiting.

Referenced by ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), and init_params().

◆ pbl_type

◆ pbl_ysu_coriolis_freq

TurbChoice::pbl_ysu_coriolis_freq
Initial value:
=
amrex::Real(1.0e-4)

Coriolis frequency used by YSU-family PBL schemes.

Referenced by ComputeDiffusivityYSU(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ pbl_ysu_force_over_water

TurbChoice::pbl_ysu_force_over_water
Initial value:
=
false

Whether YSU is forced to use over-water behavior.

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_land_Ribcr

TurbChoice::pbl_ysu_land_Ribcr
Initial value:
=
constexpr amrex::Real fourth
Definition: ERF_Constants.H:14

Critical bulk Richardson number over land for stable YSU conditions.

Referenced by ComputeDiffusivityYSU(), ComputeDiffusivityYSUNew(), display(), and init_params().

◆ pbl_ysu_unst_Ribcr

TurbChoice::pbl_ysu_unst_Ribcr
Initial value:
=
constexpr amrex::Real zero
Definition: ERF_Constants.H:8

Critical bulk Richardson number for unstable YSU conditions.

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_use_consistent_coriolis

TurbChoice::pbl_ysu_use_consistent_coriolis
Initial value:
=
false

Whether YSU uses the ERF Coriolis frequency.

Referenced by display(), and init_params().

◆ pbl_ysunew_highres_bounds

TurbChoice::pbl_ysunew_highres_bounds = false

Whether YSUNew applies high-resolution grid-dependent diffusivity bounds.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ Pr_t

TurbChoice::Pr_t = one / three

Turbulent Prandtl number.

Referenced by display(), and init_params().

◆ Pr_t_inv

TurbChoice::Pr_t_inv = three

◆ rans_type

TurbChoice::rans_type = RANSType::None

◆ Ri_crit

TurbChoice::Ri_crit = fourth

Critical Richardson number for stability correction.

Referenced by ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), display(), and init_params().

◆ Rt_crit

TurbChoice::Rt_crit = -one

Critical turbulent Reynolds number.

Referenced by ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ Rt_min

TurbChoice::Rt_min = -three

Minimum turbulent Reynolds number.

Referenced by ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ Sc_t

TurbChoice::Sc_t = one

Turbulent Schmidt number.

Referenced by display(), and init_params().

◆ Sc_t_inv

TurbChoice::Sc_t_inv = one

◆ sigma_k

TurbChoice::sigma_k = amrex::Real(0.5)

◆ smag2d

TurbChoice::smag2d = false

Whether the 2-D Smagorinsky formulation is used.

Referenced by ComputeTurbulentViscosityLES(), display(), and init_params().

◆ strat_type

TurbChoice::strat_type = StratType::theta

Thermodynamic variable used for stability stratification.

Referenced by ComputeTurbulentViscosityLES(), and init_params().

◆ theta_ref

TurbChoice::theta_ref = zero

Reference potential temperature for stable stratification.

Referenced by ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityRANS(), display(), and init_params().

◆ tke_min

TurbChoice::tke_min = amrex::Real(1.e-6)

Minimum TKE/QKE value.

Referenced by init_params().

◆ use_keqn

TurbChoice::use_keqn
Initial value:
=
false

Whether a microscale TKE closure is active.

Referenced by erf_slow_rhs_pre(), and init_params().

◆ use_kturb

◆ use_pbl_tke

TurbChoice::use_pbl_tke
Initial value:
=
false

Whether a mesoscale PBL TKE closure is active.

Referenced by init_params().

◆ use_Ri_correction

TurbChoice::use_Ri_correction = true

Whether Richardson-number correction is applied.

Referenced by ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), display(), and init_params().

◆ use_tke

TurbChoice::use_tke = false

Whether any TKE or QKE closure is active.

Referenced by erf_slow_rhs_post(), init_params(), and make_sources().

◆ ysu_moistvars

TurbChoice::ysu_moistvars = false

Whether YSU applies turbulence to moisture variables.

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().

◆ ysu_qcloud_threshold

TurbChoice::ysu_qcloud_threshold
Initial value:
=
amrex::Real(1.0e-4)

Cloud liquid water threshold for YSUNew [kg/kg].

Referenced by ComputeDiffusivityYSUNew(), display(), and init_params().


The documentation for this struct was generated from the following file: