ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InitCustomPert_DataAssimilation_ISV.H File Reference

Go to the source code of this file.

Functions

ParmParse pp ("prob")
 
pp query ("p_inf", p_inf)
 
pp query ("T_inf", T_inf)
 
pp query ("M_inf", M_inf)
 
pp query ("alpha", alpha)
 
pp query ("gamma", gamma)
 
pp query ("beta", beta)
 
pp query ("sigma", sigma)
 
pp query ("R", R)
 
pp query ("xc", xc_frac)
 
pp query ("yc", yc_frac)
 
 ParallelFor (bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+0.5) *dx[0];const Real y=(j+0.5) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - 1.0)/(2.0 *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(1.0+deltaT, inv_gm1);const Real T=(1.0+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=0.25 *(1.0+std::cos(PI *std::min(r2d_xy, R)/R));})
 

Variables

amrex::Real p_inf = p_0
 
amrex::Real T_inf = 300.0
 
amrex::Real M_inf = 0.2
 
amrex::Real alpha = 0.0
 
amrex::Real gamma = Gamma
 
amrex::Real beta = 0.01
 
amrex::Real sigma = 1.0
 
amrex::Real R = 2.0
 
amrex::Real xc_frac = 0.5
 
amrex::Real yc_frac = 0.5
 
const amrex::Realprob_lo = geomdata.ProbLo()
 
const amrex::Realprob_hi = geomdata.ProbHi()
 
amrex::Real xc = xc_frac * (prob_hi[0] - prob_lo[0])
 
amrex::Real yc = yc_frac * (prob_hi[1] - prob_lo[1])
 
amrex::Real inv_gm1 = 1.0 / (gamma - 1.0)
 
amrex::Real rho_0 = p_inf / (R_d * T_inf)
 
amrex::Real a_inf = std::sqrt(gamma * R_d * T_inf)
 
const amrex::Real rdOcp = sc.rdOcp
 

Function Documentation

◆ ParallelFor()

ParallelFor ( bx  ,
[=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+0.5) *dx[0];const Real y=(j+0.5) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - 1.0)/(2.0 *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(1.0+deltaT, inv_gm1);const Real T=(1.0+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=0.25 *(1.0+std::cos(PI *std::min(r2d_xy, R)/R));}   
)

