From ac46e0fcc70fbad1069d9ca34fb6cdb17024e07a Mon Sep 17 00:00:00 2001 From: ckoven Date: Thu, 26 Jan 2017 21:45:49 -0800 Subject: [PATCH] added seed homogenization mode to prevent compettive exclusion --- .../clm/src/ED/biogeochem/EDPhysiologyMod.F90 | 41 ++++++++++++++++++- components/clm/src/ED/main/EDTypesMod.F90 | 3 ++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 b/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 index fccd8c0843..dbec515c9a 100755 --- a/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +++ b/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 @@ -641,6 +641,7 @@ subroutine seeds_in( currentSite, cp_pnt ) ! ! !USES: use EDTypesMod, only : AREA + use EDTypesMod, only : homogenize_seed_pfts ! ! !ARGUMENTS type(ed_site_type), intent(inout), target :: currentSite @@ -650,12 +651,48 @@ subroutine seeds_in( currentSite, cp_pnt ) type(ed_patch_type), pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort integer :: p + logical :: pft_present(numpft_ed) + real(r8) :: npfts_present !---------------------------------------------------------------------- currentPatch => cp_pnt currentPatch%seeds_in(:) = 0.0_r8 - + + if ( homogenize_seed_pfts ) then + ! special mode to remove intergenerational filters on PFT existence: each PFT seeds all PFTs + ! first loop over all patches and cohorts to see what and how many PFTs are present on this site + pft_present(:) = .false. + npfts_present = 0._r8 + currentPatch => currentSite%oldest_patch + do while(associated(currentPatch)) + currentCohort => currentPatch%tallest + do while (associated(currentCohort)) + p = currentCohort%pft + if (.not. pft_present(p)) then + pft_present(p) = .true. + npfts_present = npfts_present + 1._r8 + endif + currentCohort => currentCohort%shorter + enddo !cohort loop + currentPatch => currentPatch%younger + enddo ! patch loop + + ! now calculate the homogenized seed flux into each PFT pool + currentPatch => cp_pnt + currentCohort => currentPatch%tallest + do while (associated(currentCohort)) + do p = 1, numpft_ed + if (pft_present(p)) then + currentPatch%seeds_in(p) = currentPatch%seeds_in(p) + currentCohort%seed_prod * currentCohort%n / & + (currentPatch%area * npfts_present) + endif + end do + currentCohort => currentCohort%shorter + enddo !cohort loop + else + + ! normal case: each PFT seeds its own type currentCohort => currentPatch%tallest do while (associated(currentCohort)) p = currentCohort%pft @@ -663,6 +700,8 @@ subroutine seeds_in( currentSite, cp_pnt ) currentCohort => currentCohort%shorter enddo !cohort loop + endif + currentPatch => currentSite%oldest_patch do while(associated(currentPatch)) diff --git a/components/clm/src/ED/main/EDTypesMod.F90 b/components/clm/src/ED/main/EDTypesMod.F90 index d861559ce3..ff00f13030 100755 --- a/components/clm/src/ED/main/EDTypesMod.F90 +++ b/components/clm/src/ED/main/EDTypesMod.F90 @@ -76,6 +76,9 @@ module EDTypesMod character*4 yearchar + ! special mode to cause PFTs to create seed mass of all currently-existing PFTs + logical, parameter :: homogenize_seed_pfts = .true. + !the lower limit of the size classes of ED cohorts !0-10,10-20... integer, parameter :: nlevsclass_ed = 13 ! Number of dbh size classes for size structure analysis