91 "The grid stretching ratio must be greater than 1");
98 amrex::Print() <<
"Turning terrain on to enable grid stretching" << std::endl;
103 amrex::Print() <<
"Nominal zsurface height != 0, may result in unexpected behavior"
106 pp.get(
"initial_dz",
dz0);
123 }
else if (
moisture_type == MoistureType::SAM_NoPrecip_NoIce) {
158 pp.query_enum_case_insensitive(
"land_surface_model",
lsm_type);
161 std::string terrain_type_temp =
"";
162 pp.query(
"terrain_type", terrain_type_temp);
163 if (terrain_type_temp ==
"Moving") {
164 amrex::Warning(
"erf.terrain_type = Moving is deprecated; please replace Moving by MovingFittedMesh");
166 }
else if (terrain_type_temp ==
"Static") {
167 amrex::Warning(
"erf.terrain_type = Static is deprecated; please replace Static by StaticFittedMesh");
178 int n_zlevels =
pp.countval(
"terrain_z_levels");
196 pp.query(
"c_p",
c_p);
206 for (
int i = 0; i <= max_level; i++) {
210 int nvals =
pp.countval(
"substepping_type");
211 AMREX_ALWAYS_ASSERT(nvals == 0 || nvals == 1 || nvals >= max_level+1);
215 for (
int i = 1; i <= max_level; i++) {
218 }
else if (nvals > 1) {
219 for (
int i = 0; i <= max_level; i++) {
227 int nvals_old =
pp.countval(
"no_substepping");
229 amrex::Abort(
"The no_substepping flag is deprecated -- set substepping_type instead");
233 bool any_anelastic =
false;
234 for (
int i = 0; i <= max_level; ++i) {
235 if (
anelastic[i] == 1) any_anelastic =
true;
239 if (any_anelastic == 1) {
256 for (
int lev = 0; lev <= max_level; lev++) {
282 AMREX_ASSERT_WITH_MESSAGE(
terrain_type != TerrainType::None,
"MOST stress rotations are only valid with terrain!");
283 AMREX_ASSERT_WITH_MESSAGE(
use_explicit_most,
"MOST Stress rotations are only valid with explicit MOST!");
292 pp.query_enum_case_insensitive(
"perturbation_type",
pert_type);
294 amrex::Vector<amrex::Real> abl_pressure_grad_in = {0.0, 0.0, 0.0};
295 pp.queryarr(
"abl_pressure_grad",abl_pressure_grad_in);
296 for(
int i = 0; i < AMREX_SPACEDIM; ++i)
abl_pressure_grad[i] = abl_pressure_grad_in[i];
298 amrex::Vector<amrex::Real> abl_geo_forcing_in = {0.0, 0.0, 0.0};
299 if(
pp.queryarr(
"abl_geo_forcing",abl_geo_forcing_in)) {
300 amrex::Print() <<
"Specified abl_geo_forcing: (";
301 for (
int i = 0; i < AMREX_SPACEDIM; ++i) {
305 amrex::Print() <<
")" << std::endl;
323 "Should not have both abl_geo_wind_table and custom_geostrophic_profile set.");
334 "Numerical diffusion coefficient must be between 0 & 1.");
337 amrex::Print() <<
"6th-order numerical diffusion turned on with coefficient = "
350 for (
int lev = 0; lev <= max_level; lev++) {
355 for (
int lev = 0; lev <= max_level; lev++) {
356 if (
turbChoice[lev].pbl_ysu_use_consistent_coriolis) {
360 amrex::Print() <<
"YSU PBL using ERF coriolis frequency: " <<
turbChoice[lev].pbl_ysu_coriolis_freq << std::endl;
363 amrex::Abort(
"YSU cannot use ERF coriolis frequency if not using coriolis");
377 static std::string windfarm_loc_type_string =
"None";
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:21
constexpr amrex::Real R_d
Definition: ERF_Constants.H:10
#define RhoQ4_comp
Definition: ERF_IndexDefines.H:45
#define RhoQ2_comp
Definition: ERF_IndexDefines.H:43
#define RhoQ3_comp
Definition: ERF_IndexDefines.H:44
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:42
void init_params()
Definition: ERF_AdvStruct.H:21
void init_params()
Definition: ERF_DiffStruct.H:21
bool rayleigh_damp_T
Definition: ERF_DataStruct.H:621
amrex::Real dz0
Definition: ERF_DataStruct.H:637
bool use_explicit_most
Definition: ERF_DataStruct.H:658
bool rayleigh_damp_V
Definition: ERF_DataStruct.H:619
int RhoQr_comp
Definition: ERF_DataStruct.H:700
amrex::Real poisson_reltol
Definition: ERF_DataStruct.H:607
amrex::Real rayleigh_zdamp
Definition: ERF_DataStruct.H:623
amrex::Real rdOcp
Definition: ERF_DataStruct.H:632
void read_int_string(int max_level, const char *string_to_read, amrex::Vector< int > &vec_to_fill, int default_int)
Definition: ERF_DataStruct.H:559
std::string windfarm_spec_table
Definition: ERF_DataStruct.H:702
bool use_mono_adv
Definition: ERF_DataStruct.H:674
void build_coriolis_forcings()
Definition: ERF_DataStruct.H:517
int ncorr
Definition: ERF_DataStruct.H:605
std::string windfarm_spec_table_extra
Definition: ERF_DataStruct.H:702
LandSurfaceType lsm_type
Definition: ERF_DataStruct.H:680
amrex::Real c_p
Definition: ERF_DataStruct.H:631
std::string windfarm_loc_table
Definition: ERF_DataStruct.H:702
amrex::Real gravity
Definition: ERF_DataStruct.H:630
void check_params(int max_level)
Definition: ERF_DataStruct.H:402
bool custom_rhotheta_forcing
Definition: ERF_DataStruct.H:647
bool custom_w_subsidence
Definition: ERF_DataStruct.H:649
bool nudging_from_input_sounding
Definition: ERF_DataStruct.H:655
bool rayleigh_damp_U
Definition: ERF_DataStruct.H:618
int RhoQc_comp
Definition: ERF_DataStruct.H:694
bool custom_geostrophic_profile
Definition: ERF_DataStruct.H:650
amrex::Real grid_stretching_ratio
Definition: ERF_DataStruct.H:635
bool have_geo_wind_profile
Definition: ERF_DataStruct.H:686
bool do_precip
Definition: ERF_DataStruct.H:691
bool use_num_diff
Definition: ERF_DataStruct.H:670
int RhoQv_comp
Definition: ERF_DataStruct.H:693
bool test_mapfactor
Definition: ERF_DataStruct.H:609
bool custom_moisture_forcing
Definition: ERF_DataStruct.H:648
amrex::Real num_diff_coeff
Definition: ERF_DataStruct.H:671
std::string windfarm_blade_table
Definition: ERF_DataStruct.H:703
amrex::Real zsurf
Definition: ERF_DataStruct.H:636
bool project_initial_velocity
Definition: ERF_DataStruct.H:639
int constant_density
Definition: ERF_DataStruct.H:604
bool use_moist_background
Definition: ERF_DataStruct.H:692
bool custom_forcing_prim_vars
Definition: ERF_DataStruct.H:651
bool rayleigh_damp_W
Definition: ERF_DataStruct.H:620
PerturbationType pert_type
Definition: ERF_DataStruct.H:667
amrex::Real poisson_abstol
Definition: ERF_DataStruct.H:606
bool time_avg_vel
Definition: ERF_DataStruct.H:664
bool do_cloud
Definition: ERF_DataStruct.H:690
bool use_rotate_most
Definition: ERF_DataStruct.H:661
amrex::Real rayleigh_dampcoef
Definition: ERF_DataStruct.H:622
std::string windfarm_airfoil_tables
Definition: ERF_DataStruct.H:703
int ave_plane
Definition: ERF_DataStruct.H:688
void init_params()
Definition: ERF_SpongeStruct.H:17