You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current approach to estimating SOILWAT2 litter is looping over resource groups and adding up monthly litter with v->veg[k].litter[m] += vegTypeBiomass[k] * SXWResources->_prod_litter[g][m];
The problem with the current approach is that it adds the amount vegTypeBiomass[k] * SXWResources->_prod_litter[g][m] to litter for each resource group that is assigned to the vegetation type. Thus, litter of a vegetation type increases with each additional resource groups that is assigned to that vegetation type (even if that resource group currently has zero biomass). Even if a resource group has no biomass in a year, the mere assignment to a vegetation type causes that vegetation type to have additional litter.
For instance, the values for the example run are as follows for the first month of the first year for vegetation type k=4 "C3-grass"
With assigned resource groups g=5 "a.cool.grass" and g=6 "p.cool.grass" (default: "p.warm.grass" assigned to the new "C4-grass" type): litter[k=4][0] = 1.095 = 1.5 * 0.23 + 1.5 * 0.5 with vegTypeBiomass[k=4] = 1.5, _prod_litter[g=5][0] = 0.23, _prod_litter[g=6][0] = 0.5 (note that bmass[g=5] = 1.5 and bmass[g=6] = 0.)
With assigned resource groups g=5 "a.cool.grass", g=6 "p.cool.grass", and g=7 "p.warm.grass" (reverting to previous assignment groups): litter[k=4][0] = 1.845 = 1.5 * 0.23 + 1.5 * 0.5 + 1.5 * 0.5 with vegTypeBiomass[k=4] = 1.5, _prod_litter[g=5][0] = 0.23, _prod_litter[g=6][0] = 0.5 and _prod_litter[g=7][0] = 0.5 (note that bmass[g=5] = 1.5, bmass[g=6] = 0. and bmass[g=7] = 0.)
One option is to calculate litter components based on the resource group's biomass instead of the vegetation type's, i.e., v->veg[k].litter[m] += bmass[k] * SXWResources->_prod_litter[g][m];, then following the example from above
- (new veg types): litter[k=4][0] = 0.345 = 1.5 * 0.23 + 0 * 0.5
- (previous veg types): litter[k=4][0] = 0.345 = 1.5 * 0.23 + 0 * 0.5 + 0 * 0.5
Issue was identified with Update to SOILWAT2 v8.3.0 #586, see Update to SOILWAT2 v8.3.0 #586 (comment)
The current approach to estimating SOILWAT2 litter is looping over resource groups and adding up monthly litter with
v->veg[k].litter[m] += vegTypeBiomass[k] * SXWResources->_prod_litter[g][m];See
STEPWAT2/sxw_soilwat.c
Line 365 in 1a53494
This approach was implemented following Decouple monthly litter calculations from monthly biomass #447 which replaced
v->veg[k].litter[m] = v->veg[k].biomass[m] * SXWResources->_prod_litter[m];for good reasons.The problem with the current approach is that it adds the amount
vegTypeBiomass[k] * SXWResources->_prod_litter[g][m]to litter for each resource group that is assigned to the vegetation type. Thus, litter of a vegetation type increases with each additional resource groups that is assigned to that vegetation type (even if that resource group currently has zero biomass). Even if a resource group has no biomass in a year, the mere assignment to a vegetation type causes that vegetation type to have additional litter.For instance, the values for the example run are as follows for the first month of the first year for vegetation type k=4 "C3-grass"
litter[k=4][0] = 1.095 = 1.5 * 0.23 + 1.5 * 0.5withvegTypeBiomass[k=4] = 1.5,_prod_litter[g=5][0] = 0.23,_prod_litter[g=6][0] = 0.5(note thatbmass[g=5] = 1.5andbmass[g=6] = 0.)litter[k=4][0] = 1.845 = 1.5 * 0.23 + 1.5 * 0.5 + 1.5 * 0.5withvegTypeBiomass[k=4] = 1.5,_prod_litter[g=5][0] = 0.23,_prod_litter[g=6][0] = 0.5and_prod_litter[g=7][0] = 0.5(note thatbmass[g=5] = 1.5,bmass[g=6] = 0.andbmass[g=7] = 0.)One option is to calculate litter components based on the resource group's biomass instead of the vegetation type's, i.e.,
v->veg[k].litter[m] += bmass[k] * SXWResources->_prod_litter[g][m];, then following the example from above- (new veg types):
litter[k=4][0] = 0.345 = 1.5 * 0.23 + 0 * 0.5- (previous veg types):
litter[k=4][0] = 0.345 = 1.5 * 0.23 + 0 * 0.5 + 0 * 0.5