|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| ParmParse | pp_prob ("prob") |
| pp_prob | query ("T_0", T_0) |
| pp_prob | query ("x_c", x_c) |
| pp_prob | query ("y_c", y_c) |
| pp_prob | query ("z_c", z_c) |
| pp_prob | query ("x_r", x_r) |
| pp_prob | query ("y_r", y_r) |
| pp_prob | query ("z_r", z_r) |
| pp_prob | query ("T_pert", T_pert) |
| pp_prob | query ("T_pert_is_airtemp", T_pert_is_airtemp) |
| pp_prob | query ("perturb_rho", perturb_rho) |
| pp_prob | query ("do_moist_bubble", do_moist_bubble) |
| pp_prob | query ("theta_pert", theta_pert) |
| AMREX_ALWAYS_ASSERT (bx.length()[2]==khi+1) | |
| if (y_r > 0) rad+ | |
| if (z_r > 0) rad+ | |
| if (rad<=1.0) | |
| state_pert (i, j, k, RhoTheta_comp) | |
| state_pert (i, j, k, Rho_comp) | |
| state_pert (i, j, k, RhoScalar_comp)=0.0 | |
| state_pert (i, j, k, RhoQ1_comp) | |
| state_pert (i, j, k, RhoQ2_comp) | |
| if (nstate==NVAR_max) | |
Variables | |
| Real | T_0 = 300.0 |
| Real | x_c = 0.0 |
| Real | y_c = 0.0 |
| Real | z_c = 0.0 |
| Real | x_r = 0.0 |
| Real | y_r = 0.0 |
| Real | z_r = 0.0 |
| Real | T_pert = -15.0 |
| bool | T_pert_is_airtemp = true |
| bool | perturb_rho = true |
| bool | do_moist_bubble = false |
| do_moist_bubble &Real | theta_pert = 2.0 |
| const int | khi = geomdata.Domain().bigEnd()[2] |
| const Real | dz = geomdata.CellSize()[2] |
| const Real | rdOcp = sc.rdOcp |
| background fields should have been initialized with erf init_type<< std::endl;} Real qt_init=0.02;pp_prob.query("qt_init", qt_init);Real eq_pot_temp=320.0;pp_prob.query("eq_pot_temp", eq_pot_temp);bool use_empirical=false;pp_prob.query("use_empircal_psat", use_empirical);if(do_moist_bubble) { Vector< Real > h_r(khi+2);Vector< Real > h_p(khi+2);Vector< Real > h_t(khi+2);Vector< Real > h_q_v(khi+2);Gpu::DeviceVector< Real > d_r(khi+2);Gpu::DeviceVector< Real > d_p(khi+2);Gpu::DeviceVector< Real > d_t(khi+2);Gpu::DeviceVector< Real > d_q_v(khi+2);HSEutils::init_isentropic_hse_no_terrain(h_t.data(), h_r.data(), h_p.data(), h_q_v.data(), dz, khi, qt_init, eq_pot_temp, use_empirical, false);Gpu::copyAsync(Gpu::hostToDevice, h_r.begin(), h_r.end(), d_r.begin());Gpu::copyAsync(Gpu::hostToDevice, h_p.begin(), h_p.end(), d_p.begin());Gpu::copyAsync(Gpu::hostToDevice, h_t.begin(), h_t.end(), d_t.begin());Gpu::copyAsync(Gpu::hostToDevice, h_q_v.begin(), h_q_v.end(), d_q_v.begin());Real *theta_back=d_t.data();Real *p_back=d_p.data();Real *q_v_back=d_q_v.data();int moisture_type=1;if(sc.moisture_type==MoistureType::SAM) { moisture_type=1;} else if(sc.moisture_type==MoistureType::SAM_NoIce||sc.moisture_type==MoistureType::SAM_NoPrecip_NoIce) { moisture_type=2;} ParallelFor(bx,[=] AMREX_GPU_DEVICE(int i, int j, int k) { const auto prob_lo=geomdata.ProbLo();const auto dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+0.5) *dx[0];const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=prob_lo[2]+(k+0.5) *dx[2];Real rad, delta_theta, theta_total, rho, RH;rad=0.0;if(x_r > | rad = std::pow((x - x_c)/x_r, 2) |
| else | |
| theta_total = theta_back[k]*(delta_theta/300.0 + 1) | |
| Real | T = getTgivenPandTh(p_back[k], theta_total, (R_d/Cp_d)) |
| rho = p_back[k]/(R_d*T*(1.0 + (R_v/R_d)*q_v_back[k])) | |
| RH = compute_relative_humidity(use_empirical) | |
| Real | q_v_hot = vapor_mixing_ratio(p_back[k], T, RH) |
| Real | T_back = getTgivenPandTh(p_back[k], theta_back[k], (R_d/Cp_d)) |
| Real | rho_back = p_back[k]/(R_d*T_back*(1.0 + (R_v/R_d)*q_v_back[k])) |
| int | nstate = state_pert.nComp() |
| AMREX_ALWAYS_ASSERT | ( | bx. | length()[2] = =khi+1 | ) |
Referenced by EWP::advance(), Fitch::advance(), GeneralAD::advance(), SimpleAD::advance(), MRISplitIntegrator< T >::advance(), AdvectionSrcForMom(), AdvectionSrcForMom_ConstantDz(), AdvectionSrcForMom_EB(), AdvectionSrcForMom_StretchedDz(), AdvectionSrcForMom_TF(), AdvectionSrcForOpenBC_Tangent_Cons(), AdvectionSrcForOpenBC_Tangent_Xmom(), AdvectionSrcForOpenBC_Tangent_Ymom(), AdvectionSrcForOpenBC_Tangent_Zmom(), ApplyBndryForcing_Forecast(), ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), polygon_::area(), ERF::AverageDown(), ERF::AverageDownTo(), ERFFillPatcher::BuildMask(), closest_index(), compute_source_terms_Fn_Ft(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ComputeTurbulentViscosity(), polygon_::define(), ERFFillPatcher::Define(), eb_aux_::define(), ForestDrag::define_drag_field(), polygon_::distance(), derived::erf_derenstrophysq(), derived::erf_dermagvel(), derived::erf_dermagvelsq(), derived::erf_dermoisttemp(), derived::erf_dersoundspeed(), derived::erf_dertemp(), derived::erf_dervortx(), derived::erf_dervorty(), derived::erf_dervortz(), erf_dtesati(), erf_esati(), erf_make_tau_terms(), erf_slow_rhs_post(), erf_slow_rhs_pre(), erf_substep_NS(), ERFFillPatcher::ERFFillPatcher(), ERF::ErrorEst(), expand_and_interpolate_1d(), ERFFillPatcher::Fill(), ERF::fill_from_bndryregs(), SurfaceLayer::fill_tsurf_with_sst_and_tsk(), ERF::FillIntermediatePatch(), ERF::FillPatchCrseLevel(), ERF::FillPatchFineLevel(), LineSampler::get_sample_data(), SDInitProperties::getDistribution(), SAM::IceFall(), ERFPhysBCFunct_w::impose_vertical_zvel_bcs(), ERF::init_bcs(), init_bx_scalars_from_input_sounding_hse(), ERF::init_Dirichlet_bc_data(), ERF::init_geo_wind_profile(), SolverChoice::init_params(), TurbulentPerturbation::init_tpi_type(), init_zlevels(), ERF::InitData_post(), ERF::initHSE(), ReadBndryPlanes::interp_in_time(), intersect_plane_edge(), PlaneAverage::line_average(), PlaneAverage::line_average_interpolated(), LineSampler::LineSampler(), MM5::Lsm_Data_Ptr(), NOAHMP::Lsm_Data_Ptr(), SLM::Lsm_Data_Ptr(), MM5::Lsm_DataName(), NOAHMP::Lsm_DataName(), SLM::Lsm_DataName(), MM5::Lsm_Flux_Ptr(), NOAHMP::Lsm_Flux_Ptr(), SLM::Lsm_Flux_Ptr(), NOAHMP::Lsm_FluxName(), make_buoyancy(), ERF::make_physbcs(), make_sources(), SurfaceLayer::make_SurfaceLayer_at_level(), ERF::MakeNewLevelFromCoarse(), ERF::MakeNewLevelFromScratch(), HSEutils::Newton_Raphson_hse(), ERF::ParameterSanityChecks(), PlaneAverage::PlaneAverage(), PlaneSampler::PlaneSampler(), SAM::PrecipFall(), SDInitProperties::printParameters(), ERF::project_momenta(), ERF::project_velocity_tb(), Kessler::Qmoist_Ptr(), Morrison::Qmoist_Ptr(), SAM::Qmoist_Ptr(), SatAdj::Qmoist_Ptr(), SurfaceLayer::read_custom_roughness(), ProblemBase::read_custom_terrain(), InputSpongeData::read_from_file(), InputSoundingData::read_from_file(), ReadBndryPlanes::read_input_files(), SolverChoice::read_int_string(), ReadNetCDFFile(), ERF::ReadParameters(), ReadTimeSliceFromNetCDFFile(), ERF::ReadVelsOnlyFromCheckpointFile(), realbdy_compute_interior_ghost_rhs(), realbdy_interior_bxs_xy(), ERF::refinement_criteria_setup(), ERFFillPatcher::RegisterCoarseData(), ERF::RemakeLevel(), MOSTAverage::set_k_indices_N(), InputSpongeData::size(), InputSoundingData::size(), ERF::sum_derived_quantities(), ERF::sum_energy_quantities(), ERF::Write3DPlotFile(), ERF::WriteGenericPlotfileHeaderWithTerrain(), and ERF::WriteMultiLevelPlotfileWithTerrain().

| if | ( | rad<=1. | 0 | ) |
| if | ( | y_r | , |
| 0 | |||
| ) |
| if | ( | z_r | , |
| 0 | |||
| ) |
| ParmParse pp_prob | ( | "prob" | ) |
Referenced by erf_init_const_dens_and_linear_th_hse(), erf_init_const_dens_and_th_hse(), erf_init_rayleigh(), ProblemBase::init_custom_terrain(), and init_my_custom_terrain().

| pp_prob query | ( | "do_moist_bubble" | , |
| do_moist_bubble | |||
| ) |
| pp_prob query | ( | "perturb_rho" | , |
| perturb_rho | |||
| ) |
| pp_prob query | ( | "T_pert_is_airtemp" | , |
| T_pert_is_airtemp | |||
| ) |
| pp_prob query | ( | "theta_pert" | , |
| theta_pert | |||
| ) |
| state_pert | ( | i | , |
| j | , | ||
| k | , | ||
| Rho_comp | |||
| ) |
| state_pert | ( | i | , |
| j | , | ||
| k | , | ||
| RhoQ1_comp | |||
| ) |
| state_pert | ( | i | , |
| j | , | ||
| k | , | ||
| RhoQ2_comp | |||
| ) |
|
pure virtual |
| state_pert | ( | i | , |
| j | , | ||
| k | , | ||
| RhoTheta_comp | |||
| ) |
Referenced by if(), ParallelFor(), and ParallelForRNG().

| bool do_moist_bubble = false |
| const Real dz = geomdata.CellSize()[2] |
Referenced by ApplySurfaceTreatment_BulkCoeff_CC(), ApplySurfaceTreatment_BulkCoeff_Mom(), InputSoundingData::calc_rho_p(), InputSoundingData::calc_rho_p_isentropic(), HSEutils::compute_F(), compute_gradp(), rrtmgp::compute_heating_rate(), HSEutils::compute_p_k(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ForestDrag::define_drag_field(), ERF::derive_diag_profiles(), DiffusionSrcForMom_EB(), erf_calc_slopes_eb_Dirichlet(), erf_calc_slopes_eb_Dirichlet_staggered(), erf_calc_slopes_eb_staggered(), erf_calc_slopes_eb_staggered_upwind(), derived::erf_derenstrophysq(), derived::erf_dervortx(), derived::erf_dervorty(), ERF::erf_enforce_hse(), erf_init_dens_hse(), erf_init_dens_hse_moist(), ERF::ERF_shared(), expand_and_interpolate_1d(), SurfaceLayer::fill_qsurf_with_qsat(), get_dzmin_terrain(), ERFPhysBCFunct_cons::impose_vertical_cons_bcs(), ERFPhysBCFunct_u::impose_vertical_xvel_bcs(), ERFPhysBCFunct_v::impose_vertical_yvel_bcs(), init_bx_scalars_from_input_sounding(), init_bx_scalars_from_input_sounding_hse(), init_bx_velocities_from_input_sounding(), init_default_zphys(), ERF::init_Dirichlet_bc_data(), ERF::init_geo_wind_profile(), HSEutils::init_isentropic_hse(), HSEutils::init_isentropic_hse_no_terrain(), init_zlevels(), SHOCInterface::initialize_impl(), interpolate_column_metgrid_linear(), interpolate_from_coarse(), make_sources(), SHOCInterface::mf_to_kokkos_buffers(), Radiation::mf_to_kokkos_buffers(), rrtmgp::mixing_ratio_to_cloud_mass(), HSEutils::Newton_Raphson_hse(), ERF::ReadCheckpointFile(), ERF::Write2DPlotFile(), and ERF::Write3DPlotFile().
| else |
| const int khi = geomdata.Domain().bigEnd()[2] |
Referenced by Morrison::Advance(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), MM5::ComputeFluxes(), SLM::ComputeFluxes(), MM5::ComputeTsurf(), SLM::ComputeTsurf(), DiffusionSrcForState_S(), ERF::erf_enforce_hse(), erf_init_dens_hse(), erf_init_dens_hse_moist(), erf_init_rayleigh(), erf_slow_rhs_pre(), erf_substep_MT(), erf_substep_NS(), erf_substep_T(), ERF::ErrorEst(), fill_fab_from_arrays(), ERF::FillBdyCCVels(), ImplicitDiffForMom_N(), ImplicitDiffForMom_S(), ImplicitDiffForMom_T(), ImplicitDiffForState_N(), ImplicitDiffForState_S(), ImplicitDiffForState_T(), Radiation::Init(), ERF::init_Dirichlet_bc_data(), ERF::init_geo_wind_profile(), HSEutils::init_isentropic_hse(), HSEutils::init_isentropic_hse_no_terrain(), HSEutils::init_isentropic_hse_terrain(), ERF::initRayleigh_at_level(), make_buoyancy(), make_fast_coeffs(), make_sources(), InputSpongeData::read_from_file(), InputSoundingData::read_from_file(), ERF::refinement_criteria_setup(), ERF::sample_lines(), SHOCInterface::set_grids(), ERF::setRayleighRefFromSounding(), ERF::setSpongeRefFromSounding(), SolveTridiag(), ProblemBase::update_geostrophic_profile(), ProblemBase::update_w_subsidence(), and ERF::Write2DPlotFile().
| int nstate = state_pert.nComp() |
| bool perturb_rho = true |
Referenced by if(), and ParallelFor().
Referenced by ERF::advance_radiation(), compute_source_terms_Fn_Ft(), ERF::ERF_shared(), find_rad_loc_index(), if(), ERF::InitData_post(), ERF::MakeNewLevelFromCoarse(), ERF::MakeNewLevelFromScratch(), ParallelFor(), ERF::post_timestep(), ERF::RemakeLevel(), and GeneralAD::source_terms_cellcentered().
| const Real rdOcp = sc.rdOcp |
| RH = compute_relative_humidity(use_empirical) |
Referenced by ApplySurfaceTreatment_BulkCoeff_CC(), ERF::check_for_low_temp(), ERF::check_for_negative_theta(), rrtmgp::compute_heating_rate(), custom_flux::compute_q_flux(), rotate_flux::compute_q_flux(), bulk_coeff_flux::compute_q_flux(), rico_flux::compute_q_flux(), moeng_flux::compute_q_flux(), HSEutils::compute_rho(), compute_source_terms_Fn_Ft(), custom_flux::compute_t_flux(), rotate_flux::compute_t_flux(), donelan_flux::compute_t_flux(), bulk_coeff_flux::compute_t_flux(), rico_flux::compute_t_flux(), moeng_flux::compute_t_flux(), rotate_flux::compute_u_flux(), bulk_coeff_flux::compute_u_flux(), custom_flux::compute_u_flux(), rico_flux::compute_u_flux(), donelan_flux::compute_u_flux(), moeng_flux::compute_u_flux(), bulk_coeff_flux::compute_v_flux(), custom_flux::compute_v_flux(), rico_flux::compute_v_flux(), donelan_flux::compute_v_flux(), moeng_flux::compute_v_flux(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ComputeN2(), ComputeN2_EB(), ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), derived::erf_dermoisttemp(), derived::erf_derrhodivide(), derived::erf_dersoundspeed(), derived::erf_dertemp(), ERF::estTimeStep(), getdPdRgivenConstantTheta(), getTgivenRandRTh(), getThgivenRandT(), SAM::IceFall(), if(), ERFPhysBCFunct_cons::impose_lateral_cons_bcs(), ERFPhysBCFunct_cons::impose_vertical_cons_bcs(), SurfaceLayer::init_tke_from_ustar(), IsSaturated(), rrtmgp::mixing_ratio_to_cloud_mass(), MomentumToVelocity(), ParallelFor(), ParallelForRNG(), SAM::PrecipFall(), term_vel_qp(), SurfaceLayer::update_fluxes(), VelocityToMomentum(), and ERF::Write3DPlotFile().
Referenced by if(), and ParallelFor().
| Real T = getTgivenPandTh(p_back[k], theta_total, (R_d/Cp_d)) |
Referenced by calc_saturation_vapor_pressure(), HSEutils::compute_dewpoint_temperature(), ComputeLiquidWaterPotentialTemperature(), erf_get_single_value(), ERF::getCPUTime(), getRhogivenTandPress(), GetThetal(), getThgivenRandT(), getThgivenTandP(), if(), HSEutils::Newton_Raphson_hse(), ParallelFor(), and ERF::Write3DPlotFile().
| Real T_0 = 300.0 |
| Real T_back = getTgivenPandTh(p_back[k], theta_back[k], (R_d/Cp_d)) |
Referenced by if(), and ParallelFor().
| Real T_pert = -15.0 |
| bool T_pert_is_airtemp = true |
| do_moist_bubble& Real theta_pert = 2.0 |
Referenced by if().
| theta_total = theta_back[k]*(delta_theta/300.0 + 1) |
Referenced by if(), and ParallelFor().
| Real x_c = 0.0 |
| Real x_r = 0.0 |
| Real y_c = 0.0 |
| Real y_r = 0.0 |
| Real z_c = 0.0 |
| Real z_r = 0.0 |