Skip to content

Commit

Permalink
Increase mortality count only if relsize has become zero due to fire (#…
Browse files Browse the repository at this point in the history
…345)

- close #345
  • Loading branch information
dschlaep committed Jul 10, 2019
1 parent 35f66d1 commit cd3fd93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ST_indivs.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ void indiv_proportion_Kill(IndivType *ndv, int killType, RealF proportKilled)
// insertIndivKill(ndv->id, killType);

//kill indiv Proportionally or adjust their real size irrespective of being annual or perennial, both will have this effect
species_Update_Kills(ndv->myspecies, ndv->age);
// saving killing year real size here that is going to use for calculating next year proportional recovery
ndv->prv_yr_relsize = ndv->relsize;

Expand All @@ -238,6 +237,8 @@ void indiv_proportion_Kill(IndivType *ndv, int killType, RealF proportKilled)
if (ZERO(ndv->relsize) || LT(ndv->relsize, 0.0))
{
ndv->relsize =0.0;
// increase mortality count only if relsize has become zero due to fire
species_Update_Kills(ndv->myspecies, ndv->age);
}

#undef xF_DELTA
Expand Down

0 comments on commit cd3fd93

Please sign in to comment.