|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| ParmParse | pp ("prob") |
| pp | query ("rho_0", rho_0) |
| pp | query ("T_0", T_0) |
| pp | query ("A_0", A_0) |
| pp | query ("KE_0", KE_0) |
| pp | query ("T_0_Pert_Mag", T_0_Pert_Mag) |
| pp | query ("qv_0_Pert_Mag", qv_0_Pert_Mag) |
| pp | query ("pert_ref_height", pert_ref_height) |
| pp | query ("custom_TKE", custom_TKE) |
| ParallelForRNG (bx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *prob_hi=geomdata.ProbHi();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+myhalf) *dx[0];const Real y=prob_lo[1]+(j+myhalf) *dx[1];const Real z=prob_lo[2]+(k+myhalf) *dx[2];const Real xc=myhalf *(prob_lo[0]+prob_hi[0]);const Real yc=myhalf *(prob_lo[1]+prob_hi[1]);const Real zc=myhalf *(prob_lo[2]+prob_hi[2]);const Real r=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc)+(z-zc) *(z-zc));if((z<=pert_ref_height) &&(T_0_Pert_Mag !=zero)) { Real rhotheta=state(i, j, k, RhoTheta_comp);Real rho=state(i, j, k, Rho_comp);Real qv=state(i, j, k, RhoQ1_comp)/rho;Real Told=getTgivenRandRTh(rho, rhotheta, qv);Real P=getPgivenRTh(rhotheta, qv);Real rand_double=amrex::Random(engine);Real Tpert=(rand_double *two - one) *T_0_Pert_Mag;Real Tnew=Told+Tpert;Real theta_new=getThgivenTandP(Tnew, P, rdOcp);Real rhonew=getRhogivenThetaPress(theta_new, P, rdOcp, qv);state_pert(i, j, k, Rho_comp)=rhonew - rho;state_pert(i, j, k, RhoTheta_comp)=zero;} state_pert(i, j, k, RhoScalar_comp)=A_0 *std::exp(-amrex::Real(10.) *r *r);if(custom_TKE) { state_pert(i, j, k, RhoKE_comp)=(one - z/prob_hi[2]) *r_hse(i, j, k);} else { state_pert(i, j, k, RhoKE_comp)=KE_0;} if(use_moisture) { state_pert(i, j, k, RhoQ1_comp)=zero;state_pert(i, j, k, RhoQ2_comp)=zero;if((z<=pert_ref_height) &&(qv_0_Pert_Mag !=zero)) { Real rhoold=state(i, j, k, Rho_comp);Real rhonew=rhoold+state_pert(i, j, k, Rho_comp);Real qvold=state(i, j, k, RhoQ1_comp)/rhoold;Real rand_double=amrex::Random(engine);Real qvnew=qvold+(rand_double *two - one) *qv_0_Pert_Mag;state_pert(i, j, k, RhoQ1_comp)=rhonew *qvnew - rhoold *qvold;} } }) | |
Variables | |
| amrex::Real | rho_0 = zero |
| amrex::Real | T_0 = zero |
| amrex::Real | A_0 = one |
| amrex::Real | KE_0 = amrex::Real(0.1) |
| Real | T_0_Pert_Mag = zero |
| Real | qv_0_Pert_Mag = zero |
| Real | pert_ref_height = amrex::Real(100.0) |
| bool | custom_TKE = false |
| const bool | use_moisture = (sc.moisture_type != MoistureType::None) |
| const Real | rdOcp = sc.rdOcp |
| ParallelForRNG | ( | bx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k, const RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *prob_hi=geomdata.ProbHi();const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+myhalf) *dx[0];const Real y=prob_lo[1]+(j+myhalf) *dx[1];const Real z=prob_lo[2]+(k+myhalf) *dx[2];const Real xc=myhalf *(prob_lo[0]+prob_hi[0]);const Real yc=myhalf *(prob_lo[1]+prob_hi[1]);const Real zc=myhalf *(prob_lo[2]+prob_hi[2]);const Real r=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc)+(z-zc) *(z-zc));if((z<=pert_ref_height) &&(T_0_Pert_Mag !=zero)) { Real rhotheta=state(i, j, k, RhoTheta_comp);Real rho=state(i, j, k, Rho_comp);Real qv=state(i, j, k, RhoQ1_comp)/rho;Real Told=getTgivenRandRTh(rho, rhotheta, qv);Real P=getPgivenRTh(rhotheta, qv);Real rand_double=amrex::Random(engine);Real Tpert=(rand_double *two - one) *T_0_Pert_Mag;Real Tnew=Told+Tpert;Real theta_new=getThgivenTandP(Tnew, P, rdOcp);Real rhonew=getRhogivenThetaPress(theta_new, P, rdOcp, qv);state_pert(i, j, k, Rho_comp)=rhonew - rho;state_pert(i, j, k, RhoTheta_comp)=zero;} state_pert(i, j, k, RhoScalar_comp)=A_0 *std::exp(-amrex::Real(10.) *r *r);if(custom_TKE) { state_pert(i, j, k, RhoKE_comp)=(one - z/prob_hi[2]) *r_hse(i, j, k);} else { state_pert(i, j, k, RhoKE_comp)=KE_0;} if(use_moisture) { state_pert(i, j, k, RhoQ1_comp)=zero;state_pert(i, j, k, RhoQ2_comp)=zero;if((z<=pert_ref_height) &&(qv_0_Pert_Mag !=zero)) { Real rhoold=state(i, j, k, Rho_comp);Real rhonew=rhoold+state_pert(i, j, k, Rho_comp);Real qvold=state(i, j, k, RhoQ1_comp)/rhoold;Real rand_double=amrex::Random(engine);Real qvnew=qvold+(rand_double *two - one) *qv_0_Pert_Mag;state_pert(i, j, k, RhoQ1_comp)=rhonew *qvnew - rhoold *qvold;} } } | |||
| ) |

