ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ShocDriver Class Reference

#include <ERF_ShocDriver.H>

Collaboration diagram for ShocDriver:

Public Member Functions

 ShocDriver (int lev, const SolverChoice &solver_choice)
 
void advance (amrex::MultiFab &cons, amrex::MultiFab &xvel, amrex::MultiFab &yvel, amrex::MultiFab &zvel, amrex::MultiFab *tau13, amrex::MultiFab *tau23, amrex::MultiFab *hfx3, amrex::MultiFab *qfx3, amrex::MultiFab *eddy_diffs, amrex::MultiFab &z_phys_nd, const amrex::Geometry &geom, double dt)
 
void set_eddy_diffs () const
 
void set_diff_stresses () const
 
void add_fast_tend (amrex::Vector< amrex::MultiFab > &S_rhs) const
 
void add_slow_tend (const amrex::MFIter &mfi, const amrex::Box &tbx, const amrex::Array4< amrex::Real > &cell_rhs) const
 
bool uses_momentum_state_update () const
 
bool disables_momentum_transport () const
 
bool owns_scalar_surface_fluxes () const
 
bool debug_summary_enabled () const
 
bool has_native_diagnostics () const
 
bool has_consumed_surface_flux_diagnostics () const
 
const amrex::MultiFab & native_diagnostics () const
 
const amrex::MultiFab & pblh_diagnostics () const
 
const amrex::MultiFab & consumed_sens_flux_diagnostics () const
 
const amrex::MultiFab & consumed_laten_flux_diagnostics () const
 
const amrex::MultiFab & shoc_ustar_diagnostics () const
 
const amrex::MultiFab & shoc_olen_diagnostics () const
 
const amrex::MultiFab & shoc_cldfrac_diagnostics () const
 
const amrex::MultiFab & shoc_ql_diagnostics () const
 
const amrex::MultiFab & shoc_ql2_diagnostics () const
 
const amrex::MultiFab & shoc_cond_diagnostics () const
 
const amrex::MultiFab & w_sec_diagnostics () const
 
const amrex::MultiFab & wqls_sec_diagnostics () const
 
const amrex::MultiFab & wthv_sec_diagnostics () const
 
const amrex::MultiFab & thl_sec_diagnostics () const
 
const amrex::MultiFab & qw_sec_diagnostics () const
 
const amrex::MultiFab & qwthl_sec_diagnostics () const
 
const amrex::MultiFab & wthl_sec_diagnostics () const
 
const amrex::MultiFab & wqw_sec_diagnostics () const
 
const amrex::MultiFab & w3_diagnostics () const
 
const amrex::MultiFab & brunt_diagnostics () const
 
const amrex::MultiFab & isotropy_diagnostics () const
 
const amrex::MultiFab & shear_prod_diagnostics () const
 
const amrex::MultiFab & buoy_prod_diagnostics () const
 
const amrex::MultiFab & diss_tke_diagnostics () const
 

Private Member Functions

void ensure_storage (const amrex::MultiFab &cons, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &eddy_diffs)
 
void seed_carried_turbulence (ShocColumnData &col, const amrex::MFIter &mfi, const amrex::MultiFab &cons, const amrex::MultiFab &eddy_diffs) const
 
void store_carried_turbulence (const ShocColumnData &col, const amrex::MFIter &mfi)
 
void seed_carried_buoyancy_flux (ShocColumnData &col, const amrex::MFIter &mfi) const
 
void store_carried_buoyancy_flux (const ShocColumnData &col, const amrex::MFIter &mfi)
 
void apply_state_update (amrex::MultiFab &cons, amrex::MultiFab &xvel, amrex::MultiFab &yvel, double dt) const
 
void debug_check_bad_column (const ShocColumnData &col, const amrex::MFIter &mfi, const amrex::MultiFab &z_phys_nd, const amrex::MultiFab *hfx3, const amrex::MultiFab *qfx3, const amrex::MultiFab *tau13, const amrex::MultiFab *tau23, const amrex::Geometry &geom, double dt) const
 
void print_debug_summary (double dt) const
 

Private Attributes

int m_lev
 
ShocRuntimeOptions m_opts
 
MoistureComponentIndices m_moisture_indices
 
amrex::MultiFab m_theta_tend_cc
 
amrex::MultiFab m_qv_tend_cc
 
amrex::MultiFab m_qc_tend_cc
 
amrex::MultiFab m_qi_tend_cc
 
amrex::MultiFab m_tke_tend_cc
 
amrex::MultiFab m_u_tend_cc
 
amrex::MultiFab m_v_tend_cc
 
amrex::MultiFab m_u_tend_fc
 
amrex::MultiFab m_v_tend_fc
 
amrex::MultiFab m_eddy_coeffs_cc
 
amrex::MultiFab m_prev_turb_cc
 
amrex::MultiFab m_prev_wthv_sec_cc
 
amrex::MultiFab m_consumed_sens_flux_cc
 
amrex::MultiFab m_consumed_laten_flux_cc
 
amrex::MultiFab m_pblh_cc
 
amrex::MultiFab m_shoc_ustar_cc
 
amrex::MultiFab m_shoc_olen_cc
 
amrex::MultiFab m_shoc_cldfrac_cc
 
amrex::MultiFab m_shoc_ql_cc
 
amrex::MultiFab m_shoc_ql2_cc
 
amrex::MultiFab m_shoc_cond_cc
 
amrex::MultiFab m_w_sec_cc
 
amrex::MultiFab m_wqls_sec_cc
 
amrex::MultiFab m_wthv_sec_cc
 
amrex::MultiFab m_thl_sec_cc
 
amrex::MultiFab m_qw_sec_cc
 
amrex::MultiFab m_qwthl_sec_cc
 
amrex::MultiFab m_wthl_sec_cc
 
amrex::MultiFab m_wqw_sec_cc
 
amrex::MultiFab m_w3_cc
 
amrex::MultiFab m_brunt_cc
 
amrex::MultiFab m_isotropy_cc
 
amrex::MultiFab m_shear_prod_cc
 
amrex::MultiFab m_buoy_prod_cc
 
amrex::MultiFab m_diss_tke_cc
 
amrex::MultiFab * m_cons_ptr = nullptr
 
amrex::MultiFab * m_hfx3_ptr = nullptr
 
amrex::MultiFab * m_qfx3_ptr = nullptr
 
amrex::MultiFab * m_tau13_ptr = nullptr
 
amrex::MultiFab * m_tau23_ptr = nullptr
 
amrex::MultiFab * m_eddy_diffs_ptr = nullptr
 
amrex::Vector< std::unique_ptr< ShocColumnWorkspace > > m_column_workspaces
 
int m_advance_calls = 0
 
bool m_prev_turb_valid = false
 

Constructor & Destructor Documentation

◆ ShocDriver()

ShocDriver::ShocDriver ( int  lev,
const SolverChoice solver_choice 
)
explicit
308  : m_lev(lev),
309  m_moisture_indices(solver_choice.moisture_indices)
310 {
311  m_opts.transport_mode = solver_choice.shoc_transport_mode;
313 
316  warn_if_shoc_debug_overrides_active_once(m_opts);
317 }
void validate_shoc_runtime_options(const ShocRuntimeOptions &opts)
Definition: ERF_ShocTypes.H:197
void read_shoc_runtime_options(ShocRuntimeOptions &opts)
Definition: ERF_ShocTypes.H:151
ShocRuntimeOptions m_opts
Definition: ERF_ShocDriver.H:107
MoistureComponentIndices m_moisture_indices
Definition: ERF_ShocDriver.H:108
int m_lev
Definition: ERF_ShocDriver.H:106
ShocTransportMode transport_mode
Definition: ERF_ShocTypes.H:43
ShocMomentumTransport momentum_transport
Definition: ERF_ShocTypes.H:44
ShocTransportMode shoc_transport_mode
Definition: ERF_DataStruct.H:2112
ShocMomentumTransport shoc_momentum_transport
Definition: ERF_DataStruct.H:2113
MoistureComponentIndices moisture_indices
Index map of the moisture data carried by the active scheme: conserved-state components for the speci...
Definition: ERF_DataStruct.H:2263
Here is the call graph for this function:

Member Function Documentation

◆ add_fast_tend()

void ShocDriver::add_fast_tend ( amrex::Vector< amrex::MultiFab > &  S_rhs) const
843 {
844  AMREX_ALWAYS_ASSERT(m_cons_ptr != nullptr);
845 
846  amrex::ignore_unused(S_rhs);
847 }
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
amrex::MultiFab * m_cons_ptr
Definition: ERF_ShocDriver.H:145
Here is the call graph for this function:

◆ add_slow_tend()

void ShocDriver::add_slow_tend ( const amrex::MFIter &  mfi,
const amrex::Box &  tbx,
const amrex::Array4< amrex::Real > &  cell_rhs 
) const
853 {
854  AMREX_ALWAYS_ASSERT(m_cons_ptr != nullptr);
855  amrex::ignore_unused(mfi, tbx, cell_rhs);
856 }
Here is the call graph for this function:

◆ advance()

void ShocDriver::advance ( amrex::MultiFab &  cons,
amrex::MultiFab &  xvel,
amrex::MultiFab &  yvel,
amrex::MultiFab &  zvel,
amrex::MultiFab *  tau13,
amrex::MultiFab *  tau23,
amrex::MultiFab *  hfx3,
amrex::MultiFab *  qfx3,
amrex::MultiFab *  eddy_diffs,
amrex::MultiFab &  z_phys_nd,
const amrex::Geometry &  geom,
double  dt 
)
489 {
490  BL_PROFILE("SHOC::advance");
491 
492  require_full_height_shoc_boxes(cons.boxArray(), geom.Domain());
493 
494  m_cons_ptr = &cons;
495  m_hfx3_ptr = hfx3;
496  m_qfx3_ptr = qfx3;
497  m_tau13_ptr = tau13;
498  m_tau23_ptr = tau23;
499  m_eddy_diffs_ptr = eddy_diffs;
500 
501  sync_face_multifab_impl(xvel, geom);
502  sync_face_multifab_impl(yvel, geom);
503  if (m_tau13_ptr) {
504  sync_face_multifab_impl(*m_tau13_ptr, geom);
505  }
506  if (m_tau23_ptr) {
507  sync_face_multifab_impl(*m_tau23_ptr, geom);
508  }
509 
510  {
511  BL_PROFILE("SHOC::advance::ensure_storage");
512  ensure_storage(cons, xvel, yvel, *eddy_diffs);
513  }
514 
515  std::string error_message;
517  error_message)) {
518  amrex::Abort(error_message.c_str());
519  }
520 
521  // Keep one SHOC column workspace per local box so GPU writeback kernels
522  // can finish reading a box's scratch before it is reused.
523  const amrex::Long n_local = cons.local_size();
524  AMREX_ALWAYS_ASSERT(n_local >= amrex::Long{0});
525  const amrex::Long current_size = static_cast<amrex::Long>(m_column_workspaces.size());
526  if (current_size < n_local) {
527  const amrex::Long old_size = current_size;
528  m_column_workspaces.resize(static_cast<std::size_t>(n_local));
529  for (amrex::Long n = old_size; n < n_local; ++n) {
530  m_column_workspaces[static_cast<std::size_t>(n)] =
531  std::make_unique<ShocColumnWorkspace>();
532  }
533  }
534 
535  amrex::Long local_index = 0;
536  for (MFIter mfi(cons, false); mfi.isValid(); ++mfi, ++local_index) {
538  local_index < static_cast<amrex::Long>(m_column_workspaces.size()));
539  ShocColumnWorkspace& workspace =
540  *m_column_workspaces[static_cast<std::size_t>(local_index)];
541  const Box& vbx = mfi.validbox();
542  const ShocColumnLayout active_layout = make_shoc_layout(vbx, geom);
543  {
544  BL_PROFILE("SHOC::advance::define_column_data");
545  workspace.ensure_capacity(active_layout, amrex::The_Async_Arena(),
547  }
548  ShocColumnData& col = workspace.col;
549  {
550  BL_PROFILE("SHOC::advance::preprocess");
552  hfx3, qfx3, tau13, tau23, z_phys_nd, geom,
554  }
555  {
556  BL_PROFILE("SHOC::advance::seed_carried_buoyancy_flux");
557  seed_carried_buoyancy_flux(col, mfi);
558  }
559  {
560  BL_PROFILE("SHOC::advance::seed_carried_turbulence");
561  seed_carried_turbulence(col, mfi, cons, *eddy_diffs);
562  }
563  const auto dx = geom.CellSizeArray();
564  BL_PROFILE("SHOC::advance::cache_baseline_state");
567  BL_PROFILE("SHOC::advance::implicit");
570  BL_PROFILE("SHOC::advance::finalize");
572  BL_PROFILE("SHOC::advance::debug_bad_column");
573  debug_check_bad_column(col, mfi, z_phys_nd, hfx3, qfx3, tau13, tau23, geom, dt);
574  {
575  BL_PROFILE("SHOC::advance::store_carried_buoyancy_flux");
576  store_carried_buoyancy_flux(col, mfi);
577  }
578  {
579  BL_PROFILE("SHOC::advance::store_carried_turbulence");
580  store_carried_turbulence(col, mfi);
581  }
582 
583  auto tk_arr = m_eddy_coeffs_cc.array(mfi);
584  auto th_tend = m_theta_tend_cc.array(mfi);
585  auto qv_tend = m_qv_tend_cc.array(mfi);
586  auto qc_tend = m_qc_tend_cc.array(mfi);
587  auto qi_tend = m_qi_tend_cc.array(mfi);
588  auto tke_tend = m_tke_tend_cc.array(mfi);
589  auto u_tend_cc = m_u_tend_cc.array(mfi);
590  auto v_tend_cc = m_v_tend_cc.array(mfi);
591  auto pblh_arr = m_pblh_cc.array(mfi);
592  auto consumed_sens_flux_arr = m_consumed_sens_flux_cc.array(mfi);
593  auto consumed_laten_flux_arr = m_consumed_laten_flux_cc.array(mfi);
594  auto shoc_ustar_arr = m_shoc_ustar_cc.array(mfi);
595  auto shoc_olen_arr = m_shoc_olen_cc.array(mfi);
596  auto shoc_cldfrac_arr = m_shoc_cldfrac_cc.array(mfi);
597  auto shoc_ql_arr = m_shoc_ql_cc.array(mfi);
598  auto shoc_ql2_arr = m_shoc_ql2_cc.array(mfi);
599  auto shoc_cond_arr = m_shoc_cond_cc.array(mfi);
600  auto w_sec_arr = m_w_sec_cc.array(mfi);
601  auto wqls_sec_arr = m_wqls_sec_cc.array(mfi);
602  auto wthv_sec_arr = m_wthv_sec_cc.array(mfi);
603  auto thl_sec_arr = m_thl_sec_cc.array(mfi);
604  auto qw_sec_arr = m_qw_sec_cc.array(mfi);
605  auto qwthl_sec_arr = m_qwthl_sec_cc.array(mfi);
606  auto wthl_sec_arr = m_wthl_sec_cc.array(mfi);
607  auto wqw_sec_arr = m_wqw_sec_cc.array(mfi);
608  auto w3_arr = m_w3_cc.array(mfi);
609  auto brunt_arr = m_brunt_cc.array(mfi);
610  auto isotropy_arr = m_isotropy_cc.array(mfi);
611  auto shear_prod_arr = m_shear_prod_cc.array(mfi);
612  auto buoy_prod_arr = m_buoy_prod_cc.array(mfi);
613  auto diss_tke_arr = m_diss_tke_cc.array(mfi);
614 
615  const auto shoc_mix = col.shoc_mix.const_array();
616  const auto pblh = col.pblh.const_array();
617  const auto surf_sens_flux = col.surf_sens_flux.const_array();
618  const auto surf_lat_flux = col.surf_lat_flux.const_array();
619  const auto ustar = col.ustar.const_array();
620  const auto obklen = col.obklen.const_array();
621  const auto shoc_cldfrac = col.shoc_cldfrac.const_array();
622  const auto shoc_ql = col.shoc_ql.const_array();
623  const auto shoc_ql2 = col.shoc_ql2.const_array();
624  const auto shoc_cond = col.shoc_cond.const_array();
625  const auto w_sec = col.w_sec.const_array();
626  const auto wqls_sec = col.wqls_sec.const_array();
627  const auto wthv_sec = col.wthv_sec.const_array();
628  const auto thl_sec = col.thl_sec.const_array();
629  const auto qw_sec = col.qw_sec.const_array();
630  const auto qwthl_sec = col.qwthl_sec.const_array();
631  const auto wthl_sec = col.wthl_sec.const_array();
632  const auto wqw_sec = col.wqw_sec.const_array();
633  const auto w3 = col.w3.const_array();
634  const auto brunt = col.brunt.const_array();
635  const auto isotropy = col.isotropy.const_array();
636  const auto shear_prod = col.shear_prod.const_array();
637  const auto buoy_prod = col.buoy_prod.const_array();
638  const auto diss_tke = col.diss_tke.const_array();
639  const auto tk = col.tk.const_array();
640  const auto tkh = col.tkh.const_array();
641  const auto rho = col.rho.const_array();
642  const auto zt = col.zt.const_array();
643  const auto zi = col.zi.const_array();
644  const auto col_theta_tend = col.theta_tend.const_array();
645  const auto col_qv_tend = col.qv_tend.const_array();
646  const auto col_qc_tend = col.qc_tend.const_array();
647  const auto col_qi_tend = col.qi_tend.const_array();
648  const auto col_tke_tend = col.tke_tend.const_array();
649  const auto col_u_tend = col.u_tend.const_array();
650  const auto col_v_tend = col.v_tend.const_array();
651  const auto layout = col.layout;
652  const Box xy_box = amrex::makeSlab(vbx, 2, layout.kmin);
653  {
654  BL_PROFILE("SHOC::advance::writeback");
655  ParallelFor(xy_box, [=] AMREX_GPU_DEVICE (int i, int j, int) noexcept
656  {
657  const int ic = shoc_column_index(layout, i, j);
658  const int k0 = layout.kmin;
659  const Real rho_sfc = rho(ic,0,0);
660  for (int kk = 0; kk < layout.nlev; ++kk) {
661  const int k = layout.kmin + kk;
662  const Real l = shoc_mix(ic,kk,0);
663  const Real km = tk(ic,kk,0);
664  const Real kh = tkh(ic,kk,0);
665 
666  tk_arr(i,j,k,EddyDiff::Mom_v) = rho(ic,kk,0) * km;
667  tk_arr(i,j,k,EddyDiff::Theta_v) = rho(ic,kk,0) * kh;
668  tk_arr(i,j,k,EddyDiff::KE_v) = rho(ic,kk,0) * kh;
669  tk_arr(i,j,k,EddyDiff::Scalar_v) = rho(ic,kk,0) * kh;
670  tk_arr(i,j,k,EddyDiff::Q_v) = rho(ic,kk,0) * kh;
671  tk_arr(i,j,k,EddyDiff::Turb_lengthscale) = l;
672 
673  th_tend(i,j,k) = col_theta_tend(ic,kk,0);
674  qv_tend(i,j,k) = col_qv_tend(ic,kk,0);
675  qc_tend(i,j,k) = col_qc_tend(ic,kk,0);
676  qi_tend(i,j,k) = col_qi_tend(ic,kk,0);
677  tke_tend(i,j,k) = col_tke_tend(ic,kk,0);
678  u_tend_cc(i,j,k) = col_u_tend(ic,kk,0);
679  v_tend_cc(i,j,k) = col_v_tend(ic,kk,0);
680  }
681  // Motivation: Native SHOC state_update consumes SurfaceLayer
682  // fluxes before the host diffusion path clears the overlapping
683  // SFS arrays. Preserve the consumed conservative fluxes here
684  // so 2D diagnostics report the surface forcing SHOC actually
685  // used, not the cleared host arrays.
686  consumed_sens_flux_arr(i,j,k0) = rho_sfc * surf_sens_flux(ic,0,0);
687  consumed_laten_flux_arr(i,j,k0) = rho_sfc * surf_lat_flux(ic,0,0);
688  shoc_ustar_arr(i,j,k0) = ustar(ic,0,0);
689  shoc_olen_arr(i,j,k0) = obklen(ic,0,0);
690  });
691 
692  // Keep diagnostic writeback in a separate launch so the kernel
693  // argument block fits CUDA's 4 KiB limit on pre-Volta devices.
694  ParallelFor(xy_box, [=] AMREX_GPU_DEVICE (int i, int j, int) noexcept
695  {
696  const int ic = shoc_column_index(layout, i, j);
697  for (int kk = 0; kk < layout.nlev; ++kk) {
698  const int k = layout.kmin + kk;
699  // Native SHOC pblh is diagnosed as meters AGL and is
700  // copied directly into the plotfile diagnostic field.
701  pblh_arr(i,j,k) = pblh(ic,0,0);
702  shoc_cldfrac_arr(i,j,k) = shoc_cldfrac(ic,kk,0);
703  shoc_ql_arr(i,j,k) = shoc_ql(ic,kk,0);
704  shoc_ql2_arr(i,j,k) = shoc_ql2(ic,kk,0);
705  shoc_cond_arr(i,j,k) = shoc_cond(ic,kk,0);
706  w_sec_arr(i,j,k) = w_sec(ic,kk,0);
707  wqls_sec_arr(i,j,k) = wqls_sec(ic,kk,0);
708  wthv_sec_arr(i,j,k) = wthv_sec(ic,kk,0);
709  brunt_arr(i,j,k) = brunt(ic,kk,0);
710  isotropy_arr(i,j,k) = isotropy(ic,kk,0);
711  thl_sec_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
712  thl_sec(ic,kk,0), thl_sec(ic,kk+1,0),
713  zt(ic,kk,0));
714  qw_sec_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
715  qw_sec(ic,kk,0), qw_sec(ic,kk+1,0),
716  zt(ic,kk,0));
717  qwthl_sec_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
718  qwthl_sec(ic,kk,0), qwthl_sec(ic,kk+1,0),
719  zt(ic,kk,0));
720  wthl_sec_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
721  wthl_sec(ic,kk,0), wthl_sec(ic,kk+1,0),
722  zt(ic,kk,0));
723  wqw_sec_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
724  wqw_sec(ic,kk,0), wqw_sec(ic,kk+1,0),
725  zt(ic,kk,0));
726  w3_arr(i,j,k) = weighted_linear_interp(zi(ic,kk,0), zi(ic,kk+1,0),
727  w3(ic,kk,0), w3(ic,kk+1,0),
728  zt(ic,kk,0));
729  shear_prod_arr(i,j,k) = shear_prod(ic,kk,0);
730  buoy_prod_arr(i,j,k) = buoy_prod(ic,kk,0);
731  diss_tke_arr(i,j,k) = diss_tke(ic,kk,0);
732  }
733  });
734  }
735 
736  }
737 
738  {
739  BL_PROFILE("SHOC::advance::tendency_interpolation");
740  m_u_tend_cc.FillBoundary(geom.periodicity());
741  m_v_tend_cc.FillBoundary(geom.periodicity());
742 
743  const auto dom = geom.Domain();
744  const int ilo = dom.smallEnd(0);
745  const int ihi = dom.bigEnd(0);
746  const int jlo = dom.smallEnd(1);
747  const int jhi = dom.bigEnd(1);
748  const bool xper = geom.isPeriodic(0);
749  const bool yper = geom.isPeriodic(1);
750 
751  for (MFIter mfi(m_u_tend_cc, false); mfi.isValid(); ++mfi) {
752  const Box& cc_bx = mfi.validbox();
753  const Box xface_bx = amrex::surroundingNodes(cc_bx, 0);
754  const Box yface_bx = amrex::surroundingNodes(cc_bx, 1);
755  const auto u_cc = m_u_tend_cc.const_array(mfi);
756  const auto v_cc = m_v_tend_cc.const_array(mfi);
757  auto u_fc = m_u_tend_fc.array(mfi);
758  auto v_fc = m_v_tend_fc.array(mfi);
759 
760  ParallelFor(xface_bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
761  {
762  const int il = face_neighbor_cell(i - 1, ilo, ihi, xper);
763  const int ir = face_neighbor_cell(i, ilo, ihi, xper);
764  u_fc(i,j,k) = 0.5_rt * (u_cc(il,j,k) + u_cc(ir,j,k));
765  });
766 
767  ParallelFor(yface_bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
768  {
769  const int jb = face_neighbor_cell(j - 1, jlo, jhi, yper);
770  const int jt = face_neighbor_cell(j, jlo, jhi, yper);
771  v_fc(i,j,k) = 0.5_rt * (v_cc(i,jb,k) + v_cc(i,jt,k));
772  });
773  }
774  }
775 
776  sync_face_multifab_impl(m_u_tend_fc, geom);
777  sync_face_multifab_impl(m_v_tend_fc, geom);
778 
779  BL_PROFILE("SHOC::advance::state_update");
781 
783  sync_face_multifab_impl(xvel, geom);
784  sync_face_multifab_impl(yvel, geom);
785  }
786 
787  m_prev_turb_valid = true;
788  ++m_advance_calls;
789  if (m_opts.debug_summary) {
790  BL_PROFILE("SHOC::advance::debug_summary");
792  }
793 }
@ tau23
Definition: ERF_DataStruct.H:40
@ tau13
Definition: ERF_DataStruct.H:40
const Real dx
Definition: ERF_InitCustomPert_ABL.H:44
ParallelFor(fab_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_GPU_HOST_DEVICE AMREX_FORCE_INLINE int shoc_column_index(const ShocColumnLayout &layout, int i, int j)
Definition: ERF_ShocColumnData.H:130
ShocColumnLayout make_shoc_layout(const amrex::Box &bx, const amrex::Geometry &geom)
Definition: ERF_ShocColumnData.H:11
bool shoc_driver_state_update_layout_supported(const MoistureComponentIndices &indices, int ncomp, std::string &error_message)
Definition: ERF_ShocDriver.H:26
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_ShocColumnData.H:103
ShocColumnData col
Definition: ERF_ShocColumnData.H:105
void ensure_capacity(const ShocColumnLayout &layout, amrex::Arena *arena=amrex::The_Async_Arena(), shoc::InitRunOn init_run_on=shoc::default_init_run_on())
Definition: ERF_ShocColumnData.H:107
static void diagnose_pre_implicit(ShocColumnData &col, const ShocRuntimeOptions &opts, amrex::Real dx, amrex::Real dy, double dt)
Definition: ERF_ShocDiagnostics.cpp:6
static void diagnose_post_implicit(ShocColumnData &col, const ShocRuntimeOptions &opts, double dt)
Definition: ERF_ShocDiagnostics.cpp:25
amrex::MultiFab m_shoc_ql_cc
Definition: ERF_ShocDriver.H:128
void print_debug_summary(double dt) const
Definition: ERF_ShocDriver.cpp:1437
bool m_prev_turb_valid
Definition: ERF_ShocDriver.H:153
void debug_check_bad_column(const ShocColumnData &col, const amrex::MFIter &mfi, const amrex::MultiFab &z_phys_nd, const amrex::MultiFab *hfx3, const amrex::MultiFab *qfx3, const amrex::MultiFab *tau13, const amrex::MultiFab *tau23, const amrex::Geometry &geom, double dt) const
Definition: ERF_ShocDriver.cpp:903
amrex::MultiFab m_qw_sec_cc
Definition: ERF_ShocDriver.H:135
amrex::MultiFab m_diss_tke_cc
Definition: ERF_ShocDriver.H:144
amrex::MultiFab m_qwthl_sec_cc
Definition: ERF_ShocDriver.H:136
amrex::MultiFab * m_qfx3_ptr
Definition: ERF_ShocDriver.H:147
int m_advance_calls
Definition: ERF_ShocDriver.H:152
void apply_state_update(amrex::MultiFab &cons, amrex::MultiFab &xvel, amrex::MultiFab &yvel, double dt) const
Definition: ERF_ShocDriver.cpp:877
amrex::MultiFab m_pblh_cc
Definition: ERF_ShocDriver.H:124
amrex::MultiFab m_eddy_coeffs_cc
Definition: ERF_ShocDriver.H:119
amrex::MultiFab m_buoy_prod_cc
Definition: ERF_ShocDriver.H:143
amrex::MultiFab m_wthl_sec_cc
Definition: ERF_ShocDriver.H:137
amrex::MultiFab m_u_tend_fc
Definition: ERF_ShocDriver.H:117
amrex::MultiFab m_wqls_sec_cc
Definition: ERF_ShocDriver.H:132
amrex::MultiFab * m_tau13_ptr
Definition: ERF_ShocDriver.H:148
amrex::MultiFab m_v_tend_fc
Definition: ERF_ShocDriver.H:118
void seed_carried_buoyancy_flux(ShocColumnData &col, const amrex::MFIter &mfi) const
Definition: ERF_ShocDriver.cpp:449
amrex::MultiFab m_w3_cc
Definition: ERF_ShocDriver.H:139
amrex::MultiFab m_shoc_ustar_cc
Definition: ERF_ShocDriver.H:125
void seed_carried_turbulence(ShocColumnData &col, const amrex::MFIter &mfi, const amrex::MultiFab &cons, const amrex::MultiFab &eddy_diffs) const
Definition: ERF_ShocDriver.cpp:417
amrex::MultiFab m_theta_tend_cc
Definition: ERF_ShocDriver.H:110
amrex::MultiFab m_qc_tend_cc
Definition: ERF_ShocDriver.H:112
amrex::MultiFab m_wqw_sec_cc
Definition: ERF_ShocDriver.H:138
amrex::MultiFab m_shoc_olen_cc
Definition: ERF_ShocDriver.H:126
amrex::MultiFab m_consumed_laten_flux_cc
Definition: ERF_ShocDriver.H:123
amrex::MultiFab m_brunt_cc
Definition: ERF_ShocDriver.H:140
amrex::MultiFab m_wthv_sec_cc
Definition: ERF_ShocDriver.H:133
amrex::MultiFab m_shear_prod_cc
Definition: ERF_ShocDriver.H:142
amrex::MultiFab m_w_sec_cc
Definition: ERF_ShocDriver.H:131
void store_carried_buoyancy_flux(const ShocColumnData &col, const amrex::MFIter &mfi)
Definition: ERF_ShocDriver.cpp:465
void store_carried_turbulence(const ShocColumnData &col, const amrex::MFIter &mfi)
Definition: ERF_ShocDriver.cpp:436
void ensure_storage(const amrex::MultiFab &cons, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &eddy_diffs)
Definition: ERF_ShocDriver.cpp:320
bool uses_momentum_state_update() const
Definition: ERF_ShocDriver.cpp:859
amrex::MultiFab m_shoc_cldfrac_cc
Definition: ERF_ShocDriver.H:127
amrex::MultiFab m_tke_tend_cc
Definition: ERF_ShocDriver.H:114
amrex::MultiFab m_qi_tend_cc
Definition: ERF_ShocDriver.H:113
amrex::MultiFab m_thl_sec_cc
Definition: ERF_ShocDriver.H:134
amrex::MultiFab * m_tau23_ptr
Definition: ERF_ShocDriver.H:149
amrex::MultiFab * m_eddy_diffs_ptr
Definition: ERF_ShocDriver.H:150
amrex::MultiFab m_consumed_sens_flux_cc
Definition: ERF_ShocDriver.H:122
amrex::MultiFab m_isotropy_cc
Definition: ERF_ShocDriver.H:141
amrex::MultiFab m_u_tend_cc
Definition: ERF_ShocDriver.H:115
amrex::MultiFab m_v_tend_cc
Definition: ERF_ShocDriver.H:116
amrex::MultiFab m_shoc_ql2_cc
Definition: ERF_ShocDriver.H:129
amrex::MultiFab m_shoc_cond_cc
Definition: ERF_ShocDriver.H:130
amrex::MultiFab m_qv_tend_cc
Definition: ERF_ShocDriver.H:111
amrex::MultiFab * m_hfx3_ptr
Definition: ERF_ShocDriver.H:146
amrex::Vector< std::unique_ptr< ShocColumnWorkspace > > m_column_workspaces
Definition: ERF_ShocDriver.H:151
static void advance_implicit_state(ShocColumnData &col, const ShocRuntimeOptions &opts, double dt)
Definition: ERF_ShocImplicit.cpp:166
static void cache_baseline_state(ShocColumnData &col)
Definition: ERF_ShocImplicit.cpp:84
static void finalize_from_pdf(ShocColumnData &col, const ShocRuntimeOptions &opts, double dt)
Definition: ERF_ShocImplicit.cpp:322
static void fill_columns(ShocColumnData &col, const amrex::MFIter &mfi, const amrex::MultiFab &cons, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &zvel, const amrex::MultiFab *hfx3, const amrex::MultiFab *qfx3, const amrex::MultiFab *tau13, const amrex::MultiFab *tau23, const amrex::MultiFab &z_phys_nd, const amrex::Geometry &geom, const MoistureComponentIndices &moisture_indices)
Definition: ERF_ShocPreprocess.cpp:31
@ Theta_v
Definition: ERF_IndexDefines.H:250
@ Turb_lengthscale
Definition: ERF_IndexDefines.H:254
@ Scalar_v
Definition: ERF_IndexDefines.H:252
@ Q_v
Definition: ERF_IndexDefines.H:253
@ Mom_v
Definition: ERF_IndexDefines.H:249
@ KE_v
Definition: ERF_IndexDefines.H:251
@ rho
Definition: ERF_Kessler.H:25
@ xvel
Definition: ERF_IndexDefines.H:215
@ cons
Definition: ERF_IndexDefines.H:214
@ zvel
Definition: ERF_IndexDefines.H:217
@ yvel
Definition: ERF_IndexDefines.H:216
@ tk
Definition: ERF_AdvanceWDM6.cpp:272
@ zi
Definition: ERF_AdvanceWDM6.cpp:276
InitRunOn default_init_run_on()
Definition: ERF_ShocGpuUtils.H:27
Definition: ERF_ShocTypes.H:72
amrex::FArrayBox qc_tend
Definition: ERF_ShocTypes.H:139
amrex::FArrayBox v_tend
Definition: ERF_ShocTypes.H:142
amrex::FArrayBox shoc_cond
Definition: ERF_ShocTypes.H:114
amrex::FArrayBox buoy_prod
Definition: ERF_ShocTypes.H:107
amrex::FArrayBox diss_tke
Definition: ERF_ShocTypes.H:108
amrex::FArrayBox w_sec
Definition: ERF_ShocTypes.H:126
amrex::FArrayBox tk
Definition: ERF_ShocTypes.H:104
amrex::FArrayBox w3
Definition: ERF_ShocTypes.H:125
amrex::FArrayBox surf_lat_flux
Definition: ERF_ShocTypes.H:145
amrex::FArrayBox ustar
Definition: ERF_ShocTypes.H:100
amrex::FArrayBox shoc_mix
Definition: ERF_ShocTypes.H:101
amrex::FArrayBox wthv_sec
Definition: ERF_ShocTypes.H:109
amrex::FArrayBox shear_prod
Definition: ERF_ShocTypes.H:106
amrex::FArrayBox rho
Definition: ERF_ShocTypes.H:81
amrex::FArrayBox wqw_sec
Definition: ERF_ShocTypes.H:121
amrex::FArrayBox shoc_ql
Definition: ERF_ShocTypes.H:111
amrex::FArrayBox pblh
Definition: ERF_ShocTypes.H:98
amrex::FArrayBox isotropy
Definition: ERF_ShocTypes.H:103
amrex::FArrayBox qw_sec
Definition: ERF_ShocTypes.H:118
amrex::FArrayBox tkh
Definition: ERF_ShocTypes.H:105
amrex::FArrayBox tke_tend
Definition: ERF_ShocTypes.H:143
amrex::FArrayBox qi_tend
Definition: ERF_ShocTypes.H:140
amrex::FArrayBox u_tend
Definition: ERF_ShocTypes.H:141
ShocColumnLayout layout
Definition: ERF_ShocTypes.H:73
amrex::FArrayBox zi
Definition: ERF_ShocTypes.H:77
amrex::FArrayBox surf_sens_flux
Definition: ERF_ShocTypes.H:144
amrex::FArrayBox zt
Definition: ERF_ShocTypes.H:76
amrex::FArrayBox theta_tend
Definition: ERF_ShocTypes.H:137
amrex::FArrayBox obklen
Definition: ERF_ShocTypes.H:99
amrex::FArrayBox wqls_sec
Definition: ERF_ShocTypes.H:113
amrex::FArrayBox qv_tend
Definition: ERF_ShocTypes.H:138
amrex::FArrayBox wthl_sec
Definition: ERF_ShocTypes.H:120
amrex::FArrayBox thl_sec
Definition: ERF_ShocTypes.H:117
amrex::FArrayBox shoc_ql2
Definition: ERF_ShocTypes.H:112
amrex::FArrayBox qwthl_sec
Definition: ERF_ShocTypes.H:119
amrex::FArrayBox brunt
Definition: ERF_ShocTypes.H:102
amrex::FArrayBox shoc_cldfrac
Definition: ERF_ShocTypes.H:110
Definition: ERF_ShocTypes.H:60
bool debug_summary
Definition: ERF_ShocTypes.H:40
Here is the call graph for this function:

◆ apply_state_update()

void ShocDriver::apply_state_update ( amrex::MultiFab &  cons,
amrex::MultiFab &  xvel,
amrex::MultiFab &  yvel,
double  dt 
) const
private
881 {
882  AMREX_ALWAYS_ASSERT(dt > 0.0);
883 
884  apply_state_update_cons_impl(cons,
886  m_qv_tend_cc,
887  m_qc_tend_cc,
888  m_qi_tend_cc,
893  m_opts,
894  dt);
895 
897  apply_state_update_face_velocity_impl(xvel, m_u_tend_fc, dt);
898  apply_state_update_face_velocity_impl(yvel, m_v_tend_fc, dt);
899  }
900 }
int qi
cloud ice
Definition: ERF_DataStruct.H:236
int qv
water vapor
Definition: ERF_DataStruct.H:234
int qc
cloud liquid water
Definition: ERF_DataStruct.H:235

