ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_UpdateRhoThetaSources_RICO.H
Go to the documentation of this file.
1  ParmParse pp_prob("prob");
2 
3  Real advection_heating_rate = zero; pp_prob.query("advection_heating_rate", advection_heating_rate);
4 
5  // If the z coordinate varies in time and or space, then the the height
6  // needs to be calculated at each time step. Here, we assume that only
7  // grid stretching exists.
8 
9  // Only apply temperature source below nominal inversion height
10  for ( amrex::MFIter mfi(*src, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi )
11  {
12  const auto &box = mfi.tilebox();
13  const Array4<Real>& src_arr = src->array(mfi);
14  if (box.length(0) == 1) {
15  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) {
16  src_arr(i, j, k) = advection_heating_rate;
17  });
18  }
19  }
constexpr amrex::Real zero
Definition: ERF_Constants.H:6
ParallelFor(grown_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Real advection_heating_rate
Definition: ERF_UpdateRhoThetaSources_RICO.H:3
ParmParse pp_prob("prob")