Skip to content

Commit

Permalink
simplify carea allometry wrap function to avoid redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
XiulinGao committed Jun 13, 2024
1 parent f7dd539 commit 812c7cc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions biogeochem/FatesAllometryMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ subroutine carea_allom(dbh,nplant,site_spread,ipft,crowndamage,c_area,inverse)
call carea_2pwr(dbh,site_spread,d2bl_p2,d2bl_ediff,d2ca_min,d2ca_max, &
crowndamage, c_area, do_inverse)
capped_allom = .false.
case(3)
case(3,5)
dbh_eff = min(dbh,dbh_maxh)
call carea_2pwr(dbh_eff,site_spread,d2bl_p2,d2bl_ediff,d2ca_min,d2ca_max, &
crowndamage, c_area, do_inverse)
Expand All @@ -547,11 +547,6 @@ subroutine carea_allom(dbh,nplant,site_spread,ipft,crowndamage,c_area,inverse)
call carea_3pwr(dbh_eff,height,ipft,dbh_maxh, site_spread,d2bl_p2, &
d2bl_ediff, d2ca_min,d2ca_max,crowndamage, c_area, do_inverse)
capped_allom = .true.
case(5)
dbh_eff = min(dbh,dbh_maxh)
call carea_2pwr(dbh_eff,site_spread,d2bl_p2,d2bl_ediff,d2ca_min,d2ca_max, &
crowndamage, c_area, do_inverse)
capped_allom = .true.
case DEFAULT
write(fates_log(),*) 'An undefined leaf allometry was specified: ', &
allom_lmode
Expand Down

0 comments on commit 812c7cc

Please sign in to comment.