949 amrex::ignore_unused(geom, dt);
956 print_shoc_debug_settings_once(
m_opts);
958 const auto cons_host = copy_fab_to_host((*
m_cons_ptr)[mfi]);
959 const auto z_host = copy_fab_to_host(z_phys_nd[mfi]);
960 const auto theta_tend_host = copy_fab_to_host(col.
theta_tend);
961 const auto qv_tend_host = copy_fab_to_host(col.
qv_tend);
962 const auto qc_tend_host = copy_fab_to_host(col.
qc_tend);
963 const auto qi_tend_host = copy_fab_to_host(col.
qi_tend);
964 const auto tke_tend_host = copy_fab_to_host(col.
tke_tend);
965 const auto u_tend_host = copy_fab_to_host(col.
u_tend);
966 const auto v_tend_host = copy_fab_to_host(col.
v_tend);
967 const auto p_mid_host = copy_fab_to_host(col.
p_mid);
968 const auto p_int_host = copy_fab_to_host(col.
p_int);
969 const auto zt_host = copy_fab_to_host(col.
zt);
970 const auto zi_host = copy_fab_to_host(col.
zi);
971 const auto dz_host = copy_fab_to_host(col.
dz);
972 const auto rho_host = copy_fab_to_host(col.
rho);
973 const auto theta_host = copy_fab_to_host(col.
theta);
974 const auto thetal_host = copy_fab_to_host(col.
thetal);
975 const auto theta_base_host = copy_fab_to_host(col.
theta_base);
976 const auto thetal_base_host = copy_fab_to_host(col.
thetal_base);
977 const auto qv_base_host = copy_fab_to_host(col.
qv_base);
978 const auto qc_base_host = copy_fab_to_host(col.
qc_base);
979 const auto qi_base_host = copy_fab_to_host(col.
qi_base);
981 const auto theta_v_host = copy_fab_to_host(col.
theta_v);
982 const auto qv_host = copy_fab_to_host(col.
qv);
983 const auto qc_host = copy_fab_to_host(col.
qc);
984 const auto qi_host = copy_fab_to_host(col.
qi);
985 const auto qw_host = copy_fab_to_host(col.
qw);
986 const auto tabs_host = copy_fab_to_host(col.
tabs);
987 const auto exner_host = copy_fab_to_host(col.
exner);
988 const auto host_dse_host = copy_fab_to_host(col.
host_dse);
989 const auto pblh_host = copy_fab_to_host(col.
pblh);
990 const auto obklen_host = copy_fab_to_host(col.
obklen);
991 const auto ustar_host = copy_fab_to_host(col.
ustar);
992 const auto shoc_mix_host = copy_fab_to_host(col.
shoc_mix);
993 const auto brunt_host = copy_fab_to_host(col.
brunt);
994 const auto isotropy_host = copy_fab_to_host(col.
isotropy);
995 const auto tk_host = copy_fab_to_host(col.
tk);
996 const auto tkh_host = copy_fab_to_host(col.
tkh);
997 const auto shear_prod_host = copy_fab_to_host(col.
shear_prod);
998 const auto buoy_prod_host = copy_fab_to_host(col.
buoy_prod);
999 const auto diss_tke_host = copy_fab_to_host(col.
diss_tke);
1000 const auto tke_host = copy_fab_to_host(col.
tke);
1001 const auto w_sec_host = copy_fab_to_host(col.
w_sec);
1002 const auto wthv_sec_host = copy_fab_to_host(col.
wthv_sec);
1003 const auto shoc_cldfrac_host = copy_fab_to_host(col.
shoc_cldfrac);
1004 const auto shoc_ql_host = copy_fab_to_host(col.
shoc_ql);
1005 const auto shoc_ql2_host = copy_fab_to_host(col.
shoc_ql2);
1006 const auto shoc_cond_host = copy_fab_to_host(col.
shoc_cond);
1007 const auto shoc_evap_host = copy_fab_to_host(col.
shoc_evap);
1008 const auto wqls_sec_host = copy_fab_to_host(col.
wqls_sec);
1009 const auto thl_sec_host = copy_fab_to_host(col.
thl_sec);
1010 const auto qw_sec_host = copy_fab_to_host(col.
qw_sec);
1011 const auto qwthl_sec_host = copy_fab_to_host(col.
qwthl_sec);
1012 const auto wthl_sec_host = copy_fab_to_host(col.
wthl_sec);
1013 const auto wqw_sec_host = copy_fab_to_host(col.
wqw_sec);
1014 const auto uw_sec_host = copy_fab_to_host(col.
uw_sec);
1015 const auto vw_sec_host = copy_fab_to_host(col.
vw_sec);
1016 const auto wtke_sec_host = copy_fab_to_host(col.
wtke_sec);
1017 const auto w3_host = copy_fab_to_host(col.
w3);
1018 const auto surf_sens_flux_host = copy_fab_to_host(col.
surf_sens_flux);
1019 const auto surf_lat_flux_host = copy_fab_to_host(col.
surf_lat_flux);
1020 const auto surf_tau_u_host = copy_fab_to_host(col.
surf_tau_u);
1021 const auto surf_tau_v_host = copy_fab_to_host(col.
surf_tau_v);
1022 const auto hfx3_host = hfx3 ? copy_fab_to_host((*hfx3)[mfi]) : FArrayBox();
1023 const auto qfx3_host = qfx3 ? copy_fab_to_host((*qfx3)[mfi]) : FArrayBox();
1024 const auto tau13_host =
tau13 ? copy_fab_to_host((*
tau13)[mfi]) : FArrayBox();
1025 const auto tau23_host =
tau23 ? copy_fab_to_host((*
tau23)[mfi]) : FArrayBox();
1027 const auto z_arr = z_host.const_array();
1028 const auto cons_arr = cons_host.const_array();
1029 const auto theta_tend_arr = theta_tend_host.const_array();
1030 const auto qv_tend_arr = qv_tend_host.const_array();
1031 const auto qc_tend_arr = qc_tend_host.const_array();
1032 const auto qi_tend_arr = qi_tend_host.const_array();
1033 const auto tke_tend_arr = tke_tend_host.const_array();
1034 const auto u_tend_arr = u_tend_host.const_array();
1035 const auto v_tend_arr = v_tend_host.const_array();
1036 const auto dz_arr = dz_host.const_array();
1038 std::vector<ShocBadColumnReport> reports;
1041 auto maybe_add = [&] (
int i,
int j,
int k,
int kk,
int ic,
1043 if (!std::isfinite(
value)) {
1044 reports.push_back(ShocBadColumnReport{
1045 std::numeric_limits<Real>::infinity(),
1046 std::string(name) +
" nonfinite",
1047 mfi.index(), i, j, k, kk, ic
1051 const Real abs_value = amrex::Math::abs(
value);
1052 const Real ratio = abs_value / threshold;
1053 if (ratio > 1.0_rt) {
1054 std::ostringstream oss;
1055 oss << name <<
" |value|=" << abs_value <<
" threshold=" << threshold;
1056 reports.push_back(ShocBadColumnReport{ratio, oss.str(), mfi.index(), i, j, k, kk, ic});
1060 auto maybe_add_geom = [&] (
int i,
int j,
int k,
int kk,
int ic,
Real dz_val) {
1061 if (!std::isfinite(dz_val)) {
1062 reports.push_back(ShocBadColumnReport{
1063 std::numeric_limits<Real>::infinity(),
1065 mfi.index(), i, j, k, kk, ic
1067 }
else if (dz_val <= 0.0_rt) {
1068 reports.push_back(ShocBadColumnReport{
1069 std::numeric_limits<Real>::infinity(),
1071 mfi.index(), i, j, k, kk, ic
1074 std::ostringstream oss;
1075 oss <<
"dz below minimum |dz|=" << dz_val
1077 reports.push_back(ShocBadColumnReport{
1080 mfi.index(), i, j, k, kk, ic
1088 for (
int kk = 0; kk < col.
layout.
nlev; ++kk) {
1090 const Real dz_val = dz_arr(ic, kk, 0);
1091 maybe_add_geom(i, j, k, kk, ic, dz_val);
1105 const Real key_values[] = {
1106 rho_host.const_array()(ic, kk, 0),
1107 theta_host.const_array()(ic, kk, 0),
1108 thetal_host.const_array()(ic, kk, 0),
1109 theta_v_host.const_array()(ic, kk, 0),
1110 qv_host.const_array()(ic, kk, 0),
1111 qc_host.const_array()(ic, kk, 0),
1112 qi_host.const_array()(ic, kk, 0),
1113 qw_host.const_array()(ic, kk, 0),
1114 tabs_host.const_array()(ic, kk, 0),
1115 exner_host.const_array()(ic, kk, 0),
1116 p_mid_host.const_array()(ic, kk, 0),
1117 host_dse_host.const_array()(ic, kk, 0),
1118 pblh_host.const_array()(ic, 0, 0),
1119 obklen_host.const_array()(ic, 0, 0),
1120 ustar_host.const_array()(ic, 0, 0),
1121 shoc_mix_host.const_array()(ic, kk, 0),
1122 isotropy_host.const_array()(ic, kk, 0),
1123 tk_host.const_array()(ic, kk, 0),
1124 tkh_host.const_array()(ic, kk, 0),
1125 shear_prod_host.const_array()(ic, kk, 0),
1126 buoy_prod_host.const_array()(ic, kk, 0),
1127 diss_tke_host.const_array()(ic, kk, 0),
1128 w_sec_host.const_array()(ic, kk, 0),
1129 wthv_sec_host.const_array()(ic, kk, 0),
1130 shoc_cldfrac_host.const_array()(ic, kk, 0),
1131 shoc_ql_host.const_array()(ic, kk, 0),
1132 shoc_ql2_host.const_array()(ic, kk, 0),
1133 shoc_cond_host.const_array()(ic, kk, 0),
1134 shoc_evap_host.const_array()(ic, kk, 0),
1135 wqls_sec_host.const_array()(ic, kk, 0),
1136 thl_sec_host.const_array()(ic, kk, 0),
1137 qw_sec_host.const_array()(ic, kk, 0),
1138 qwthl_sec_host.const_array()(ic, kk, 0),
1139 wthl_sec_host.const_array()(ic, kk, 0),
1140 wqw_sec_host.const_array()(ic, kk, 0),
1141 uw_sec_host.const_array()(ic, kk, 0),
1142 vw_sec_host.const_array()(ic, kk, 0),
1143 wtke_sec_host.const_array()(ic, kk, 0),
1144 w3_host.const_array()(ic, kk, 0),
1145 theta_tend_arr(ic, kk, 0),
1146 qv_tend_arr(ic, kk, 0),
1147 qc_tend_arr(ic, kk, 0),
1148 qi_tend_arr(ic, kk, 0),
1149 tke_tend_arr(ic, kk, 0),
1150 u_tend_arr(ic, kk, 0),
1151 v_tend_arr(ic, kk, 0)
1154 if (!std::isfinite(
value)) {
1155 reports.push_back(ShocBadColumnReport{
1156 std::numeric_limits<Real>::infinity(),
1157 "key field nonfinite",
1158 mfi.index(), i, j, k, kk, ic
1167 if (reports.empty()) {
1171 std::stable_sort(reports.begin(), reports.end(),
1172 [] (
const ShocBadColumnReport& a,
const ShocBadColumnReport& b) {
1173 return a.score > b.score;
1177 static_cast<int>(reports.size()));
1179 const auto rho_arr = rho_host.const_array();
1180 const auto theta_arr = theta_host.const_array();
1181 const auto thetal_arr = thetal_host.const_array();
1182 const auto theta_base_arr = theta_base_host.const_array();
1183 const auto thetal_base_arr = thetal_base_host.const_array();
1184 const auto qv_base_arr = qv_base_host.const_array();
1185 const auto qc_base_arr = qc_base_host.const_array();
1186 const auto qi_base_arr = qi_base_host.const_array();
1187 const auto theta_v_arr = theta_v_host.const_array();
1188 const auto qv_arr = qv_host.const_array();
1189 const auto qc_arr = qc_host.const_array();
1190 const auto qi_arr = qi_host.const_array();
1191 const auto qw_arr = qw_host.const_array();
1192 const auto tabs_arr = tabs_host.const_array();
1193 const auto exner_arr = exner_host.const_array();
1194 const auto p_mid_arr = p_mid_host.const_array();
1195 const auto p_int_arr = p_int_host.const_array();
1196 const auto host_dse_arr = host_dse_host.const_array();
1197 const auto pblh_arr = pblh_host.const_array();
1198 const auto obklen_arr = obklen_host.const_array();
1199 const auto ustar_arr = ustar_host.const_array();
1200 const auto shoc_mix_arr = shoc_mix_host.const_array();
1201 const auto brunt_arr = brunt_host.const_array();
1202 const auto isotropy_arr = isotropy_host.const_array();
1203 const auto tk_arr = tk_host.const_array();
1204 const auto tkh_arr = tkh_host.const_array();
1205 const auto shear_prod_arr = shear_prod_host.const_array();
1206 const auto buoy_prod_arr = buoy_prod_host.const_array();
1207 const auto diss_tke_arr = diss_tke_host.const_array();
1208 const auto tke_state_arr = tke_host.const_array();
1209 const auto tke_base_arr = tke_base_host.const_array();
1210 const auto w_sec_arr = w_sec_host.const_array();
1211 const auto wthv_sec_arr = wthv_sec_host.const_array();
1212 const auto shoc_cldfrac_arr = shoc_cldfrac_host.const_array();
1213 const auto shoc_ql_arr = shoc_ql_host.const_array();
1214 const auto shoc_ql2_arr = shoc_ql2_host.const_array();
1215 const auto shoc_cond_arr = shoc_cond_host.const_array();
1216 const auto shoc_evap_arr = shoc_evap_host.const_array();
1217 const auto wqls_sec_arr = wqls_sec_host.const_array();
1218 const auto thl_sec_arr = thl_sec_host.const_array();
1219 const auto qw_sec_arr = qw_sec_host.const_array();
1220 const auto qwthl_sec_arr = qwthl_sec_host.const_array();
1221 const auto wthl_sec_arr = wthl_sec_host.const_array();
1222 const auto wqw_sec_arr = wqw_sec_host.const_array();
1223 const auto uw_sec_arr = uw_sec_host.const_array();
1224 const auto vw_sec_arr = vw_sec_host.const_array();
1225 const auto wtke_sec_arr = wtke_sec_host.const_array();
1226 const auto w3_arr = w3_host.const_array();
1227 const auto surf_sens_flux_arr = surf_sens_flux_host.const_array();
1228 const auto surf_lat_flux_arr = surf_lat_flux_host.const_array();
1229 const auto surf_tau_u_arr = surf_tau_u_host.const_array();
1230 const auto surf_tau_v_arr = surf_tau_v_host.const_array();
1231 const bool has_hfx3 = hfx3 && hfx3_host.box().ok();
1232 const bool has_qfx3 = qfx3 && qfx3_host.box().ok();
1233 const bool has_tau13 =
tau13 && tau13_host.box().ok();
1234 const bool has_tau23 =
tau23 && tau23_host.box().ok();
1236 for (
int n = 0; n < max_reports; ++n) {
1237 const auto& rep = reports[
static_cast<std::size_t
>(n)];
1238 const int i = rep.i;
1239 const int j = rep.j;
1240 const int k = rep.k;
1241 const int kk = rep.kk;
1242 const int ic = rep.ic;
1244 const auto node_value = [&] (
int ii,
int jj,
int kk) ->
Real {
1245 const IntVect iv(ii, jj, kk);
1246 return z_host.box().contains(iv) ? z_arr(ii, jj, kk) : std::numeric_limits<
Real>::quiet_NaN();
1249 const Real z_nd_ijk = node_value(i, j, k);
1250 const Real z_nd_ip1jk = node_value(i + 1, j, k);
1251 const Real z_nd_ijp1k = node_value(i, j + 1, k);
1252 const Real z_nd_ip1jp1k = node_value(i + 1, j + 1, k);
1253 const Real z_nd_ijkp1 = node_value(i, j, k + 1);
1254 const Real z_nd_ip1jkp1 = node_value(i + 1, j, k + 1);
1255 const Real z_nd_ijp1kp1 = node_value(i, j + 1, k + 1);
1256 const Real z_nd_ip1jp1kp1 = node_value(i + 1, j + 1, k + 1);
1257 const Real four_node_zlo = 0.25_rt * (z_nd_ijk + z_nd_ip1jk + z_nd_ijp1k + z_nd_ip1jp1k);
1258 const Real four_node_zhi = 0.25_rt * (z_nd_ijkp1 + z_nd_ip1jkp1 + z_nd_ijp1kp1 + z_nd_ip1jp1kp1);
1259 const Real four_node_dz = four_node_zhi - four_node_zlo;
1260 const Real corner_dz = z_nd_ijkp1 - z_nd_ijk;
1261 const Real theta_base_val = theta_base_arr(ic, kk, 0);
1262 const Real theta_new_val = theta_arr(ic, kk, 0);
1263 const Real thetal_base_val = thetal_base_arr(ic, kk, 0);
1264 const Real thetal_new_val = thetal_arr(ic, kk, 0);
1265 const Real qv_base_val = qv_base_arr(ic, kk, 0);
1266 const Real qc_base_val = qc_base_arr(ic, kk, 0);
1267 const Real qi_base_val = qi_base_arr(ic, kk, 0);
1269 const Real qc_new_val = qc_arr(ic, kk, 0);
1270 const Real qi_new_val = qi_arr(ic, kk, 0);
1271 const Real ql_base = qc_base_val + qi_base_val;
1272 const Real ql_new = qc_new_val + qi_new_val;
1273 const Real qw_base = qv_base_val + qc_base_val + qi_base_val;
1274 const Real qw_new = qv_new_val + qc_new_val + qi_new_val;
1275 const Real delta_theta = theta_new_val - theta_base_val;
1276 const Real delta_qv = qv_new_val - qv_base_val;
1277 const Real delta_qc = qc_new_val - qc_base_val;
1278 const Real delta_qi = qi_new_val - qi_base_val;
1279 const Real delta_ql = ql_new - ql_base;
1280 const Real delta_qw = qw_new - qw_base;
1281 const Real dt_theta_tend = theta_tend_arr(ic, kk, 0) * dt;
1282 const Real dt_qv_tend = qv_tend_arr(ic, kk, 0) * dt;
1283 const Real dt_qc_tend = qc_tend_arr(ic, kk, 0) * dt;
1284 const Real dt_qi_tend = qi_tend_arr(ic, kk, 0) * dt;
1285 const Real dt_tke_tend = tke_tend_arr(ic, kk, 0) * dt;
1286 const Real cond_dt = shoc_cond_arr(ic, kk, 0) * dt;
1287 const Real evap_dt = shoc_evap_arr(ic, kk, 0) * dt;
1288 const Real tke_base_val = tke_base_arr(ic, kk, 0);
1289 std::ostringstream msg;
1290 msg <<
"NATIVE_SHOC_BAD_COLUMN_BEGIN\n"
1291 <<
" rank=" << ParallelDescriptor::MyProc()
1292 <<
" level=" <<
m_lev
1294 <<
" mfi_index=" << rep.mfi_index
1295 <<
" box_valid_lo=(" << mfi.validbox().smallEnd(0) <<
","
1296 << mfi.validbox().smallEnd(1) <<
","
1297 << mfi.validbox().smallEnd(2) <<
")"
1298 <<
" box_valid_hi=(" << mfi.validbox().bigEnd(0) <<
","
1299 << mfi.validbox().bigEnd(1) <<
","
1300 << mfi.validbox().bigEnd(2) <<
")"
1310 <<
" i=" << i <<
" j=" << j <<
" k=" << k
1311 <<
" kk=" << kk <<
" ic=" << ic
1312 <<
" score=" << rep.score
1313 <<
" reason=" << rep.reason
1315 <<
" geometry z_nd(i,j,k)=" << z_nd_ijk
1316 <<
" z_nd(i+1,j,k)=" << z_nd_ip1jk
1317 <<
" z_nd(i,j+1,k)=" << z_nd_ijp1k
1318 <<
" z_nd(i+1,j+1,k)=" << z_nd_ip1jp1k
1319 <<
" z_nd(i,j,k+1)=" << z_nd_ijkp1
1320 <<
" z_nd(i+1,j,k+1)=" << z_nd_ip1jkp1
1321 <<
" z_nd(i,j+1,k+1)=" << z_nd_ijp1kp1
1322 <<
" z_nd(i+1,j+1,k+1)=" << z_nd_ip1jp1kp1
1324 <<
" four_node_zlo=" << four_node_zlo
1325 <<
" four_node_zhi=" << four_node_zhi
1326 <<
" four_node_dz=" << four_node_dz
1327 <<
" corner_dz=" << corner_dz
1328 <<
" dz=" << dz_arr(ic, kk, 0)
1330 <<
" rho=" <<
rho_arr(ic, kk, 0)
1331 <<
" theta=" << theta_arr(ic, kk, 0)
1332 <<
" thetal=" << thetal_arr(ic, kk, 0)
1333 <<
" theta_v=" << theta_v_arr(ic, kk, 0)
1334 <<
" qv=" <<
qv_arr(ic, kk, 0)
1335 <<
" qc=" << qc_arr(ic, kk, 0)
1336 <<
" qi=" << qi_arr(ic, kk, 0)
1337 <<
" qw=" << qw_arr(ic, kk, 0)
1338 <<
" tabs=" << tabs_arr(ic, kk, 0)
1339 <<
" exner=" << exner_arr(ic, kk, 0)
1340 <<
" p_mid=" << p_mid_arr(ic, kk, 0)
1341 <<
" p_int_lower=" << p_int_arr(ic, kk, 0)
1342 <<
" p_int_upper=" << p_int_arr(ic, kk + 1, 0)
1343 <<
" host_dse=" << host_dse_arr(ic, kk, 0)
1345 <<
" pblh=" << pblh_arr(ic, 0, 0)
1346 <<
" obklen=" << obklen_arr(ic, 0, 0)
1347 <<
" ustar=" << ustar_arr(ic, 0, 0)
1348 <<
" shoc_mix=" << shoc_mix_arr(ic, kk, 0)
1349 <<
" Lturb=" << shoc_mix_arr(ic, kk, 0)
1350 <<
" brunt=" << brunt_arr(ic, kk, 0)
1351 <<
" isotropy=" << isotropy_arr(ic, kk, 0)
1352 <<
" tk=" << tk_arr(ic, kk, 0)
1353 <<
" tkh=" << tkh_arr(ic, kk, 0)
1354 <<
" shear_prod=" << shear_prod_arr(ic, kk, 0)
1355 <<
" buoy_prod=" << buoy_prod_arr(ic, kk, 0)
1356 <<
" diss_tke=" << diss_tke_arr(ic, kk, 0)
1357 <<
" tke=" << tke_state_arr(ic, kk, 0)
1359 <<
" w_sec=" << w_sec_arr(ic, kk, 0)
1360 <<
" wthv_sec=" << wthv_sec_arr(ic, kk, 0)
1361 <<
" shoc_cldfrac=" << shoc_cldfrac_arr(ic, kk, 0)
1362 <<
" shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1363 <<
" shoc_ql2=" << shoc_ql2_arr(ic, kk, 0)
1364 <<
" shoc_cond=" << shoc_cond_arr(ic, kk, 0)
1365 <<
" shoc_evap=" << shoc_evap_arr(ic, kk, 0)
1366 <<
" wqls_sec=" << wqls_sec_arr(ic, kk, 0)
1368 <<
" thl_sec_lower=" << thl_sec_arr(ic, kk, 0)
1369 <<
" thl_sec_upper=" << thl_sec_arr(ic, kk + 1, 0)
1370 <<
" qw_sec_lower=" << qw_sec_arr(ic, kk, 0)
1371 <<
" qw_sec_upper=" << qw_sec_arr(ic, kk + 1, 0)
1372 <<
" qwthl_sec_lower=" << qwthl_sec_arr(ic, kk, 0)
1373 <<
" qwthl_sec_upper=" << qwthl_sec_arr(ic, kk + 1, 0)
1374 <<
" wthl_sec_lower=" << wthl_sec_arr(ic, kk, 0)
1375 <<
" wthl_sec_upper=" << wthl_sec_arr(ic, kk + 1, 0)
1376 <<
" wqw_sec_lower=" << wqw_sec_arr(ic, kk, 0)
1377 <<
" wqw_sec_upper=" << wqw_sec_arr(ic, kk + 1, 0)
1378 <<
" w3_lower=" << w3_arr(ic, kk, 0)
1379 <<
" w3_upper=" << w3_arr(ic, kk + 1, 0)
1380 <<
" uw_sec_lower=" << uw_sec_arr(ic, kk, 0)
1381 <<
" uw_sec_upper=" << uw_sec_arr(ic, kk + 1, 0)
1382 <<
" vw_sec_lower=" << vw_sec_arr(ic, kk, 0)
1383 <<
" vw_sec_upper=" << vw_sec_arr(ic, kk + 1, 0)
1384 <<
" wtke_sec_lower=" << wtke_sec_arr(ic, kk, 0)
1385 <<
" wtke_sec_upper=" << wtke_sec_arr(ic, kk + 1, 0)
1387 <<
" theta_tend=" << theta_tend_arr(ic, kk, 0)
1388 <<
" qv_tend=" << qv_tend_arr(ic, kk, 0)
1389 <<
" qc_tend=" << qc_tend_arr(ic, kk, 0)
1390 <<
" qi_tend=" << qi_tend_arr(ic, kk, 0)
1391 <<
" tke_tend=" << tke_tend_arr(ic, kk, 0)
1392 <<
" u_tend=" << u_tend_arr(ic, kk, 0)
1393 <<
" v_tend=" << v_tend_arr(ic, kk, 0)
1395 <<
" baseline theta=" << theta_base_val
1396 <<
" thetal=" << thetal_base_val
1397 <<
" qv=" << qv_base_val
1398 <<
" qc=" << qc_base_val
1399 <<
" qi=" << qi_base_val
1400 <<
" ql=" << ql_base
1401 <<
" qw=" << qw_base
1402 <<
" tke=" << tke_base_val
1404 <<
" updated theta=" << theta_new_val
1405 <<
" thetal=" << thetal_new_val
1406 <<
" qv=" << qv_new_val
1407 <<
" qc=" << qc_new_val
1408 <<
" qi=" << qi_new_val
1411 <<
" tke=" << tke_state_arr(ic, kk, 0)
1413 <<
" deltas dtheta=" << delta_theta
1414 <<
" dqv=" << delta_qv
1415 <<
" dqc=" << delta_qc
1416 <<
" dqi=" << delta_qi
1417 <<
" dql=" << delta_ql
1418 <<
" dqw=" << delta_qw
1420 <<
" tend_dt theta=" << dt_theta_tend
1421 <<
" qv=" << dt_qv_tend
1422 <<
" qc=" << dt_qc_tend
1423 <<
" qi=" << dt_qi_tend
1424 <<
" tke=" << dt_tke_tend
1426 <<
" consistency dtheta_minus_tenddt=" << (delta_theta - dt_theta_tend)
1427 <<
" dqv_minus_tenddt=" << (delta_qv - dt_qv_tend)
1428 <<
" dqc_minus_tenddt=" << (delta_qc - dt_qc_tend)
1429 <<
" dqi_minus_tenddt=" << (delta_qi - dt_qi_tend)
1431 <<
" pdf_cloud shoc_ql=" << shoc_ql_arr(ic, kk, 0)
1432 <<
" shoc_cond_dt=" << cond_dt
1433 <<
" shoc_evap_dt=" << evap_dt
1434 <<
" delta_ql=" << delta_ql
1435 <<
" delta_ql_minus_cond_minus_evap=" << (delta_ql - (cond_dt - evap_dt))
1437 <<
" surf_sens_flux=" << surf_sens_flux_arr(ic, 0, 0)
1438 <<
" surf_lat_flux=" << surf_lat_flux_arr(ic, 0, 0)
1439 <<
" surf_tau_u=" << surf_tau_u_arr(ic, 0, 0)
1440 <<
" surf_tau_v=" << surf_tau_v_arr(ic, 0, 0)
1441 <<
" rho_sfc=" << cons_arr(i, j, k,
Rho_comp)
1445 msg <<
" raw hfx3(i,j,klo)=" << hfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1448 msg <<
" raw qfx3(i,j,klo)=" << qfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1451 msg <<
" raw tau13(i,j,klo)=" << tau13_host.const_array()(rep.i, rep.j, rep.k)
1452 <<
" raw tau13(i+1,j,klo)=" << tau13_host.const_array()(rep.i + 1, rep.j, rep.k)
1456 msg <<
" raw tau23(i,j,klo)=" << tau23_host.const_array()(rep.i, rep.j, rep.k)
1457 <<
" raw tau23(i,j+1,klo)=" << tau23_host.const_array()(rep.i, rep.j + 1, rep.k)
1460 msg <<
"NATIVE_SHOC_BAD_COLUMN_END\n";
1461 amrex::AllPrint() << msg.str() << std::flush;
1465 amrex::Abort(
"Native SHOC debug_bad_column abort: bad SHOC column detected before state update");
amrex::Real value
Definition: ERF_HurricaneDiagnostics.H:20
#define Rho_comp
Definition: ERF_IndexDefines.H:36
auto qv_arr
Definition: ERF_InitCustomPert_MultiSpeciesBubble.H:210
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