@@ -514,7 +514,10 @@ void calc_carbon_allocation_fracs(control *c, fluxes *f, params *p, state *s,
514514 double min_leaf_alloc , adj , arg1 , arg2 , arg3 , arg4 , leaf2sa_target ,
515515 sap_cross_sec_area , lr_max , stress , mis_match , orig_af , orig_ar ,
516516 reduction , target_branch , coarse_root_target , left_over ,
517- total_alloc , leaf2sap ;
517+ total_alloc , leaf2sap , spare ;
518+
519+ /* this is obviously arbitary */
520+ double min_stem_alloc = 0.01 ;
518521
519522 if (c -> alloc_model == FIXED ){
520523 f -> alleaf = (p -> c_alloc_fmax + nitfac *
@@ -650,18 +653,16 @@ void calc_carbon_allocation_fracs(control *c, fluxes *f, params *p, state *s,
650653
651654
652655 if (mis_match > 1.0 ) {
653- /* reduce leaf allocation fraction */
654-
655- float spare ;
656- /* Root=Leaf biomass in balance, borrow from the stem to try
657- and alleviate this difference and move towards a
658- functional balance */
659- spare = 1.0 - f -> alleaf - f -> albranch - f -> alcroot - 0.02 ;
660-
656+ /* Root=Leaf biomass in out of balance, borrow from the stem to try
657+ and alleviate this difference and move towards a functional
658+ balance */
659+ spare = 1.0 - f -> alleaf - f -> albranch - f -> alcroot - min_stem_alloc ;
661660 adj = f -> alroot * mis_match ;
662-
663661 f -> alroot += MAX (p -> c_alloc_rmin , MIN (spare , adj ));
664662 } else if (mis_match < 1.0 ) {
663+ /* Root=Leaf biomass in out of balance, borrow from the root to try
664+ and alleviate this difference and move towards a functional
665+ balance */
665666 /* reduce root allocation */
666667 orig_ar = f -> alroot ;
667668 adj = f -> alroot * mis_match ;
@@ -672,7 +673,7 @@ void calc_carbon_allocation_fracs(control *c, fluxes *f, params *p, state *s,
672673
673674
674675 /* Ensure we don't end up with alloc fractions that make no
675- physical sense. In such a situation assume a bl */
676+ physical sense. */
676677 left_over = 1.0 - f -> alroot - f -> alleaf ;
677678 if (f -> albranch + f -> alcroot > left_over ) {
678679 if (float_eq (s -> croot , 0.0 )) {
0 commit comments