Skip to content

Commit

Permalink
Fix logic related to evaporation. This dramatically improved behavior…
Browse files Browse the repository at this point in the history
… of the bubble case. (#1489)
  • Loading branch information
AMLattanzi authored Mar 12, 2024
1 parent 58b9b8e commit 5723229
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Source/Microphysics/SAM/Precip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,11 @@ void SAM::Precip () {
erf_qsatw(tabs_array(i,j,k),pres_array(i,j,k),qsatw);
erf_qsati(tabs_array(i,j,k),pres_array(i,j,k),qsati);
qsat = qsatw * omn + qsati * (1.0-omn);
if((qp_array(i,j,k) > qp_threshold) && (qv_array(i,j,k) < qsat)) {
if((qp_array(i,j,k) > 0.0) && (qv_array(i,j,k) < qsat)) {

if(omp > 0.001) {
dqpr = evapr1_t(k)*sqrt(qpr) + evapr2_t(k)*pow(qpr,powr2);
}
if(omp < 0.999 && omg < 0.999) {
dqps = evaps1_t(k)*sqrt(qps) + evaps2_t(k)*pow(qps,pows2);
}
if(omp < 0.999 && omg > 0.001) {
dqpg = evapg1_t(k)*sqrt(qpg) + evapg2_t(k)*pow(qpg,powg2);
}
dqpr = evapr1_t(k)*sqrt(qpr) + evapr2_t(k)*pow(qpr,powr2);
dqps = evaps1_t(k)*sqrt(qps) + evaps2_t(k)*pow(qps,pows2);
dqpg = evapg1_t(k)*sqrt(qpg) + evapg2_t(k)*pow(qpg,powg2);

// NOTE: This is always a sink for precipitating comps
// since qv<qsat and thus (qv/qsat-1)<0. If we are
Expand Down

0 comments on commit 5723229

Please sign in to comment.