253d0972 by Nathan Lighthart

Fix water stress calculation

- Add check for when pTransp is zero
1 parent e3b6f96f
......@@ -43,7 +43,11 @@ public class PlantGrowthStress {
public void execute() {
biomass_start = BioAct;
// calculate water stress
wstrs = 1 - ((aTransp + 0.000001) / (pTransp + 0.000001)); //original SWAT
if (pTransp > 0) {
wstrs = 1 - ((aTransp) / (pTransp));
} else {
wstrs = 0;
}
// calculate N stress
double phi_nit = 0;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!