Referenced by advance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ brunt_diagnostics()

const amrex::MultiFab& ShocDriver::brunt_diagnostics ( ) const
inline
99 { return m_brunt_cc; }

◆ buoy_prod_diagnostics()

const amrex::MultiFab& ShocDriver::buoy_prod_diagnostics ( ) const
inline
102 { return m_buoy_prod_cc; }

◆ consumed_laten_flux_diagnostics()

const amrex::MultiFab& ShocDriver::consumed_laten_flux_diagnostics ( ) const
inline
81  {
83  }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ consumed_sens_flux_diagnostics()

const amrex::MultiFab& ShocDriver::consumed_sens_flux_diagnostics ( ) const
inline
77  {
79  }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ debug_check_bad_column()

void ShocDriver::debug_check_bad_column ( const ShocColumnData col,
const amrex::MFIter &  mfi,
const amrex::MultiFab &  z_phys_nd,
const amrex::MultiFab *  hfx3,
const amrex::MultiFab *  qfx3,
const amrex::MultiFab *  tau13,
const amrex::MultiFab *  tau23,
const amrex::Geometry &  geom,
double  dt 
) const
private
912 {
913  amrex::ignore_unused(geom, dt_d);
914 
915  if (!m_opts.debug_bad_column) {
916  return;
917  }
918 
919  AMREX_ALWAYS_ASSERT(m_cons_ptr != nullptr);
920  print_shoc_debug_settings_once(m_opts);
921 
922  const auto cons_host = copy_fab_to_host((*m_cons_ptr)[mfi]);
923  const auto z_host = copy_fab_to_host(z_phys_nd[mfi]);
924  const auto theta_tend_host = copy_fab_to_host(col.theta_tend);
925  const auto qv_tend_host = copy_fab_to_host(col.qv_tend);
926  const auto qc_tend_host = copy_fab_to_host(col.qc_tend);
927  const auto qi_tend_host = copy_fab_to_host(col.qi_tend);
928  const auto tke_tend_host = copy_fab_to_host(col.tke_tend);
929  const auto u_tend_host = copy_fab_to_host(col.u_tend);
930  const auto v_tend_host = copy_fab_to_host(col.v_tend);
931  const auto p_mid_host = copy_fab_to_host(col.p_mid);
932  const auto p_int_host = copy_fab_to_host(col.p_int);
933  const auto zt_host = copy_fab_to_host(col.zt);
934  const auto zi_host = copy_fab_to_host(col.zi);
935  const auto dz_host = copy_fab_to_host(col.dz);
936  const auto rho_host = copy_fab_to_host(col.rho);
937  const auto theta_host = copy_fab_to_host(col.theta);
938  const auto thetal_host = copy_fab_to_host(col.thetal);
939  const auto theta_base_host = copy_fab_to_host(col.theta_base);
940  const auto thetal_base_host = copy_fab_to_host(col.thetal_base);
941  const auto qv_base_host = copy_fab_to_host(col.qv_base);
942  const auto qc_base_host = copy_fab_to_host(col.qc_base);
943  const auto qi_base_host = copy_fab_to_host(col.qi_base);
944  const auto tke_base_host = copy_fab_to_host(col.tke_base_state);
945  const auto theta_v_host = copy_fab_to_host(col.theta_v);
946  const auto qv_host = copy_fab_to_host(col.qv);
947  const auto qc_host = copy_fab_to_host(col.qc);
948  const auto qi_host = copy_fab_to_host(col.qi);
949  const auto qw_host = copy_fab_to_host(col.qw);
950  const auto tabs_host = copy_fab_to_host(col.tabs);
951  const auto exner_host = copy_fab_to_host(col.exner);
952  const auto host_dse_host = copy_fab_to_host(col.host_dse);
953  const auto pblh_host = copy_fab_to_host(col.pblh);
954  const auto obklen_host = copy_fab_to_host(col.obklen);
955  const auto ustar_host = copy_fab_to_host(col.ustar);
956  const auto shoc_mix_host = copy_fab_to_host(col.shoc_mix);
957  const auto brunt_host = copy_fab_to_host(col.brunt);
958  const auto isotropy_host = copy_fab_to_host(col.isotropy);
959  const auto tk_host = copy_fab_to_host(col.tk);
960  const auto tkh_host = copy_fab_to_host(col.tkh);
961  const auto shear_prod_host = copy_fab_to_host(col.shear_prod);
962  const auto buoy_prod_host = copy_fab_to_host(col.buoy_prod);
963  const auto diss_tke_host = copy_fab_to_host(col.diss_tke);
964  const auto tke_host = copy_fab_to_host(col.tke);
965  const auto w_sec_host = copy_fab_to_host(col.w_sec);
966  const auto wthv_sec_host = copy_fab_to_host(col.wthv_sec);
967  const auto shoc_cldfrac_host = copy_fab_to_host(col.shoc_cldfrac);
968  const auto shoc_ql_host = copy_fab_to_host(col.shoc_ql);
969  const auto shoc_ql2_host = copy_fab_to_host(col.shoc_ql2);
970  const auto shoc_cond_host = copy_fab_to_host(col.shoc_cond);
971  const auto shoc_evap_host = copy_fab_to_host(col.shoc_evap);
972  const auto wqls_sec_host = copy_fab_to_host(col.wqls_sec);
973  const auto thl_sec_host = copy_fab_to_host(col.thl_sec);
974  const auto qw_sec_host = copy_fab_to_host(col.qw_sec);
975  const auto qwthl_sec_host = copy_fab_to_host(col.qwthl_sec);
976  const auto wthl_sec_host = copy_fab_to_host(col.wthl_sec);
977  const auto wqw_sec_host = copy_fab_to_host(col.wqw_sec);
978  const auto uw_sec_host = copy_fab_to_host(col.uw_sec);
979  const auto vw_sec_host = copy_fab_to_host(col.vw_sec);
980  const auto wtke_sec_host = copy_fab_to_host(col.wtke_sec);
981  const auto w3_host = copy_fab_to_host(col.w3);
982  const auto surf_sens_flux_host = copy_fab_to_host(col.surf_sens_flux);
983  const auto surf_lat_flux_host = copy_fab_to_host(col.surf_lat_flux);
984  const auto surf_tau_u_host = copy_fab_to_host(col.surf_tau_u);
985  const auto surf_tau_v_host = copy_fab_to_host(col.surf_tau_v);
986  const auto hfx3_host = hfx3 ? copy_fab_to_host((*hfx3)[mfi]) : FArrayBox();
987  const auto qfx3_host = qfx3 ? copy_fab_to_host((*qfx3)[mfi]) : FArrayBox();
988  const auto tau13_host = tau13 ? copy_fab_to_host((*tau13)[mfi]) : FArrayBox();
989  const auto tau23_host = tau23 ? copy_fab_to_host((*tau23)[mfi]) : FArrayBox();
990 
991  const auto z_arr = z_host.const_array();
992  const auto cons_arr = cons_host.const_array();
993  const auto theta_tend_arr = theta_tend_host.const_array();
994  const auto qv_tend_arr = qv_tend_host.const_array();
995  const auto qc_tend_arr = qc_tend_host.const_array();
996  const auto qi_tend_arr = qi_tend_host.const_array();
997  const auto tke_tend_arr = tke_tend_host.const_array();
998  const auto u_tend_arr = u_tend_host.const_array();
999  const auto v_tend_arr = v_tend_host.const_array();
1000  const auto dz_arr = dz_host.const_array();
1001 
1002  std::vector<ShocBadColumnReport> reports;
1003  reports.reserve(static_cast<std::size_t>(col.layout.ncell * col.layout.nlev));
1004 
1005  auto maybe_add = [&] (int i, int j, int k, int kk, int ic,
1006  const char* name, Real value, Real threshold) {
1007  if (!std::isfinite(value)) {
1008  reports.push_back(ShocBadColumnReport{
1009  std::numeric_limits<Real>::infinity(),
1010  std::string(name) + " nonfinite",
1011  mfi.index(), i, j, k, kk, ic
1012  });
1013  return;
1014  }
1015  const Real abs_value = amrex::Math::abs(value);
1016  const Real ratio = abs_value / threshold;
1017  if (ratio > 1.0_rt) {
1018  std::ostringstream oss;
1019  oss << name << " |value|=" << abs_value << " threshold=" << threshold;
1020  reports.push_back(ShocBadColumnReport{ratio, oss.str(), mfi.index(), i, j, k, kk, ic});
1021  }
1022  };
1023 
1024  auto maybe_add_geom = [&] (int i, int j, int k, int kk, int ic, Real dz_val) {
1025  if (!std::isfinite(dz_val)) {
1026  reports.push_back(ShocBadColumnReport{
1027  std::numeric_limits<Real>::infinity(),
1028  "dz nonfinite",
1029  mfi.index(), i, j, k, kk, ic
1030  });
1031  } else if (dz_val <= 0.0_rt) {
1032  reports.push_back(ShocBadColumnReport{
1033  std::numeric_limits<Real>::infinity(),
1034  "dz <= 0",
1035  mfi.index(), i, j, k, kk, ic
1036  });
1037  } else if (dz_val < m_opts.debug_bad_column_min_dz) {
1038  std::ostringstream oss;
1039  oss << "dz below minimum |dz|=" << dz_val
1040  << " min_dz=" << m_opts.debug_bad_column_min_dz;
1041  reports.push_back(ShocBadColumnReport{
1043  oss.str(),
1044  mfi.index(), i, j, k, kk, ic
1045  });
1046  }
1047  };
1048 
1049  for (int j = col.layout.jmin; j < col.layout.jmin + col.layout.ny; ++j) {
1050  for (int i = col.layout.imin; i < col.layout.imin + col.layout.nx; ++i) {
1051  const int ic = shoc_column_index(col.layout, i, j);
1052  for (int kk = 0; kk < col.layout.nlev; ++kk) {
1053  const int k = col.layout.kmin + kk;
1054  const Real dz_val = dz_arr(ic, kk, 0);
1055  maybe_add_geom(i, j, k, kk, ic, dz_val);
1056 
1057  maybe_add(i, j, k, kk, ic, "theta_tend", theta_tend_arr(ic, kk, 0), m_opts.debug_bad_column_theta_tend_threshold);
1058  maybe_add(i, j, k, kk, ic, "qv_tend", qv_tend_arr(ic, kk, 0), m_opts.debug_bad_column_q_tend_threshold);
1059  maybe_add(i, j, k, kk, ic, "qc_tend", qc_tend_arr(ic, kk, 0), m_opts.debug_bad_column_q_tend_threshold);
1060  maybe_add(i, j, k, kk, ic, "qi_tend", qi_tend_arr(ic, kk, 0), m_opts.debug_bad_column_q_tend_threshold);
1061  maybe_add(i, j, k, kk, ic, "brunt", brunt_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_brunt_threshold);
1062  maybe_add(i, j, k, kk, ic, "thl_sec", thl_sec_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_scalar_moment_threshold);
1063  maybe_add(i, j, k, kk, ic, "qw_sec", qw_sec_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_scalar_moment_threshold);
1064  maybe_add(i, j, k, kk, ic, "qwthl_sec", qwthl_sec_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_scalar_moment_threshold);
1065  maybe_add(i, j, k, kk, ic, "wthl_sec", wthl_sec_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_scalar_moment_threshold);
1066  maybe_add(i, j, k, kk, ic, "wqw_sec", wqw_sec_host.const_array()(ic, kk, 0), m_opts.debug_bad_column_scalar_moment_threshold);
1067 
1068  // Treat NaN/Inf in the key state and diagnostic fields as bad.
1069  const Real key_values[] = {
1070  rho_host.const_array()(ic, kk, 0),
1071  theta_host.const_array()(ic, kk, 0),
1072  thetal_host.const_array()(ic, kk, 0),
1073  theta_v_host.const_array()(ic, kk, 0),
1074  qv_host.const_array()(ic, kk, 0),
1075  qc_host.const_array()(ic, kk, 0),
1076  qi_host.const_array()(ic, kk, 0),
1077  qw_host.const_array()(ic, kk, 0),
1078  tabs_host.const_array()(ic, kk, 0),
1079  exner_host.const_array()(ic, kk, 0),
1080  p_mid_host.const_array()(ic, kk, 0),
1081  host_dse_host.const_array()(ic, kk, 0),
1082  pblh_host.const_array()(ic, 0, 0),
1083  obklen_host.const_array()(ic, 0, 0),
1084  ustar_host.const_array()(ic, 0, 0),
1085  shoc_mix_host.const_array()(ic, kk, 0),
1086  isotropy_host.const_array()(ic, kk, 0),
1087  tk_host.const_array()(ic, kk, 0),
1088  tkh_host.const_array()(ic, kk, 0),
1089  shear_prod_host.const_array()(ic, kk, 0),
1090  buoy_prod_host.const_array()(ic, kk, 0),
1091  diss_tke_host.const_array()(ic, kk, 0),
1092  w_sec_host.const_array()(ic, kk, 0),
1093  wthv_sec_host.const_array()(ic, kk, 0),
1094  shoc_cldfrac_host.const_array()(ic, kk, 0),
1095  shoc_ql_host.const_array()(ic, kk, 0),
1096  shoc_ql2_host.const_array()(ic, kk, 0),
1097  shoc_cond_host.const_array()(ic, kk, 0),
1098  shoc_evap_host.const_array()(ic, kk, 0),
1099  wqls_sec_host.const_array()(ic, kk, 0),
1100  thl_sec_host.const_array()(ic, kk, 0),
1101  qw_sec_host.const_array()(ic, kk, 0),
1102  qwthl_sec_host.const_array()(ic, kk, 0),
1103  wthl_sec_host.const_array()(ic, kk, 0),
1104  wqw_sec_host.const_array()(ic, kk, 0),
1105  uw_sec_host.const_array()(ic, kk, 0),
1106  vw_sec_host.const_array()(ic, kk, 0),
1107  wtke_sec_host.const_array()(ic, kk, 0),
1108  w3_host.const_array()(ic, kk, 0),
1109  theta_tend_arr(ic, kk, 0),
1110  qv_tend_arr(ic, kk, 0),
1111  qc_tend_arr(ic, kk, 0),
1112  qi_tend_arr(ic, kk, 0),
1113  tke_tend_arr(ic, kk, 0),
1114  u_tend_arr(ic, kk, 0),
1115  v_tend_arr(ic, kk, 0)
1116  };
1117  for (Real value : key_values) {
1118  if (!std::isfinite(value)) {
1119  reports.push_back(ShocBadColumnReport{
1120  std::numeric_limits<Real>::infinity(),
1121  "key field nonfinite",
1122  mfi.index(), i, j, k, kk, ic
1123  });
1124  break;
1125  }
1126  }
1127  }
1128  }
1129  }
1130 
1131  if (reports.empty()) {
1132  return;
1133  }
1134 
1135  std::stable_sort(reports.begin(), reports.end(),
1136  [] (const ShocBadColumnReport& a, const ShocBadColumnReport& b) {
1137  return a.score > b.score;
1138  });
1139 
1140  const int max_reports = std::min(m_opts.debug_bad_column_max_reports,
1141  static_cast<int>(reports.size()));
1142 
1143  const auto rho_arr = rho_host.const_array();
1144  const auto theta_arr = theta_host.const_array();
1145  const auto thetal_arr = thetal_host.const_array();
1146  const auto theta_base_arr = theta_base_host.const_array();
1147  const auto thetal_base_arr = thetal_base_host.const_array();
1148  const auto qv_base_arr = qv_base_host.const_array();
1149  const auto qc_base_arr = qc_base_host.const_array();
1150  const auto qi_base_arr = qi_base_host.const_array();
1151  const auto theta_v_arr = theta_v_host.const_array();
1152  const auto qv_arr = qv_host.const_array();
1153  const auto qc_arr = qc_host.const_array();
1154  const auto qi_arr = qi_host.const_array();
1155  const auto qw_arr = qw_host.const_array();
1156  const auto tabs_arr = tabs_host.const_array();
1157  const auto exner_arr = exner_host.const_array();
1158  const auto p_mid_arr = p_mid_host.const_array();
1159  const auto p_int_arr = p_int_host.const_array();
1160  const auto host_dse_arr = host_dse_host.const_array();
1161  const auto pblh_arr = pblh_host.const_array();
1162  const auto obklen_arr = obklen_host.const_array();
1163  const auto ustar_arr = ustar_host.const_array();
1164  const auto shoc_mix_arr = shoc_mix_host.const_array();
1165  const auto brunt_arr = brunt_host.const_array();
1166  const auto isotropy_arr = isotropy_host.const_array();
1167  const auto tk_arr = tk_host.const_array();
1168  const auto tkh_arr = tkh_host.const_array();
1169  const auto shear_prod_arr = shear_prod_host.const_array();
1170  const auto buoy_prod_arr = buoy_prod_host.const_array();
1171  const auto diss_tke_arr = diss_tke_host.const_array();
1172  const auto tke_state_arr = tke_host.const_array();
1173  const auto tke_base_arr = tke_base_host.const_array();
1174  const auto w_sec_arr = w_sec_host.const_array();
1175  const auto wthv_sec_arr = wthv_sec_host.const_array();
1176  const auto shoc_cldfrac_arr = shoc_cldfrac_host.const_array();
1177  const auto shoc_ql_arr = shoc_ql_host.const_array();
1178  const auto shoc_ql2_arr = shoc_ql2_host.const_array();
1179  const auto shoc_cond_arr = shoc_cond_host.const_array();
1180  const auto shoc_evap_arr = shoc_evap_host.const_array();
1181  const auto wqls_sec_arr = wqls_sec_host.const_array();
1182  const auto thl_sec_arr = thl_sec_host.const_array();
1183  const auto qw_sec_arr = qw_sec_host.const_array();
1184  const auto qwthl_sec_arr = qwthl_sec_host.const_array();
1185  const auto wthl_sec_arr = wthl_sec_host.const_array();
1186  const auto wqw_sec_arr = wqw_sec_host.const_array();
1187  const auto uw_sec_arr = uw_sec_host.const_array();
1188  const auto vw_sec_arr = vw_sec_host.const_array();
1189  const auto wtke_sec_arr = wtke_sec_host.const_array();
1190  const auto w3_arr = w3_host.const_array();
1191  const auto surf_sens_flux_arr = surf_sens_flux_host.const_array();
1192  const auto surf_lat_flux_arr = surf_lat_flux_host.const_array();
1193  const auto surf_tau_u_arr = surf_tau_u_host.const_array();
1194  const auto surf_tau_v_arr = surf_tau_v_host.const_array();
1195  const bool has_hfx3 = hfx3 && hfx3_host.box().ok();
1196  const bool has_qfx3 = qfx3 && qfx3_host.box().ok();
1197  const bool has_tau13 = tau13 && tau13_host.box().ok();
1198  const bool has_tau23 = tau23 && tau23_host.box().ok();
1199 
1200  for (int n = 0; n < max_reports; ++n) {
1201  const auto& rep = reports[static_cast<std::size_t>(n)];
1202  const int i = rep.i;
1203  const int j = rep.j;
1204  const int k = rep.k;
1205  const int kk = rep.kk;
1206  const int ic = rep.ic;
1207 
1208  const auto node_value = [&] (int iii, int jjj, int kkk) -> Real {
1209  const IntVect iv(iii, jjj, kkk);
1210  return z_host.box().contains(iv) ? z_arr(iii, jjj, kkk) : std::numeric_limits<Real>::quiet_NaN();
1211  };
1212 
1213  const Real z_nd_ijk = node_value(i, j, k);
1214  const Real z_nd_ip1jk = node_value(i + 1, j, k);
1215  const Real z_nd_ijp1k = node_value(i, j + 1, k);
1216  const Real z_nd_ip1jp1k = node_value(i + 1, j + 1, k);
1217  const Real z_nd_ijkp1 = node_value(i, j, k + 1);
1218  const Real z_nd_ip1jkp1 = node_value(i + 1, j, k + 1);
1219  const Real z_nd_ijp1kp1 = node_value(i, j + 1, k + 1);
1220  const Real z_nd_ip1jp1kp1 = node_value(i + 1, j + 1, k + 1);
1221  const Real four_node_zlo = 0.25_rt * (z_nd_ijk + z_nd_ip1jk + z_nd_ijp1k + z_nd_ip1jp1k);
1222  const Real four_node_zhi = 0.25_rt * (z_nd_ijkp1 + z_nd_ip1jkp1 + z_nd_ijp1kp1 + z_nd_ip1jp1kp1);
1223  const Real four_node_dz = four_node_zhi - four_node_zlo;
1224  const Real corner_dz = z_nd_ijkp1 - z_nd_ijk;
1225  const Real theta_base_val = theta_base_arr(ic, kk, 0);
1226  const Real theta_new_val = theta_arr(ic, kk, 0);
1227  const Real thetal_base_val = thetal_base_arr(ic, kk, 0);
1228  const Real thetal_new_val = thetal_arr(ic, kk, 0);
1229  const Real qv_base_val = qv_base_arr(ic, kk, 0);
1230  const Real qc_base_val = qc_base_arr(ic, kk, 0);
1231  const Real qi_base_val = qi_base_arr(ic, kk, 0);
1232  const Real qv_new_val = qv_arr(ic, kk, 0);
1233  const Real qc_new_val = qc_arr(ic, kk, 0);
1234  const Real qi_new_val = qi_arr(ic, kk, 0);
1235  const Real ql_base = qc_base_val + qi_base_val;
1236  const Real ql_new = qc_new_val + qi_new_val;
1237  const Real qw_base = qv_base_val + qc_base_val + qi_base_val;
1238  const Real qw_new = qv_new_val + qc_new_val + qi_new_val;
1239  const Real delta_theta = theta_new_val - theta_base_val;
1240  const Real delta_qv = qv_new_val - qv_base_val;
1241  const Real delta_qc = qc_new_val - qc_base_val;
1242  const Real delta_qi = qi_new_val - qi_base_val;
1243  const Real delta_ql = ql_new - ql_base;
1244  const Real delta_qw = qw_new - qw_base;
1245 
1246  const Real dt = static_cast<Real>(dt_d);
1247 
1248  const Real dt_theta_tend = theta_tend_arr(ic, kk, 0) * dt;
1249  const Real dt_qv_tend = qv_tend_arr(ic, kk, 0) * dt;
1250  const Real dt_qc_tend = qc_tend_arr(ic, kk, 0) * dt;
1251  const Real dt_qi_tend = qi_tend_arr(ic, kk, 0) * dt;
1252  const Real dt_tke_tend = tke_tend_arr(ic, kk, 0) * dt;
1253  const Real cond_dt = shoc_cond_arr(ic, kk, 0) * dt;
1254  const Real evap_dt = shoc_evap_arr(ic, kk, 0) * dt;
1255  const Real tke_base_val = tke_base_arr(ic, kk, 0);
1256  std::ostringstream msg;
1257  msg << "NATIVE_SHOC_BAD_COLUMN_BEGIN\n"
1258  << " rank=" << ParallelDescriptor::MyProc()
1259  << " level=" << m_lev
1260  << " shoc_call=" << (m_advance_calls + 1)
1261  << " mfi_index=" << rep.mfi_index
1262  << " box_valid_lo=(" << mfi.validbox().smallEnd(0) << ","
1263  << mfi.validbox().smallEnd(1) << ","
1264  << mfi.validbox().smallEnd(2) << ")"
1265  << " box_valid_hi=(" << mfi.validbox().bigEnd(0) << ","
1266  << mfi.validbox().bigEnd(1) << ","
1267  << mfi.validbox().bigEnd(2) << ")"
1268  << " layout.nx=" << col.layout.nx
1269  << " layout.ny=" << col.layout.ny
1270  << " layout.ncell=" << col.layout.ncell
1271  << " layout.nlev=" << col.layout.nlev
1272  << " layout.imin=" << col.layout.imin
1273  << " layout.jmin=" << col.layout.jmin
1274  << " layout.kmin=" << col.layout.kmin
1275  << " layout.kmax=" << col.layout.kmax
1276  << "\n"
1277  << " i=" << i << " j=" << j << " k=" << k
1278  << " kk=" << kk << " ic=" << ic
1279  << " score=" << rep.score
1280  << " reason=" << rep.reason
1281  << "\n"
1282  << " geometry z_nd(i,j,k)=" << z_nd_ijk
1283  << " z_nd(i+1,j,k)=" << z_nd_ip1jk
1284  << " z_nd(i,j+1,k)=" << z_nd_ijp1k
1285  << " z_nd(i+1,j+1,k)=" << z_nd_ip1jp1k
1286  << " z_nd(i,j,k+1)=" << z_nd_ijkp1
1287  << " z_nd(i+1,j,k+1)=" << z_nd_ip1jkp1
1288  << " z_nd(i,j+1,k+1)=" << z_nd_ijp1kp1
1289  << " z_nd(i+1,j+1,k+1)=" << z_nd_ip1jp1kp1
1290  << "\n"
1291  << " four_node_zlo=" << four_node_zlo
1292  << " four_node_zhi=" << four_node_zhi
1293  << " four_node_dz=" << four_node_dz
1294  << " corner_dz=" << corner_dz
1295  << " dz=" << dz_arr(ic, kk, 0)
1296  << "\n"
1297  << " rho=" << rho_arr(ic, kk, 0)
1298  << " theta=" << theta_arr(ic, kk, 0)
1299  << " thetal=" << thetal_arr(ic, kk, 0)
1300  << " theta_v=" << theta_v_arr(ic, kk, 0)
1301  << " qv=" << qv_arr(ic, kk, 0)
1302  << " qc=" << qc_arr(ic, kk, 0)
1303  << " qi=" << qi_arr(ic, kk, 0)
1304  << " qw=" << qw_arr(ic, kk, 0)
1305  << " tabs=" << tabs_arr(ic, kk, 0)
1306  << " exner=" << exner_arr(ic, kk, 0)
1307  << " p_mid=" << p_mid_arr(ic, kk, 0)
1308  << " p_int_lower=" << p_int_arr(ic, kk, 0)
1309  << " p_int_upper=" << p_int_arr(ic, kk + 1, 0)
1310  << " host_dse=" << host_dse_arr(ic, kk, 0)
1311  << "\n"
1312  << " pblh=" << pblh_arr(ic, 0, 0)
1313  << " obklen=" << obklen_arr(ic, 0, 0)
1314  << " ustar=" << ustar_arr(ic, 0, 0)
1315  << " shoc_mix=" << shoc_mix_arr(ic, kk, 0)
1316  << " Lturb=" << shoc_mix_arr(ic, kk, 0)
1317  << " brunt=" << brunt_arr(ic, kk, 0)
1318  << " isotropy=" << isotropy_arr(ic, kk, 0)
1319  << " tk=" << tk_arr(ic, kk, 0)
1320  << " tkh=" << tkh_arr(ic, kk, 0)
1321  << " shear_prod=" << shear_prod_arr(ic, kk, 0)
1322  << " buoy_prod=" << buoy_prod_arr(ic, kk, 0)
1323  << " diss_tke=" << diss_tke_arr(ic, kk, 0)
1324  << " tke=" << tke_state_arr(ic, kk, 0)
1325  << "\n"
1326  << " w_sec=" << w_sec_arr(ic, kk, 0)
1327  << " wthv_sec=" << wthv_sec_arr(ic, kk, 0)
1328  << " shoc_cldfrac=" << shoc_cldfrac_arr(ic, kk, 0)
1329  << " shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1330  << " shoc_ql2=" << shoc_ql2_arr(ic, kk, 0)
1331  << " shoc_cond=" << shoc_cond_arr(ic, kk, 0)
1332  << " shoc_evap=" << shoc_evap_arr(ic, kk, 0)
1333  << " wqls_sec=" << wqls_sec_arr(ic, kk, 0)
1334  << "\n"
1335  << " thl_sec_lower=" << thl_sec_arr(ic, kk, 0)
1336  << " thl_sec_upper=" << thl_sec_arr(ic, kk + 1, 0)
1337  << " qw_sec_lower=" << qw_sec_arr(ic, kk, 0)
1338  << " qw_sec_upper=" << qw_sec_arr(ic, kk + 1, 0)
1339  << " qwthl_sec_lower=" << qwthl_sec_arr(ic, kk, 0)
1340  << " qwthl_sec_upper=" << qwthl_sec_arr(ic, kk + 1, 0)
1341  << " wthl_sec_lower=" << wthl_sec_arr(ic, kk, 0)
1342  << " wthl_sec_upper=" << wthl_sec_arr(ic, kk + 1, 0)
1343  << " wqw_sec_lower=" << wqw_sec_arr(ic, kk, 0)
1344  << " wqw_sec_upper=" << wqw_sec_arr(ic, kk + 1, 0)
1345  << " w3_lower=" << w3_arr(ic, kk, 0)
1346  << " w3_upper=" << w3_arr(ic, kk + 1, 0)
1347  << " uw_sec_lower=" << uw_sec_arr(ic, kk, 0)
1348  << " uw_sec_upper=" << uw_sec_arr(ic, kk + 1, 0)
1349  << " vw_sec_lower=" << vw_sec_arr(ic, kk, 0)
1350  << " vw_sec_upper=" << vw_sec_arr(ic, kk + 1, 0)
1351  << " wtke_sec_lower=" << wtke_sec_arr(ic, kk, 0)
1352  << " wtke_sec_upper=" << wtke_sec_arr(ic, kk + 1, 0)
1353  << "\n"
1354  << " theta_tend=" << theta_tend_arr(ic, kk, 0)
1355  << " qv_tend=" << qv_tend_arr(ic, kk, 0)
1356  << " qc_tend=" << qc_tend_arr(ic, kk, 0)
1357  << " qi_tend=" << qi_tend_arr(ic, kk, 0)
1358  << " tke_tend=" << tke_tend_arr(ic, kk, 0)
1359  << " u_tend=" << u_tend_arr(ic, kk, 0)
1360  << " v_tend=" << v_tend_arr(ic, kk, 0)
1361  << "\n"
1362  << " baseline theta=" << theta_base_val
1363  << " thetal=" << thetal_base_val
1364  << " qv=" << qv_base_val
1365  << " qc=" << qc_base_val
1366  << " qi=" << qi_base_val
1367  << " ql=" << ql_base
1368  << " qw=" << qw_base
1369  << " tke=" << tke_base_val
1370  << "\n"
1371  << " updated theta=" << theta_new_val
1372  << " thetal=" << thetal_new_val
1373  << " qv=" << qv_new_val
1374  << " qc=" << qc_new_val
1375  << " qi=" << qi_new_val
1376  << " ql=" << ql_new
1377  << " qw=" << qw_new
1378  << " tke=" << tke_state_arr(ic, kk, 0)
1379  << "\n"
1380  << " deltas dtheta=" << delta_theta
1381  << " dqv=" << delta_qv
1382  << " dqc=" << delta_qc
1383  << " dqi=" << delta_qi
1384  << " dql=" << delta_ql
1385  << " dqw=" << delta_qw
1386  << "\n"
1387  << " tend_dt theta=" << dt_theta_tend
1388  << " qv=" << dt_qv_tend
1389  << " qc=" << dt_qc_tend
1390  << " qi=" << dt_qi_tend
1391  << " tke=" << dt_tke_tend
1392  << "\n"
1393  << " consistency dtheta_minus_tenddt=" << (delta_theta - dt_theta_tend)
1394  << " dqv_minus_tenddt=" << (delta_qv - dt_qv_tend)
1395  << " dqc_minus_tenddt=" << (delta_qc - dt_qc_tend)
1396  << " dqi_minus_tenddt=" << (delta_qi - dt_qi_tend)
1397  << "\n"
1398  << " pdf_cloud shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1399  << " shoc_cond_dt=" << cond_dt
1400  << " shoc_evap_dt=" << evap_dt
1401  << " delta_ql=" << delta_ql
1402  << " delta_ql_minus_cond_minus_evap=" << (delta_ql - (cond_dt - evap_dt))
1403  << "\n"
1404  << " surf_sens_flux=" << surf_sens_flux_arr(ic, 0, 0)
1405  << " surf_lat_flux=" << surf_lat_flux_arr(ic, 0, 0)
1406  << " surf_tau_u=" << surf_tau_u_arr(ic, 0, 0)
1407  << " surf_tau_v=" << surf_tau_v_arr(ic, 0, 0)
1408  << " rho_sfc=" << cons_arr(i, j, k, Rho_comp)
1409  << "\n";
1410 
1411  if (has_hfx3) {
1412  msg << " raw hfx3(i,j,klo)=" << hfx3_host.const_array()(rep.i, rep.j, rep.k) << "\n";
1413  }
1414  if (has_qfx3) {
1415  msg << " raw qfx3(i,j,klo)=" << qfx3_host.const_array()(rep.i, rep.j, rep.k) << "\n";
1416  }
1417  if (has_tau13) {
1418  msg << " raw tau13(i,j,klo)=" << tau13_host.const_array()(rep.i, rep.j, rep.k)
1419  << " raw tau13(i+1,j,klo)=" << tau13_host.const_array()(rep.i + 1, rep.j, rep.k)
1420  << "\n";
1421  }
1422  if (has_tau23) {
1423  msg << " raw tau23(i,j,klo)=" << tau23_host.const_array()(rep.i, rep.j, rep.k)
1424  << " raw tau23(i,j+1,klo)=" << tau23_host.const_array()(rep.i, rep.j + 1, rep.k)
1425  << "\n";
1426  }
1427  msg << "NATIVE_SHOC_BAD_COLUMN_END\n";
1428  amrex::AllPrint() << msg.str() << std::flush;
1429  }
1430 
1432  amrex::Abort("Native SHOC debug_bad_column abort: bad SHOC column detected before state update");
1433  }
1434 }
#define Rho_comp
Definition: ERF_IndexDefines.H:39
auto qv_arr
Definition: ERF_InitCustomPert_MultiSpeciesBubble.H:210
std::string name
Definition: ERF_Plotfile2DCatalog.cpp:101
auto rho_arr
Definition: ERF_UpdateWSubsidence_SineMassFlux.H:3
amrex::FArrayBox theta_v
Definition: ERF_ShocTypes.H:84
amrex::FArrayBox theta
Definition: ERF_ShocTypes.H:82
amrex::FArrayBox theta_base
Definition: ERF_ShocTypes.H:129
amrex::FArrayBox qi
Definition: ERF_ShocTypes.H:88
amrex::FArrayBox dz
Definition: ERF_ShocTypes.H:78
amrex::FArrayBox vw_sec
Definition: ERF_ShocTypes.H:123
amrex::FArrayBox shoc_evap
Definition: ERF_ShocTypes.H:115
amrex::FArrayBox tke_base_state
Definition: ERF_ShocTypes.H:135
amrex::FArrayBox qv_base
Definition: ERF_ShocTypes.H:130
amrex::FArrayBox uw_sec
Definition: ERF_ShocTypes.H:122
amrex::FArrayBox host_dse
Definition: ERF_ShocTypes.H:95
amrex::FArrayBox qc
Definition: ERF_ShocTypes.H:87
amrex::FArrayBox surf_tau_v
Definition: ERF_ShocTypes.H:147
amrex::FArrayBox tke
Definition: ERF_ShocTypes.H:91
amrex::FArrayBox p_int
Definition: ERF_ShocTypes.H:80
amrex::FArrayBox qi_base
Definition: ERF_ShocTypes.H:132
amrex::FArrayBox exner
Definition: ERF_ShocTypes.H:83
amrex::FArrayBox qc_base
Definition: ERF_ShocTypes.H:131
amrex::FArrayBox tabs
Definition: ERF_ShocTypes.H:90
amrex::FArrayBox qw
Definition: ERF_ShocTypes.H:89
amrex::FArrayBox qv
Definition: ERF_ShocTypes.H:86
amrex::FArrayBox p_mid
Definition: ERF_ShocTypes.H:79
amrex::FArrayBox wtke_sec
Definition: ERF_ShocTypes.H:124
amrex::FArrayBox surf_tau_u
Definition: ERF_ShocTypes.H:146
amrex::FArrayBox thetal_base
Definition: ERF_ShocTypes.H:128
amrex::FArrayBox thetal
Definition: ERF_ShocTypes.H:85
int imin
Definition: ERF_ShocTypes.H:65
int nlev
Definition: ERF_ShocTypes.H:64
int kmax
Definition: ERF_ShocTypes.H:68
int ncell
Definition: ERF_ShocTypes.H:63
int jmin
Definition: ERF_ShocTypes.H:66
int ny
Definition: ERF_ShocTypes.H:62
int nx
Definition: ERF_ShocTypes.H:61
int kmin
Definition: ERF_ShocTypes.H:67
int debug_bad_column_max_reports
Definition: ERF_ShocTypes.H:47
amrex::Real debug_bad_column_q_tend_threshold
Definition: ERF_ShocTypes.H:49
amrex::Real debug_bad_column_scalar_moment_threshold
Definition: ERF_ShocTypes.H:52
amrex::Real debug_bad_column_min_dz
Definition: ERF_ShocTypes.H:51
amrex::Real debug_bad_column_theta_tend_threshold
Definition: ERF_ShocTypes.H:48
bool debug_bad_column
Definition: ERF_ShocTypes.H:45
amrex::Real debug_bad_column_brunt_threshold
Definition: ERF_ShocTypes.H:50
bool debug_bad_column_abort
Definition: ERF_ShocTypes.H:46

