ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_MakeSources.cpp File Reference
#include <AMReX_MultiFab.H>
#include <AMReX_ArrayLim.H>
#include <AMReX_BCRec.H>
#include <AMReX_TableData.H>
#include <AMReX_GpuContainers.H>
#include <ERF_NumericalDiffusion.H>
#include <ERF_SrcHeaders.H>
#include <ERF_TI_slow_headers.H>
Include dependency graph for ERF_MakeSources.cpp:

Functions

void make_sources (int level, int, Real dt, Real time, const Vector< MultiFab > &S_data, const MultiFab &S_prim, MultiFab &source, const MultiFab &base_state, std::unique_ptr< MultiFab > &z_phys_cc, const MultiFab *qheating_rates, MultiFab *terrain_blank, const Geometry geom, const SolverChoice &solverChoice, Vector< std::unique_ptr< MultiFab >> &mapfac, const Real *dptr_rhotheta_src, const Real *dptr_rhoqt_src, const Real *dptr_wbar_sub, const Vector< Real * > d_rayleigh_ptrs_at_lev, InputSoundingData &input_sounding_data, TurbulentPerturbation &turbPert, bool is_slow_step)
 

Function Documentation

◆ make_sources()

void make_sources ( int  level,
int  ,
Real  dt,
Real  time,
const Vector< MultiFab > &  S_data,
const MultiFab &  S_prim,
MultiFab &  source,
const MultiFab &  base_state,
std::unique_ptr< MultiFab > &  z_phys_cc,
const MultiFab *  qheating_rates,
MultiFab *  terrain_blank,
const Geometry  geom,
const SolverChoice solverChoice,
Vector< std::unique_ptr< MultiFab >> &  mapfac,
const Real *  dptr_rhotheta_src,
const Real *  dptr_rhoqt_src,
const Real *  dptr_wbar_sub,
const Vector< Real * >  d_rayleigh_ptrs_at_lev,
InputSoundingData input_sounding_data,
TurbulentPerturbation turbPert,
bool  is_slow_step 
)

Function for computing the slow RHS for the evolution equations for the density, potential temperature and momentum.