| ParmParse pp | ( | "prob" | ) |
Referenced by add_par(), Morrison::Advance(), WDM6::Advance(), WSM6::Advance(), ERF::appendPlotVariables(), plotfile2d::available_diagnostic_names(), SolverChoice::build_coriolis_forcings_const_lat(), TurbulentPerturbation::calc_tpi_update(), eb_aux_::define(), AdvChoice::display(), erf_init_dens_hse_moist(), ERF::ERF_shared(), ERF::ErrorEst(), Morrison::Init(), WDM6::Init(), ProblemBase::init_buildings_surface(), ERF::init_custom(), init_my_custom_terrain(), IBSEBParams::init_params(), RadChoice::init_params(), TurbChoice::init_params(), SolverChoice::init_params(), AdvChoice::init_params(), DampingChoice::init_params(), DiffChoice::init_params(), EBChoice::init_params(), SpongeChoice::init_params(), ERF::init_phys_bcs(), ProblemBase::init_terrain_surface(), TurbulentPerturbation::init_tpi(), init_which_terrain_grid(), WindFarm::init_windfarm_lat_lon(), init_zlevels(), ERF::init_zphys(), ERF::InitData_post(), InputSoundingData::InputSoundingData(), InputSpongeData::InputSpongeData(), LargeScaleForcingData::LargeScaleForcingData(), LineSampler::LineSampler(), SurfaceLayer::make_SurfaceLayer_at_level(), make_terrain_fitted_coords(), ProblemBase::name(), plotfile2d::parse_requested_sampled_level_sets(), plotfile2d::parse_sampled_level_definition(), erf_wall_scalar_bc::parse_wall_face_scalars(), PlaneSampler::PlaneSampler(), query_one_or_per_level(), query_one_or_per_level_enum_case_insensitive(), Radiation::Radiation(), SolverChoice::read_int_string(), read_shoc_runtime_options(), read_shoc_transport_modes(), ReadBndryPlanes::ReadBndryPlanes(), ERF::ReadParameters(), ERF::refinement_criteria_setup(), erf_cloud_chamber::reject_unsupported_face_keys(), ERF::remake_zphys(), MOSTAverage::set_k_indices_N(), MOSTAverage::set_k_indices_T(), MOSTAverage::set_norm_indices_T(), MOSTAverage::set_norm_positions_T(), MOSTAverage::set_z_positions_EB(), MOSTAverage::set_z_positions_T(), ERF::setPlotVariables(), ERF::setPlotVariables2D(), ERF::setSubVolVariables(), IRadiation::setupDataLog(), SHOCInterface::SHOCInterface(), StationSampler::StationSampler(), ProblemBase::terrain_is_specified(), which_fine_terrain(), WriteBndryPlanes::WriteBndryPlanes(), and ERF::WriteSubvolume().
| pp query | ( | "custom_TKE" | , |
| custom_TKE | |||
| ) |
| pp query | ( | "pert_ref_height" | , |
| pert_ref_height | |||
| ) |
| pp query | ( | "qv_0_Pert_Mag" | , |
| qv_0_Pert_Mag | |||
| ) |
| pp query | ( | "T_0_Pert_Mag" | , |
| T_0_Pert_Mag | |||
| ) |
| amrex::Real A_0 = one |
Referenced by ParallelForRNG().
| bool custom_TKE = false |
Referenced by ParallelForRNG().
| amrex::Real KE_0 = amrex::Real(0.1) |
Referenced by ParallelForRNG().
| Real pert_ref_height = amrex::Real(100.0) |
Referenced by ParallelForRNG().
Referenced by ParallelForRNG().
| const Real rdOcp = sc.rdOcp |
Referenced by ParallelForRNG().
| amrex::Real rho_0 = zero |
| amrex::Real T_0 = zero |
Referenced by ParallelForRNG().
| const bool use_moisture = (sc.moisture_type != MoistureType::None) |
Referenced by ParallelForRNG().