Rev 169 | Rev 180 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 169 | Rev 170 | ||
---|---|---|---|
Line 526... | Line 526... | ||
526 | if (mFoliageMass<0.) mFoliageMass=0.; // limit to zero |
526 | if (mFoliageMass<0.) mFoliageMass=0.; // limit to zero |
527 | 527 | ||
528 | mLeafArea = mFoliageMass * species()->specificLeafArea(); // update leaf area |
528 | mLeafArea = mFoliageMass * species()->specificLeafArea(); // update leaf area |
529 | 529 | ||
530 | // stress index
|
530 | // stress index
|
531 | d.stress_index =qMax(1. - (npp-reserve_size) / |
531 | d.stress_index =qMax(1. - (npp-reserve_size) / foliage_mass_allo, 0.); |
532 | 532 | ||
533 | // Woody compartments
|
533 | // Woody compartments
|
534 | // (1) transfer to reserve pool
|
534 | // (1) transfer to reserve pool
|
535 | double gross_woody = apct_wood * npp; |
535 | double gross_woody = apct_wood * npp; |
536 | double to_reserve = qMin(reserve_size, gross_woody); |
536 | double to_reserve = qMin(reserve_size, gross_woody); |
Line 656... | Line 656... | ||
656 | // death if leaf area is 0
|
656 | // death if leaf area is 0
|
657 | if (mFoliageMass<0.00001) |
657 | if (mFoliageMass<0.00001) |
658 | die(); |
658 | die(); |
659 | 659 | ||
660 | double p_death, p_stress; |
660 | double p_death, p_stress; |
661 |
|
661 | p_stress = d.stress_index * species()->deathProb_stress(); |
662 |
|
662 | //if (d.stress_index>0)
|
663 |
|
663 | // p_stress = species()->deathProb_stress();
|
664 | p_death = species()->deathProb_intrinsic() + p_stress; |
664 | p_death = species()->deathProb_intrinsic() + p_stress; |
665 | double p = random(); //0..1 |
665 | double p = random(); //0..1 |
666 | if (p<p_death) { |
666 | if (p<p_death) { |
667 | // die...
|
667 | // die...
|
668 | die(); |
668 | die(); |