Skip to content

Commit

Permalink
Merge pull request NGEET#433 from xuchongang/xuchongang/dense_forest_…
Browse files Browse the repository at this point in the history
…ready_to_merge

Add the option to initialize forest with canopy closure
  • Loading branch information
rgknox authored Oct 31, 2018
2 parents af76d76 + 84a50e4 commit 49535a8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
15 changes: 14 additions & 1 deletion main/EDInitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module EDInitMod
use EDTypesMod , only : nuMWaterMem
use EDTypesMod , only : maxpft
use EDTypesMod , only : AREA
use EDTypesMod , only : init_spread_near_bare_ground
use EDTypesMod , only : init_spread_inventory
use FatesInterfaceMod , only : bc_in_type
use FatesInterfaceMod , only : hlm_use_planthydro
use FatesInterfaceMod , only : hlm_use_inventory_init
Expand Down Expand Up @@ -224,7 +226,6 @@ subroutine set_site_properties( nsites, sites)
sites(s)%frac_burnt = 0.0_r8
sites(s)%old_stock = 0.0_r8

sites(s)%spread = 1.0_r8
end do

return
Expand Down Expand Up @@ -282,6 +283,13 @@ subroutine init_patches( nsites, sites, bc_in)

if ( hlm_use_inventory_init.eq.itrue ) then

! Initialize the site-level crown area spread factor (0-1)
! It is likely that closed canopy forest inventories
! have smaller spread factors than bare ground (they are crowded)
do s = 1, nsites
sites(s)%spread = init_spread_inventory
enddo

call initialize_sites_by_inventory(nsites,sites,bc_in)

do s = 1, nsites
Expand All @@ -296,6 +304,11 @@ subroutine init_patches( nsites, sites, bc_in)
!FIX(SPM,032414) clean this up...inits out of this loop
do s = 1, nsites

! Initialize the site-level crown area spread factor (0-1)
! It is likely that closed canopy forest inventories
! have smaller spread factors than bare ground (they are crowded)
sites(s)%spread = init_spread_near_bare_ground

allocate(newp)

newp%patchno = 1
Expand Down
16 changes: 15 additions & 1 deletion main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ module EDTypesMod
logical, parameter :: do_ed_phenology = .true.


! This is the community level amount of spread expected in nearly-bare-ground
! and inventory starting modes.
! These are used to initialize only. These values will scale between
! the PFT defined maximum and minimum crown area scaing parameters.
!
! A value of 1 indicates that
! plants should have crown areas at maximum spread for their size and PFT.
! A value of 0 means that they have the least amount of spread for their
! size and PFT.

real(r8), parameter :: init_spread_near_bare_ground = 1.0_r8
real(r8), parameter :: init_spread_inventory = 0.0_r8


! MODEL PARAMETERS
real(r8), parameter :: AREA = 10000.0_r8 ! Notional area of simulated forest m2
real(r8), parameter :: AREA_INV = 1.0e-4_r8 ! Inverse of the notion area (faster math)
Expand Down Expand Up @@ -132,7 +146,7 @@ module EDTypesMod
! special mode to cause PFTs to create seed mass of all currently-existing PFTs
logical, parameter :: homogenize_seed_pfts = .false.

!************************************
!************************************
!** COHORT type structure **
!************************************
type ed_cohort_type
Expand Down
6 changes: 3 additions & 3 deletions main/FatesInventoryInitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module FatesInventoryInitMod
use EDTypesMod , only : area
use EDPftvarcon , only : EDPftvarcon_inst


implicit none
private

Expand Down Expand Up @@ -931,10 +932,9 @@ subroutine set_inventory_edcohort_type1(csite,bc_in,css_file_unit,npatches, &
endif

! Since spread is a canopy level calculation, we need to provide an initial guess here.
site_spread = 0.5_r8
call create_cohort(csite, cpatch, c_pft, temp_cohort%n, temp_cohort%hite, temp_cohort%dbh, &
b_leaf, b_fineroot, b_sapwood, b_dead, b_store, &
temp_cohort%laimemory, cstatus, rstatus, temp_cohort%canopy_trim, 1, site_spread, bc_in)
b_leaf, b_fineroot, b_sapwood, b_dead, b_store, &
temp_cohort%laimemory, cstatus, rstatus, temp_cohort%canopy_trim, 1, csite%spread, bc_in)


deallocate(temp_cohort) ! get rid of temporary cohort
Expand Down

0 comments on commit 49535a8

Please sign in to comment.