Skip to content

Commit

Permalink
Cuda fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
overfelt committed Aug 28, 2023
1 parent cd712b2 commit fe90c41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
7 changes: 4 additions & 3 deletions src/mam4xx/wet_dep.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,6 @@ class WetDeposition {
// block in subr wetdepa_v2
int mam_prevap_resusp_optcc = 0;

// change mode order as mmode_loop_aa loops in a different order
static constexpr int mode_order_change[4] = {0, 1, 3, 2};
};

const char *name() const { return "MAM4 Wet Deposition"; }
Expand Down Expand Up @@ -1264,6 +1262,9 @@ void WetDeposition::compute_tendencies(
const int nlev = config_.nlev;
static constexpr int gas_pcnst = 40;

// change mode order as mmode_loop_aa loops in a different order
static constexpr int mode_order_change[4] = {0, 1, 3, 2};

// 0 = no resuspension
// 130 = non-linear resuspension of aerosol mass based on scavenged aerosol
// mass 230 = non-linear resuspension of aerosol number based on raindrop
Expand Down Expand Up @@ -1372,7 +1373,7 @@ void WetDeposition::compute_tendencies(
// then aitken = 1,
// then pcarbon - 3,
// then coarse = 2
const int imode = Config::mode_order_change[mtmp];
const int imode = mode_order_change[mtmp];

// loop over interstitial (1) and cloud-borne (2) forms
// BSINGH (09/12/2014):Do cloudborne first for unified convection
Expand Down
10 changes: 0 additions & 10 deletions src/validation/wetdep/compute_tendencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ void test_compute_tendencies(std::unique_ptr<Ensemble> &ensemble) {
const int gas_pcnst = 40;
EKAT_ASSERT(input.get("dt") == 3600);

int mmtoo_prevap_resusp[gas_pcnst];
{
const int resusp[gas_pcnst] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 31, 33, 34, 32, 29,
30, 35, -2, 31, 34, 30, 35, -2, 29, 30,
31, 32, 33, 34, 35, -2, 33, 32, 35, -2};
for (int i = 0; i < gas_pcnst; ++i)
mmtoo_prevap_resusp[i] = resusp[i] - 1;
}

Atmosphere atmosphere = validation::create_atmosphere(nlev, pblh);
Surface surface = validation::create_surface();
mam4::Prognostics prognostics = validation::create_prognostics(nlev);
Expand Down

0 comments on commit fe90c41

Please sign in to comment.