Referenced by SHOCInterface::add_fast_tend(), SHOCInterface::add_slow_tend(), add_thin_body_sources(), AddPertToBckgnd(), Morrison::Advance(), WSM6::Advance(), NOAHMP::Advance_With_State(), Kessler::AdvanceKessler(), MM5::AdvanceMM5(), SatAdj::AdvanceSatAdj(), SLM::AdvanceSLM(), AdvectionSrcForMom(), AdvectionSrcForMom_ConstantDz(), AdvectionSrcForMom_EB(), AdvectionSrcForMom_StretchedDz(), AdvectionSrcForMom_TF(), AdvectionSrcForMomWrapper(), AdvectionSrcForMomWrapper_N(), AdvectionSrcForOpenBC_Normal(), AdvectionSrcForOpenBC_Tangent_Cons(), AdvectionSrcForOpenBC_Tangent_Xmom(), AdvectionSrcForOpenBC_Tangent_Ymom(), AdvectionSrcForOpenBC_Tangent_Zmom(), AdvectionSrcForRho(), AdvectionSrcForScalars(), AdvectionSrcForScalarsWrapper(), ERF::apply_gaussian_smoothing_to_perturbations(), TurbulentPerturbation::apply_tpi(), ApplyBndryForcing_Forecast(), ApplyInvertedMask(), ApplyMask(), ApplyNeumannBCs(), ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), ApplySurfaceTreatment_BulkCoeff_CC(), ApplySurfaceTreatment_BulkCoeff_Mom(), ERF::AverageDownTo(), br_shift(), ERF::build_fine_mask(), ERFFillPatcher::BuildMask(), TurbulentPerturbation::calc_tpi_meanMag_perBox(), ERF::check_for_low_temp(), ERF::check_for_negative_theta(), SAM::Cloud(), PlaneAverage::compute_averages(), Morrison::Compute_Coefficients(), SAM::Compute_Coefficients(), ERF::compute_divergence(), SurfaceLayer::compute_fluxes(), GeneralAD::compute_freestream_velocity(), SimpleAD::compute_freestream_velocity(), compute_gradp(), compute_gradp_interpz(), MYNNPBLH::compute_pblh(), MOSTAverage::compute_plane_averages(), Fitch::compute_power_output(), EWP::compute_power_output(), MOSTAverage::compute_region_averages(), saturation_funcs::compute_saturation_pressure_H2O(), saturation_funcs::compute_saturation_vapfrac_H2O(), SurfaceLayer::compute_SurfaceLayer_bcs(), SurfaceLayer::compute_SurfaceLayer_bcs_EB(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), MM5::ComputeFluxes(), SLM::ComputeFluxes(), ComputeGlobalMinLocation(), ComputeStrain_EB(), ComputeStrain_N(), ComputeStrain_S(), ComputeStrain_T(), ComputeStressConsVisc_EB(), ComputeStressConsVisc_N(), ComputeStressConsVisc_S(), ComputeStressConsVisc_T(), ComputeStressVarVisc_EB(), ComputeStressVarVisc_N(), ComputeStressVarVisc_S(), ComputeStressVarVisc_T(), MM5::ComputeTsurf(), SLM::ComputeTsurf(), ComputeTurbulentViscosity(), ComputeTurbulentViscosityLES(), ComputeTurbulentViscosityLES_EB(), ComputeTurbulentViscosityRANS(), ConvertForProjection(), Kessler::Copy_Micro_to_State(), Morrison::Copy_Micro_to_State(), SAM::Copy_Micro_to_State(), SatAdj::Copy_Micro_to_State(), WSM6::Copy_Micro_to_State(), Kessler::Copy_State_to_Micro(), Morrison::Copy_State_to_Micro(), SAM::Copy_State_to_Micro(), SatAdj::Copy_State_to_Micro(), WSM6::Copy_State_to_Micro(), copy_surface_tau_for_implicit(), correct_outflow(), eb_aux_::define(), ForestDrag::define_drag_field(), ERF::derive_diag_profiles(), ERF::derive_diag_profiles_stag(), ERF::derive_stress_profiles(), ERF::derive_stress_profiles_stag(), DiffusionSrcForMom(), DiffusionSrcForMom_EB(), DiffusionSrcForState_EB(), DiffusionSrcForState_N(), DiffusionSrcForState_S(), DiffusionSrcForState_T(), EBAdvectionSrcForMomWrapper(), EBAdvectionSrcForRho(), EBAdvectionSrcForScalars(), EBAdvectionSrcForScalarsWrapper(), derived::erf_derenstrophysq(), derived::erf_derhelicity(), derived::erf_derlocalhelicity(), derived::erf_dermagvel(), derived::erf_dermagvelsq(), derived::erf_dermaxreflectivity(), derived::erf_dermoisttemp(), derived::erf_dermucape(), derived::erf_derprecipitable(), derived::erf_derreflectivity(), derived::erf_derrhodivide(), derived::erf_dersoundspeed(), derived::erf_dertemp(), derived::erf_dervortx(), derived::erf_dervorty(), derived::erf_dervortz(), ERF::erf_enforce_hse(), erf_init_const_dens_and_linear_th_hse(), erf_init_const_dens_hse(), erf_init_dens_hse(), erf_init_dens_hse_moist(), erf_make_tau_terms(), erf_slow_rhs_post(), erf_slow_rhs_pre(), erf_substep_MT(), erf_substep_NS(), erf_substep_T(), ERF::ErrorEst(), ERF::fill_from_bndryregs(), WindFarm::fill_Nturb_multifab(), SurfaceLayer::fill_qsurf_with_qsat(), WindFarm::fill_SMark_multifab(), WindFarm::fill_SMark_multifab_mesoscale_models(), SurfaceLayer::fill_tsurf_with_sst_and_tsk(), ERF::FillBdyCCVels(), ERF::FillForecastStateMultiFabs(), ERF::FillSurfaceStateMultiFabs(), FillZeroAreaFaceFluxes(), ERF::FindInitialEye(), fine_compute_interior_ghost_rhs(), for(), SurfaceLayer::get_lsm_tsurf(), LineSampler::get_sample_data(), PlaneSampler::get_sample_data(), HurricaneEyeTrackerInitial(), HurricaneEyeTrackerNotInitial(), HurricaneMaxVelTracker(), HurricaneMinPressureTracker(), SAM::IceFall(), if(), ImplicitDiffForMomLU_N(), ImplicitDiffForMomLU_S(), ImplicitDiffForMomLU_T(), ImplicitDiffForStateLU_N(), ImplicitDiffForStateLU_S(), ImplicitDiffForStateLU_T(), ERFPhysBCFunct_base::impose_lateral_basestate_bcs(), ERFPhysBCFunct_cons::impose_lateral_cons_bcs(), ERFPhysBCFunct_u::impose_lateral_xvel_bcs(), ERFPhysBCFunct_v::impose_lateral_yvel_bcs(), ERFPhysBCFunct_w::impose_lateral_zvel_bcs(), ERFPhysBCFunct_base::impose_vertical_basestate_bcs(), ERFPhysBCFunct_cons::impose_vertical_cons_bcs(), ERFPhysBCFunct_u::impose_vertical_xvel_bcs(), ERFPhysBCFunct_v::impose_vertical_yvel_bcs(), ERFPhysBCFunct_w::impose_vertical_zvel_bcs(), ERF::ImposeBCsOnPhi(), init_bx_scalars_from_input_sounding(), init_bx_scalars_from_input_sounding_hse(), init_bx_velocities_from_input_sounding(), ERF::init_custom(), init_default_zphys(), ERF::init_from_hse(), ERF::init_immersed_forcing(), init_my_custom_terrain(), SurfaceLayer::init_tke_from_ustar(), init_which_terrain_grid(), InterpolateToFineMF(), Radiation::kokkos_buffers_to_mf(), SHOCInterface::kokkos_buffers_to_mf(), make_areas(), make_buoyancy(), make_fast_coeffs(), make_gradp_pert(), make_J(), make_mom_sources(), make_sources(), make_terrain_fitted_coords(), make_zcc(), ERF::MakeDiagnosticAverage(), MakeFinalMultiFabs(), ERF::MakeHorizontalAverages(), SHOCInterface::mf_to_kokkos_buffers(), Radiation::mf_to_kokkos_buffers(), MomentumToVelocity(), TurbulentPerturbation::netZeroBuoyantAdd(), TurbulentPerturbation::netZeroBuoyantAdjust(), NumericalDiffusion_Scal(), NumericalDiffusion_Xmom(), NumericalDiffusion_Ymom(), ERF::poisson_wall_dist(), Radiation::populateDatalogMF(), ERF::post_timestep(), SAM::Precip(), SAM::PrecipFall(), ERF::project_momenta(), ERF::project_velocity_tb(), TurbulentPerturbation::pseudoRandomPert(), SurfaceLayer::read_custom_roughness(), ProblemBase::read_custom_terrain(), ReadBndryPlanes::read_file(), ERF::ReadCheckpointFile(), realbdy_compute_interior_ghost_rhs(), realbdy_compute_relaxation(), redistribute_term(), eb_::set_connection_flags(), SHOCInterface::set_diff_stresses(), SHOCInterface::set_eddy_diffs(), MOSTAverage::set_k_indices_T(), MOSTAverage::set_norm_indices_T(), MOSTAverage::set_norm_positions_T(), MOSTAverage::set_rotated_fields(), MOSTAverage::set_z_positions_T(), ERF::solve_with_gmres(), EWP::source_terms_cellcentered(), Fitch::source_terms_cellcentered(), GeneralAD::source_terms_cellcentered(), SimpleAD::source_terms_cellcentered(), ERF::sum_derived_quantities(), ERF::sum_energy_quantities(), tag_on_distance_from_eye(), thinbody_wall_dist(), Time_Avg_Vel_atCC(), GeneralAD::update(), SimpleAD::update(), EWP::update(), Fitch::update(), SurfaceLayer::update_fluxes(), ProblemBase::update_rhoqt_sources(), ProblemBase::update_rhotheta_sources(), VelocityToMomentum(), ERF::volWgtColumnSum(), ERF::volWgtSumMF(), ERF::Write2DPlotFile(), ERF::Write3DPlotFile(), Radiation::write_rrtmgp_fluxes(), ERF::WriteCheckpointFile(), and TurbulentPerturbation::zero_amp().

Here is the call graph for this function:

◆ pp()

ParmParse pp ( "prob"  )

◆ query() [1/10]

pp query ( "alpha"  ,
alpha   
)

◆ query() [2/10]

pp query ( "beta"  ,
beta   
)

◆ query() [3/10]

pp query ( "gamma"  ,
gamma   
)

◆ query() [4/10]

pp query ( "M_inf"  ,
M_inf   
)

◆ query() [5/10]

pp query ( "p_inf"  ,
p_inf   
)

◆ query() [6/10]

pp query ( "R"  ,
R   
)

◆ query() [7/10]

pp query ( "sigma"  ,
sigma   
)

◆ query() [8/10]

pp query ( "T_inf"  ,
T_inf   
)

◆ query() [9/10]

pp query ( "xc"  ,
xc_frac   
)

◆ query() [10/10]

pp query ( "yc"  ,
yc_frac   
)

Variable Documentation

◆ a_inf

amrex::Real a_inf = std::sqrt(gamma * R_d * T_inf)

Referenced by ParallelFor().

◆ alpha

amrex::Real alpha = 0.0

◆ beta

◆ gamma

◆ inv_gm1

amrex::Real inv_gm1 = 1.0 / (gamma - 1.0)

Referenced by ParallelFor().

◆ M_inf

amrex::Real M_inf = 0.2

◆ p_inf

amrex::Real p_inf = p_0

◆ prob_hi

const amrex::Real* prob_hi = geomdata.ProbHi()

◆ prob_lo

◆ R

amrex::Real R = 2.0

Referenced by erf_vortex_Gaussian(), and ParallelFor().

◆ rdOcp

const amrex::Real rdOcp = sc.rdOcp

Referenced by ParallelFor().

◆ rho_0

amrex::Real rho_0 = p_inf / (R_d * T_inf)

Referenced by ParallelFor().

◆ sigma

◆ T_inf

amrex::Real T_inf = 300.0

Referenced by ParallelFor().

◆ xc

amrex::Real xc = xc_frac * (prob_hi[0] - prob_lo[0])

Referenced by ParallelFor().

◆ xc_frac

amrex::Real xc_frac = 0.5

◆ yc

amrex::Real yc = yc_frac * (prob_hi[1] - prob_lo[1])

Referenced by ParallelFor().

◆ yc_frac

amrex::Real yc_frac = 0.5