Referenced by advance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug_summary_enabled()

bool ShocDriver::debug_summary_enabled ( ) const
inline
66 { return m_opts.debug_summary; }

◆ disables_momentum_transport()

bool ShocDriver::disables_momentum_transport ( ) const
866 {
868 }
bool shoc_disables_momentum_transport(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:47
Here is the call graph for this function:

◆ diss_tke_diagnostics()

const amrex::MultiFab& ShocDriver::diss_tke_diagnostics ( ) const
inline
103 { return m_diss_tke_cc; }

◆ ensure_storage()

void ShocDriver::ensure_storage ( const amrex::MultiFab &  cons,
const amrex::MultiFab &  xvel,
const amrex::MultiFab &  yvel,
const amrex::MultiFab &  eddy_diffs 
)
private
324 {
325  const bool storage_changed =
326  !m_theta_tend_cc.isDefined() ||
327  !m_u_tend_fc.isDefined() ||
328  !m_v_tend_fc.isDefined() ||
329  !m_eddy_coeffs_cc.isDefined() ||
330  m_theta_tend_cc.boxArray() != cons.boxArray() ||
331  m_theta_tend_cc.DistributionMap() != cons.DistributionMap() ||
332  m_u_tend_fc.boxArray() != xvel.boxArray() ||
333  m_u_tend_fc.DistributionMap() != xvel.DistributionMap() ||
334  m_v_tend_fc.boxArray() != yvel.boxArray() ||
335  m_v_tend_fc.DistributionMap() != yvel.DistributionMap() ||
336  m_eddy_coeffs_cc.boxArray() != eddy_diffs.boxArray() ||
337  m_eddy_coeffs_cc.DistributionMap() != eddy_diffs.DistributionMap();
338 
339  if (storage_changed) {
340  m_column_workspaces.clear();
341  m_prev_turb_valid = false;
342  m_theta_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
343  m_qv_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
344  m_qc_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
345  m_qi_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
346  m_tke_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
347  m_u_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 1);
348  m_v_tend_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 1);
349  m_u_tend_fc.define(xvel.boxArray(), xvel.DistributionMap(), 1, 0);
350  m_v_tend_fc.define(yvel.boxArray(), yvel.DistributionMap(), 1, 0);
351  m_eddy_coeffs_cc.define(eddy_diffs.boxArray(), eddy_diffs.DistributionMap(),
352  EddyDiff::NumDiffs, 0);
353  m_prev_turb_cc.define(cons.boxArray(), cons.DistributionMap(), 2, 0);
354  m_prev_wthv_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
355  m_consumed_sens_flux_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
356  m_consumed_laten_flux_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
357  m_pblh_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
358  m_shoc_ustar_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
359  m_shoc_olen_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
360  m_shoc_cldfrac_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
361  m_shoc_ql_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
362  m_shoc_ql2_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
363  m_shoc_cond_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
364  m_w_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
365  m_wqls_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
366  m_wthv_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
367  m_thl_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
368  m_qw_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
369  m_qwthl_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
370  m_wthl_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
371  m_wqw_sec_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
372  m_w3_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
373  m_brunt_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
374  m_isotropy_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
375  m_shear_prod_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
376  m_buoy_prod_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
377  m_diss_tke_cc.define(cons.boxArray(), cons.DistributionMap(), 1, 0);
378  m_prev_turb_cc.setVal(0.0);
379  m_prev_wthv_sec_cc.setVal(0.0);
380  }
381  m_theta_tend_cc.setVal(0.0);
382  m_qv_tend_cc.setVal(0.0);
383  m_qc_tend_cc.setVal(0.0);
384  m_qi_tend_cc.setVal(0.0);
385  m_tke_tend_cc.setVal(0.0);
386  m_u_tend_cc.setVal(0.0);
387  m_v_tend_cc.setVal(0.0);
388  m_u_tend_fc.setVal(0.0);
389  m_v_tend_fc.setVal(0.0);
390  m_eddy_coeffs_cc.setVal(0.0);
391  m_consumed_sens_flux_cc.setVal(0.0);
392  m_consumed_laten_flux_cc.setVal(0.0);
393  m_pblh_cc.setVal(0.0);
394  m_shoc_ustar_cc.setVal(0.0);
395  m_shoc_olen_cc.setVal(0.0);
396  m_shoc_cldfrac_cc.setVal(0.0);
397  m_shoc_ql_cc.setVal(0.0);
398  m_shoc_ql2_cc.setVal(0.0);
399  m_shoc_cond_cc.setVal(0.0);
400  m_w_sec_cc.setVal(0.0);
401  m_wqls_sec_cc.setVal(0.0);
402  m_wthv_sec_cc.setVal(0.0);
403  m_thl_sec_cc.setVal(0.0);
404  m_qw_sec_cc.setVal(0.0);
405  m_qwthl_sec_cc.setVal(0.0);
406  m_wthl_sec_cc.setVal(0.0);
407  m_wqw_sec_cc.setVal(0.0);
408  m_w3_cc.setVal(0.0);
409  m_brunt_cc.setVal(0.0);
410  m_isotropy_cc.setVal(0.0);
411  m_shear_prod_cc.setVal(0.0);
412  m_buoy_prod_cc.setVal(0.0);
413  m_diss_tke_cc.setVal(0.0);
414 }
amrex::MultiFab m_prev_wthv_sec_cc
Definition: ERF_ShocDriver.H:121
amrex::MultiFab m_prev_turb_cc
Definition: ERF_ShocDriver.H:120
@ NumDiffs
Definition: ERF_IndexDefines.H:269

