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

Go to the source code of this file.

Functions

ParmParse pp_prob ("prob")
 
pp_prob query ("advection_moisture_rate", advection_moisture_rate)
 
pp_prob query ("moisture_source_cutoff", moisture_cutoff)
 
 for (MFIter mfi(*qsrc, TilingIfNotGPU());mfi.isValid();++mfi)
 

Variables

Real advection_moisture_rate = zero
 
Real moisture_cutoff = amrex::Real(500.0)
 

Function Documentation

◆ for()

for ( MFIter mfi(*,  TilingIfNotGPU)
8  {
9  const auto &box = mfi.tilebox();
10  const Array4<Real>& qsrc_arr = qsrc->array(mfi);
11  if (box.length(0) == 1)
12  {
13  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) {
14  const Real z_cc = d_zlevels_arr[k];
15  if (z_cc < moisture_cutoff) {
16  qsrc_arr(i, j, k) = amrex::Real(5.226199353716133e-12)*z_cc + advection_moisture_rate;
17  } else {
18  qsrc_arr(i, j, k) = amrex::Real(5.226199353716133e-12)*amrex::Real(2980.0) + advection_moisture_rate;
19  }
20  });
21  }
22  }
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo=geomdata.ProbLo();const auto dx=geomdata.CellSize();const Real x=(prob_lo[0]+(i+myhalf) *dx[0])/mf_m(i, j, 0);const Real z=z_cc(i, j, k);Real L=std::sqrt(std::pow((x - x_c)/x_r, 2)+std::pow((z - z_c)/z_r, 2));if(L<=one) { Real dT=T_pert *(std::cos(PI *L)+one)/two;Real Tbar_hse=p_hse(i, j, k)/(R_d *r_hse(i, j, k));Real theta_perturbed=(Tbar_hse+dT) *std::pow(p_0/p_hse(i, j, k), rdOcp);Real theta_0=(Tbar_hse) *std::pow(p_0/p_hse(i, j, k), rdOcp);if(const_rho) { state_pert(i, j, k, RhoTheta_comp)=r_hse(i, j, k) *(theta_perturbed - theta_0);} else { state_pert(i, j, k, Rho_comp)=getRhoThetagivenP(p_hse(i, j, k))/theta_perturbed - r_hse(i, j, k);} } })
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Real moisture_cutoff
Definition: ERF_UpdateRhoQtSources_RICO.H:4
Real advection_moisture_rate
Definition: ERF_UpdateRhoQtSources_RICO.H:3
Here is the call graph for this function:

◆ pp_prob()

ParmParse pp_prob ( "prob"  )

◆ query() [1/2]

pp_prob query ( "advection_moisture_rate"  ,
advection_moisture_rate   
)

◆ query() [2/2]

pp_prob query ( "moisture_source_cutoff"  ,
moisture_cutoff   
)

Variable Documentation

◆ advection_moisture_rate

Real advection_moisture_rate = zero

Referenced by for().

◆ moisture_cutoff

Real moisture_cutoff = amrex::Real(500.0)

Referenced by for().