1033 amrex::ignore_unused(geom, dt_d);
1040 print_shoc_debug_settings_once(
m_opts);
1042 const auto cons_host = copy_fab_to_host((*
m_cons_ptr)[mfi]);
1043 const auto z_host = copy_fab_to_host(z_phys_nd[mfi]);
1044 const auto theta_tend_host = copy_fab_to_host(col.
theta_tend);
1045 const auto qv_tend_host = copy_fab_to_host(col.
qv_tend);
1046 const auto qc_tend_host = copy_fab_to_host(col.
qc_tend);
1047 const auto qi_tend_host = copy_fab_to_host(col.
qi_tend);
1048 const auto tke_tend_host = copy_fab_to_host(col.
tke_tend);
1049 const auto u_tend_host = copy_fab_to_host(col.
u_tend);
1050 const auto v_tend_host = copy_fab_to_host(col.
v_tend);
1051 const auto p_mid_host = copy_fab_to_host(col.
p_mid);
1052 const auto p_int_host = copy_fab_to_host(col.
p_int);
1053 const auto zt_host = copy_fab_to_host(col.
zt);
1054 const auto zi_host = copy_fab_to_host(col.
zi);
1055 const auto dz_host = copy_fab_to_host(col.
dz);
1056 const auto rho_host = copy_fab_to_host(col.
rho);
1057 const auto theta_host = copy_fab_to_host(col.
theta);
1058 const auto thetal_host = copy_fab_to_host(col.
thetal);
1059 const auto theta_base_host = copy_fab_to_host(col.
theta_base);
1060 const auto thetal_base_host = copy_fab_to_host(col.
thetal_base);
1061 const auto qv_base_host = copy_fab_to_host(col.
qv_base);
1062 const auto qc_base_host = copy_fab_to_host(col.
qc_base);
1063 const auto qi_base_host = copy_fab_to_host(col.
qi_base);
1065 const auto theta_v_host = copy_fab_to_host(col.
theta_v);
1066 const auto qv_host = copy_fab_to_host(col.
qv);
1067 const auto qc_host = copy_fab_to_host(col.
qc);
1068 const auto qi_host = copy_fab_to_host(col.
qi);
1069 const auto qw_host = copy_fab_to_host(col.
qw);
1070 const auto tabs_host = copy_fab_to_host(col.
tabs);
1071 const auto exner_host = copy_fab_to_host(col.
exner);
1072 const auto host_dse_host = copy_fab_to_host(col.
host_dse);
1073 const auto pblh_host = copy_fab_to_host(col.
pblh);
1074 const auto obklen_host = copy_fab_to_host(col.
obklen);
1075 const auto ustar_host = copy_fab_to_host(col.
ustar);
1076 const auto shoc_mix_host = copy_fab_to_host(col.
shoc_mix);
1077 const auto brunt_host = copy_fab_to_host(col.
brunt);
1078 const auto isotropy_host = copy_fab_to_host(col.
isotropy);
1079 const auto tk_host = copy_fab_to_host(col.
tk);
1080 const auto tkh_host = copy_fab_to_host(col.
tkh);
1081 const auto shear_prod_host = copy_fab_to_host(col.
shear_prod);
1082 const auto buoy_prod_host = copy_fab_to_host(col.
buoy_prod);
1083 const auto diss_tke_host = copy_fab_to_host(col.
diss_tke);
1084 const auto tke_host = copy_fab_to_host(col.
tke);
1085 const auto w_sec_host = copy_fab_to_host(col.
w_sec);
1086 const auto wthv_sec_host = copy_fab_to_host(col.
wthv_sec);
1087 const auto shoc_cldfrac_host = copy_fab_to_host(col.
shoc_cldfrac);
1088 const auto shoc_ql_host = copy_fab_to_host(col.
shoc_ql);
1089 const auto shoc_ql2_host = copy_fab_to_host(col.
shoc_ql2);
1090 const auto shoc_cond_host = copy_fab_to_host(col.
shoc_cond);
1091 const auto shoc_evap_host = copy_fab_to_host(col.
shoc_evap);
1092 const auto wqls_sec_host = copy_fab_to_host(col.
wqls_sec);
1093 const auto thl_sec_host = copy_fab_to_host(col.
thl_sec);
1094 const auto qw_sec_host = copy_fab_to_host(col.
qw_sec);
1095 const auto qwthl_sec_host = copy_fab_to_host(col.
qwthl_sec);
1096 const auto wthl_sec_host = copy_fab_to_host(col.
wthl_sec);
1097 const auto wqw_sec_host = copy_fab_to_host(col.
wqw_sec);
1098 const auto uw_sec_host = copy_fab_to_host(col.
uw_sec);
1099 const auto vw_sec_host = copy_fab_to_host(col.
vw_sec);
1100 const auto wtke_sec_host = copy_fab_to_host(col.
wtke_sec);
1101 const auto w3_host = copy_fab_to_host(col.
w3);
1102 const auto surf_sens_flux_host = copy_fab_to_host(col.
surf_sens_flux);
1103 const auto surf_lat_flux_host = copy_fab_to_host(col.
surf_lat_flux);
1104 const auto surf_tau_u_host = copy_fab_to_host(col.
surf_tau_u);
1105 const auto surf_tau_v_host = copy_fab_to_host(col.
surf_tau_v);
1106 const auto hfx3_host = hfx3 ? copy_fab_to_host((*hfx3)[mfi]) : FArrayBox();
1107 const auto qfx3_host = qfx3 ? copy_fab_to_host((*qfx3)[mfi]) : FArrayBox();
1108 const auto tau13_host =
tau13 ? copy_fab_to_host((*
tau13)[mfi]) : FArrayBox();
1109 const auto tau23_host =
tau23 ? copy_fab_to_host((*
tau23)[mfi]) : FArrayBox();
1111 const auto z_arr = z_host.const_array();
1112 const auto cons_arr = cons_host.const_array();
1113 const auto theta_tend_arr = theta_tend_host.const_array();
1114 const auto qv_tend_arr = qv_tend_host.const_array();
1115 const auto qc_tend_arr = qc_tend_host.const_array();
1116 const auto qi_tend_arr = qi_tend_host.const_array();
1117 const auto tke_tend_arr = tke_tend_host.const_array();
1118 const auto u_tend_arr = u_tend_host.const_array();
1119 const auto v_tend_arr = v_tend_host.const_array();
1120 const auto dz_arr = dz_host.const_array();
1122 std::vector<ShocBadColumnReport> reports;
1125 auto maybe_add = [&] (
int i,
int j,
int k,
int kk,
int ic,
1127 if (!std::isfinite(value)) {
1128 reports.push_back(ShocBadColumnReport{
1129 std::numeric_limits<Real>::infinity(),
1130 std::string(
name) +
" nonfinite",
1131 mfi.index(), i, j, k, kk, ic
1135 const Real abs_value = amrex::Math::abs(value);
1136 const Real ratio = abs_value / threshold;
1137 if (ratio > 1.0_rt) {
1138 std::ostringstream oss;
1139 oss <<
name <<
" |value|=" << abs_value <<
" threshold=" << threshold;
1140 reports.push_back(ShocBadColumnReport{ratio, oss.str(), mfi.index(), i, j, k, kk, ic});
1144 auto maybe_add_geom = [&] (
int i,
int j,
int k,
int kk,
int ic,
Real dz_val) {
1145 if (!std::isfinite(dz_val)) {
1146 reports.push_back(ShocBadColumnReport{
1147 std::numeric_limits<Real>::infinity(),
1149 mfi.index(), i, j, k, kk, ic
1151 }
else if (dz_val <= 0.0_rt) {
1152 reports.push_back(ShocBadColumnReport{
1153 std::numeric_limits<Real>::infinity(),
1155 mfi.index(), i, j, k, kk, ic
1158 std::ostringstream oss;
1159 oss <<
"dz below minimum |dz|=" << dz_val
1161 reports.push_back(ShocBadColumnReport{
1164 mfi.index(), i, j, k, kk, ic
1172 for (
int kk = 0; kk < col.
layout.
nlev; ++kk) {
1174 const Real dz_val = dz_arr(ic, kk, 0);
1175 maybe_add_geom(i, j, k, kk, ic, dz_val);
1189 const Real key_values[] = {
1190 rho_host.const_array()(ic, kk, 0),
1191 theta_host.const_array()(ic, kk, 0),
1192 thetal_host.const_array()(ic, kk, 0),
1193 theta_v_host.const_array()(ic, kk, 0),
1194 qv_host.const_array()(ic, kk, 0),
1195 qc_host.const_array()(ic, kk, 0),
1196 qi_host.const_array()(ic, kk, 0),
1197 qw_host.const_array()(ic, kk, 0),
1198 tabs_host.const_array()(ic, kk, 0),
1199 exner_host.const_array()(ic, kk, 0),
1200 p_mid_host.const_array()(ic, kk, 0),
1201 host_dse_host.const_array()(ic, kk, 0),
1202 pblh_host.const_array()(ic, 0, 0),
1203 obklen_host.const_array()(ic, 0, 0),
1204 ustar_host.const_array()(ic, 0, 0),
1205 shoc_mix_host.const_array()(ic, kk, 0),
1206 isotropy_host.const_array()(ic, kk, 0),
1207 tk_host.const_array()(ic, kk, 0),
1208 tkh_host.const_array()(ic, kk, 0),
1209 shear_prod_host.const_array()(ic, kk, 0),
1210 buoy_prod_host.const_array()(ic, kk, 0),
1211 diss_tke_host.const_array()(ic, kk, 0),
1212 w_sec_host.const_array()(ic, kk, 0),
1213 wthv_sec_host.const_array()(ic, kk, 0),
1214 shoc_cldfrac_host.const_array()(ic, kk, 0),
1215 shoc_ql_host.const_array()(ic, kk, 0),
1216 shoc_ql2_host.const_array()(ic, kk, 0),
1217 shoc_cond_host.const_array()(ic, kk, 0),
1218 shoc_evap_host.const_array()(ic, kk, 0),
1219 wqls_sec_host.const_array()(ic, kk, 0),
1220 thl_sec_host.const_array()(ic, kk, 0),
1221 qw_sec_host.const_array()(ic, kk, 0),
1222 qwthl_sec_host.const_array()(ic, kk, 0),
1223 wthl_sec_host.const_array()(ic, kk, 0),
1224 wqw_sec_host.const_array()(ic, kk, 0),
1225 uw_sec_host.const_array()(ic, kk, 0),
1226 vw_sec_host.const_array()(ic, kk, 0),
1227 wtke_sec_host.const_array()(ic, kk, 0),
1228 w3_host.const_array()(ic, kk, 0),
1229 theta_tend_arr(ic, kk, 0),
1230 qv_tend_arr(ic, kk, 0),
1231 qc_tend_arr(ic, kk, 0),
1232 qi_tend_arr(ic, kk, 0),
1233 tke_tend_arr(ic, kk, 0),
1234 u_tend_arr(ic, kk, 0),
1235 v_tend_arr(ic, kk, 0)
1237 for (
Real value : key_values) {
1238 if (!std::isfinite(value)) {
1239 reports.push_back(ShocBadColumnReport{
1240 std::numeric_limits<Real>::infinity(),
1241 "key field nonfinite",
1242 mfi.index(), i, j, k, kk, ic
1251 if (reports.empty()) {
1255 std::stable_sort(reports.begin(), reports.end(),
1256 [] (
const ShocBadColumnReport& a,
const ShocBadColumnReport& b) {
1257 return a.score > b.score;
1261 static_cast<int>(reports.size()));
1263 const auto rho_arr = rho_host.const_array();
1264 const auto theta_arr = theta_host.const_array();
1265 const auto thetal_arr = thetal_host.const_array();
1266 const auto theta_base_arr = theta_base_host.const_array();
1267 const auto thetal_base_arr = thetal_base_host.const_array();
1268 const auto qv_base_arr = qv_base_host.const_array();
1269 const auto qc_base_arr = qc_base_host.const_array();
1270 const auto qi_base_arr = qi_base_host.const_array();
1271 const auto theta_v_arr = theta_v_host.const_array();
1272 const auto qv_arr = qv_host.const_array();
1273 const auto qc_arr = qc_host.const_array();
1274 const auto qi_arr = qi_host.const_array();
1275 const auto qw_arr = qw_host.const_array();
1276 const auto tabs_arr = tabs_host.const_array();
1277 const auto exner_arr = exner_host.const_array();
1278 const auto p_mid_arr = p_mid_host.const_array();
1279 const auto p_int_arr = p_int_host.const_array();
1280 const auto host_dse_arr = host_dse_host.const_array();
1281 const auto pblh_arr = pblh_host.const_array();
1282 const auto obklen_arr = obklen_host.const_array();
1283 const auto ustar_arr = ustar_host.const_array();
1284 const auto shoc_mix_arr = shoc_mix_host.const_array();
1285 const auto brunt_arr = brunt_host.const_array();
1286 const auto isotropy_arr = isotropy_host.const_array();
1287 const auto tk_arr = tk_host.const_array();
1288 const auto tkh_arr = tkh_host.const_array();
1289 const auto shear_prod_arr = shear_prod_host.const_array();
1290 const auto buoy_prod_arr = buoy_prod_host.const_array();
1291 const auto diss_tke_arr = diss_tke_host.const_array();
1292 const auto tke_state_arr = tke_host.const_array();
1293 const auto tke_base_arr = tke_base_host.const_array();
1294 const auto w_sec_arr = w_sec_host.const_array();
1295 const auto wthv_sec_arr = wthv_sec_host.const_array();
1296 const auto shoc_cldfrac_arr = shoc_cldfrac_host.const_array();
1297 const auto shoc_ql_arr = shoc_ql_host.const_array();
1298 const auto shoc_ql2_arr = shoc_ql2_host.const_array();
1299 const auto shoc_cond_arr = shoc_cond_host.const_array();
1300 const auto shoc_evap_arr = shoc_evap_host.const_array();
1301 const auto wqls_sec_arr = wqls_sec_host.const_array();
1302 const auto thl_sec_arr = thl_sec_host.const_array();
1303 const auto qw_sec_arr = qw_sec_host.const_array();
1304 const auto qwthl_sec_arr = qwthl_sec_host.const_array();
1305 const auto wthl_sec_arr = wthl_sec_host.const_array();
1306 const auto wqw_sec_arr = wqw_sec_host.const_array();
1307 const auto uw_sec_arr = uw_sec_host.const_array();
1308 const auto vw_sec_arr = vw_sec_host.const_array();
1309 const auto wtke_sec_arr = wtke_sec_host.const_array();
1310 const auto w3_arr = w3_host.const_array();
1311 const auto surf_sens_flux_arr = surf_sens_flux_host.const_array();
1312 const auto surf_lat_flux_arr = surf_lat_flux_host.const_array();
1313 const auto surf_tau_u_arr = surf_tau_u_host.const_array();
1314 const auto surf_tau_v_arr = surf_tau_v_host.const_array();
1315 const bool has_hfx3 = hfx3 && hfx3_host.box().ok();
1316 const bool has_qfx3 = qfx3 && qfx3_host.box().ok();
1317 const bool has_tau13 =
tau13 && tau13_host.box().ok();
1318 const bool has_tau23 =
tau23 && tau23_host.box().ok();
1320 for (
int n = 0; n < max_reports; ++n) {
1321 const auto& rep = reports[
static_cast<std::size_t
>(n)];
1322 const int i = rep.i;
1323 const int j = rep.j;
1324 const int k = rep.k;
1325 const int kk = rep.kk;
1326 const int ic = rep.ic;
1328 const auto node_value = [&] (
int iii,
int jjj,
int kkk) ->
Real {
1329 const IntVect iv(iii, jjj, kkk);
1330 return z_host.box().contains(iv) ? z_arr(iii, jjj, kkk) : std::numeric_limits<
Real>::quiet_NaN();
1333 const Real z_nd_ijk = node_value(i, j, k);
1334 const Real z_nd_ip1jk = node_value(i + 1, j, k);
1335 const Real z_nd_ijp1k = node_value(i, j + 1, k);
1336 const Real z_nd_ip1jp1k = node_value(i + 1, j + 1, k);
1337 const Real z_nd_ijkp1 = node_value(i, j, k + 1);
1338 const Real z_nd_ip1jkp1 = node_value(i + 1, j, k + 1);
1339 const Real z_nd_ijp1kp1 = node_value(i, j + 1, k + 1);
1340 const Real z_nd_ip1jp1kp1 = node_value(i + 1, j + 1, k + 1);
1341 const Real four_node_zlo = 0.25_rt * (z_nd_ijk + z_nd_ip1jk + z_nd_ijp1k + z_nd_ip1jp1k);
1342 const Real four_node_zhi = 0.25_rt * (z_nd_ijkp1 + z_nd_ip1jkp1 + z_nd_ijp1kp1 + z_nd_ip1jp1kp1);
1343 const Real four_node_dz = four_node_zhi - four_node_zlo;
1344 const Real corner_dz = z_nd_ijkp1 - z_nd_ijk;
1345 const Real theta_base_val = theta_base_arr(ic, kk, 0);
1346 const Real theta_new_val = theta_arr(ic, kk, 0);
1347 const Real thetal_base_val = thetal_base_arr(ic, kk, 0);
1348 const Real thetal_new_val = thetal_arr(ic, kk, 0);
1349 const Real qv_base_val = qv_base_arr(ic, kk, 0);
1350 const Real qc_base_val = qc_base_arr(ic, kk, 0);
1351 const Real qi_base_val = qi_base_arr(ic, kk, 0);
1353 const Real qc_new_val = qc_arr(ic, kk, 0);
1354 const Real qi_new_val = qi_arr(ic, kk, 0);
1355 const Real ql_base = qc_base_val + qi_base_val;
1356 const Real ql_new = qc_new_val + qi_new_val;
1357 const Real qw_base = qv_base_val + qc_base_val + qi_base_val;
1358 const Real qw_new = qv_new_val + qc_new_val + qi_new_val;
1359 const Real delta_theta = theta_new_val - theta_base_val;
1360 const Real delta_qv = qv_new_val - qv_base_val;
1361 const Real delta_qc = qc_new_val - qc_base_val;
1362 const Real delta_qi = qi_new_val - qi_base_val;
1363 const Real delta_ql = ql_new - ql_base;
1364 const Real delta_qw = qw_new - qw_base;
1366 const Real dt =
static_cast<Real>(dt_d);
1368 const Real dt_theta_tend = theta_tend_arr(ic, kk, 0) * dt;
1369 const Real dt_qv_tend = qv_tend_arr(ic, kk, 0) * dt;
1370 const Real dt_qc_tend = qc_tend_arr(ic, kk, 0) * dt;
1371 const Real dt_qi_tend = qi_tend_arr(ic, kk, 0) * dt;
1372 const Real dt_tke_tend = tke_tend_arr(ic, kk, 0) * dt;
1373 const Real cond_dt = shoc_cond_arr(ic, kk, 0) * dt;
1374 const Real evap_dt = shoc_evap_arr(ic, kk, 0) * dt;
1375 const Real tke_base_val = tke_base_arr(ic, kk, 0);
1376 std::ostringstream msg;
1377 msg <<
"NATIVE_SHOC_BAD_COLUMN_BEGIN\n"
1378 <<
" rank=" << ParallelDescriptor::MyProc()
1379 <<
" level=" <<
m_lev
1381 <<
" mfi_index=" << rep.mfi_index
1382 <<
" box_valid_lo=(" << mfi.validbox().smallEnd(0) <<
","
1383 << mfi.validbox().smallEnd(1) <<
","
1384 << mfi.validbox().smallEnd(2) <<
")"
1385 <<
" box_valid_hi=(" << mfi.validbox().bigEnd(0) <<
","
1386 << mfi.validbox().bigEnd(1) <<
","
1387 << mfi.validbox().bigEnd(2) <<
")"
1397 <<
" i=" << i <<
" j=" << j <<
" k=" << k
1398 <<
" kk=" << kk <<
" ic=" << ic
1399 <<
" score=" << rep.score
1400 <<
" reason=" << rep.reason
1402 <<
" geometry z_nd(i,j,k)=" << z_nd_ijk
1403 <<
" z_nd(i+1,j,k)=" << z_nd_ip1jk
1404 <<
" z_nd(i,j+1,k)=" << z_nd_ijp1k
1405 <<
" z_nd(i+1,j+1,k)=" << z_nd_ip1jp1k
1406 <<
" z_nd(i,j,k+1)=" << z_nd_ijkp1
1407 <<
" z_nd(i+1,j,k+1)=" << z_nd_ip1jkp1
1408 <<
" z_nd(i,j+1,k+1)=" << z_nd_ijp1kp1
1409 <<
" z_nd(i+1,j+1,k+1)=" << z_nd_ip1jp1kp1
1411 <<
" four_node_zlo=" << four_node_zlo
1412 <<
" four_node_zhi=" << four_node_zhi
1413 <<
" four_node_dz=" << four_node_dz
1414 <<
" corner_dz=" << corner_dz
1415 <<
" dz=" << dz_arr(ic, kk, 0)
1417 <<
" rho=" <<
rho_arr(ic, kk, 0)
1418 <<
" theta=" << theta_arr(ic, kk, 0)
1419 <<
" thetal=" << thetal_arr(ic, kk, 0)
1420 <<
" theta_v=" << theta_v_arr(ic, kk, 0)
1421 <<
" qv=" <<
qv_arr(ic, kk, 0)
1422 <<
" qc=" << qc_arr(ic, kk, 0)
1423 <<
" qi=" << qi_arr(ic, kk, 0)
1424 <<
" qw=" << qw_arr(ic, kk, 0)
1425 <<
" tabs=" << tabs_arr(ic, kk, 0)
1426 <<
" exner=" << exner_arr(ic, kk, 0)
1427 <<
" p_mid=" << p_mid_arr(ic, kk, 0)
1428 <<
" p_int_lower=" << p_int_arr(ic, kk, 0)
1429 <<
" p_int_upper=" << p_int_arr(ic, kk + 1, 0)
1430 <<
" host_dse=" << host_dse_arr(ic, kk, 0)
1432 <<
" pblh=" << pblh_arr(ic, 0, 0)
1433 <<
" obklen=" << obklen_arr(ic, 0, 0)
1434 <<
" ustar=" << ustar_arr(ic, 0, 0)
1435 <<
" shoc_mix=" << shoc_mix_arr(ic, kk, 0)
1436 <<
" Lturb=" << shoc_mix_arr(ic, kk, 0)
1437 <<
" brunt=" << brunt_arr(ic, kk, 0)
1438 <<
" isotropy=" << isotropy_arr(ic, kk, 0)
1439 <<
" tk=" << tk_arr(ic, kk, 0)
1440 <<
" tkh=" << tkh_arr(ic, kk, 0)
1441 <<
" shear_prod=" << shear_prod_arr(ic, kk, 0)
1442 <<
" buoy_prod=" << buoy_prod_arr(ic, kk, 0)
1443 <<
" diss_tke=" << diss_tke_arr(ic, kk, 0)
1444 <<
" tke=" << tke_state_arr(ic, kk, 0)
1446 <<
" w_sec=" << w_sec_arr(ic, kk, 0)
1447 <<
" wthv_sec=" << wthv_sec_arr(ic, kk, 0)
1448 <<
" shoc_cldfrac=" << shoc_cldfrac_arr(ic, kk, 0)
1449 <<
" shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1450 <<
" shoc_ql2=" << shoc_ql2_arr(ic, kk, 0)
1451 <<
" shoc_cond=" << shoc_cond_arr(ic, kk, 0)
1452 <<
" shoc_evap=" << shoc_evap_arr(ic, kk, 0)
1453 <<
" wqls_sec=" << wqls_sec_arr(ic, kk, 0)
1455 <<
" thl_sec_lower=" << thl_sec_arr(ic, kk, 0)
1456 <<
" thl_sec_upper=" << thl_sec_arr(ic, kk + 1, 0)
1457 <<
" qw_sec_lower=" << qw_sec_arr(ic, kk, 0)
1458 <<
" qw_sec_upper=" << qw_sec_arr(ic, kk + 1, 0)
1459 <<
" qwthl_sec_lower=" << qwthl_sec_arr(ic, kk, 0)
1460 <<
" qwthl_sec_upper=" << qwthl_sec_arr(ic, kk + 1, 0)
1461 <<
" wthl_sec_lower=" << wthl_sec_arr(ic, kk, 0)
1462 <<
" wthl_sec_upper=" << wthl_sec_arr(ic, kk + 1, 0)
1463 <<
" wqw_sec_lower=" << wqw_sec_arr(ic, kk, 0)
1464 <<
" wqw_sec_upper=" << wqw_sec_arr(ic, kk + 1, 0)
1465 <<
" w3_lower=" << w3_arr(ic, kk, 0)
1466 <<
" w3_upper=" << w3_arr(ic, kk + 1, 0)
1467 <<
" uw_sec_lower=" << uw_sec_arr(ic, kk, 0)
1468 <<
" uw_sec_upper=" << uw_sec_arr(ic, kk + 1, 0)
1469 <<
" vw_sec_lower=" << vw_sec_arr(ic, kk, 0)
1470 <<
" vw_sec_upper=" << vw_sec_arr(ic, kk + 1, 0)
1471 <<
" wtke_sec_lower=" << wtke_sec_arr(ic, kk, 0)
1472 <<
" wtke_sec_upper=" << wtke_sec_arr(ic, kk + 1, 0)
1474 <<
" theta_tend=" << theta_tend_arr(ic, kk, 0)
1475 <<
" qv_tend=" << qv_tend_arr(ic, kk, 0)
1476 <<
" qc_tend=" << qc_tend_arr(ic, kk, 0)
1477 <<
" qi_tend=" << qi_tend_arr(ic, kk, 0)
1478 <<
" tke_tend=" << tke_tend_arr(ic, kk, 0)
1479 <<
" u_tend=" << u_tend_arr(ic, kk, 0)
1480 <<
" v_tend=" << v_tend_arr(ic, kk, 0)
1482 <<
" baseline theta=" << theta_base_val
1483 <<
" thetal=" << thetal_base_val
1484 <<
" qv=" << qv_base_val
1485 <<
" qc=" << qc_base_val
1486 <<
" qi=" << qi_base_val
1487 <<
" ql=" << ql_base
1488 <<
" qw=" << qw_base
1489 <<
" tke=" << tke_base_val
1491 <<
" updated theta=" << theta_new_val
1492 <<
" thetal=" << thetal_new_val
1493 <<
" qv=" << qv_new_val
1494 <<
" qc=" << qc_new_val
1495 <<
" qi=" << qi_new_val
1498 <<
" tke=" << tke_state_arr(ic, kk, 0)
1500 <<
" deltas dtheta=" << delta_theta
1501 <<
" dqv=" << delta_qv
1502 <<
" dqc=" << delta_qc
1503 <<
" dqi=" << delta_qi
1504 <<
" dql=" << delta_ql
1505 <<
" dqw=" << delta_qw
1507 <<
" tend_dt theta=" << dt_theta_tend
1508 <<
" qv=" << dt_qv_tend
1509 <<
" qc=" << dt_qc_tend
1510 <<
" qi=" << dt_qi_tend
1511 <<
" tke=" << dt_tke_tend
1513 <<
" consistency dtheta_minus_tenddt=" << (delta_theta - dt_theta_tend)
1514 <<
" dqv_minus_tenddt=" << (delta_qv - dt_qv_tend)
1515 <<
" dqc_minus_tenddt=" << (delta_qc - dt_qc_tend)
1516 <<
" dqi_minus_tenddt=" << (delta_qi - dt_qi_tend)
1518 <<
" pdf_cloud shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1519 <<
" shoc_cond_dt=" << cond_dt
1520 <<
" shoc_evap_dt=" << evap_dt
1521 <<
" delta_ql=" << delta_ql
1522 <<
" delta_ql_minus_cond_minus_evap=" << (delta_ql - (cond_dt - evap_dt))
1524 <<
" surf_sens_flux=" << surf_sens_flux_arr(ic, 0, 0)
1525 <<
" surf_lat_flux=" << surf_lat_flux_arr(ic, 0, 0)
1526 <<
" surf_tau_u=" << surf_tau_u_arr(ic, 0, 0)
1527 <<
" surf_tau_v=" << surf_tau_v_arr(ic, 0, 0)
1528 <<
" rho_sfc=" << cons_arr(i, j, k,
Rho_comp)
1532 msg <<
" raw hfx3(i,j,klo)=" << hfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1535 msg <<
" raw qfx3(i,j,klo)=" << qfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1538 msg <<
" raw tau13(i,j,klo)=" << tau13_host.const_array()(rep.i, rep.j, rep.k)
1539 <<
" raw tau13(i+1,j,klo)=" << tau13_host.const_array()(rep.i + 1, rep.j, rep.k)
1543 msg <<
" raw tau23(i,j,klo)=" << tau23_host.const_array()(rep.i, rep.j, rep.k)
1544 <<
" raw tau23(i,j+1,klo)=" << tau23_host.const_array()(rep.i, rep.j + 1, rep.k)
1547 msg <<
"NATIVE_SHOC_BAD_COLUMN_END\n";
1548 amrex::AllPrint() << msg.str() << std::flush;
1552 amrex::Abort(
"Native SHOC debug_bad_column abort: bad SHOC column detected before state update");
#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:97
amrex::FArrayBox theta
Definition: ERF_ShocTypes.H:95
amrex::FArrayBox theta_base
Definition: ERF_ShocTypes.H:142
amrex::FArrayBox qi
Definition: ERF_ShocTypes.H:101
amrex::FArrayBox dz
Definition: ERF_ShocTypes.H:91
amrex::FArrayBox vw_sec
Definition: ERF_ShocTypes.H:136
amrex::FArrayBox shoc_evap
Definition: ERF_ShocTypes.H:128
amrex::FArrayBox tke_base_state
Definition: ERF_ShocTypes.H:148
amrex::FArrayBox qv_base
Definition: ERF_ShocTypes.H:143
amrex::FArrayBox uw_sec
Definition: ERF_ShocTypes.H:135
amrex::FArrayBox host_dse
Definition: ERF_ShocTypes.H:108
amrex::FArrayBox qc
Definition: ERF_ShocTypes.H:100
amrex::FArrayBox surf_tau_v
Definition: ERF_ShocTypes.H:160
amrex::FArrayBox tke
Definition: ERF_ShocTypes.H:104
amrex::FArrayBox p_int
Definition: ERF_ShocTypes.H:93
amrex::FArrayBox qi_base
Definition: ERF_ShocTypes.H:145
amrex::FArrayBox exner
Definition: ERF_ShocTypes.H:96
amrex::FArrayBox qc_base
Definition: ERF_ShocTypes.H:144
amrex::FArrayBox tabs
Definition: ERF_ShocTypes.H:103
amrex::FArrayBox qw
Definition: ERF_ShocTypes.H:102
amrex::FArrayBox qv
Definition: ERF_ShocTypes.H:99
amrex::FArrayBox p_mid
Definition: ERF_ShocTypes.H:92
amrex::FArrayBox wtke_sec
Definition: ERF_ShocTypes.H:137
amrex::FArrayBox surf_tau_u
Definition: ERF_ShocTypes.H:159
amrex::FArrayBox thetal_base
Definition: ERF_ShocTypes.H:141
amrex::FArrayBox thetal
Definition: ERF_ShocTypes.H:98
int imin
Definition: ERF_ShocTypes.H:78
int nlev
Definition: ERF_ShocTypes.H:77
int kmax
Definition: ERF_ShocTypes.H:81
int ncell
Definition: ERF_ShocTypes.H:76
int jmin
Definition: ERF_ShocTypes.H:79
int ny
Definition: ERF_ShocTypes.H:75
int nx
Definition: ERF_ShocTypes.H:74
int kmin
Definition: ERF_ShocTypes.H:80
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