1020 amrex::ignore_unused(geom, dt_d);
1027 print_shoc_debug_settings_once(
m_opts);
1029 const auto cons_host = copy_fab_to_host((*
m_cons_ptr)[mfi]);
1030 const auto z_host = copy_fab_to_host(z_phys_nd[mfi]);
1031 const auto theta_tend_host = copy_fab_to_host(col.
theta_tend);
1032 const auto qv_tend_host = copy_fab_to_host(col.
qv_tend);
1033 const auto qc_tend_host = copy_fab_to_host(col.
qc_tend);
1034 const auto qi_tend_host = copy_fab_to_host(col.
qi_tend);
1035 const auto tke_tend_host = copy_fab_to_host(col.
tke_tend);
1036 const auto u_tend_host = copy_fab_to_host(col.
u_tend);
1037 const auto v_tend_host = copy_fab_to_host(col.
v_tend);
1038 const auto p_mid_host = copy_fab_to_host(col.
p_mid);
1039 const auto p_int_host = copy_fab_to_host(col.
p_int);
1040 const auto zt_host = copy_fab_to_host(col.
zt);
1041 const auto zi_host = copy_fab_to_host(col.
zi);
1042 const auto dz_host = copy_fab_to_host(col.
dz);
1043 const auto rho_host = copy_fab_to_host(col.
rho);
1044 const auto theta_host = copy_fab_to_host(col.
theta);
1045 const auto thetal_host = copy_fab_to_host(col.
thetal);
1046 const auto theta_base_host = copy_fab_to_host(col.
theta_base);
1047 const auto thetal_base_host = copy_fab_to_host(col.
thetal_base);
1048 const auto qv_base_host = copy_fab_to_host(col.
qv_base);
1049 const auto qc_base_host = copy_fab_to_host(col.
qc_base);
1050 const auto qi_base_host = copy_fab_to_host(col.
qi_base);
1052 const auto theta_v_host = copy_fab_to_host(col.
theta_v);
1053 const auto qv_host = copy_fab_to_host(col.
qv);
1054 const auto qc_host = copy_fab_to_host(col.
qc);
1055 const auto qi_host = copy_fab_to_host(col.
qi);
1056 const auto qw_host = copy_fab_to_host(col.
qw);
1057 const auto tabs_host = copy_fab_to_host(col.
tabs);
1058 const auto exner_host = copy_fab_to_host(col.
exner);
1059 const auto host_dse_host = copy_fab_to_host(col.
host_dse);
1060 const auto pblh_host = copy_fab_to_host(col.
pblh);
1061 const auto obklen_host = copy_fab_to_host(col.
obklen);
1062 const auto ustar_host = copy_fab_to_host(col.
ustar);
1063 const auto shoc_mix_host = copy_fab_to_host(col.
shoc_mix);
1064 const auto brunt_host = copy_fab_to_host(col.
brunt);
1065 const auto isotropy_host = copy_fab_to_host(col.
isotropy);
1066 const auto tk_host = copy_fab_to_host(col.
tk);
1067 const auto tkh_host = copy_fab_to_host(col.
tkh);
1068 const auto shear_prod_host = copy_fab_to_host(col.
shear_prod);
1069 const auto buoy_prod_host = copy_fab_to_host(col.
buoy_prod);
1070 const auto diss_tke_host = copy_fab_to_host(col.
diss_tke);
1071 const auto tke_host = copy_fab_to_host(col.
tke);
1072 const auto w_sec_host = copy_fab_to_host(col.
w_sec);
1073 const auto wthv_sec_host = copy_fab_to_host(col.
wthv_sec);
1074 const auto shoc_cldfrac_host = copy_fab_to_host(col.
shoc_cldfrac);
1075 const auto shoc_ql_host = copy_fab_to_host(col.
shoc_ql);
1076 const auto shoc_ql2_host = copy_fab_to_host(col.
shoc_ql2);
1077 const auto shoc_cond_host = copy_fab_to_host(col.
shoc_cond);
1078 const auto shoc_evap_host = copy_fab_to_host(col.
shoc_evap);
1079 const auto wqls_sec_host = copy_fab_to_host(col.
wqls_sec);
1080 const auto thl_sec_host = copy_fab_to_host(col.
thl_sec);
1081 const auto qw_sec_host = copy_fab_to_host(col.
qw_sec);
1082 const auto qwthl_sec_host = copy_fab_to_host(col.
qwthl_sec);
1083 const auto wthl_sec_host = copy_fab_to_host(col.
wthl_sec);
1084 const auto wqw_sec_host = copy_fab_to_host(col.
wqw_sec);
1085 const auto uw_sec_host = copy_fab_to_host(col.
uw_sec);
1086 const auto vw_sec_host = copy_fab_to_host(col.
vw_sec);
1087 const auto wtke_sec_host = copy_fab_to_host(col.
wtke_sec);
1088 const auto w3_host = copy_fab_to_host(col.
w3);
1089 const auto surf_sens_flux_host = copy_fab_to_host(col.
surf_sens_flux);
1090 const auto surf_lat_flux_host = copy_fab_to_host(col.
surf_lat_flux);
1091 const auto surf_tau_u_host = copy_fab_to_host(col.
surf_tau_u);
1092 const auto surf_tau_v_host = copy_fab_to_host(col.
surf_tau_v);
1093 const auto hfx3_host = hfx3 ? copy_fab_to_host((*hfx3)[mfi]) : FArrayBox();
1094 const auto qfx3_host = qfx3 ? copy_fab_to_host((*qfx3)[mfi]) : FArrayBox();
1095 const auto tau13_host =
tau13 ? copy_fab_to_host((*
tau13)[mfi]) : FArrayBox();
1096 const auto tau23_host =
tau23 ? copy_fab_to_host((*
tau23)[mfi]) : FArrayBox();
1098 const auto z_arr = z_host.const_array();
1099 const auto cons_arr = cons_host.const_array();
1100 const auto theta_tend_arr = theta_tend_host.const_array();
1101 const auto qv_tend_arr = qv_tend_host.const_array();
1102 const auto qc_tend_arr = qc_tend_host.const_array();
1103 const auto qi_tend_arr = qi_tend_host.const_array();
1104 const auto tke_tend_arr = tke_tend_host.const_array();
1105 const auto u_tend_arr = u_tend_host.const_array();
1106 const auto v_tend_arr = v_tend_host.const_array();
1107 const auto dz_arr = dz_host.const_array();
1109 std::vector<ShocBadColumnReport> reports;
1112 auto maybe_add = [&] (
int i,
int j,
int k,
int kk,
int ic,
1114 if (!std::isfinite(
value)) {
1115 reports.push_back(ShocBadColumnReport{
1116 std::numeric_limits<Real>::infinity(),
1117 std::string(
name) +
" nonfinite",
1118 mfi.index(), i, j, k, kk, ic
1122 const Real abs_value = amrex::Math::abs(
value);
1123 const Real ratio = abs_value / threshold;
1124 if (ratio > 1.0_rt) {
1125 std::ostringstream oss;
1126 oss <<
name <<
" |value|=" << abs_value <<
" threshold=" << threshold;
1127 reports.push_back(ShocBadColumnReport{ratio, oss.str(), mfi.index(), i, j, k, kk, ic});
1131 auto maybe_add_geom = [&] (
int i,
int j,
int k,
int kk,
int ic,
Real dz_val) {
1132 if (!std::isfinite(dz_val)) {
1133 reports.push_back(ShocBadColumnReport{
1134 std::numeric_limits<Real>::infinity(),
1136 mfi.index(), i, j, k, kk, ic
1138 }
else if (dz_val <= 0.0_rt) {
1139 reports.push_back(ShocBadColumnReport{
1140 std::numeric_limits<Real>::infinity(),
1142 mfi.index(), i, j, k, kk, ic
1145 std::ostringstream oss;
1146 oss <<
"dz below minimum |dz|=" << dz_val
1148 reports.push_back(ShocBadColumnReport{
1151 mfi.index(), i, j, k, kk, ic
1159 for (
int kk = 0; kk < col.
layout.
nlev; ++kk) {
1161 const Real dz_val = dz_arr(ic, kk, 0);
1162 maybe_add_geom(i, j, k, kk, ic, dz_val);
1176 const Real key_values[] = {
1177 rho_host.const_array()(ic, kk, 0),
1178 theta_host.const_array()(ic, kk, 0),
1179 thetal_host.const_array()(ic, kk, 0),
1180 theta_v_host.const_array()(ic, kk, 0),
1181 qv_host.const_array()(ic, kk, 0),
1182 qc_host.const_array()(ic, kk, 0),
1183 qi_host.const_array()(ic, kk, 0),
1184 qw_host.const_array()(ic, kk, 0),
1185 tabs_host.const_array()(ic, kk, 0),
1186 exner_host.const_array()(ic, kk, 0),
1187 p_mid_host.const_array()(ic, kk, 0),
1188 host_dse_host.const_array()(ic, kk, 0),
1189 pblh_host.const_array()(ic, 0, 0),
1190 obklen_host.const_array()(ic, 0, 0),
1191 ustar_host.const_array()(ic, 0, 0),
1192 shoc_mix_host.const_array()(ic, kk, 0),
1193 isotropy_host.const_array()(ic, kk, 0),
1194 tk_host.const_array()(ic, kk, 0),
1195 tkh_host.const_array()(ic, kk, 0),
1196 shear_prod_host.const_array()(ic, kk, 0),
1197 buoy_prod_host.const_array()(ic, kk, 0),
1198 diss_tke_host.const_array()(ic, kk, 0),
1199 w_sec_host.const_array()(ic, kk, 0),
1200 wthv_sec_host.const_array()(ic, kk, 0),
1201 shoc_cldfrac_host.const_array()(ic, kk, 0),
1202 shoc_ql_host.const_array()(ic, kk, 0),
1203 shoc_ql2_host.const_array()(ic, kk, 0),
1204 shoc_cond_host.const_array()(ic, kk, 0),
1205 shoc_evap_host.const_array()(ic, kk, 0),
1206 wqls_sec_host.const_array()(ic, kk, 0),
1207 thl_sec_host.const_array()(ic, kk, 0),
1208 qw_sec_host.const_array()(ic, kk, 0),
1209 qwthl_sec_host.const_array()(ic, kk, 0),
1210 wthl_sec_host.const_array()(ic, kk, 0),
1211 wqw_sec_host.const_array()(ic, kk, 0),
1212 uw_sec_host.const_array()(ic, kk, 0),
1213 vw_sec_host.const_array()(ic, kk, 0),
1214 wtke_sec_host.const_array()(ic, kk, 0),
1215 w3_host.const_array()(ic, kk, 0),
1216 theta_tend_arr(ic, kk, 0),
1217 qv_tend_arr(ic, kk, 0),
1218 qc_tend_arr(ic, kk, 0),
1219 qi_tend_arr(ic, kk, 0),
1220 tke_tend_arr(ic, kk, 0),
1221 u_tend_arr(ic, kk, 0),
1222 v_tend_arr(ic, kk, 0)
1225 if (!std::isfinite(
value)) {
1226 reports.push_back(ShocBadColumnReport{
1227 std::numeric_limits<Real>::infinity(),
1228 "key field nonfinite",
1229 mfi.index(), i, j, k, kk, ic
1238 if (reports.empty()) {
1242 std::stable_sort(reports.begin(), reports.end(),
1243 [] (
const ShocBadColumnReport& a,
const ShocBadColumnReport& b) {
1244 return a.score > b.score;
1248 static_cast<int>(reports.size()));
1250 const auto rho_arr = rho_host.const_array();
1251 const auto theta_arr = theta_host.const_array();
1252 const auto thetal_arr = thetal_host.const_array();
1253 const auto theta_base_arr = theta_base_host.const_array();
1254 const auto thetal_base_arr = thetal_base_host.const_array();
1255 const auto qv_base_arr = qv_base_host.const_array();
1256 const auto qc_base_arr = qc_base_host.const_array();
1257 const auto qi_base_arr = qi_base_host.const_array();
1258 const auto theta_v_arr = theta_v_host.const_array();
1259 const auto qv_arr = qv_host.const_array();
1260 const auto qc_arr = qc_host.const_array();
1261 const auto qi_arr = qi_host.const_array();
1262 const auto qw_arr = qw_host.const_array();
1263 const auto tabs_arr = tabs_host.const_array();
1264 const auto exner_arr = exner_host.const_array();
1265 const auto p_mid_arr = p_mid_host.const_array();
1266 const auto p_int_arr = p_int_host.const_array();
1267 const auto host_dse_arr = host_dse_host.const_array();
1268 const auto pblh_arr = pblh_host.const_array();
1269 const auto obklen_arr = obklen_host.const_array();
1270 const auto ustar_arr = ustar_host.const_array();
1271 const auto shoc_mix_arr = shoc_mix_host.const_array();
1272 const auto brunt_arr = brunt_host.const_array();
1273 const auto isotropy_arr = isotropy_host.const_array();
1274 const auto tk_arr = tk_host.const_array();
1275 const auto tkh_arr = tkh_host.const_array();
1276 const auto shear_prod_arr = shear_prod_host.const_array();
1277 const auto buoy_prod_arr = buoy_prod_host.const_array();
1278 const auto diss_tke_arr = diss_tke_host.const_array();
1279 const auto tke_state_arr = tke_host.const_array();
1280 const auto tke_base_arr = tke_base_host.const_array();
1281 const auto w_sec_arr = w_sec_host.const_array();
1282 const auto wthv_sec_arr = wthv_sec_host.const_array();
1283 const auto shoc_cldfrac_arr = shoc_cldfrac_host.const_array();
1284 const auto shoc_ql_arr = shoc_ql_host.const_array();
1285 const auto shoc_ql2_arr = shoc_ql2_host.const_array();
1286 const auto shoc_cond_arr = shoc_cond_host.const_array();
1287 const auto shoc_evap_arr = shoc_evap_host.const_array();
1288 const auto wqls_sec_arr = wqls_sec_host.const_array();
1289 const auto thl_sec_arr = thl_sec_host.const_array();
1290 const auto qw_sec_arr = qw_sec_host.const_array();
1291 const auto qwthl_sec_arr = qwthl_sec_host.const_array();
1292 const auto wthl_sec_arr = wthl_sec_host.const_array();
1293 const auto wqw_sec_arr = wqw_sec_host.const_array();
1294 const auto uw_sec_arr = uw_sec_host.const_array();
1295 const auto vw_sec_arr = vw_sec_host.const_array();
1296 const auto wtke_sec_arr = wtke_sec_host.const_array();
1297 const auto w3_arr = w3_host.const_array();
1298 const auto surf_sens_flux_arr = surf_sens_flux_host.const_array();
1299 const auto surf_lat_flux_arr = surf_lat_flux_host.const_array();
1300 const auto surf_tau_u_arr = surf_tau_u_host.const_array();
1301 const auto surf_tau_v_arr = surf_tau_v_host.const_array();
1302 const bool has_hfx3 = hfx3 && hfx3_host.box().ok();
1303 const bool has_qfx3 = qfx3 && qfx3_host.box().ok();
1304 const bool has_tau13 =
tau13 && tau13_host.box().ok();
1305 const bool has_tau23 =
tau23 && tau23_host.box().ok();
1307 for (
int n = 0; n < max_reports; ++n) {
1308 const auto& rep = reports[
static_cast<std::size_t
>(n)];
1309 const int i = rep.i;
1310 const int j = rep.j;
1311 const int k = rep.k;
1312 const int kk = rep.kk;
1313 const int ic = rep.ic;
1315 const auto node_value = [&] (
int iii,
int jjj,
int kkk) ->
Real {
1316 const IntVect iv(iii, jjj, kkk);
1317 return z_host.box().contains(iv) ? z_arr(iii, jjj, kkk) : std::numeric_limits<
Real>::quiet_NaN();
1320 const Real z_nd_ijk = node_value(i, j, k);
1321 const Real z_nd_ip1jk = node_value(i + 1, j, k);
1322 const Real z_nd_ijp1k = node_value(i, j + 1, k);
1323 const Real z_nd_ip1jp1k = node_value(i + 1, j + 1, k);
1324 const Real z_nd_ijkp1 = node_value(i, j, k + 1);
1325 const Real z_nd_ip1jkp1 = node_value(i + 1, j, k + 1);
1326 const Real z_nd_ijp1kp1 = node_value(i, j + 1, k + 1);
1327 const Real z_nd_ip1jp1kp1 = node_value(i + 1, j + 1, k + 1);
1328 const Real four_node_zlo = 0.25_rt * (z_nd_ijk + z_nd_ip1jk + z_nd_ijp1k + z_nd_ip1jp1k);
1329 const Real four_node_zhi = 0.25_rt * (z_nd_ijkp1 + z_nd_ip1jkp1 + z_nd_ijp1kp1 + z_nd_ip1jp1kp1);
1330 const Real four_node_dz = four_node_zhi - four_node_zlo;
1331 const Real corner_dz = z_nd_ijkp1 - z_nd_ijk;
1332 const Real theta_base_val = theta_base_arr(ic, kk, 0);
1333 const Real theta_new_val = theta_arr(ic, kk, 0);
1334 const Real thetal_base_val = thetal_base_arr(ic, kk, 0);
1335 const Real thetal_new_val = thetal_arr(ic, kk, 0);
1336 const Real qv_base_val = qv_base_arr(ic, kk, 0);
1337 const Real qc_base_val = qc_base_arr(ic, kk, 0);
1338 const Real qi_base_val = qi_base_arr(ic, kk, 0);
1340 const Real qc_new_val = qc_arr(ic, kk, 0);
1341 const Real qi_new_val = qi_arr(ic, kk, 0);
1342 const Real ql_base = qc_base_val + qi_base_val;
1343 const Real ql_new = qc_new_val + qi_new_val;
1344 const Real qw_base = qv_base_val + qc_base_val + qi_base_val;
1345 const Real qw_new = qv_new_val + qc_new_val + qi_new_val;
1346 const Real delta_theta = theta_new_val - theta_base_val;
1347 const Real delta_qv = qv_new_val - qv_base_val;
1348 const Real delta_qc = qc_new_val - qc_base_val;
1349 const Real delta_qi = qi_new_val - qi_base_val;
1350 const Real delta_ql = ql_new - ql_base;
1351 const Real delta_qw = qw_new - qw_base;
1353 const Real dt =
static_cast<Real>(dt_d);
1355 const Real dt_theta_tend = theta_tend_arr(ic, kk, 0) * dt;
1356 const Real dt_qv_tend = qv_tend_arr(ic, kk, 0) * dt;
1357 const Real dt_qc_tend = qc_tend_arr(ic, kk, 0) * dt;
1358 const Real dt_qi_tend = qi_tend_arr(ic, kk, 0) * dt;
1359 const Real dt_tke_tend = tke_tend_arr(ic, kk, 0) * dt;
1360 const Real cond_dt = shoc_cond_arr(ic, kk, 0) * dt;
1361 const Real evap_dt = shoc_evap_arr(ic, kk, 0) * dt;
1362 const Real tke_base_val = tke_base_arr(ic, kk, 0);
1363 std::ostringstream msg;
1364 msg <<
"NATIVE_SHOC_BAD_COLUMN_BEGIN\n"
1365 <<
" rank=" << ParallelDescriptor::MyProc()
1366 <<
" level=" <<
m_lev
1368 <<
" mfi_index=" << rep.mfi_index
1369 <<
" box_valid_lo=(" << mfi.validbox().smallEnd(0) <<
","
1370 << mfi.validbox().smallEnd(1) <<
","
1371 << mfi.validbox().smallEnd(2) <<
")"
1372 <<
" box_valid_hi=(" << mfi.validbox().bigEnd(0) <<
","
1373 << mfi.validbox().bigEnd(1) <<
","
1374 << mfi.validbox().bigEnd(2) <<
")"
1384 <<
" i=" << i <<
" j=" << j <<
" k=" << k
1385 <<
" kk=" << kk <<
" ic=" << ic
1386 <<
" score=" << rep.score
1387 <<
" reason=" << rep.reason
1389 <<
" geometry z_nd(i,j,k)=" << z_nd_ijk
1390 <<
" z_nd(i+1,j,k)=" << z_nd_ip1jk
1391 <<
" z_nd(i,j+1,k)=" << z_nd_ijp1k
1392 <<
" z_nd(i+1,j+1,k)=" << z_nd_ip1jp1k
1393 <<
" z_nd(i,j,k+1)=" << z_nd_ijkp1
1394 <<
" z_nd(i+1,j,k+1)=" << z_nd_ip1jkp1
1395 <<
" z_nd(i,j+1,k+1)=" << z_nd_ijp1kp1
1396 <<
" z_nd(i+1,j+1,k+1)=" << z_nd_ip1jp1kp1
1398 <<
" four_node_zlo=" << four_node_zlo
1399 <<
" four_node_zhi=" << four_node_zhi
1400 <<
" four_node_dz=" << four_node_dz
1401 <<
" corner_dz=" << corner_dz
1402 <<
" dz=" << dz_arr(ic, kk, 0)
1404 <<
" rho=" <<
rho_arr(ic, kk, 0)
1405 <<
" theta=" << theta_arr(ic, kk, 0)
1406 <<
" thetal=" << thetal_arr(ic, kk, 0)
1407 <<
" theta_v=" << theta_v_arr(ic, kk, 0)
1408 <<
" qv=" <<
qv_arr(ic, kk, 0)
1409 <<
" qc=" << qc_arr(ic, kk, 0)
1410 <<
" qi=" << qi_arr(ic, kk, 0)
1411 <<
" qw=" << qw_arr(ic, kk, 0)
1412 <<
" tabs=" << tabs_arr(ic, kk, 0)
1413 <<
" exner=" << exner_arr(ic, kk, 0)
1414 <<
" p_mid=" << p_mid_arr(ic, kk, 0)
1415 <<
" p_int_lower=" << p_int_arr(ic, kk, 0)
1416 <<
" p_int_upper=" << p_int_arr(ic, kk + 1, 0)
1417 <<
" host_dse=" << host_dse_arr(ic, kk, 0)
1419 <<
" pblh=" << pblh_arr(ic, 0, 0)
1420 <<
" obklen=" << obklen_arr(ic, 0, 0)
1421 <<
" ustar=" << ustar_arr(ic, 0, 0)
1422 <<
" shoc_mix=" << shoc_mix_arr(ic, kk, 0)
1423 <<
" Lturb=" << shoc_mix_arr(ic, kk, 0)
1424 <<
" brunt=" << brunt_arr(ic, kk, 0)
1425 <<
" isotropy=" << isotropy_arr(ic, kk, 0)
1426 <<
" tk=" << tk_arr(ic, kk, 0)
1427 <<
" tkh=" << tkh_arr(ic, kk, 0)
1428 <<
" shear_prod=" << shear_prod_arr(ic, kk, 0)
1429 <<
" buoy_prod=" << buoy_prod_arr(ic, kk, 0)
1430 <<
" diss_tke=" << diss_tke_arr(ic, kk, 0)
1431 <<
" tke=" << tke_state_arr(ic, kk, 0)
1433 <<
" w_sec=" << w_sec_arr(ic, kk, 0)
1434 <<
" wthv_sec=" << wthv_sec_arr(ic, kk, 0)
1435 <<
" shoc_cldfrac=" << shoc_cldfrac_arr(ic, kk, 0)
1436 <<
" shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1437 <<
" shoc_ql2=" << shoc_ql2_arr(ic, kk, 0)
1438 <<
" shoc_cond=" << shoc_cond_arr(ic, kk, 0)
1439 <<
" shoc_evap=" << shoc_evap_arr(ic, kk, 0)
1440 <<
" wqls_sec=" << wqls_sec_arr(ic, kk, 0)
1442 <<
" thl_sec_lower=" << thl_sec_arr(ic, kk, 0)
1443 <<
" thl_sec_upper=" << thl_sec_arr(ic, kk + 1, 0)
1444 <<
" qw_sec_lower=" << qw_sec_arr(ic, kk, 0)
1445 <<
" qw_sec_upper=" << qw_sec_arr(ic, kk + 1, 0)
1446 <<
" qwthl_sec_lower=" << qwthl_sec_arr(ic, kk, 0)
1447 <<
" qwthl_sec_upper=" << qwthl_sec_arr(ic, kk + 1, 0)
1448 <<
" wthl_sec_lower=" << wthl_sec_arr(ic, kk, 0)
1449 <<
" wthl_sec_upper=" << wthl_sec_arr(ic, kk + 1, 0)
1450 <<
" wqw_sec_lower=" << wqw_sec_arr(ic, kk, 0)
1451 <<
" wqw_sec_upper=" << wqw_sec_arr(ic, kk + 1, 0)
1452 <<
" w3_lower=" << w3_arr(ic, kk, 0)
1453 <<
" w3_upper=" << w3_arr(ic, kk + 1, 0)
1454 <<
" uw_sec_lower=" << uw_sec_arr(ic, kk, 0)
1455 <<
" uw_sec_upper=" << uw_sec_arr(ic, kk + 1, 0)
1456 <<
" vw_sec_lower=" << vw_sec_arr(ic, kk, 0)
1457 <<
" vw_sec_upper=" << vw_sec_arr(ic, kk + 1, 0)
1458 <<
" wtke_sec_lower=" << wtke_sec_arr(ic, kk, 0)
1459 <<
" wtke_sec_upper=" << wtke_sec_arr(ic, kk + 1, 0)
1461 <<
" theta_tend=" << theta_tend_arr(ic, kk, 0)
1462 <<
" qv_tend=" << qv_tend_arr(ic, kk, 0)
1463 <<
" qc_tend=" << qc_tend_arr(ic, kk, 0)
1464 <<
" qi_tend=" << qi_tend_arr(ic, kk, 0)
1465 <<
" tke_tend=" << tke_tend_arr(ic, kk, 0)
1466 <<
" u_tend=" << u_tend_arr(ic, kk, 0)
1467 <<
" v_tend=" << v_tend_arr(ic, kk, 0)
1469 <<
" baseline theta=" << theta_base_val
1470 <<
" thetal=" << thetal_base_val
1471 <<
" qv=" << qv_base_val
1472 <<
" qc=" << qc_base_val
1473 <<
" qi=" << qi_base_val
1474 <<
" ql=" << ql_base
1475 <<
" qw=" << qw_base
1476 <<
" tke=" << tke_base_val
1478 <<
" updated theta=" << theta_new_val
1479 <<
" thetal=" << thetal_new_val
1480 <<
" qv=" << qv_new_val
1481 <<
" qc=" << qc_new_val
1482 <<
" qi=" << qi_new_val
1485 <<
" tke=" << tke_state_arr(ic, kk, 0)
1487 <<
" deltas dtheta=" << delta_theta
1488 <<
" dqv=" << delta_qv
1489 <<
" dqc=" << delta_qc
1490 <<
" dqi=" << delta_qi
1491 <<
" dql=" << delta_ql
1492 <<
" dqw=" << delta_qw
1494 <<
" tend_dt theta=" << dt_theta_tend
1495 <<
" qv=" << dt_qv_tend
1496 <<
" qc=" << dt_qc_tend
1497 <<
" qi=" << dt_qi_tend
1498 <<
" tke=" << dt_tke_tend
1500 <<
" consistency dtheta_minus_tenddt=" << (delta_theta - dt_theta_tend)
1501 <<
" dqv_minus_tenddt=" << (delta_qv - dt_qv_tend)
1502 <<
" dqc_minus_tenddt=" << (delta_qc - dt_qc_tend)
1503 <<
" dqi_minus_tenddt=" << (delta_qi - dt_qi_tend)
1505 <<
" pdf_cloud shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1506 <<
" shoc_cond_dt=" << cond_dt
1507 <<
" shoc_evap_dt=" << evap_dt
1508 <<
" delta_ql=" << delta_ql
1509 <<
" delta_ql_minus_cond_minus_evap=" << (delta_ql - (cond_dt - evap_dt))
1511 <<
" surf_sens_flux=" << surf_sens_flux_arr(ic, 0, 0)
1512 <<
" surf_lat_flux=" << surf_lat_flux_arr(ic, 0, 0)
1513 <<
" surf_tau_u=" << surf_tau_u_arr(ic, 0, 0)
1514 <<
" surf_tau_v=" << surf_tau_v_arr(ic, 0, 0)
1515 <<
" rho_sfc=" << cons_arr(i, j, k,
Rho_comp)
1519 msg <<
" raw hfx3(i,j,klo)=" << hfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1522 msg <<
" raw qfx3(i,j,klo)=" << qfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1525 msg <<
" raw tau13(i,j,klo)=" << tau13_host.const_array()(rep.i, rep.j, rep.k)
1526 <<
" raw tau13(i+1,j,klo)=" << tau13_host.const_array()(rep.i + 1, rep.j, rep.k)
1530 msg <<
" raw tau23(i,j,klo)=" << tau23_host.const_array()(rep.i, rep.j, rep.k)
1531 <<
" raw tau23(i,j+1,klo)=" << tau23_host.const_array()(rep.i, rep.j + 1, rep.k)
1534 msg <<
"NATIVE_SHOC_BAD_COLUMN_END\n";
1535 amrex::AllPrint() << msg.str() << std::flush;
1539 amrex::Abort(
"Native SHOC debug_bad_column abort: bad SHOC column detected before state update");
Real value
Definition: ERF_HurricaneDiagnostics.cpp:30
#define Rho_comp
Definition: ERF_IndexDefines.H:36
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:216
amrex::FArrayBox theta
Definition: ERF_ShocTypes.H:214
amrex::FArrayBox theta_base
Definition: ERF_ShocTypes.H:261
amrex::FArrayBox qi
Definition: ERF_ShocTypes.H:220
amrex::FArrayBox dz
Definition: ERF_ShocTypes.H:210
amrex::FArrayBox vw_sec
Definition: ERF_ShocTypes.H:255
amrex::FArrayBox shoc_evap
Definition: ERF_ShocTypes.H:247
amrex::FArrayBox tke_base_state
Definition: ERF_ShocTypes.H:267
amrex::FArrayBox qv_base
Definition: ERF_ShocTypes.H:262
amrex::FArrayBox uw_sec
Definition: ERF_ShocTypes.H:254
amrex::FArrayBox host_dse
Definition: ERF_ShocTypes.H:227
amrex::FArrayBox qc
Definition: ERF_ShocTypes.H:219
amrex::FArrayBox surf_tau_v
Definition: ERF_ShocTypes.H:279
amrex::FArrayBox tke
Definition: ERF_ShocTypes.H:223
amrex::FArrayBox p_int
Definition: ERF_ShocTypes.H:212
amrex::FArrayBox qi_base
Definition: ERF_ShocTypes.H:264
amrex::FArrayBox exner
Definition: ERF_ShocTypes.H:215
amrex::FArrayBox qc_base
Definition: ERF_ShocTypes.H:263
amrex::FArrayBox tabs
Definition: ERF_ShocTypes.H:222
amrex::FArrayBox qw
Definition: ERF_ShocTypes.H:221
amrex::FArrayBox qv
Definition: ERF_ShocTypes.H:218
amrex::FArrayBox p_mid
Definition: ERF_ShocTypes.H:211
amrex::FArrayBox wtke_sec
Definition: ERF_ShocTypes.H:256
amrex::FArrayBox surf_tau_u
Definition: ERF_ShocTypes.H:278
amrex::FArrayBox thetal_base
Definition: ERF_ShocTypes.H:260
amrex::FArrayBox thetal
Definition: ERF_ShocTypes.H:217
int imin
Definition: ERF_ShocTypes.H:197
int nlev
Definition: ERF_ShocTypes.H:196
int kmax
Definition: ERF_ShocTypes.H:200
int ncell
Definition: ERF_ShocTypes.H:195
int jmin
Definition: ERF_ShocTypes.H:198
int ny
Definition: ERF_ShocTypes.H:194
int nx
Definition: ERF_ShocTypes.H:193
int kmin
Definition: ERF_ShocTypes.H:199
int debug_bad_column_max_reports
Definition: ERF_ShocTypes.H:111
amrex::Real debug_bad_column_q_tend_threshold
Definition: ERF_ShocTypes.H:113
amrex::Real debug_bad_column_scalar_moment_threshold
Definition: ERF_ShocTypes.H:116
amrex::Real debug_bad_column_min_dz
Definition: ERF_ShocTypes.H:115
amrex::Real debug_bad_column_theta_tend_threshold
Definition: ERF_ShocTypes.H:112
bool debug_bad_column
Definition: ERF_ShocTypes.H:109
amrex::Real debug_bad_column_brunt_threshold
Definition: ERF_ShocTypes.H:114
bool debug_bad_column_abort
Definition: ERF_ShocTypes.H:110