913 amrex::ignore_unused(geom, dt_d);
920 print_shoc_debug_settings_once(
m_opts);
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);
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();
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();
1002 std::vector<ShocBadColumnReport> reports;
1005 auto maybe_add = [&] (
int i,
int j,
int k,
int kk,
int ic,
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
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});
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(),
1029 mfi.index(), i, j, k, kk, ic
1031 }
else if (dz_val <= 0.0_rt) {
1032 reports.push_back(ShocBadColumnReport{
1033 std::numeric_limits<Real>::infinity(),
1035 mfi.index(), i, j, k, kk, ic
1038 std::ostringstream oss;
1039 oss <<
"dz below minimum |dz|=" << dz_val
1041 reports.push_back(ShocBadColumnReport{
1044 mfi.index(), i, j, k, kk, ic
1052 for (
int kk = 0; kk < col.
layout.
nlev; ++kk) {
1054 const Real dz_val = dz_arr(ic, kk, 0);
1055 maybe_add_geom(i, j, k, kk, ic, dz_val);
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)
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
1131 if (reports.empty()) {
1135 std::stable_sort(reports.begin(), reports.end(),
1136 [] (
const ShocBadColumnReport& a,
const ShocBadColumnReport& b) {
1137 return a.score > b.score;
1141 static_cast<int>(reports.size()));
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();
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;
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();
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);
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;
1246 const Real dt =
static_cast<Real>(dt_d);
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
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) <<
")"
1277 <<
" i=" << i <<
" j=" << j <<
" k=" << k
1278 <<
" kk=" << kk <<
" ic=" << ic
1279 <<
" score=" << rep.score
1280 <<
" reason=" << rep.reason
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
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)
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)
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)
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)
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)
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)
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
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
1378 <<
" tke=" << tke_state_arr(ic, kk, 0)
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
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
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)
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))
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)
1412 msg <<
" raw hfx3(i,j,klo)=" << hfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
1415 msg <<
" raw qfx3(i,j,klo)=" << qfx3_host.const_array()(rep.i, rep.j, rep.k) <<
"\n";
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)
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)
1427 msg <<
"NATIVE_SHOC_BAD_COLUMN_END\n";
1428 amrex::AllPrint() << msg.str() << std::flush;
1432 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: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