56 auto ncol = size(daytime_fluxes.bnd_flux_up, 1);
57 auto nlev = size(daytime_fluxes.bnd_flux_up, 2);
58 auto nbnds = size(daytime_fluxes.bnd_flux_up, 3);
60 int1d nday_1d(
"nday_1d", 1),nday_host(
"nday_host",1);
61 yakl::memset(nday_1d, 0);
62 parallel_for(SimpleBounds<1>(ncol), YAKL_LAMBDA (
int icol)
64 if (day_indices(icol) > 0) nday_1d(1)++;
68 nday_1d.deep_copy_to(nday_host);
69 auto nday = nday_host(1);
70 AMREX_ASSERT_WITH_MESSAGE((nday>0) && (nday<=ncol),
"RADIATION: Invalid number of days!");
71 parallel_for(SimpleBounds<3>(nday, nlev, nbnds), YAKL_LAMBDA (
int iday,
int ilev,
int ibnd)
74 auto icol = day_indices(iday);
77 expanded_fluxes.flux_up(icol,ilev) = daytime_fluxes.flux_up(iday,ilev);
78 expanded_fluxes.flux_dn(icol,ilev) = daytime_fluxes.flux_dn(iday,ilev);
79 expanded_fluxes.flux_net(icol,ilev) = daytime_fluxes.flux_net(iday,ilev);
80 expanded_fluxes.flux_dn_dir(icol,ilev) = daytime_fluxes.flux_dn_dir(iday,ilev);
83 expanded_fluxes.bnd_flux_up(icol,ilev,ibnd) = daytime_fluxes.bnd_flux_up(iday,ilev,ibnd);
84 expanded_fluxes.bnd_flux_dn(icol,ilev,ibnd) = daytime_fluxes.bnd_flux_dn(iday,ilev,ibnd);
85 expanded_fluxes.bnd_flux_net(icol,ilev,ibnd) = daytime_fluxes.bnd_flux_net(iday,ilev,ibnd);
86 expanded_fluxes.bnd_flux_dn_dir(icol,ilev,ibnd) = daytime_fluxes.bnd_flux_dn_dir(iday,ilev,ibnd);