1 #ifndef ERF_TWO_STREAM_COLUMN_H_
2 #define ERF_TWO_STREAM_COLUMN_H_
8 #include <AMReX_Array4.H>
10 #include <AMReX_Geometry.H>
11 #include <AMReX_GpuControl.H>
12 #include <AMReX_Math.H>
13 #include <AMReX_REAL.H>
115 amrex::Real
S0 = 1360.9;
121 static_assert(std::is_trivially_copyable<TwoStreamParams>::value,
122 "TwoStreamParams must stay trivially copyable so it can be captured by device lambdas");
128 const amrex::Real
rdOcp)
131 p.sw_enabled =
rc.sw_enabled;
132 p.lw_enabled =
rc.lw_enabled;
133 p.tau_per_layer =
rc.tau_per_layer;
134 p.tau_lw_per_layer =
rc.tau_lw_per_layer;
135 p.tau_profile_type =
rc.tau_profile_type;
136 p.cloud_base_height_m =
rc.cloud_base_height_m;
137 p.cloud_top_height_m =
rc.cloud_top_height_m;
138 p.cloud_tau_per_layer =
rc.cloud_tau_per_layer;
139 p.single_scattering_albedo =
rc.single_scattering_albedo;
140 p.asymmetry_factor =
rc.asymmetry_factor;
141 p.cloud_single_scattering_albedo =
rc.cloud_single_scattering_albedo;
142 p.cloud_asymmetry_factor =
rc.cloud_asymmetry_factor;
143 p.surface_albedo_sw =
rc.surface_albedo_sw;
144 p.surface_albedo_sw_diffuse =
rc.surface_albedo_sw_diffuse;
145 p.surface_emissivity_lw =
rc.surface_emissivity_lw;
146 p.t_sfc_default =
rc.rad_t_sfc;
148 p.tau_sw_dynamic_enable =
rc.tau_sw_dynamic_enable;
149 p.tau_lw_dynamic_enable =
rc.tau_lw_dynamic_enable;
150 p.tau_sw_coeff_qv =
rc.tau_sw_coeff_qv;
151 p.tau_sw_coeff_qc =
rc.tau_sw_coeff_qc;
152 p.tau_lw_coeff_qv =
rc.tau_lw_coeff_qv;
153 p.tau_lw_coeff_qc =
rc.tau_lw_coeff_qc;
154 p.cloud_fraction_prog_enable =
rc.cloud_fraction_prog_enable;
155 p.cloud_fraction_rh_min =
rc.cloud_fraction_rh_min;
156 p.cloud_fraction_rh_max =
rc.cloud_fraction_rh_max;
157 p.cloud_fraction_qc_scale =
rc.cloud_fraction_qc_scale;
158 p.aerosol_enable =
rc.aerosol_enable;
159 p.aerosol_profile_type =
rc.aerosol_profile_type;
160 p.aerosol_tau_per_layer =
rc.aerosol_tau_per_layer;
161 p.aerosol_scale_height_m =
rc.aerosol_scale_height_m;
162 p.aerosol_tau_surface =
rc.aerosol_tau_surface;
163 p.tau_model =
rc.tau_model;
164 p.sw_kabs_dry =
rc.sw_kabs_dry;
165 p.sw_kscat_dry =
rc.sw_kscat_dry;
166 p.sw_kabs_vapor =
rc.sw_kabs_vapor;
167 p.sw_kext_cloud =
rc.sw_kext_cloud;
168 p.sw_cloud_omega =
rc.sw_cloud_omega;
169 p.sw_cloud_g =
rc.sw_cloud_g;
170 p.lw_mass_absorption_enable =
rc.lw_mass_absorption_enable;
171 p.lw_kabs_dry =
rc.lw_kabs_dry;
172 p.lw_kabs_vapor =
rc.lw_kabs_vapor;
173 p.lw_kabs_cloud =
rc.lw_kabs_cloud;
176 p.solar_dynamic = !(
rc.fixed_solar_zenith_angle > 0.0);
177 p.cos_zenith_fixed =
rc.fixed_solar_zenith_angle;
178 p.S0 = (
rc.fixed_total_solar_irradiance >= 0.0) ?
rc.fixed_total_solar_irradiance : 1360.9;
179 p.lat_cons_rad =
rc.rad_cons_lat *
PI / 180.0;
180 p.lon_cons_rad =
rc.rad_cons_lon *
PI / 180.0;
199 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
202 amrex::Real
qv = 0.0)
204 if (!(
rho > 0.0) || !amrex::Math::isfinite(
rho) ||
205 !(rho_theta > 0.0) || !amrex::Math::isfinite(rho_theta)) {
208 if (!(
qv >= 0.0) || !amrex::Math::isfinite(
qv)) {
213 if (!amrex::Math::isfinite(
T) ||
T <= 0.0) {
218 T = std::max(
T, amrex::Real(100.0));
219 T = std::min(
T, amrex::Real(400.0));
224 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
227 return amrex::Math::isfinite(value) && value > 0.0 && value <
lsm_undefined;
244 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
247 const amrex::Array4<const amrex::Real>* hetero_alb_sw,
253 if (has_hetero_alb && hetero_alb_sw !=
nullptr && hetero_alb_sw->contains(i, j, 0)) {
254 amrex::Real hetero_val = (*hetero_alb_sw)(i, j, 0, 0);
255 if (amrex::Math::isfinite(hetero_val) && hetero_val >= 0.0 && hetero_val <= 1.0) {
283 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
286 return k_lower > kbot;
294 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
295 amrex::Real
grey_surface_lw_up (amrex::Real emissivity, amrex::Real temperature, amrex::Real lw_down,
296 amrex::Real
sigma) noexcept
307 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
310 return (surface_albedo_sw_diffuse >= 0.0) ? surface_albedo_sw_diffuse : alb_dir;
327 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
330 const amrex::Array4<const amrex::Real>* hetero_emiss_lw,
332 bool has_hetero_emiss)
336 if (has_hetero_emiss && hetero_emiss_lw !=
nullptr && hetero_emiss_lw->contains(i, j, 0)) {
337 amrex::Real hetero_val = (*hetero_emiss_lw)(i, j, 0, 0);
338 if (amrex::Math::isfinite(hetero_val) && hetero_val >= 0.0 && hetero_val <= 1.0) {
373 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
376 const amrex::Array4<const amrex::Real>* lsm_t_sfc,
378 const amrex::Array4<const amrex::Real>* seb_t_sfc,
380 const amrex::Array4<const amrex::Real>* surface_layer_theta,
381 bool has_surface_layer,
383 bool& from_surface_layer)
386 from_surface_layer =
false;
388 if (has_lsm_t_sfc && lsm_t_sfc !=
nullptr && lsm_t_sfc->contains(i, j, 0)) {
389 const amrex::Real lsm_value = (*lsm_t_sfc)(i, j, 0, 0);
395 if (has_seb_t_sfc && seb_t_sfc !=
nullptr && seb_t_sfc->contains(i, j, 0)) {
396 const amrex::Real seb_value = (*seb_t_sfc)(i, j, 0, 0);
402 if (has_surface_layer && surface_layer_theta !=
nullptr &&
403 surface_layer_theta->contains(i, j, 0)) {
404 const amrex::Real
theta = (*surface_layer_theta)(i, j, 0, 0);
406 from_surface_layer =
true;
422 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
435 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
437 const amrex::Array4<const amrex::Real>& state_arr)
439 if (state_arr.nComp() <=
RhoQ1_comp)
return 0.0;
441 amrex::Real rho_qv = state_arr(i, j, k,
RhoQ1_comp);
442 if (!(
rho > 0.0) || !amrex::Math::isfinite(
rho) || !amrex::Math::isfinite(rho_qv))
return 0.0;
443 amrex::Real
qv = rho_qv /
rho;
444 return (amrex::Math::isfinite(
qv) &&
qv > 0.0) ?
qv : 0.0;
454 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
456 const amrex::Array4<const amrex::Real>& state_arr)
459 if (!(rho_theta > 0.0) || !amrex::Math::isfinite(rho_theta))
return 1.0;
462 return (amrex::Math::isfinite(
pi) &&
pi > 0.0) ? 1.0 /
pi : 1.0;
471 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
473 const amrex::Array4<const amrex::Real>& state_arr)
475 if (state_arr.nComp() <=
RhoQ2_comp)
return 0.0;
477 amrex::Real rho_qc = state_arr(i, j, k,
RhoQ2_comp);
478 if (!(
rho > 0.0) || !amrex::Math::isfinite(
rho) || !amrex::Math::isfinite(rho_qc))
return 0.0;
479 amrex::Real
qc = rho_qc /
rho;
480 return (amrex::Math::isfinite(
qc) &&
qc > 0.0) ?
qc : 0.0;
499 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
501 amrex::Real coeff_qv, amrex::Real coeff_qc)
503 if (!(
qv > 0.0) || !amrex::Math::isfinite(
qv))
qv = 0.0;
504 if (!(
qc > 0.0) || !amrex::Math::isfinite(
qc))
qc = 0.0;
505 amrex::Real tau = tau_base + coeff_qv *
qv + coeff_qc *
qc;
506 if (!amrex::Math::isfinite(tau))
return tau_base;
507 if (tau < 0.0) tau = 0.0;
508 if (tau > 100.0) tau = 100.0;
529 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
531 amrex::Real z_center, amrex::Real tau_base,
534 if (!apply_cloud || rad_choice.
tau_profile_type != TauProfileType::CloudLayer) {
564 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
566 amrex::Real z_center,
const TwoStreamParams& rad_choice,
bool apply_cloud,
567 amrex::Real&
omega, amrex::Real&
g)
569 bool use_cloud_props = apply_cloud &&
573 if (use_cloud_props) {
600 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
603 const amrex::Array4<const amrex::Real>& state_arr,
618 if (
rho <= 0.0 || !amrex::Math::isfinite(
rho))
rho = 1.0;
619 if (rho_theta <= 0.0 || !amrex::Math::isfinite(rho_theta)) rho_theta = 288.15;
624 if (
P <= 0.0 || !amrex::Math::isfinite(
P))
P =
p_0;
649 constexpr
int DZ = 0;
694 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
697 amrex::Real dz_layer, amrex::Real z_center,
698 const amrex::Array4<const amrex::Real>& state_arr,
699 amrex::Real tau_base,
bool is_sw,
bool cloudy,
707 amrex::Real base = tau_base;
710 if (!(
rho > 0.0) || !amrex::Math::isfinite(
rho))
rho = 0.0;
716 if (!amrex::Math::isfinite(base) || base < 0.0) base = 0.0;
725 if (dynamic_enabled) {
745 amrex::Real tau_aerosol = 0.0;
796 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
799 amrex::Real dz_layer, amrex::Real z_center,
800 const amrex::Array4<const amrex::Real>& state_arr,
801 amrex::Real tau_base,
bool is_sw,
bool cloudy,
803 amrex::Real& tau, amrex::Real&
omega, amrex::Real&
g)
807 if (!is_sw || rad_choice.
tau_model != TauModel::Mass) {
808 tau =
diagnose_layer_tau(i, j, k, dz_layer, z_center, state_arr, tau_base, is_sw, cloudy, rad_choice);
817 if (!(
rho > 0.0) || !amrex::Math::isfinite(
rho))
rho = 0.0;
820 const amrex::Real path =
rho * dz_layer;
822 const amrex::Real tau_dry_abs = path * rad_choice.
sw_kabs_dry;
823 const amrex::Real tau_rayleigh = path * rad_choice.
sw_kscat_dry;
827 amrex::Real ext = tau_dry_abs + tau_rayleigh + tau_vapor + tau_cloud;
828 amrex::Real sca = tau_rayleigh + rad_choice.
sw_cloud_omega * tau_cloud;
847 const amrex::Real additions =
diagnose_layer_tau(i, j, k, dz_layer, z_center, state_arr,
848 0.0,
true, cloudy, rad_choice) - band;
849 if (additions > 0.0) ext += additions;
851 if (!amrex::Math::isfinite(ext) || ext <= 0.0) {
859 g = (sca > 0.0) ? gsca / sca : 0.0;
860 if (
g > 1.0)
g = 1.0;
861 if (
g < -1.0)
g = -1.0;
873 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
877 const amrex::Array4<const amrex::Real>* lat_arr,
878 const amrex::Array4<const amrex::Real>* lon_arr)
881 const amrex::Real lat_rad = (has_latlon && lat_arr !=
nullptr && lat_arr->contains(i, j, 0))
883 const amrex::Real lon_rad = (has_latlon && lon_arr !=
nullptr && lon_arr->contains(i, j, 0))
885 return static_cast<amrex::Real
>(
907 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
909 const amrex::Array4<const amrex::Real>& rad_flux,
910 amrex::Real cos_zenith,
915 sw_dn = rad_flux(i, j, kmin, 1);
916 lw_dn = rad_flux(i, j, kmin, 3);
917 coszen = (cos_zenith > amrex::Real(0.0)) ? cos_zenith : amrex::Real(0.0);
1003 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
1006 const amrex::Box& bx,
1007 amrex::Real dz_uniform,
1008 const amrex::Array4<const amrex::Real>& state_arr,
1011 const amrex::Array4<amrex::Real>& qheating_arr,
1012 amrex::Real& max_heating_rate,
1013 amrex::Real& sw_surface_flux,
1014 amrex::Real& sw_up_toa,
1015 amrex::Real& lw_net_surface,
1016 amrex::Real& lw_up_toa,
1017 amrex::Real& sw_down_toa,
1018 const amrex::Array4<const amrex::Real>& z_phys_nd,
1019 const amrex::Array4<amrex::Real>& scratch,
1020 bool has_hetero_alb_sw =
false,
1021 const amrex::Array4<const amrex::Real>* hetero_alb_sw =
nullptr,
1022 bool has_hetero_emiss_lw =
false,
1023 const amrex::Array4<const amrex::Real>* hetero_emiss_lw =
nullptr,
1024 bool has_lsm_t_sfc =
false,
1025 const amrex::Array4<const amrex::Real>* lsm_t_sfc =
nullptr,
1026 bool has_seb_t_sfc =
false,
1027 const amrex::Array4<const amrex::Real>* seb_t_sfc =
nullptr,
1028 bool has_surface_layer =
false,
1029 const amrex::Array4<const amrex::Real>* surface_layer_theta =
nullptr,
1030 bool has_latlon =
false,
1031 const amrex::Array4<const amrex::Real>* lat_arr =
nullptr,
1032 const amrex::Array4<const amrex::Real>* lon_arr =
nullptr,
1033 const amrex::Array4<amrex::Real>* rad_flux_out =
nullptr,
1034 amrex::Real* cos_zenith_out =
nullptr,
1035 amrex::Real* sw_beam_absorbed_out =
nullptr,
1040 const int kbot = bx.smallEnd(2);
1042 const int kmin = on_roof ? roof->k_lower : kbot;
1043 const int kmax = bx.bigEnd(2);
1044 const int nlev = kmax - kmin + 1;
1048 AMREX_ASSERT(scratch.contains(i, j, kbot) && scratch.contains(i, j, kmax + 1));
1049 AMREX_ASSERT(rad_flux_out ==
nullptr ||
1050 (rad_flux_out->contains(i, j, kbot) && rad_flux_out->contains(i, j, kmax + 1)));
1054 auto dz_level = [&] (
int m) -> amrex::Real& {
return scratch(i, j, kmin + m,
TwoStreamScratch::DZ); };
1055 auto z_level = [&] (
int m) -> amrex::Real& {
return scratch(i, j, kmin + m,
TwoStreamScratch::Z); };
1060 auto F_lw_up_iface = [&] (
int m) -> amrex::Real& {
return scratch(i, j, kmin + m,
TwoStreamScratch::LW_UP); };
1061 auto F_lw_down_iface = [&] (
int m) -> amrex::Real& {
return scratch(i, j, kmin + m,
TwoStreamScratch::LW_DN); };
1066 const amrex::Real cp_air =
Cp_d;
1080 auto z_face = [&] (
int k) -> amrex::Real {
1081 return 0.25 * (z_phys_nd(i, j, k) + z_phys_nd(i + 1, j, k) +
1082 z_phys_nd(i, j + 1, k) + z_phys_nd(i + 1, j + 1, k));
1084 const amrex::Real z_surface = z_face(kbot);
1085 for (
int m = 0; m < nlev; ++m) {
1086 const amrex::Real z_lo = z_face(kmin + m);
1087 const amrex::Real z_hi = z_face(kmin + m + 1);
1088 const amrex::Real dz_computed = z_hi - z_lo;
1089 dz_level(m) = (dz_computed > 0.0 && amrex::Math::isfinite(dz_computed)) ? dz_computed : dz_uniform;
1090 z_level(m) = 0.5 * (z_lo + z_hi) - z_surface;
1093 for (
int m = 0; m < nlev; ++m) {
1094 dz_level(m) = dz_uniform;
1095 z_level(m) = (
static_cast<amrex::Real
>(kmin - kbot + m) + 0.5) * dz_uniform;
1099 const amrex::Real cos_zenith =
two_stream_cos_zenith(i, j, rad_choice, has_latlon, lat_arr, lon_arr);
1100 if (cos_zenith_out !=
nullptr) { *cos_zenith_out = cos_zenith; }
1104 const amrex::Real S0 = rad_choice.
S0;
1108 amrex::Real local_max_heating = 0.0;
1113 for (
int k = kbot; k <= kmax; ++k) {
1114 qheating_arr(i, j, k, 0) = 0.0;
1115 qheating_arr(i, j, k, 1) = 0.0;
1117 if (rad_flux_out !=
nullptr) {
1118 for (
int k = kbot; k <= kmax + 1; ++k) {
1119 for (
int comp = 0; comp < 4; ++comp) { (*rad_flux_out)(i, j, k, comp) = 0.0; }
1122 sw_down_toa = (rad_choice.
sw_enabled && cos_zenith > 0.0) ? S0 * cos_zenith : 0.0;
1127 const int k_dark = (nlev <= 0) ? kmax + 1 : kmin - 1;
1128 for (
int k = kbot; k <= k_dark; ++k) {
1133 max_heating_rate = 0.0;
1134 sw_surface_flux = 0.0;
1136 lw_net_surface = 0.0;
1138 if (sw_beam_absorbed_out !=
nullptr) { *sw_beam_absorbed_out = 0.0; }
1155 amrex::Real tau_sw_cum = 0.0;
1156 amrex::Real sw_surface_absorbed = 0.0;
1157 amrex::Real sw_up_at_toa = 0.0;
1161 const amrex::Real alb_dir = on_roof ? roof->albedo
1163 const amrex::Real alb_dif = on_roof ? roof->albedo
1166 if (rad_choice.
sw_enabled && cos_zenith > 0.0) {
1169 F_dir(nlev) = S0 * cos_zenith;
1170 for (
int k = kmax; k >= kmin; --k) {
1171 const int m = k - kmin;
1172 amrex::Real omega_m = 0.0, g_m = 0.0;
1174 true, cloudy, rad_choice, tau_sw_level(m), omega_m, g_m);
1175 tau_sw_cum += tau_sw_level(m);
1180 auto layer_props = [&](
int m) {
1181 amrex::Real tau_m = 0.0,
omega = 0.0,
g = 0.0;
1183 true, cloudy, rad_choice, tau_m,
omega,
g);
1189 const amrex::Real beam_sfc = on_roof ? roof->lit * F_dir(0) : F_dir(0);
1193 S(0) = alb_dir * beam_sfc;
1194 for (
int m = 0; m < nlev; ++m) {
1196 amrex::Real denom = 1.0 - L.
R_dif *
A(m);
1197 if (denom < 1.0e-12) denom = 1.0e-12;
1199 S(m + 1) = L.
R_dir * F_dir(m + 1)
1200 + L.
T_dif * (
S(m) +
A(m) * L.
T_dir * F_dir(m + 1)) / denom;
1204 amrex::Real d_above = 0.0;
1205 amrex::Real u_above =
S(nlev);
1206 sw_up_at_toa = u_above;
1207 amrex::Real F_net_above = F_dir(nlev) + d_above - u_above;
1208 if (rad_flux_out !=
nullptr) {
1209 (*rad_flux_out)(i, j, kmax + 1, 0) = u_above;
1210 (*rad_flux_out)(i, j, kmax + 1, 1) = F_dir(nlev);
1212 for (
int k = kmax; k >= kmin; --k) {
1213 const int m = k - kmin;
1215 amrex::Real denom = 1.0 - L.
R_dif *
A(m);
1216 if (denom < 1.0e-12) denom = 1.0e-12;
1218 const amrex::Real d_m = (L.
T_dif * d_above + L.
T_dir * F_dir(m + 1) + L.
R_dif *
S(m)) / denom;
1219 const amrex::Real u_m =
A(m) * d_m +
S(m);
1220 const amrex::Real F_net_m = F_dir(m) + d_m - u_m;
1221 if (rad_flux_out !=
nullptr) {
1222 (*rad_flux_out)(i, j, k, 0) = u_m;
1223 (*rad_flux_out)(i, j, k, 1) = F_dir(m) + d_m;
1227 if (
rho <= 0.0 || !amrex::Math::isfinite(
rho))
rho = 1.0;
1232 dz_level(m),
rho, cp_air)
1234 qheating_arr(i, j, k, 0) = Q_sw;
1235 local_max_heating = std::max(local_max_heating, std::abs(Q_sw));
1238 F_net_above = F_net_m;
1240 sw_surface_absorbed = (1.0 - alb_dir) * beam_sfc + (1.0 - alb_dif) * d_m;
1253 F_lw_down_iface(nlev) = 0.0;
1254 for (
int k = kmax; k >= kmin; --k) {
1255 const int m = k - kmin;
1259 if (
rho <= 0.0 || !amrex::Math::isfinite(
rho))
rho = 1.0;
1260 if (rho_theta <= 0.0 || !amrex::Math::isfinite(rho_theta)) rho_theta = 288.15;
1265 state_arr, tau_lw_base,
false, cloudy,
1277 bool t_sfc_from_surface_layer =
false;
1279 i, j, lsm_t_sfc, has_lsm_t_sfc, seb_t_sfc, has_seb_t_sfc,
1280 surface_layer_theta, has_surface_layer, rad_choice,
1281 t_sfc_from_surface_layer);
1286 if (t_sfc_from_surface_layer) {
1287 const amrex::Real
rho = state_arr(i, j, kmin,
Rho_comp);
1288 const amrex::Real rho_theta = state_arr(i, j, kmin,
RhoTheta_comp);
1290 const amrex::Real delta_z = z_level(0);
1292 rho, rho_theta,
qv, delta_z);
1294 t_surface, pressure, rad_choice.
rdOcp, t_surface)) {
1301 for (
int k = kmin; k <= kmax; ++k) {
1302 const int m = k - kmin;
1306 if (
rho <= 0.0 || !amrex::Math::isfinite(
rho))
rho = 1.0;
1307 if (rho_theta <= 0.0 || !amrex::Math::isfinite(rho_theta)) rho_theta = 288.15;
1316 for (
int k = kmin; k <= kmax; ++k) {
1317 const int m = k - kmin;
1319 if (
rho <= 0.0 || !amrex::Math::isfinite(
rho))
rho = 1.0;
1320 if (rad_flux_out !=
nullptr) {
1321 (*rad_flux_out)(i, j, k, 2) = F_lw_up_iface(m);
1322 (*rad_flux_out)(i, j, k, 3) = F_lw_down_iface(m);
1324 (*rad_flux_out)(i, j, kmax + 1, 2) = F_lw_up_iface(nlev);
1325 (*rad_flux_out)(i, j, kmax + 1, 3) = F_lw_down_iface(nlev);
1329 amrex::Real F_net_top = F_lw_up_iface(m + 1) - F_lw_down_iface(m + 1);
1330 amrex::Real F_net_bot = F_lw_up_iface(m) - F_lw_down_iface(m);
1335 qheating_arr(i, j, k, 1) = Q_lw;
1337 amrex::Real Q_sw_here = qheating_arr(i, j, k, 0);
1338 local_max_heating = std::max(local_max_heating, std::abs(Q_sw_here) + std::abs(Q_lw));
1345 if (sw_beam_absorbed_out !=
nullptr) {
1349 const bool lit = rad_choice.
sw_enabled && cos_zenith > 0.0;
1350 const amrex::Real beam_low = lit ? F_dir(0) : amrex::Real(0.0);
1351 const amrex::Real beam_taken = on_roof ? roof->lit * beam_low : beam_low;
1352 *sw_beam_absorbed_out = (amrex::Real(1.0) - alb_dir) * beam_taken;
1356 sw_surface_flux = sw_surface_absorbed;
1357 sw_up_toa = sw_up_at_toa;
1359 sw_surface_flux = 0.0;
1364 amrex::Real F_lw_up_sfc = F_lw_up_iface(0);
1365 amrex::Real F_lw_down_sfc = F_lw_down_iface(0);
1366 lw_up_toa = F_lw_up_iface(nlev);
1367 lw_net_surface = F_lw_up_sfc - F_lw_down_sfc;
1369 lw_net_surface = 0.0;
1373 max_heating_rate = local_max_heating;
Prescribed bulk aerosol/turbidity optical depth diagnosis.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_tau_aerosol_constant(amrex::Real tau_aerosol_const)
Diagnose aerosol optical depth for Constant profile.
Definition: ERF_AerosolOpticalDepth.H:42
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_tau_aerosol_exponential(amrex::Real z_level, amrex::Real dz, amrex::Real tau_surface, amrex::Real scale_height_m)
Diagnose aerosol optical depth for Exponential profile.
Definition: ERF_AerosolOpticalDepth.H:77
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_tau_aerosol_table(int k)
Diagnose aerosol optical depth for the Table profile.
Definition: ERF_AerosolOpticalDepth.H:123
constexpr amrex::Real Cp_d
Definition: ERF_Constants.H:51
constexpr amrex::Real p_0
Definition: ERF_Constants.H:69
constexpr amrex::Real lsm_undefined
Definition: ERF_Constants.H:28
constexpr amrex::Real RdoCp
Definition: ERF_Constants.H:57
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getTgivenRandRTh(const amrex::Real rho, const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:46
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getExnergivenRTh(const amrex::Real rhotheta, const amrex::Real rdOcp, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:156
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:81
#define Rho_comp
Definition: ERF_IndexDefines.H:61
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:62
#define RhoQ2_comp
Definition: ERF_IndexDefines.H:79
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:78
const Real rdOcp
Definition: ERF_InitCustomPert_ABL.H:128
amrex::Real sigma
Definition: ERF_InitCustomPert_DataAssimilation_ISV.H:11
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double orbital_cos_zenith_instant(double jday, double lat, double lon, double declin)
Definition: ERF_OrbCosZenith.H:507
Prognostic cloud fraction diagnosis from relative humidity and cloud water.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_relative_humidity(amrex::Real qv, amrex::Real T, amrex::Real P)
Compute relative humidity from water vapor mixing ratio.
Definition: ERF_PrognosticCloudFraction.H:37
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_cloud_fraction_from_rh_qc(amrex::Real rh, amrex::Real qc, amrex::Real rh_min, amrex::Real rh_max, amrex::Real qc_scale)
Diagnose cloud fraction from relative humidity and cloud water.
Definition: ERF_PrognosticCloudFraction.H:99
Radiation model type and control parameters.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real two_stream_cos_zenith(int i, int j, const TwoStreamParams &rad_choice, bool has_latlon, const amrex::Array4< const amrex::Real > *lat_arr, const amrex::Array4< const amrex::Real > *lon_arr)
Cosine of the solar zenith angle over column (i,j) for one call.
Definition: ERF_TwoStreamColumn.H:874
TwoStreamParams make_two_stream_params(const RadChoice &rc, const amrex::Real rdOcp)
Copy the column-kernel parameters out of a RadChoice.
Definition: ERF_TwoStreamColumn.H:127
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real get_inverse_exner(int i, int j, int k, const amrex::Array4< const amrex::Real > &state_arr)
Inverse Exner function 1/pi at (i,j,k) from the state, with pi = (p / p_0)^(R_d/c_p) evaluated by get...
Definition: ERF_TwoStreamColumn.H:455
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real resolve_surface_albedo_sw(int i, int j, const amrex::Array4< const amrex::Real > *hetero_alb_sw, const TwoStreamParams &rad_choice, bool has_hetero_alb)
Resolve per-column shortwave surface albedo from hetero field or fallback.
Definition: ERF_TwoStreamColumn.H:245
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real resolve_surface_albedo_sw_diffuse(amrex::Real alb_dir, amrex::Real surface_albedo_sw_diffuse) noexcept
The ground's albedo for diffuse shortwave: the input surface_albedo_sw_diffuse, or the direct-beam al...
Definition: ERF_TwoStreamColumn.H:308
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void two_stream_land_forcing(int i, int j, int kmin, const amrex::Array4< const amrex::Real > &rad_flux, amrex::Real cos_zenith, amrex::Real &sw_dn, amrex::Real &lw_dn, amrex::Real &coszen)
The radiative forcing a land-surface model integrates on, for column (i,j).
Definition: ERF_TwoStreamColumn.H:908
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_cloud_fraction_prognostic(int i, int j, int k, const amrex::Array4< const amrex::Real > &state_arr, const TwoStreamParams &rad_choice)
GPU-safe helper to diagnose prognostic cloud fraction from per-level relative humidity and cloud liqu...
Definition: ERF_TwoStreamColumn.H:601
amrex::Box two_stream_scratch_box(const amrex::Box &bx)
Box of the scratch FArrayBox a sweep over box bx needs.
Definition: ERF_TwoStreamColumn.H:662
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real get_qv_from_state(int i, int j, int k, const amrex::Array4< const amrex::Real > &state_arr)
Water-vapor mixing ratio qv = RhoQv / Rho at (i,j,k).
Definition: ERF_TwoStreamColumn.H:436
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void diagnose_layer_optics(int i, int j, int k, amrex::Real dz_layer, amrex::Real z_center, const amrex::Array4< const amrex::Real > &state_arr, amrex::Real tau_base, bool is_sw, bool cloudy, const TwoStreamParams &rad_choice, amrex::Real &tau, amrex::Real &omega, amrex::Real &g)
Optical depth, single-scattering albedo and asymmetry factor of layer k for one band,...
Definition: ERF_TwoStreamColumn.H:797
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real tau_layer_value(amrex::Real z_center, amrex::Real tau_base, const TwoStreamParams &rad_choice, bool apply_cloud)
GPU-safe helper to compute the per-layer optical depth at level k, given the base (clear-sky) optical...
Definition: ERF_TwoStreamColumn.H:530
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real get_qc_from_state(int i, int j, int k, const amrex::Array4< const amrex::Real > &state_arr)
Cloud-water mixing ratio qc = RhoQc / Rho at (i,j,k).
Definition: ERF_TwoStreamColumn.H:472
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_tau_dynamic(amrex::Real tau_base, amrex::Real qv, amrex::Real qc, amrex::Real coeff_qv, amrex::Real coeff_qc)
Moisture-dependent (dynamic) per-layer optical depth.
Definition: ERF_TwoStreamColumn.H:500
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real grey_surface_lw_up(amrex::Real emissivity, amrex::Real temperature, amrex::Real lw_down, amrex::Real sigma) noexcept
The longwave a gray surface sends up: what it emits and the part of the longwave coming down that it ...
Definition: ERF_TwoStreamColumn.H:295
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool is_cloud_level(amrex::Real z_center, const TwoStreamParams &rad_choice)
GPU-safe helper to determine whether a layer falls within the cloud band [cloud_base_height_m,...
Definition: ERF_TwoStreamColumn.H:423
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool two_stream_starts_on_roof(int k_lower, int kbot) noexcept
Whether a column starts on a roof: the layer on the roof, k_lower, is above the box's bottom layer kb...
Definition: ERF_TwoStreamColumn.H:284
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool valid_surface_temperature(amrex::Real value)
Check whether a heterogeneous absolute surface temperature is valid.
Definition: ERF_TwoStreamColumn.H:225
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real get_temperature_from_rhotheta(amrex::Real rho_theta, amrex::Real rho, amrex::Real qv=0.0)
GPU-safe helper to compute absolute temperature from (rho, rho*theta).
Definition: ERF_TwoStreamColumn.H:200
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void select_scattering_props(amrex::Real z_center, const TwoStreamParams &rad_choice, bool apply_cloud, amrex::Real &omega, amrex::Real &g)
GPU-safe helper to select the single-scattering albedo and asymmetry factor to use for level k's diff...
Definition: ERF_TwoStreamColumn.H:565
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real resolve_surface_emissivity_lw(int i, int j, const amrex::Array4< const amrex::Real > *hetero_emiss_lw, const TwoStreamParams &rad_choice, bool has_hetero_emiss)
Resolve per-column longwave surface emissivity from hetero field or fallback.
Definition: ERF_TwoStreamColumn.H:328
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_layer_tau(int i, int j, int k, amrex::Real dz_layer, amrex::Real z_center, const amrex::Array4< const amrex::Real > &state_arr, amrex::Real tau_base, bool is_sw, bool cloudy, const TwoStreamParams &rad_choice)
GPU-safe helper to assemble the total per-layer optical depth at level k for either the SW or the LW ...
Definition: ERF_TwoStreamColumn.H:695
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real resolve_surface_temp_k(int i, int j, const amrex::Array4< const amrex::Real > *lsm_t_sfc, bool has_lsm_t_sfc, const amrex::Array4< const amrex::Real > *seb_t_sfc, bool has_seb_t_sfc, const amrex::Array4< const amrex::Real > *surface_layer_theta, bool has_surface_layer, const TwoStreamParams &rad_choice, bool &from_surface_layer)
Resolve the per-column surface-temperature boundary condition.
Definition: ERF_TwoStreamColumn.H:374
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void vertical_two_stream_sweep(int i, int j, const amrex::Box &bx, amrex::Real dz_uniform, const amrex::Array4< const amrex::Real > &state_arr, const TwoStreamParams &rad_choice, bool cloudy, const amrex::Array4< amrex::Real > &qheating_arr, amrex::Real &max_heating_rate, amrex::Real &sw_surface_flux, amrex::Real &sw_up_toa, amrex::Real &lw_net_surface, amrex::Real &lw_up_toa, amrex::Real &sw_down_toa, const amrex::Array4< const amrex::Real > &z_phys_nd, const amrex::Array4< amrex::Real > &scratch, bool has_hetero_alb_sw=false, const amrex::Array4< const amrex::Real > *hetero_alb_sw=nullptr, bool has_hetero_emiss_lw=false, const amrex::Array4< const amrex::Real > *hetero_emiss_lw=nullptr, bool has_lsm_t_sfc=false, const amrex::Array4< const amrex::Real > *lsm_t_sfc=nullptr, bool has_seb_t_sfc=false, const amrex::Array4< const amrex::Real > *seb_t_sfc=nullptr, bool has_surface_layer=false, const amrex::Array4< const amrex::Real > *surface_layer_theta=nullptr, bool has_latlon=false, const amrex::Array4< const amrex::Real > *lat_arr=nullptr, const amrex::Array4< const amrex::Real > *lon_arr=nullptr, const amrex::Array4< amrex::Real > *rad_flux_out=nullptr, amrex::Real *cos_zenith_out=nullptr, amrex::Real *sw_beam_absorbed_out=nullptr, const TwoStreamRoof *roof=nullptr)
GPU-safe per-column vertical integration kernel for two-stream radiation, computing either the clear-...
Definition: ERF_TwoStreamColumn.H:1004
Longwave (thermal) radiation using gray-gas two-stream model.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_lw_flux_down(amrex::Real F_down_above, amrex::Real T_layer, amrex::Real sigma, amrex::Real tau_lw)
Compute downwelling LW flux in one layer of a two-stream sweep.
Definition: ERF_TwoStreamLW.H:188
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_thermal_intensity(amrex::Real T, amrex::Real sigma)
Compute thermal (LW) intensity for a given temperature.
Definition: ERF_TwoStreamLW.H:93
constexpr amrex::Real stefan_boltzmann
Stefan-Boltzmann constant [W/(m^2 K^4)] used by the two-stream LW model.
Definition: ERF_TwoStreamLW.H:11
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_lw_heating_rate(amrex::Real F_net_top, amrex::Real F_net_bot, amrex::Real dz, amrex::Real rho, amrex::Real cp)
Compute LW heating rate from net flux divergence.
Definition: ERF_TwoStreamLW.H:236
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_lw_flux_up(amrex::Real F_up_below, amrex::Real T_layer, amrex::Real sigma, amrex::Real tau_lw)
Compute upwelling LW flux in one layer of a two-stream sweep.
Definition: ERF_TwoStreamLW.H:156
Shortwave (solar) radiation kernels: Beer-Lambert direct beam and the two-stream layer solution for t...
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_sw_direct_flux(amrex::Real tau_cumulative, amrex::Real S0, amrex::Real cos_zenith)
Compute Beer-Lambert direct-beam flux at a given optical depth.
Definition: ERF_TwoStreamSW.H:72
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_sw_heating_rate(amrex::Real flux_top, amrex::Real flux_bot, amrex::Real dz, amrex::Real rho, amrex::Real cp)
Compute the shortwave heating rate of a layer from the net (downward positive) flux at its top and bo...
Definition: ERF_TwoStreamSW.H:101
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TwoStreamLayerSW compute_sw_layer_two_stream(amrex::Real tau, amrex::Real omega, amrex::Real g, amrex::Real cos_zenith)
Compute the two-stream layer solution for shortwave radiation.
Definition: ERF_TwoStreamSW.H:176
@ P
Definition: ERF_IndexDefines.H:221
@ rho
Definition: ERF_Kessler.H:25
@ theta
Definition: ERF_Kessler.H:26
@ qv
Definition: ERF_Kessler.H:31
@ omega
Definition: ERF_Morrison.H:57
@ qc
Definition: ERF_Morrison.H:110
@ T
Definition: ERF_IndexDefines.H:180
constexpr std::array< amrex::Real, num_veg_params > rc
Definition: ERF_SLM_DefaultParams.H:22
Per-column scratch the sweep keeps in a caller-provided Array4.
Definition: ERF_TwoStreamColumn.H:648
constexpr int F_DIR
Definition: ERF_TwoStreamColumn.H:652
constexpr int A
Definition: ERF_TwoStreamColumn.H:653
constexpr int Z
Definition: ERF_TwoStreamColumn.H:650
constexpr int NCOMP
Definition: ERF_TwoStreamColumn.H:658
constexpr int TAU_LW
Definition: ERF_TwoStreamColumn.H:657
constexpr int LW_UP
Definition: ERF_TwoStreamColumn.H:655
constexpr int LW_DN
Definition: ERF_TwoStreamColumn.H:656
constexpr int S
Definition: ERF_TwoStreamColumn.H:654
constexpr int DZ
Definition: ERF_TwoStreamColumn.H:649
constexpr int TAU_SW
Definition: ERF_TwoStreamColumn.H:651
@ p
Definition: ERF_WSM6.H:303
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real pressure_at_surface(const amrex::Real rho, const amrex::Real rho_theta, const amrex::Real qv, const amrex::Real delta_z)
Definition: ERF_SurfaceTemperature.H:112
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool theta_to_temperature(const amrex::Real theta, const amrex::Real pressure, const amrex::Real rdOcp, amrex::Real &temperature)
Definition: ERF_SurfaceTemperature.H:136
real(c_double), parameter g
Definition: ERF_module_model_constants.F90:19
real(c_double), parameter, private pi
Definition: ERF_module_mp_morr_two_moment.F90:100
Container holding radiation-related choices and parameters.
Definition: ERF_RadStruct.H:142
Two-stream reflectance and transmittance of one homogeneous layer.
Definition: ERF_TwoStreamSW.H:132
amrex::Real T_dir
Definition: ERF_TwoStreamSW.H:136
amrex::Real T_dif
Definition: ERF_TwoStreamSW.H:134
amrex::Real R_dif
Definition: ERF_TwoStreamSW.H:133
amrex::Real R_dir
Definition: ERF_TwoStreamSW.H:135
Trivially copyable subset of RadChoice used by the column kernels.
Definition: ERF_TwoStreamColumn.H:57
amrex::Real cos_zenith_fixed
Definition: ERF_TwoStreamColumn.H:114
bool lw_mass_absorption_enable
Definition: ERF_TwoStreamColumn.H:105
amrex::Real lw_kabs_cloud
Definition: ERF_TwoStreamColumn.H:108
amrex::Real aerosol_tau_per_layer
Definition: ERF_TwoStreamColumn.H:93
amrex::Real sw_cloud_omega
Definition: ERF_TwoStreamColumn.H:102
amrex::Real cloud_single_scattering_albedo
Definition: ERF_TwoStreamColumn.H:70
amrex::Real sw_kabs_vapor
Definition: ERF_TwoStreamColumn.H:100
bool tau_sw_dynamic_enable
Definition: ERF_TwoStreamColumn.H:79
amrex::Real cloud_top_height_m
Definition: ERF_TwoStreamColumn.H:65
bool aerosol_enable
Definition: ERF_TwoStreamColumn.H:91
amrex::Real cloud_base_height_m
Definition: ERF_TwoStreamColumn.H:64
amrex::Real surface_emissivity_lw
Definition: ERF_TwoStreamColumn.H:75
amrex::Real aerosol_tau_surface
Definition: ERF_TwoStreamColumn.H:95
TauModel tau_model
Definition: ERF_TwoStreamColumn.H:97
bool sw_enabled
Definition: ERF_TwoStreamColumn.H:58
amrex::Real tau_lw_coeff_qv
Definition: ERF_TwoStreamColumn.H:83
amrex::Real cloud_tau_per_layer
Definition: ERF_TwoStreamColumn.H:66
TauProfileType tau_profile_type
Definition: ERF_TwoStreamColumn.H:63
amrex::Real surface_albedo_sw
Definition: ERF_TwoStreamColumn.H:73
amrex::Real tau_lw_per_layer
Definition: ERF_TwoStreamColumn.H:61
amrex::Real single_scattering_albedo
Definition: ERF_TwoStreamColumn.H:68
amrex::Real S0
Definition: ERF_TwoStreamColumn.H:115
amrex::Real lat_cons_rad
Definition: ERF_TwoStreamColumn.H:118
amrex::Real sw_kext_cloud
Definition: ERF_TwoStreamColumn.H:101
amrex::Real sw_kabs_dry
Definition: ERF_TwoStreamColumn.H:98
amrex::Real sw_kscat_dry
Definition: ERF_TwoStreamColumn.H:99
amrex::Real tau_sw_coeff_qc
Definition: ERF_TwoStreamColumn.H:82
amrex::Real cloud_fraction_qc_scale
Definition: ERF_TwoStreamColumn.H:89
amrex::Real tau_lw_coeff_qc
Definition: ERF_TwoStreamColumn.H:84
bool lw_enabled
Definition: ERF_TwoStreamColumn.H:59
amrex::Real aerosol_scale_height_m
Definition: ERF_TwoStreamColumn.H:94
amrex::Real t_sfc_default
Definition: ERF_TwoStreamColumn.H:76
amrex::Real surface_albedo_sw_diffuse
Definition: ERF_TwoStreamColumn.H:74
amrex::Real cloud_fraction_rh_max
Definition: ERF_TwoStreamColumn.H:88
amrex::Real rdOcp
Definition: ERF_TwoStreamColumn.H:77
bool cloud_fraction_prog_enable
Definition: ERF_TwoStreamColumn.H:86
amrex::Real tau_per_layer
Definition: ERF_TwoStreamColumn.H:60
amrex::Real cloud_asymmetry_factor
Definition: ERF_TwoStreamColumn.H:71
amrex::Real calday
Definition: ERF_TwoStreamColumn.H:116
amrex::Real declin
Definition: ERF_TwoStreamColumn.H:117
amrex::Real lon_cons_rad
Definition: ERF_TwoStreamColumn.H:119
bool solar_dynamic
Definition: ERF_TwoStreamColumn.H:113
amrex::Real sw_cloud_g
Definition: ERF_TwoStreamColumn.H:103
amrex::Real lw_kabs_vapor
Definition: ERF_TwoStreamColumn.H:107
AerosolProfileType aerosol_profile_type
Definition: ERF_TwoStreamColumn.H:92
amrex::Real tau_sw_coeff_qv
Definition: ERF_TwoStreamColumn.H:81
amrex::Real asymmetry_factor
Definition: ERF_TwoStreamColumn.H:69
bool tau_lw_dynamic_enable
Definition: ERF_TwoStreamColumn.H:80
amrex::Real lw_kabs_dry
Definition: ERF_TwoStreamColumn.H:106
amrex::Real cloud_fraction_rh_min
Definition: ERF_TwoStreamColumn.H:87
A roof as the lower boundary of a column (erf.ibseb.two_stream_roofs): the column under a building st...
Definition: ERF_TwoStreamColumn.H:270
amrex::Real emissivity
Longwave emissivity of the roof [1].
Definition: ERF_TwoStreamColumn.H:273
amrex::Real albedo
Shortwave albedo of the roof, for the beam and for diffuse light [1].
Definition: ERF_TwoStreamColumn.H:272
amrex::Real lit
Share of the direct beam that reaches the roof: 0 where a taller building shades it [1].
Definition: ERF_TwoStreamColumn.H:275
int k_lower
First cell of the column above the roof (the roof is its lower interface)
Definition: ERF_TwoStreamColumn.H:271
amrex::Real temperature
Skin temperature of the roof [K].
Definition: ERF_TwoStreamColumn.H:274