Skip to content

Commit

Permalink
Merge pull request #377 from eagles-project/mjs/f/emissions_idx
Browse files Browse the repository at this point in the history
Fix else branch indexing in dust_emis()
  • Loading branch information
mjs271 authored Nov 19, 2024
2 parents fdbb081 + be231dd commit edaa167
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mam4xx/aero_model_emissions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ void dust_emis(
cflux[inum] = cflux[idx_dust] * dust_mass_to_num[ibin];
}
} else {
for (int i = 0; i < dust_nbin; ++i) {
cflux[dust_indices[i]] = 0.0;
cflux[i] = 0.0;
for (int ibin = 0; ibin < dust_nbin; ++ibin) {
const int idx_dust = dust_indices[ibin];
const int inum = dust_indices[ibin + dust_nbin];
cflux[idx_dust] = 0.0;
cflux[inum] = 0.0;
}
}
// // local version (unnecessary?) that's zero if less than the threshold
Expand Down

0 comments on commit edaa167

Please sign in to comment.