Skip to content

Commit facb187

Browse files
committed
save
1 parent 5802a51 commit facb187

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,13 @@ void MAMMicrophysics::run_impl(const double dt) {
12511251
dflx_col // deposition flux [1/cm^2/s]
12521252
);
12531253
});
1254+
// Update constituent fluxes with gas drydep fluxes (dflx)
1255+
// FIXME: Possible units mismatch (dflx is in kg/cm2/s but
1256+
// constituent_fluxes is kg/m2/s) (Following mimics Fortran code
1257+
// behavior but we should look into it)
1258+
Kokkos::parallel_for(Kokkos::TeamVectorRange(team, offset_aerosol, pcnst), [&](int ispc) {
1259+
constituent_fluxes(icol, ispc) -= dflx_col[ispc - offset_aerosol];
1260+
});
12541261
});
12551262

12561263
// Store mixing ratios before gas chemistry changes the mixing ratios
@@ -1597,6 +1604,7 @@ void MAMMicrophysics::run_impl(const double dt) {
15971604
});
15981605

15991606
#endif
1607+
#if 0
16001608
Kokkos::parallel_for(
16011609
"MAMMicrophysics::run_impl", policy,
16021610
KOKKOS_LAMBDA(const ThreadTeam &team) {
@@ -1758,6 +1766,7 @@ void MAMMicrophysics::run_impl(const double dt) {
17581766
constituent_fluxes(icol, ispc) -= dflx_col[ispc - offset_aerosol];
17591767
});
17601768
}); // parallel_for for the column loop
1769+
#endif
17611770
Kokkos::fence();
17621771

17631772
auto extfrc_fm = get_field_out("mam4_external_forcing").get_view<Real***>();
@@ -1783,7 +1792,7 @@ void MAMMicrophysics::run_impl(const double dt) {
17831792
const Real molar_mass_g_per_mol = molar_mass_g_per_mol_tmp[pcnst_idx]; // g/mol
17841793
// Modify units to MKS units: [molec/cm3/s] to [kg/m3/s]
17851794
// Convert g → kg (× 1e-3), cm³ → m³ (× 1e6) → total factor: 1e-3 × 1e6 = 1e3 = 1000.0
1786-
extfrc_fm(i,j,k) = extfrc(i,k,j) * (molar_mass_g_per_mol / Avogadro) * 1000.0;
1795+
extfrc_fm(i,j,k) = extfrc_test(i,k,j) * (molar_mass_g_per_mol / Avogadro) * 1000.0;
17871796
});
17881797

17891798
#if 0

externals/mam4xx

Submodule mam4xx updated 79 files

0 commit comments

Comments
 (0)