Referenced by advance().

Here is the caller graph for this function:

◆ has_consumed_surface_flux_diagnostics()

bool ShocDriver::has_consumed_surface_flux_diagnostics ( ) const
inline
69  {
70  return m_consumed_sens_flux_cc.isDefined() && m_consumed_laten_flux_cc.isDefined();
71  }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ has_native_diagnostics()

bool ShocDriver::has_native_diagnostics ( ) const
inline
67 { return m_eddy_coeffs_cc.isDefined(); }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ isotropy_diagnostics()

const amrex::MultiFab& ShocDriver::isotropy_diagnostics ( ) const
inline
100 { return m_isotropy_cc; }

◆ native_diagnostics()

const amrex::MultiFab& ShocDriver::native_diagnostics ( ) const
inline
72 { return m_eddy_coeffs_cc; }

◆ owns_scalar_surface_fluxes()

bool ShocDriver::owns_scalar_surface_fluxes ( ) const
872 {
873  return true;
874 }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ pblh_diagnostics()

const amrex::MultiFab& ShocDriver::pblh_diagnostics ( ) const
inline
74 { return m_pblh_cc; }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ print_debug_summary()

void ShocDriver::print_debug_summary ( double  dt) const
private
1438 {
1439  BL_PROFILE("SHOC::print_debug_summary");
1440 
1441  auto print_minmax = [] (const char* name, const MultiFab& mf, int comp) {
1442  amrex::Print() << " " << std::setw(12) << std::left << name
1443  << " min=" << mf.min(comp)
1444  << " max=" << mf.max(comp) << "\n";
1445  };
1446 
1447  amrex::Print() << "SHOC debug summary:"
1448  << " level=" << m_lev
1449  << " call=" << m_advance_calls
1450  << " dt=" << dt
1451  << " transport_mode=" << shoc_transport_mode_name(m_opts.transport_mode)
1452  << " momentum_transport=" << shoc_momentum_transport_name(m_opts.momentum_transport)
1453  << " state_update=on"
1454  << "\n";
1455  print_shoc_debug_settings_once(m_opts);
1456 
1457  print_minmax("Kmv", m_eddy_coeffs_cc, EddyDiff::Mom_v);
1458  print_minmax("Khv", m_eddy_coeffs_cc, EddyDiff::Theta_v);
1459  print_minmax("KE_v", m_eddy_coeffs_cc, EddyDiff::KE_v);
1460  print_minmax("Q_v", m_eddy_coeffs_cc, EddyDiff::Q_v);
1461  print_minmax("l_turb", m_eddy_coeffs_cc, EddyDiff::Turb_lengthscale);
1462  print_minmax("pblh", m_pblh_cc, 0);
1463 
1464  print_minmax("th_tend", m_theta_tend_cc, 0);
1465  print_minmax("qv_tend", m_qv_tend_cc, 0);
1466  print_minmax("qc_tend", m_qc_tend_cc, 0);
1467  print_minmax("qi_tend", m_qi_tend_cc, 0);
1468  print_minmax("tke_tend", m_tke_tend_cc, 0);
1469  print_minmax("u_tend", m_u_tend_fc, 0);
1470  print_minmax("v_tend", m_v_tend_fc, 0);
1471  print_minmax("w_sec", m_w_sec_cc, 0);
1472  print_minmax("thl_sec", m_thl_sec_cc, 0);
1473  print_minmax("qw_sec", m_qw_sec_cc, 0);
1474  print_minmax("qwthl_sec", m_qwthl_sec_cc, 0);
1475  print_minmax("wthl_sec", m_wthl_sec_cc, 0);
1476  print_minmax("wqw_sec", m_wqw_sec_cc, 0);
1477  print_minmax("w3", m_w3_cc, 0);
1478  print_minmax("brunt", m_brunt_cc, 0);
1479  print_minmax("isotropy", m_isotropy_cc, 0);
1480  print_minmax("shear_prod", m_shear_prod_cc, 0);
1481  print_minmax("buoy_prod", m_buoy_prod_cc, 0);
1482  print_minmax("diss_tke", m_diss_tke_cc, 0);
1483  print_minmax("cldfrac", m_shoc_cldfrac_cc, 0);
1484  print_minmax("shoc_ql", m_shoc_ql_cc, 0);
1485  print_minmax("shoc_ql2", m_shoc_ql2_cc, 0);
1486  print_minmax("shoc_cond", m_shoc_cond_cc, 0);
1487  print_minmax("wqls_sec", m_wqls_sec_cc, 0);
1488  print_minmax("wthv_sec", m_wthv_sec_cc, 0);
1489 
1490  if (m_hfx3_ptr) print_minmax("hfx3_in", *m_hfx3_ptr, 0);
1491  if (m_qfx3_ptr) print_minmax("qfx3_in", *m_qfx3_ptr, 0);
1492  if (m_tau13_ptr) print_minmax("tau13_in", *m_tau13_ptr, 0);
1493  if (m_tau23_ptr) print_minmax("tau23_in", *m_tau23_ptr, 0);
1494 }
const char * shoc_transport_mode_name(ShocTransportMode mode)
Definition: ERF_ShocTransportStruct.H:22
const char * shoc_momentum_transport_name(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:31

Referenced by advance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qw_sec_diagnostics()

const amrex::MultiFab& ShocDriver::qw_sec_diagnostics ( ) const
inline
94 { return m_qw_sec_cc; }

◆ qwthl_sec_diagnostics()

const amrex::MultiFab& ShocDriver::qwthl_sec_diagnostics ( ) const
inline
95 { return m_qwthl_sec_cc; }

◆ seed_carried_buoyancy_flux()

void ShocDriver::seed_carried_buoyancy_flux ( ShocColumnData col,
const amrex::MFIter &  mfi 
) const
private
451 {
452  if (!m_prev_turb_valid) {
453  return;
454  }
455 
456  const auto carried = m_prev_wthv_sec_cc.const_array(mfi);
457  auto wthv_sec = col.wthv_sec.array();
458  const auto layout = col.layout;
459  const Box xy_box = amrex::makeSlab(mfi.validbox(), 2, layout.kmin);
460 
461  seed_carried_buoyancy_flux_impl(xy_box, layout, carried, wthv_sec);
462 }

Referenced by advance().

Here is the caller graph for this function:

◆ seed_carried_turbulence()

void ShocDriver::seed_carried_turbulence ( ShocColumnData col,
const amrex::MFIter &  mfi,
const amrex::MultiFab &  cons,
const amrex::MultiFab &  eddy_diffs 
) const
private
421 {
422  const auto rho_host = cons.const_array(mfi);
423  const auto carried = m_prev_turb_cc.const_array(mfi);
424  const auto host_diff = eddy_diffs.const_array(mfi);
425  auto tk = col.tk.array();
426  auto tkh = col.tkh.array();
427  const bool prev_turb_valid = m_prev_turb_valid;
428  const auto layout = col.layout;
429  const Box xy_box = amrex::makeSlab(mfi.validbox(), 2, layout.kmin);
430 
431  seed_carried_turbulence_impl(xy_box, layout, rho_host, carried, host_diff,
432  tk, tkh, prev_turb_valid);
433 }

Referenced by advance().

Here is the caller graph for this function:

◆ set_diff_stresses()

void ShocDriver::set_diff_stresses ( ) const
809 {
810  BL_PROFILE("SHOC::set_diff_stresses");
811 
812  if (!m_hfx3_ptr || !m_qfx3_ptr) {
813  return;
814  }
815 
816  for (MFIter mfi(*m_hfx3_ptr, false); mfi.isValid(); ++mfi) {
817  const Box& vbx_cc = mfi.validbox();
818  const Box& vbx_xz = convert(vbx_cc, IntVect(1,0,1));
819  const Box& vbx_yz = convert(vbx_cc, IntVect(0,1,1));
820  auto hfx = m_hfx3_ptr->array(mfi);
821  auto qfx = m_qfx3_ptr->array(mfi);
822 
823  ParallelFor(vbx_cc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
824  hfx(i,j,k) = 0.0;
825  qfx(i,j,k) = 0.0;
826  });
827 
828  if (m_tau13_ptr && m_tau23_ptr) {
829  auto tau13 = m_tau13_ptr->array(mfi);
830  auto tau23 = m_tau23_ptr->array(mfi);
831  ParallelFor(vbx_xz, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
832  tau13(i,j,k) = 0.0;
833  });
834  ParallelFor(vbx_yz, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
835  tau23(i,j,k) = 0.0;
836  });
837  }
838  }
839 }
Here is the call graph for this function:

◆ set_eddy_diffs()

void ShocDriver::set_eddy_diffs ( ) const
797 {
798  BL_PROFILE("SHOC::set_eddy_diffs");
799 
801  m_eddy_diffs_ptr->setVal(0.0, k_shoc_vertical_diff_comp, k_shoc_vertical_diff_count,
802  m_eddy_diffs_ptr->nGrow());
803  MultiFab::Copy(*m_eddy_diffs_ptr, m_eddy_coeffs_cc,
805 }
Here is the call graph for this function:

◆ shear_prod_diagnostics()

const amrex::MultiFab& ShocDriver::shear_prod_diagnostics ( ) const
inline
101 { return m_shear_prod_cc; }

◆ shoc_cldfrac_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_cldfrac_diagnostics ( ) const
inline
86 { return m_shoc_cldfrac_cc; }

◆ shoc_cond_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_cond_diagnostics ( ) const
inline
89 { return m_shoc_cond_cc; }

◆ shoc_olen_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_olen_diagnostics ( ) const
inline
85 { return m_shoc_olen_cc; }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ shoc_ql2_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_ql2_diagnostics ( ) const
inline
88 { return m_shoc_ql2_cc; }

◆ shoc_ql_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_ql_diagnostics ( ) const
inline
87 { return m_shoc_ql_cc; }

◆ shoc_ustar_diagnostics()

const amrex::MultiFab& ShocDriver::shoc_ustar_diagnostics ( ) const
inline
84 { return m_shoc_ustar_cc; }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

◆ store_carried_buoyancy_flux()

void ShocDriver::store_carried_buoyancy_flux ( const ShocColumnData col,
const amrex::MFIter &  mfi 
)
private
467 {
468  auto carried = m_prev_wthv_sec_cc.array(mfi);
469  const auto wthv_sec = col.wthv_sec.const_array();
470  const auto layout = col.layout;
471  const Box xy_box = amrex::makeSlab(mfi.validbox(), 2, layout.kmin);
472 
473  store_carried_buoyancy_flux_impl(xy_box, layout, carried, wthv_sec);
474 }

Referenced by advance().

Here is the caller graph for this function:

◆ store_carried_turbulence()

void ShocDriver::store_carried_turbulence ( const ShocColumnData col,
const amrex::MFIter &  mfi 
)
private
438 {
439  auto carried = m_prev_turb_cc.array(mfi);
440  const auto tk = col.tk.const_array();
441  const auto tkh = col.tkh.const_array();
442  const auto layout = col.layout;
443  const Box xy_box = amrex::makeSlab(mfi.validbox(), 2, layout.kmin);
444 
445  store_carried_turbulence_impl(xy_box, layout, carried, tk, tkh);
446 }

Referenced by advance().

Here is the caller graph for this function:

◆ thl_sec_diagnostics()

const amrex::MultiFab& ShocDriver::thl_sec_diagnostics ( ) const
inline
93 { return m_thl_sec_cc; }

◆ uses_momentum_state_update()

bool ShocDriver::uses_momentum_state_update ( ) const
860 {
862 }
bool shoc_uses_momentum_state_update(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:41

Referenced by advance(), and apply_state_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ w3_diagnostics()

const amrex::MultiFab& ShocDriver::w3_diagnostics ( ) const
inline
98 { return m_w3_cc; }

◆ w_sec_diagnostics()

const amrex::MultiFab& ShocDriver::w_sec_diagnostics ( ) const
inline
90 { return m_w_sec_cc; }

◆ wqls_sec_diagnostics()

const amrex::MultiFab& ShocDriver::wqls_sec_diagnostics ( ) const
inline
91 { return m_wqls_sec_cc; }

◆ wqw_sec_diagnostics()

const amrex::MultiFab& ShocDriver::wqw_sec_diagnostics ( ) const
inline
97 { return m_wqw_sec_cc; }

◆ wthl_sec_diagnostics()

const amrex::MultiFab& ShocDriver::wthl_sec_diagnostics ( ) const
inline
96 { return m_wthl_sec_cc; }

◆ wthv_sec_diagnostics()

const amrex::MultiFab& ShocDriver::wthv_sec_diagnostics ( ) const
inline
92 { return m_wthv_sec_cc; }

Referenced by ERF::FillPlot2DVars().

Here is the caller graph for this function:

Member Data Documentation

◆ m_advance_calls

int ShocDriver::m_advance_calls = 0
private

◆ m_brunt_cc

amrex::MultiFab ShocDriver::m_brunt_cc
private

◆ m_buoy_prod_cc

amrex::MultiFab ShocDriver::m_buoy_prod_cc
private

◆ m_column_workspaces

amrex::Vector<std::unique_ptr<ShocColumnWorkspace> > ShocDriver::m_column_workspaces
private

Referenced by advance(), and ensure_storage().

◆ m_cons_ptr

amrex::MultiFab* ShocDriver::m_cons_ptr = nullptr
private

◆ m_consumed_laten_flux_cc

amrex::MultiFab ShocDriver::m_consumed_laten_flux_cc
private

◆ m_consumed_sens_flux_cc

amrex::MultiFab ShocDriver::m_consumed_sens_flux_cc
private

◆ m_diss_tke_cc

amrex::MultiFab ShocDriver::m_diss_tke_cc
private

◆ m_eddy_coeffs_cc

amrex::MultiFab ShocDriver::m_eddy_coeffs_cc
private

◆ m_eddy_diffs_ptr

amrex::MultiFab* ShocDriver::m_eddy_diffs_ptr = nullptr
private

Referenced by advance(), and set_eddy_diffs().

◆ m_hfx3_ptr

amrex::MultiFab* ShocDriver::m_hfx3_ptr = nullptr
private

◆ m_isotropy_cc

amrex::MultiFab ShocDriver::m_isotropy_cc
private

◆ m_lev

int ShocDriver::m_lev
private

◆ m_moisture_indices

MoistureComponentIndices ShocDriver::m_moisture_indices
private

Referenced by advance(), and apply_state_update().

◆ m_opts

◆ m_pblh_cc

amrex::MultiFab ShocDriver::m_pblh_cc
private

◆ m_prev_turb_cc

amrex::MultiFab ShocDriver::m_prev_turb_cc
private

◆ m_prev_turb_valid

bool ShocDriver::m_prev_turb_valid = false
private

◆ m_prev_wthv_sec_cc

amrex::MultiFab ShocDriver::m_prev_wthv_sec_cc
private

◆ m_qc_tend_cc

amrex::MultiFab ShocDriver::m_qc_tend_cc
private

◆ m_qfx3_ptr

amrex::MultiFab* ShocDriver::m_qfx3_ptr = nullptr
private

◆ m_qi_tend_cc

amrex::MultiFab ShocDriver::m_qi_tend_cc
private

◆ m_qv_tend_cc

amrex::MultiFab ShocDriver::m_qv_tend_cc
private

◆ m_qw_sec_cc

amrex::MultiFab ShocDriver::m_qw_sec_cc
private

◆ m_qwthl_sec_cc

amrex::MultiFab ShocDriver::m_qwthl_sec_cc
private

◆ m_shear_prod_cc

amrex::MultiFab ShocDriver::m_shear_prod_cc
private

◆ m_shoc_cldfrac_cc

amrex::MultiFab ShocDriver::m_shoc_cldfrac_cc
private

◆ m_shoc_cond_cc

amrex::MultiFab ShocDriver::m_shoc_cond_cc
private

◆ m_shoc_olen_cc

amrex::MultiFab ShocDriver::m_shoc_olen_cc
private

◆ m_shoc_ql2_cc

amrex::MultiFab ShocDriver::m_shoc_ql2_cc
private

◆ m_shoc_ql_cc

amrex::MultiFab ShocDriver::m_shoc_ql_cc
private

◆ m_shoc_ustar_cc

amrex::MultiFab ShocDriver::m_shoc_ustar_cc
private

◆ m_tau13_ptr

amrex::MultiFab* ShocDriver::m_tau13_ptr = nullptr
private

◆ m_tau23_ptr

amrex::MultiFab* ShocDriver::m_tau23_ptr = nullptr
private

◆ m_theta_tend_cc

amrex::MultiFab ShocDriver::m_theta_tend_cc
private

◆ m_thl_sec_cc

amrex::MultiFab ShocDriver::m_thl_sec_cc
private

◆ m_tke_tend_cc

amrex::MultiFab ShocDriver::m_tke_tend_cc
private

◆ m_u_tend_cc

amrex::MultiFab ShocDriver::m_u_tend_cc
private

Referenced by advance(), and ensure_storage().

◆ m_u_tend_fc

amrex::MultiFab ShocDriver::m_u_tend_fc
private

◆ m_v_tend_cc

amrex::MultiFab ShocDriver::m_v_tend_cc
private

Referenced by advance(), and ensure_storage().

◆ m_v_tend_fc

amrex::MultiFab ShocDriver::m_v_tend_fc
private

◆ m_w3_cc

amrex::MultiFab ShocDriver::m_w3_cc
private

◆ m_w_sec_cc

amrex::MultiFab ShocDriver::m_w_sec_cc
private

◆ m_wqls_sec_cc

amrex::MultiFab ShocDriver::m_wqls_sec_cc
private

◆ m_wqw_sec_cc

amrex::MultiFab ShocDriver::m_wqw_sec_cc
private

◆ m_wthl_sec_cc

amrex::MultiFab ShocDriver::m_wthl_sec_cc
private

◆ m_wthv_sec_cc

amrex::MultiFab ShocDriver::m_wthv_sec_cc
private

The documentation for this class was generated from the following files: