File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments