Skip to content

Commit

Permalink
pulled crown area : dbh coefficient out of exponent parentheses, and …
Browse files Browse the repository at this point in the history
…changed the name of arealayer var in canopy_spread subroutine
  • Loading branch information
ckoven committed Oct 4, 2017
1 parent 6d34a0c commit 06e3c88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ subroutine canopy_spread( currentSite )
! !LOCAL VARIABLES:
type (ed_cohort_type), pointer :: currentCohort
type (ed_patch_type) , pointer :: currentPatch
real(r8) :: arealayer ! Amount of canopy in each layer.
real(r8) :: sitelevel_canopyarea ! Amount of canopy in top layer at the site level
real(r8) :: inc ! Arbitrary daily incremental change in canopy area
integer :: z
!----------------------------------------------------------------------
Expand All @@ -820,15 +820,15 @@ subroutine canopy_spread( currentSite )

currentPatch => currentSite%oldest_patch

arealayer = 0.0_r8
sitelevel_canopyarea = 0.0_r8
do while (associated(currentPatch))

!calculate canopy area in each patch...
currentCohort => currentPatch%tallest
do while (associated(currentCohort))
currentCohort%c_area = c_area(currentCohort)
if(EDPftvarcon_inst%woody(currentCohort%pft) .eq. 1 .and. currentCohort%canopy_layer .eq. 1 ) then
arealayer = arealayer + currentCohort%c_area
sitelevel_canopyarea = sitelevel_canopyarea + currentCohort%c_area
endif
currentCohort => currentCohort%shorter
enddo
Expand All @@ -838,7 +838,7 @@ subroutine canopy_spread( currentSite )
enddo !currentPatch

!If the canopy area is approaching closure, squash the tree canopies and make them taller and thinner
if( arealayer/AREA .gt. ED_val_canopy_closure_thresh ) then
if( sitelevel_canopyarea/AREA .gt. ED_val_canopy_closure_thresh ) then
currentSite%spread = currentSite%spread - inc
else
currentSite%spread = currentSite%spread + inc
Expand Down
2 changes: 1 addition & 1 deletion biogeochem/EDGrowthFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ real(r8) function c_area( cohort_in )
spreadterm = cohort_in%siteptr%spread * EDPftvarcon_inst%allom_d2ca_coefficient_max(cohort_in%pft) + &
(1._r8 - cohort_in%siteptr%spread) * EDPftvarcon_inst%allom_d2ca_coefficient_min(cohort_in%pft)
!
c_area = cohort_in%n * (spreadterm * dbh)**crown_area_to_dbh_exponent
c_area = cohort_in%n * spreadterm * dbh ** crown_area_to_dbh_exponent

end function c_area

Expand Down

0 comments on commit 06e3c88

Please sign in to comment.