Parameters
[in]levellevel of resolution
[in]nrkwhich RK stage
[in]dtslow time step
[in]S_datacurrent solution
[in]S_primprimitive variables (i.e. conserved variables divided by density)
[in]sourcesource terms for conserved variables
[in]geomContainer for geometric information
[in]solverChoiceContainer for solver parameters
[in]mapfacmap factors
[in]dptr_rhotheta_srccustom temperature source term
[in]dptr_rhoqt_srccustom moisture source term
[in]dptr_wbar_subsubsidence source term
[in]d_rayleigh_ptrs_at_levVector of {strength of Rayleigh damping, reference value of theta} used to define Rayleigh damping
50 {
51  BL_PROFILE_REGION("erf_make_sources()");
52 
53  // *****************************************************************************
54  // Initialize source to zero since we re-compute it every RK stage
55  // *****************************************************************************
56  if (is_slow_step) {
57  source.setVal(0.);
58  } else {
59  source.setVal(0.0,Rho_comp,2);
60  }
61 
62  const bool l_use_ndiff = solverChoice.use_num_diff;
63 
64  TurbChoice tc = solverChoice.turbChoice[level];
65  const bool l_use_KE = tc.use_tke;
66  const bool l_diff_KE = tc.diffuse_tke_3D;
67 
68  const Box& domain = geom.Domain();
69 
70  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
71 
72  MultiFab r_hse (base_state, make_alias, BaseState::r0_comp , 1);
73 
74  Real* thetabar = d_rayleigh_ptrs_at_lev[Rayleigh::thetabar];
75 
76  // flags to apply certain source terms in substep call only
77  bool use_Rayleigh_fast = solverChoice.rayleigh_damp_substep;
78  bool use_ImmersedForcing_fast = solverChoice.immersed_forcing_substep;
79 
80  // *****************************************************************************
81  // Planar averages for subsidence terms
82  // *****************************************************************************
83  Table1D<Real> dptr_r_plane, dptr_t_plane, dptr_qv_plane, dptr_qc_plane;
84  TableData<Real, 1> r_plane_tab, t_plane_tab, qv_plane_tab, qc_plane_tab;
85  bool compute_averages = false;
86  compute_averages = compute_averages ||
87  ( (solverChoice.terrain_type == TerrainType::ImmersedForcing) &&
88  ((is_slow_step && !use_ImmersedForcing_fast) || (!is_slow_step && use_ImmersedForcing_fast)));
89  compute_averages = compute_averages ||
90  ( is_slow_step && (dptr_wbar_sub || solverChoice.nudging_from_input_sounding) );
91 
92  if (compute_averages)
93  {
94  //
95  // The call to "compute_averages" currently does all the components in one call
96  // We can then extract each component separately with the "line_average" call
97  //
98  // We need just one ghost cell in the vertical
99  //
100  IntVect ng_c(S_data[IntVars::cons].nGrowVect()); ng_c[2] = 1;
101  //
102  // With no moisture we only (rho) and (rho theta); with moisture we also do qv and qc
103  // We use the alias here to control ncomp inside the PlaneAverage
104  //
105  int ncomp = (solverChoice.moisture_type == MoistureType::None) ? 2 : RhoQ2_comp+1;
106  MultiFab cons(S_data[IntVars::cons], make_alias, 0, ncomp);
107 
108  PlaneAverage cons_ave(&cons, geom, solverChoice.ave_plane, ng_c);
109  cons_ave.compute_averages(ZDir(), cons_ave.field());
110 
111  int ncell = cons_ave.ncell_line();
112 
113  Gpu::HostVector< Real> r_plane_h(ncell);
114  Gpu::DeviceVector< Real> r_plane_d(ncell);
115 
116  Gpu::HostVector< Real> t_plane_h(ncell);
117  Gpu::DeviceVector< Real> t_plane_d(ncell);
118 
119  cons_ave.line_average(Rho_comp , r_plane_h);
120  cons_ave.line_average(RhoTheta_comp, t_plane_h);
121 
122  Gpu::copyAsync(Gpu::hostToDevice, r_plane_h.begin(), r_plane_h.end(), r_plane_d.begin());
123  Gpu::copyAsync(Gpu::hostToDevice, t_plane_h.begin(), t_plane_h.end(), t_plane_d.begin());
124 
125  Real* dptr_r = r_plane_d.data();
126  Real* dptr_t = t_plane_d.data();
127 
128  Box tdomain = domain; tdomain.grow(2,ng_c[2]);
129  r_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
130  t_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
131 
132  int offset = ng_c[2];
133 
134  dptr_r_plane = r_plane_tab.table();
135  dptr_t_plane = t_plane_tab.table();
136  ParallelFor(ncell, [=] AMREX_GPU_DEVICE (int k) noexcept
137  {
138  dptr_r_plane(k-offset) = dptr_r[k];
139  dptr_t_plane(k-offset) = dptr_t[k];
140  });
141 
142  if (solverChoice.moisture_type != MoistureType::None)
143  {
144  Gpu::HostVector< Real> qv_plane_h(ncell), qc_plane_h(ncell);
145  Gpu::DeviceVector<Real> qv_plane_d(ncell), qc_plane_d(ncell);
146 
147  // Water vapor
148  cons_ave.line_average(RhoQ1_comp, qv_plane_h);
149  Gpu::copyAsync(Gpu::hostToDevice, qv_plane_h.begin(), qv_plane_h.end(), qv_plane_d.begin());
150 
151  // Cloud water
152  cons_ave.line_average(RhoQ2_comp, qc_plane_h);
153  Gpu::copyAsync(Gpu::hostToDevice, qc_plane_h.begin(), qc_plane_h.end(), qc_plane_d.begin());
154 
155  Real* dptr_qv = qv_plane_d.data();
156  Real* dptr_qc = qc_plane_d.data();
157 
158  qv_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
159  qc_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
160 
161  dptr_qv_plane = qv_plane_tab.table();
162  dptr_qc_plane = qc_plane_tab.table();
163  ParallelFor(ncell, [=] AMREX_GPU_DEVICE (int k) noexcept
164  {
165  dptr_qv_plane(k-offset) = dptr_qv[k];
166  dptr_qc_plane(k-offset) = dptr_qc[k];
167  });
168  }
169  }
170 
171  // *****************************************************************************
172  // Define source term for cell-centered conserved variables, from
173  // 1. user-defined source terms for (rho theta) and (rho q_t)
174  // 2. radiation for (rho theta)
175  // 3. Rayleigh damping for (rho theta)
176  // 4. custom forcing for (rho theta) and (rho Q1)
177  // 5. custom subsidence for (rho theta) and (rho Q1)
178  // 6. numerical diffusion for (rho theta)
179  // 7. sponging
180  // 8. turbulent perturbation
181  // 9. nudging towards input sounding values (only for theta)
182  // 10. Immersed forcing
183  // *****************************************************************************
184 
185  // ***********************************************************************************************
186  // Add remaining source terms
187  // ***********************************************************************************************
188 #ifdef _OPENMP
189 #pragma omp parallel if (Gpu::notInLaunchRegion())
190 #endif
191  {
192  for ( MFIter mfi(S_data[IntVars::cons],TileNoZ()); mfi.isValid(); ++mfi)
193  {
194  Box bx = mfi.tilebox();
195 
196  const Array4<const Real>& cell_data = S_data[IntVars::cons].array(mfi);
197  const Array4<const Real>& cell_prim = S_prim.array(mfi);
198  const Array4<Real> & cell_src = source.array(mfi);
199 
200  const Array4<const Real>& r0 = r_hse.const_array(mfi);
201 
202  const Array4<const Real>& z_cc_arr = z_phys_cc->const_array(mfi);
203 
204  const Array4<const Real>& t_blank_arr = (terrain_blank) ? terrain_blank->const_array(mfi) :
205  Array4<const Real>{};
206 
207  // *************************************************************************************
208  // 2. Add radiation source terms to (rho theta)
209  // *************************************************************************************
210  if (solverChoice.rad_type != RadiationType::None && is_slow_step) {
211  auto const& qheating_arr = qheating_rates->const_array(mfi);
212  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
213  {
214  // Short-wavelength and long-wavelength radiation source terms
215  cell_src(i,j,k,RhoTheta_comp) += cell_data(i,j,k,Rho_comp) * ( qheating_arr(i,j,k,0) + qheating_arr(i,j,k,1) );
216  });
217  }
218 
219 
220  // *************************************************************************************
221  // 3. Add Rayleigh damping for (rho theta)
222  // *************************************************************************************
223  Real ztop = solverChoice.rayleigh_ztop;
224  Real zdamp = solverChoice.rayleigh_zdamp;
225  Real dampcoef = solverChoice.rayleigh_dampcoef;
226 
227  if ((is_slow_step && !use_Rayleigh_fast) || (!is_slow_step && use_Rayleigh_fast)) {
228  if (solverChoice.rayleigh_damp_T) {
229  int n = RhoTheta_comp;
230  int nr = Rho_comp;
231  int np = PrimTheta_comp;
232  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
233  {
234  Real zcc = z_cc_arr(i,j,k);
235  Real zfrac = 1 - (ztop - zcc) / zdamp;
236  if (zfrac > 0) {
237  Real theta = cell_prim(i,j,k,np);
238  Real sinefac = std::sin(PIoTwo*zfrac);
239  cell_src(i, j, k, n) -= dampcoef*sinefac*sinefac * (theta - thetabar[k]) * cell_data(i,j,k,nr);
240  }
241  });
242  }
243  }
244 
245  // *************************************************************************************
246  // 4. Add custom forcing for (rho theta)
247  // *************************************************************************************
248  if (solverChoice.custom_rhotheta_forcing && is_slow_step) {
249  const int n = RhoTheta_comp;
250  if (solverChoice.custom_forcing_prim_vars) {
251  const int nr = Rho_comp;
252  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
253  {
254  cell_src(i, j, k, n) += cell_data(i,j,k,nr) * dptr_rhotheta_src[k];
255  });
256  } else {
257  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
258  {
259  cell_src(i, j, k, n) += dptr_rhotheta_src[k];
260  });
261  }
262  }
263 
264  // *************************************************************************************
265  // 4. Add custom forcing for RhoQ1
266  // *************************************************************************************
267  if (solverChoice.custom_moisture_forcing && is_slow_step) {
268  const int n = RhoQ1_comp;
269  if (solverChoice.custom_forcing_prim_vars) {
270  const int nr = Rho_comp;
271  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
272  {
273  cell_src(i, j, k, n) += cell_data(i,j,k,nr) * dptr_rhoqt_src[k];
274  });
275  } else {
276  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
277  {
278  cell_src(i, j, k, n) += dptr_rhoqt_src[k];
279  });
280  }
281  }
282 
283  // *************************************************************************************
284  // 5. Add custom subsidence for (rho theta)
285  // *************************************************************************************
286  if (solverChoice.custom_w_subsidence && is_slow_step) {
287  const int n = RhoTheta_comp;
288  if (solverChoice.custom_forcing_prim_vars) {
289  const int nr = Rho_comp;
290  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
291  {
292  Real dzInv = (z_cc_arr) ? 1.0/ (z_cc_arr(i,j,k+1) - z_cc_arr(i,j,k-1)) : 0.5*dxInv[2];
293  Real T_hi = dptr_t_plane(k+1) / dptr_r_plane(k+1);
294  Real T_lo = dptr_t_plane(k-1) / dptr_r_plane(k-1);
295  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
296  cell_src(i, j, k, n) -= cell_data(i,j,k,nr) * wbar_cc * (T_hi - T_lo) * dzInv;
297  });
298  } else {
299  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
300  {
301  Real dzInv = (z_cc_arr) ? 1.0/ (z_cc_arr(i,j,k+1) - z_cc_arr(i,j,k-1)) : 0.5*dxInv[2];
302  Real T_hi = dptr_t_plane(k+1) / dptr_r_plane(k+1);
303  Real T_lo = dptr_t_plane(k-1) / dptr_r_plane(k-1);
304  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
305  cell_src(i, j, k, n) -= wbar_cc * (T_hi - T_lo) * dzInv;
306  });
307  }
308  }
309 
310  // *************************************************************************************
311  // 5. Add custom subsidence for RhoQ1 and RhoQ2
312  // *************************************************************************************
313  if (solverChoice.custom_w_subsidence && (solverChoice.moisture_type != MoistureType::None) && is_slow_step) {
314  const int nv = RhoQ1_comp;
315  if (solverChoice.custom_forcing_prim_vars) {
316  const int nr = Rho_comp;
317  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
318  {
319  Real dzInv = (z_cc_arr) ? 1.0/ (z_cc_arr(i,j,k+1) - z_cc_arr(i,j,k-1)) : 0.5*dxInv[2];
320  Real Qv_hi = dptr_qv_plane(k+1) / dptr_r_plane(k+1);
321  Real Qv_lo = dptr_qv_plane(k-1) / dptr_r_plane(k-1);
322  Real Qc_hi = dptr_qc_plane(k+1) / dptr_r_plane(k+1);
323  Real Qc_lo = dptr_qc_plane(k-1) / dptr_r_plane(k-1);
324  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
325  cell_src(i, j, k, nv ) -= cell_data(i,j,k,nr) * wbar_cc * (Qv_hi - Qv_lo) * dzInv;
326  cell_src(i, j, k, nv+1) -= cell_data(i,j,k,nr) * wbar_cc * (Qc_hi - Qc_lo) * dzInv;
327  });
328  } else {
329  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
330  {
331  Real dzInv = (z_cc_arr) ? 1.0/ (z_cc_arr(i,j,k+1) - z_cc_arr(i,j,k-1)) : 0.5*dxInv[2];
332  Real Qv_hi = dptr_qv_plane(k+1) / dptr_r_plane(k+1);
333  Real Qv_lo = dptr_qv_plane(k-1) / dptr_r_plane(k-1);
334  Real Qc_hi = dptr_qc_plane(k+1) / dptr_r_plane(k+1);
335  Real Qc_lo = dptr_qc_plane(k-1) / dptr_r_plane(k-1);
336  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
337  cell_src(i, j, k, nv ) -= wbar_cc * (Qv_hi - Qv_lo) * dzInv;
338  cell_src(i, j, k, nv+1) -= wbar_cc * (Qc_hi - Qc_lo) * dzInv;
339  });
340  }
341  }
342 
343  // *************************************************************************************
344  // 6. Add numerical diffuion for rho and (rho theta)
345  // *************************************************************************************
346  if (l_use_ndiff && is_slow_step) {
347  int sc;
348  int nc;
349 
350  const Array4<const Real>& mf_mx = mapfac[MapFacType::m_x]->const_array(mfi);
351  const Array4<const Real>& mf_my = mapfac[MapFacType::m_y]->const_array(mfi);
352 
353  // Rho is a special case
354  NumericalDiffusion_Scal(bx, sc=0, nc=1, dt, solverChoice.num_diff_coeff,
355  cell_data, cell_data, cell_src, mf_mx, mf_my);
356 
357  // Other scalars proceed as normal
358  NumericalDiffusion_Scal(bx, sc=1, nc=1, dt, solverChoice.num_diff_coeff,
359  cell_prim, cell_data, cell_src, mf_mx, mf_my);
360 
361 
362  if (l_use_KE && l_diff_KE) {
363  NumericalDiffusion_Scal(bx, sc=RhoKE_comp, nc=1, dt, solverChoice.num_diff_coeff,
364  cell_prim, cell_data, cell_src, mf_mx, mf_my);
365  }
366 
368  cell_prim, cell_data, cell_src, mf_mx, mf_my);
369  }
370 
371  // *************************************************************************************
372  // 7. Add sponging
373  // *************************************************************************************
374  if(!(solverChoice.spongeChoice.sponge_type == "input_sponge") && is_slow_step){
375  ApplySpongeZoneBCsForCC(solverChoice.spongeChoice, geom, bx, cell_src, cell_data, r0, z_cc_arr);
376  }
377 
378  // *************************************************************************************
379  // 8. Add perturbation
380  // *************************************************************************************
381  if (solverChoice.pert_type == PerturbationType::Source && is_slow_step) {
382  auto m_ixtype = S_data[IntVars::cons].boxArray().ixType(); // Conserved term
383  const amrex::Array4<const amrex::Real>& pert_cell = turbPert.pb_cell[level].const_array(mfi);
384  turbPert.apply_tpi(level, bx, RhoTheta_comp, m_ixtype, cell_src, pert_cell); // Applied as source term
385  }
386 
387  // *************************************************************************************
388  // 9. Add nudging towards value specified in input sounding
389  // *************************************************************************************
390  if (solverChoice.nudging_from_input_sounding && is_slow_step)
391  {
392  int itime_n = 0;
393  int itime_np1 = 0;
394  Real coeff_n = Real(1.0);
395  Real coeff_np1 = Real(0.0);
396 
397  Real tau_inv = Real(1.0) / input_sounding_data.tau_nudging;
398 
399  int n_sounding_times = input_sounding_data.input_sounding_time.size();
400 
401  for (int nt = 1; nt < n_sounding_times; nt++) {
402  if (time > input_sounding_data.input_sounding_time[nt]) itime_n = nt;
403  }
404  if (itime_n == n_sounding_times-1) {
405  itime_np1 = itime_n;
406  } else {
407  itime_np1 = itime_n+1;
408  coeff_np1 = (time - input_sounding_data.input_sounding_time[itime_n]) /
409  (input_sounding_data.input_sounding_time[itime_np1] - input_sounding_data.input_sounding_time[itime_n]);
410  coeff_n = Real(1.0) - coeff_np1;
411  }
412 
413  const Real* theta_inp_sound_n = input_sounding_data.theta_inp_sound_d[itime_n].dataPtr();
414  const Real* theta_inp_sound_np1 = input_sounding_data.theta_inp_sound_d[itime_np1].dataPtr();
415 
416  const int n = RhoTheta_comp;
417  const int nr = Rho_comp;
418 
419  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
420  {
421  Real nudge = (coeff_n*theta_inp_sound_n[k] + coeff_np1*theta_inp_sound_np1[k]) - (dptr_t_plane(k)/dptr_r_plane(k));
422  nudge *= tau_inv;
423  cell_src(i, j, k, n) += cell_data(i, j, k, nr) * nudge;
424  });
425  }
426 
427  // *************************************************************************************
428  // 10. Add Immersed source terms
429  // *************************************************************************************
430  if (solverChoice.terrain_type == TerrainType::ImmersedForcing &&
431  ((is_slow_step && !use_ImmersedForcing_fast) || (!is_slow_step && use_ImmersedForcing_fast)))
432  {
433  Real dz = geom.CellSize(2);
434  const Real drag_coefficient = 10.0/dz;
435  const Real CdT = drag_coefficient;
436  const Real U_s = 1.0;
437  ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
438  {
439  const Real t_blank = t_blank_arr(i, j, k);
440  cell_src(i, j, k, RhoTheta_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,RhoTheta_comp) - dptr_t_plane(k));
441  cell_src(i, j, k, Rho_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,Rho_comp) - dptr_r_plane(k));
442  });
443  }
444 
445 
446  } // mfi
447  } // OMP
448 }
void ApplySpongeZoneBCsForCC(const SpongeChoice &spongeChoice, const Geometry geom, const Box &bx, const Array4< Real > &cell_rhs, const Array4< const Real > &cell_data, const Array4< const Real > &r0, const Array4< const Real > &z_phys_cc)
Definition: ERF_ApplySpongeZoneBCs.cpp:7
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:7
@ thetabar
Definition: ERF_DataStruct.H:83
@ m_y
Definition: ERF_DataStruct.H:22
@ m_x
Definition: ERF_DataStruct.H:21
DirectionSelector< 2 > ZDir
Definition: ERF_DirectionSelector.H:38
#define RhoScalar_comp
Definition: ERF_IndexDefines.H:40
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define RhoQ2_comp
Definition: ERF_IndexDefines.H:43
#define NSCALARS
Definition: ERF_IndexDefines.H:16
#define PrimTheta_comp
Definition: ERF_IndexDefines.H:50
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:42
#define RhoKE_comp
Definition: ERF_IndexDefines.H:38
void NumericalDiffusion_Scal(const Box &bx, const int start_comp, const int num_comp, const Real dt, const Real num_diff_coeff, const Array4< const Real > &prim_data, const Array4< const Real > &cell_data, const Array4< Real > &rhs, const Array4< const Real > &mfx_arr, const Array4< const Real > &mfy_arr)
Definition: ERF_NumericalDiffusion.cpp:18
AMREX_FORCE_INLINE IntVect offset(const int face_dir, const int normal)
Definition: ERF_ReadBndryPlanes.cpp:28
AMREX_FORCE_INLINE amrex::IntVect TileNoZ()
Definition: ERF_TileNoZ.H:11
Definition: ERF_PlaneAverage.H:14
@ r0_comp
Definition: ERF_IndexDefines.H:63
@ cons
Definition: ERF_IndexDefines.H:158
@ theta
Definition: ERF_MM5.H:20
@ nc
Definition: ERF_Morrison.H:44
@ nr
Definition: ERF_Morrison.H:45
@ cons
Definition: ERF_IndexDefines.H:140
amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > theta_inp_sound_d
Definition: ERF_InputSoundingData.H:326
amrex::Vector< amrex::Real > input_sounding_time
Definition: ERF_InputSoundingData.H:315
amrex::Real tau_nudging
Definition: ERF_InputSoundingData.H:312
bool rayleigh_damp_T
Definition: ERF_DataStruct.H:722
bool rayleigh_damp_substep
Definition: ERF_DataStruct.H:726
amrex::Real rayleigh_zdamp
Definition: ERF_DataStruct.H:724
RadiationType rad_type
Definition: ERF_DataStruct.H:787
bool custom_rhotheta_forcing
Definition: ERF_DataStruct.H:753
bool custom_w_subsidence
Definition: ERF_DataStruct.H:755
bool nudging_from_input_sounding
Definition: ERF_DataStruct.H:761
amrex::Real rayleigh_ztop
Definition: ERF_DataStruct.H:725
bool immersed_forcing_substep
Definition: ERF_DataStruct.H:729
bool use_num_diff
Definition: ERF_DataStruct.H:773
bool custom_moisture_forcing
Definition: ERF_DataStruct.H:754
amrex::Real num_diff_coeff
Definition: ERF_DataStruct.H:774
amrex::Vector< TurbChoice > turbChoice
Definition: ERF_DataStruct.H:698
MoistureType moisture_type
Definition: ERF_DataStruct.H:783
bool custom_forcing_prim_vars
Definition: ERF_DataStruct.H:757
static TerrainType terrain_type
Definition: ERF_DataStruct.H:681
PerturbationType pert_type
Definition: ERF_DataStruct.H:770
SpongeChoice spongeChoice
Definition: ERF_DataStruct.H:697
amrex::Real rayleigh_dampcoef
Definition: ERF_DataStruct.H:723
int ave_plane
Definition: ERF_DataStruct.H:798
std::string sponge_type
Definition: ERF_SpongeStruct.H:58
Definition: ERF_TurbStruct.H:31
bool use_tke
Definition: ERF_TurbStruct.H:285
bool diffuse_tke_3D
Definition: ERF_TurbStruct.H:297
amrex::Vector< amrex::MultiFab > pb_cell
Definition: ERF_TurbPertStruct.H:647
void apply_tpi(const int &lev, const amrex::Box &vbx, const int &comp, const amrex::IndexType &m_ixtype, const amrex::Array4< amrex::Real > &src_arr, const amrex::Array4< amrex::Real const > &pert_cell)
Definition: ERF_TurbPertStruct.H:324
Here is the call graph for this function: