132 auto thl_sec = col.
thl_sec.array();
133 auto qw_sec = col.
qw_sec.array();
135 auto wthl_sec = col.
wthl_sec.array();
136 auto wqw_sec = col.
wqw_sec.array();
137 auto uw_sec = col.
uw_sec.array();
138 auto vw_sec = col.
vw_sec.array();
139 auto wtke_sec = col.
wtke_sec.array();
143 const auto tauu = col.
surf_tau_u.const_array();
144 const auto tauv = col.
surf_tau_v.const_array();
145 const auto pblh = col.
pblh.const_array();
147 const auto layout = col.
layout;
148 const Box col_box(IntVect(0,0,0), IntVect(layout.ncell - 1, 0, 0));
149 ParallelFor(col_box, [=] AMREX_GPU_DEVICE (
int ic,
int,
int) noexcept
151 const Real wthl_sfc = sflux(ic,0,0);
152 const Real wqw_sfc = lflux(ic,0,0);
153 const Real uw_sfc = tauu(ic,0,0);
154 const Real vw_sfc = tauv(ic,0,0);
155 const Real ustar2 = std::sqrt(uw_sfc * uw_sfc + vw_sfc * vw_sfc);
156 const Real convective_depth = amrex::max(0.0_rt, pblh(ic,0,0));
157 const Real wstar = (wthl_sfc > 0.0_rt)
161 std::sqrt(ustar2 + 0.3_rt * wstar * wstar));
162 const Real wthl_ratio = wthl_sfc / uf;
163 const Real wqw_ratio = wqw_sfc / uf;
164 const Real wtke_scale = amrex::max(std::sqrt(ustar2),
shoc_ufmin());
166 thl_sec(ic,0,0) = 0.72_rt * wthl_ratio * wthl_ratio;
167 qw_sec(ic,0,0) = 0.72_rt * wqw_ratio * wqw_ratio;
168 qwthl_sec(ic,0,0) = 0.36_rt * wthl_ratio * wqw_ratio;
169 wthl_sec(ic,0,0) = wthl_sfc;
170 wqw_sec(ic,0,0) = wqw_sfc;
171 uw_sec(ic,0,0) = uw_sfc;
172 vw_sec(ic,0,0) = vw_sfc;
173 wtke_sec(ic,0,0) = wtke_scale * wtke_scale * wtke_scale;
175 const int ktop = layout.nlev;
176 thl_sec(ic,ktop,0) = 0.0_rt;
177 qw_sec(ic,ktop,0) = 0.0_rt;
178 qwthl_sec(ic,ktop,0) = 0.0_rt;
179 wthl_sec(ic,layout.nlev,0) = 0.0_rt;
180 wqw_sec(ic,layout.nlev,0) = 0.0_rt;
181 uw_sec(ic,layout.nlev,0) = 0.0_rt;
182 vw_sec(ic,layout.nlev,0) = 0.0_rt;
183 wtke_sec(ic,layout.nlev,0) = 0.0_rt;
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:72
ParallelFor(fab_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_base_temp() noexcept
Definition: ERF_ShocMoments.cpp:14
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real shoc_ufmin() noexcept
Definition: ERF_ShocMoments.cpp:15
amrex::FArrayBox vw_sec
Definition: ERF_ShocTypes.H:125
amrex::FArrayBox surf_lat_flux
Definition: ERF_ShocTypes.H:147
amrex::FArrayBox wqw_sec
Definition: ERF_ShocTypes.H:123
amrex::FArrayBox uw_sec
Definition: ERF_ShocTypes.H:124
amrex::FArrayBox pblh
Definition: ERF_ShocTypes.H:100
amrex::FArrayBox surf_tau_v
Definition: ERF_ShocTypes.H:149
amrex::FArrayBox qw_sec
Definition: ERF_ShocTypes.H:120
ShocColumnLayout layout
Definition: ERF_ShocTypes.H:71
amrex::FArrayBox surf_sens_flux
Definition: ERF_ShocTypes.H:146
amrex::FArrayBox wtke_sec
Definition: ERF_ShocTypes.H:126
amrex::FArrayBox surf_tau_u
Definition: ERF_ShocTypes.H:148
amrex::FArrayBox wthl_sec
Definition: ERF_ShocTypes.H:122
amrex::FArrayBox thl_sec
Definition: ERF_ShocTypes.H:119
amrex::FArrayBox qwthl_sec
Definition: ERF_ShocTypes.H:121