Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions components/eamxx/src/physics/shoc/impl/shoc_assumed_pdf_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ void Functions<S,D>::shoc_assumed_pdf(
// Compute SGS cloud fraction
shoc_cldfrac(k) = ekat::min(1, a*C1 + (1 - a)*C2);

// Compute cond and evap tendencies
if (extra_diags) {
auto dum = ekat::max(0, a * ql1 + (1 - a) * ql2);
shoc_cond(k) = ekat::max(0, (dum - shoc_ql(k)) / dtime);
shoc_evap(k) = ekat::max(0, (shoc_ql(k) - dum) / dtime);
}

// Compute SGS liquid water mixing ratio
shoc_assumed_pdf_compute_sgs_liquid(a, ql1, ql2, shoc_ql(k));

Expand All @@ -246,13 +253,6 @@ void Functions<S,D>::shoc_assumed_pdf(
s2, ql2, C2, std_s2, shoc_ql(k),
shoc_ql2(k));

// Compute cond and evap tendencies
if (extra_diags) {
auto dum = ekat::max(0, a * ql1 + (1 - a) * ql2);
shoc_cond(k) = ekat::max(0, (dum - shoc_ql(k)) / dtime);
shoc_evap(k) = ekat::max(0, (shoc_ql(k) - dum) / dtime);
}

// Compute liquid water flux
shoc_assumed_pdf_compute_liquid_water_flux(a, w1_1, w_first, ql1, w1_2, ql2, wqls(k));

Expand Down
Loading