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, Vector< MultiFab > &S_data, const MultiFab &S_prim, MultiFab &source, std::unique_ptr< MultiFab > &z_phys_cc, MultiFab *terrain_blank, const Geometry geom, const SolverChoice &solverChoice, std::unique_ptr< MultiFab > &, std::unique_ptr< MultiFab > &, std::unique_ptr< MultiFab > &mapfac_m, 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)
 

Function Documentation

◆ make_sources()

void make_sources ( int  level,
int  ,
Real  dt,
Real  time,
Vector< MultiFab > &  S_data,
const MultiFab &  S_prim,
MultiFab &  source,
std::unique_ptr< MultiFab > &  z_phys_cc,
MultiFab *  terrain_blank,
const Geometry  geom,
const SolverChoice solverChoice,
std::unique_ptr< MultiFab > &  ,
std::unique_ptr< MultiFab > &  ,
std::unique_ptr< MultiFab > &  mapfac_m,
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 
)

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]mapfac_umap factor at x-faces
[in]mapfac_vmap factor at y-faces
[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
53 {
54  BL_PROFILE_REGION("erf_make_sources()");
55 
56  // *****************************************************************************
57  // Initialize source to zero since we re-compute it every RK stage
58  // *****************************************************************************
59  source.setVal(0.0);
60 
61  const bool l_use_ndiff = solverChoice.use_num_diff;
62 
63  TurbChoice tc = solverChoice.turbChoice[level];
64  const bool l_use_KE = ( (tc.les_type == LESType::Deardorff) ||
65  (tc.rans_type == RANSType::kEqn) ||
66  (tc.pbl_type == PBLType::MYNN25) ||
67  (tc.pbl_type == PBLType::MYNNEDMF) );
68  const bool l_diff_KE = tc.diffuse_KE_3D;
69 
70  const Box& domain = geom.Domain();
71 
72  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
73 
74  Real* thetabar = d_rayleigh_ptrs_at_lev[Rayleigh::thetabar];
75 
76  // *****************************************************************************
77  // Planar averages for subsidence terms
78  // *****************************************************************************
79  Table1D<Real> dptr_r_plane, dptr_t_plane, dptr_qv_plane, dptr_qc_plane;
80  TableData<Real, 1> r_plane_tab, t_plane_tab, qv_plane_tab, qc_plane_tab;
81  if (dptr_wbar_sub || solverChoice.nudging_from_input_sounding || solverChoice.terrain_type == TerrainType::ImmersedForcing)
82  {
83  // Rho
84  PlaneAverage r_ave(&(S_data[IntVars::cons]), geom, solverChoice.ave_plane, true);
85  r_ave.compute_averages(ZDir(), r_ave.field());
86 
87  int ncell = r_ave.ncell_line();
88  Gpu::HostVector< Real> r_plane_h(ncell);
89  Gpu::DeviceVector< Real> r_plane_d(ncell);
90 
91  r_ave.line_average(Rho_comp, r_plane_h);
92 
93  Gpu::copyAsync(Gpu::hostToDevice, r_plane_h.begin(), r_plane_h.end(), r_plane_d.begin());
94 
95  Real* dptr_r = r_plane_d.data();
96 
97  IntVect ng_c = S_data[IntVars::cons].nGrowVect();
98  Box tdomain = domain; tdomain.grow(2,ng_c[2]);
99  r_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
100 
101  int offset = ng_c[2];
102  dptr_r_plane = r_plane_tab.table();
103  ParallelFor(ncell, [=] AMREX_GPU_DEVICE (int k) noexcept
104  {
105  dptr_r_plane(k-offset) = dptr_r[k];
106  });
107 
108  // Rho * Theta
109  PlaneAverage t_ave(&(S_data[IntVars::cons]), geom, solverChoice.ave_plane, true);
110  t_ave.compute_averages(ZDir(), t_ave.field());
111 
112  Gpu::HostVector< Real> t_plane_h(ncell);
113  Gpu::DeviceVector< Real> t_plane_d(ncell);
114 
115  t_ave.line_average(RhoTheta_comp, t_plane_h);
116 
117  Gpu::copyAsync(Gpu::hostToDevice, t_plane_h.begin(), t_plane_h.end(), t_plane_d.begin());
118 
119  Real* dptr_t = t_plane_d.data();
120 
121  t_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
122 
123  dptr_t_plane = t_plane_tab.table();
124  ParallelFor(ncell, [=] AMREX_GPU_DEVICE (int k) noexcept
125  {
126  dptr_t_plane(k-offset) = dptr_t[k];
127  });
128 
129  if (solverChoice.moisture_type != MoistureType::None)
130  {
131  Gpu::HostVector< Real> qv_plane_h(ncell), qc_plane_h(ncell);
132  Gpu::DeviceVector<Real> qv_plane_d(ncell), qc_plane_d(ncell);
133 
134  // Water vapor
135  PlaneAverage qv_ave(&(S_data[IntVars::cons]), geom, solverChoice.ave_plane, true);
136  qv_ave.compute_averages(ZDir(), qv_ave.field());
137  qv_ave.line_average(RhoQ1_comp, qv_plane_h);
138  Gpu::copyAsync(Gpu::hostToDevice, qv_plane_h.begin(), qv_plane_h.end(), qv_plane_d.begin());
139 
140  // Cloud water
141  PlaneAverage qc_ave(&(S_data[IntVars::cons]), geom, solverChoice.ave_plane, true);
142  qc_ave.compute_averages(ZDir(), qc_ave.field());
143  qc_ave.line_average(RhoQ2_comp, qc_plane_h);
144  Gpu::copyAsync(Gpu::hostToDevice, qc_plane_h.begin(), qc_plane_h.end(), qc_plane_d.begin());
145 
146  Real* dptr_qv = qv_plane_d.data();
147  Real* dptr_qc = qc_plane_d.data();
148 
149  qv_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
150  qc_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
151 
152  dptr_qv_plane = qv_plane_tab.table();
153  dptr_qc_plane = qc_plane_tab.table();
154  ParallelFor(ncell, [=] AMREX_GPU_DEVICE (int k) noexcept
155  {
156  dptr_qv_plane(k-offset) = dptr_qv[k];
157  dptr_qc_plane(k-offset) = dptr_qc[k];
158  });
159  }
160  }
161 
162  // *****************************************************************************
163  // Define source term for cell-centered conserved variables, from
164  // 1. user-defined source terms for (rho theta) and (rho q_t)
165  // 2. radiation for (rho theta)
166  // 3. Rayleigh damping for (rho theta)
167  // 4. custom forcing for (rho theta) and (rho Q1)
168  // 5. custom subsidence for (rho theta) and (rho Q1)
169  // 6. numerical diffusion for (rho theta)
170  // 7. sponging
171  // 8. turbulent perturbation
172  // 9. nudging towards input sounding values (only for theta)
173  // 10. Immersed forcing
174  // *****************************************************************************
175 
176  // ***********************************************************************************************
177  // Add remaining source terms
178  // ***********************************************************************************************
179 #ifdef _OPENMP
180 #pragma omp parallel if (Gpu::notInLaunchRegion())
181 #endif
182  {
183  for ( MFIter mfi(S_data[IntVars::cons],TileNoZ()); mfi.isValid(); ++mfi)
184  {
185  Box bx = mfi.tilebox();
186 
187  const Array4<const Real> & cell_data = S_data[IntVars::cons].array(mfi);
188  const Array4<const Real> & cell_prim = S_prim.array(mfi);
189  const Array4<Real> & cell_src = source.array(mfi);
190 
191  const Array4<const Real>& z_cc_arr = z_phys_cc->const_array(mfi);
192 
193  const Array4<const Real>& t_blank_arr = (terrain_blank) ? terrain_blank->const_array(mfi) :
194  Array4<const Real>{};
195 
196 #ifdef ERF_USE_RRTMGP
197  // *************************************************************************************
198  // 2. Add radiation source terms to (rho theta)
199  // *************************************************************************************
200  {
201  auto const& qheating_arr = qheating_rates->const_array(mfi);
202  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
203  {
204  // Short-wavelength and long-wavelength radiation source terms
205  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) );
206  });
207  }
208 
209 #endif
210 
211  // *************************************************************************************
212  // 3. Add Rayleigh damping for (rho theta)
213  // *************************************************************************************
214  Real ztop = solverChoice.rayleigh_ztop;
215  Real zdamp = solverChoice.rayleigh_zdamp;
216  Real dampcoef = solverChoice.rayleigh_dampcoef;
217 
218  if (solverChoice.rayleigh_damp_T) {
219  int n = RhoTheta_comp;
220  int nr = Rho_comp;
221  int np = PrimTheta_comp;
222  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
223  {
224  Real zcc = z_cc_arr(i,j,k);
225  Real zfrac = 1 - (ztop - zcc) / zdamp;
226  if (zfrac > 0) {
227  Real theta = cell_prim(i,j,k,np);
228  Real sinefac = std::sin(PIoTwo*zfrac);
229  cell_src(i, j, k, n) -= dampcoef*sinefac*sinefac * (theta - thetabar[k]) * cell_data(i,j,k,nr);
230  }
231  });
232  }
233 
234  // *************************************************************************************
235  // 4. Add custom forcing for (rho theta)
236  // *************************************************************************************
237  if (solverChoice.custom_rhotheta_forcing) {
238  const int n = RhoTheta_comp;
239  if (solverChoice.custom_forcing_prim_vars) {
240  const int nr = Rho_comp;
241  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
242  {
243  cell_src(i, j, k, n) += cell_data(i,j,k,nr) * dptr_rhotheta_src[k];
244  });
245  } else {
246  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
247  {
248  cell_src(i, j, k, n) += dptr_rhotheta_src[k];
249  });
250  }
251  }
252 
253  // *************************************************************************************
254  // 4. Add custom forcing for RhoQ1
255  // *************************************************************************************
256  if (solverChoice.custom_moisture_forcing) {
257  const int n = RhoQ1_comp;
258  if (solverChoice.custom_forcing_prim_vars) {
259  const int nr = Rho_comp;
260  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
261  {
262  cell_src(i, j, k, n) += cell_data(i,j,k,nr) * dptr_rhoqt_src[k];
263  });
264  } else {
265  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
266  {
267  cell_src(i, j, k, n) += dptr_rhoqt_src[k];
268  });
269  }
270  }
271 
272  // *************************************************************************************
273  // 5. Add custom subsidence for (rho theta)
274  // *************************************************************************************
275  if (solverChoice.custom_w_subsidence) {
276  const int n = RhoTheta_comp;
277  if (solverChoice.custom_forcing_prim_vars) {
278  const int nr = Rho_comp;
279  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
280  {
281  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];
282  Real T_hi = dptr_t_plane(k+1) / dptr_r_plane(k+1);
283  Real T_lo = dptr_t_plane(k-1) / dptr_r_plane(k-1);
284  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
285  cell_src(i, j, k, n) -= cell_data(i,j,k,nr) * wbar_cc * (T_hi - T_lo) * dzInv;
286  });
287  } else {
288  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
289  {
290  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];
291  Real T_hi = dptr_t_plane(k+1) / dptr_r_plane(k+1);
292  Real T_lo = dptr_t_plane(k-1) / dptr_r_plane(k-1);
293  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
294  cell_src(i, j, k, n) -= wbar_cc * (T_hi - T_lo) * dzInv;
295  });
296  }
297  }
298 
299  // *************************************************************************************
300  // 5. Add custom subsidence for RhoQ1 and RhoQ2
301  // *************************************************************************************
302  if (solverChoice.custom_w_subsidence && (solverChoice.moisture_type != MoistureType::None)) {
303  const int nv = RhoQ1_comp;
304  if (solverChoice.custom_forcing_prim_vars) {
305  const int nr = Rho_comp;
306  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
307  {
308  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];
309  Real Qv_hi = dptr_qv_plane(k+1) / dptr_r_plane(k+1);
310  Real Qv_lo = dptr_qv_plane(k-1) / dptr_r_plane(k-1);
311  Real Qc_hi = dptr_qc_plane(k+1) / dptr_r_plane(k+1);
312  Real Qc_lo = dptr_qc_plane(k-1) / dptr_r_plane(k-1);
313  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
314  cell_src(i, j, k, nv ) -= cell_data(i,j,k,nr) * wbar_cc * (Qv_hi - Qv_lo) * dzInv;
315  cell_src(i, j, k, nv+1) -= cell_data(i,j,k,nr) * wbar_cc * (Qc_hi - Qc_lo) * dzInv;
316  });
317  } else {
318  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
319  {
320  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];
321  Real Qv_hi = dptr_qv_plane(k+1) / dptr_r_plane(k+1);
322  Real Qv_lo = dptr_qv_plane(k-1) / dptr_r_plane(k-1);
323  Real Qc_hi = dptr_qc_plane(k+1) / dptr_r_plane(k+1);
324  Real Qc_lo = dptr_qc_plane(k-1) / dptr_r_plane(k-1);
325  Real wbar_cc = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
326  cell_src(i, j, k, nv ) -= wbar_cc * (Qv_hi - Qv_lo) * dzInv;
327  cell_src(i, j, k, nv+1) -= wbar_cc * (Qc_hi - Qc_lo) * dzInv;
328  });
329  }
330  }
331 
332  // *************************************************************************************
333  // 6. Add numerical diffuion for rho and (rho theta)
334  // *************************************************************************************
335  if (l_use_ndiff) {
336  int sc;
337  int nc;
338 
339  const Array4<const Real>& mf_m = mapfac_m->const_array(mfi);
340 
341  // Rho is a special case
342  NumericalDiffusion_Scal(bx, sc=0, nc=1, dt, solverChoice.num_diff_coeff,
343  cell_data, cell_data, cell_src, mf_m);
344 
345  // Other scalars proceed as normal
346  NumericalDiffusion_Scal(bx, sc=1, nc=1, dt, solverChoice.num_diff_coeff,
347  cell_prim, cell_data, cell_src, mf_m);
348 
349 
350  if (l_use_KE && l_diff_KE) {
351  NumericalDiffusion_Scal(bx, sc=RhoKE_comp, nc=1, dt, solverChoice.num_diff_coeff,
352  cell_prim, cell_data, cell_src, mf_m);
353  }
354 
355  NumericalDiffusion_Scal(bx, sc=RhoScalar_comp, nc=NSCALARS, dt, solverChoice.num_diff_coeff,
356  cell_prim, cell_data, cell_src, mf_m);
357  }
358 
359  // *************************************************************************************
360  // 7. Add sponging
361  // *************************************************************************************
362  if(!(solverChoice.spongeChoice.sponge_type == "input_sponge")){
363  ApplySpongeZoneBCsForCC(solverChoice.spongeChoice, geom, bx, cell_src, cell_data, z_cc_arr);
364  }
365 
366  // *************************************************************************************
367  // 8. Add perturbation
368  // *************************************************************************************
369  if (solverChoice.pert_type == PerturbationType::Source) {
370  auto m_ixtype = S_data[IntVars::cons].boxArray().ixType(); // Conserved term
371  const amrex::Array4<const amrex::Real>& pert_cell = turbPert.pb_cell[level].const_array(mfi);
372  turbPert.apply_tpi(level, bx, RhoTheta_comp, m_ixtype, cell_src, pert_cell); // Applied as source term
373  }
374 
375  // *************************************************************************************
376  // 9. Add nudging towards value specified in input sounding
377  // *************************************************************************************
378  if (solverChoice.nudging_from_input_sounding)
379  {
380  int itime_n = 0;
381  int itime_np1 = 0;
382  Real coeff_n = Real(1.0);
383  Real coeff_np1 = Real(0.0);
384 
385  Real tau_inv = Real(1.0) / input_sounding_data.tau_nudging;
386 
387  int n_sounding_times = input_sounding_data.input_sounding_time.size();
388 
389  for (int nt = 1; nt < n_sounding_times; nt++) {
390  if (time > input_sounding_data.input_sounding_time[nt]) itime_n = nt;
391  }
392  if (itime_n == n_sounding_times-1) {
393  itime_np1 = itime_n;
394  } else {
395  itime_np1 = itime_n+1;
396  coeff_np1 = (time - input_sounding_data.input_sounding_time[itime_n]) /
397  (input_sounding_data.input_sounding_time[itime_np1] - input_sounding_data.input_sounding_time[itime_n]);
398  coeff_n = Real(1.0) - coeff_np1;
399  }
400 
401  const Real* theta_inp_sound_n = input_sounding_data.theta_inp_sound_d[itime_n].dataPtr();
402  const Real* theta_inp_sound_np1 = input_sounding_data.theta_inp_sound_d[itime_np1].dataPtr();
403 
404  const int n = RhoTheta_comp;
405  const int nr = Rho_comp;
406 
407  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
408  {
409  Real nudge = (coeff_n*theta_inp_sound_n[k] + coeff_np1*theta_inp_sound_np1[k]) - (dptr_t_plane(k)/dptr_r_plane(k));
410  nudge *= tau_inv;
411  cell_src(i, j, k, n) += cell_data(i, j, k, nr) * nudge;
412  });
413  }
414 
415  // *************************************************************************************
416  // 10. Add Immersed source terms
417  // *************************************************************************************
418  if (solverChoice.terrain_type == TerrainType::ImmersedForcing)
419  {
420  Real dz = geom.CellSize(2);
421  const Real drag_coefficient = 10.0/dz;
422  const Real CdT = drag_coefficient;
423  const Real U_s = 1.0;
424  ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
425  {
426  const Real t_blank = t_blank_arr(i, j, k);
427  cell_src(i, j, k, RhoTheta_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,RhoTheta_comp) - dptr_t_plane(k));
428  cell_src(i, j, k, Rho_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,Rho_comp) - dptr_r_plane(k));
429  });
430  }
431 
432 
433  } // mfi
434  } // OMP
435 }
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 > &z_phys_cc)
Definition: ERF_ApplySpongeZoneBCs.cpp:7
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:7
@ thetabar
Definition: ERF_DataStruct.H:74
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 > &mf_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
@ cons
Definition: ERF_IndexDefines.H:150
@ theta
Definition: ERF_MM5.H:20
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:700
amrex::Real rayleigh_zdamp
Definition: ERF_DataStruct.H:702
bool custom_rhotheta_forcing
Definition: ERF_DataStruct.H:726
bool custom_w_subsidence
Definition: ERF_DataStruct.H:728
bool nudging_from_input_sounding
Definition: ERF_DataStruct.H:734
amrex::Real rayleigh_ztop
Definition: ERF_DataStruct.H:703
bool use_num_diff
Definition: ERF_DataStruct.H:749
bool custom_moisture_forcing
Definition: ERF_DataStruct.H:727
amrex::Real num_diff_coeff
Definition: ERF_DataStruct.H:750
amrex::Vector< TurbChoice > turbChoice
Definition: ERF_DataStruct.H:676
MoistureType moisture_type
Definition: ERF_DataStruct.H:759
bool custom_forcing_prim_vars
Definition: ERF_DataStruct.H:730
static TerrainType terrain_type
Definition: ERF_DataStruct.H:659
PerturbationType pert_type
Definition: ERF_DataStruct.H:746
SpongeChoice spongeChoice
Definition: ERF_DataStruct.H:675
amrex::Real rayleigh_dampcoef
Definition: ERF_DataStruct.H:701
int ave_plane
Definition: ERF_DataStruct.H:773
std::string sponge_type
Definition: ERF_SpongeStruct.H:58
Definition: ERF_TurbStruct.H:31
PBLType pbl_type
Definition: ERF_TurbStruct.H:240
RANSType rans_type
Definition: ERF_TurbStruct.H:237
bool diffuse_KE_3D
Definition: ERF_TurbStruct.H:255
LESType les_type
Definition: ERF_TurbStruct.H:204
amrex::Vector< amrex::MultiFab > pb_cell
Definition: ERF_TurbPertStruct.H:554
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:262
Here is the call graph for this function: