Skip to content

Commit e0c6217

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 8f21016 + dafad15 commit e0c6217

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

model.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,13 +1180,16 @@ void model::runlsmodel()
11801180
LEpot = (dqsatdT * (Q - G) + rho * cp / ra * (qsat - q)) / (dqsatdT + cp / Lv);
11811181
LEref = (dqsatdT * (Q - G) + rho * cp / ra * (qsat - q)) / (dqsatdT + cp / Lv * (1. + rsmin / LAI / ra));
11821182

1183-
CG = pow(CGsat * (wsat / w2), b / (2. * log(10.)));
1183+
CG = CGsat * pow(wsat / w2, b / (2. * log(10.)));
11841184

11851185
Tsoiltend = CG * G - 2. * pi / 86400. * (Tsoil - T2);
11861186

11871187
d1 = 0.1;
1188-
C1 = pow(C1sat * (wsat / wg), b / 2. + 1.);
1189-
C2 = C2ref * (w2 / (wsat - w2));
1188+
1189+
C1 = C1sat * pow(wsat / wg, b/2. + 1.);
1190+
const double wsmall = 1e-3;
1191+
C2 = C2ref * (w2 / (wsat - w2 + wsmall));
1192+
11901193
wgeq = w2 - wsat * a * ( pow(w2 / wsat, p) * (1. - pow(w2 / wsat,8.*p)) );
11911194
wgtend = - C1 / (rhow * d1) * LEsoil / Lv - C2 / 86400. * (wg - wgeq);
11921195
}

0 commit comments

Comments
 (0)