Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Land Use] C-based wood harvest #888

Merged
merged 27 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
420431f
Added C based logging in FATES. Passed validation.
sshu3 Mar 8, 2022
6725822
Updated minor corrections from fatesluc branch.
sshu3 Mar 10, 2022
d5bd304
Updated changes from parent branch "fatesluc".
sshu3 Mar 17, 2022
aaa1062
Merge branch 'fatesluc_cbasedhrv' into HEAD
sshu3 Mar 20, 2022
14c3002
Added historical outputs of secondary patches.
sshu3 Jun 16, 2022
67b9211
Pass NPP and AR to ELM for calculating NBP.
sshu3 Aug 2, 2022
ce81248
Removed hlm_harvest_bypass_criteria. Applied fix on global restart run.
sshu3 Sep 23, 2022
7827534
Merge branch 'master' into fatesluc_cbasedhrv_v2_merge
glemieux Sep 26, 2022
1fb5220
Remove "available_forest_c" and simplify the logic.
sshu3 Oct 26, 2022
ad337ea
Minor revisions on comments, temporary commit
sshu3 Oct 28, 2022
81ebf32
Minor revisions on comments and merged with master branch, temporary …
sshu3 Oct 28, 2022
91d4576
Patch up paralell disturbance and model phenology issue.
sshu3 Oct 31, 2022
bed5e40
Patch up some errors when merging with FATES API 24.
sshu3 Nov 1, 2022
422723e
Ignore small logging rate which would produce tiny secondary patch.
sshu3 Nov 4, 2022
fec6597
Clarify calculations and comments on the harvest debt.
sshu3 Nov 9, 2022
fe6b0ab
Merge branch 'fatesluc_nocomp' into fatesluc_cbasedhrv_v2
sshu3 Nov 10, 2022
b62fe84
Change back EDPatchDynamicsMod.F90 for sanity purpose.
sshu3 Nov 11, 2022
b35025e
Ignore small logging disturbance.
sshu3 Nov 24, 2022
68d96be
Merge tag 'sci.1.60.3_api.24.2.0' into fatesluc_cbasedhrv_v2
glemieux Dec 3, 2022
23ee93f
Create subroutine to encapsulate the calculation of harvest debt.
sshu3 Dec 20, 2022
f597756
Merge branch 'main' into fatesluc_cbasedhrv_v2
glemieux Jan 4, 2023
eb609b5
all_carbon to carbon12
rgknox Jan 6, 2023
56006f8
Merge pull request #3 from rgknox/fatesluc_cbasedhrv_v2-api25
sshu88 Jan 6, 2023
f1f855d
Update EDPatchDynamicsMod.F90
sshu88 Jan 18, 2023
e6772ad
Merge branch 'main' into fatesluc_cbasedhrv_v2
glemieux Jan 26, 2023
2504716
manually reinstate tveg history variable
glemieux Jan 26, 2023
d80ef20
add local variable initialization for get_harvest_debt
glemieux Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module EDCanopyStructureMod
use EDTypesMod , only : nclmax
use EDTypesMod , only : nlevleaf
use EDtypesMod , only : AREA
use EDLoggingMortalityMod , only : UpdateHarvestC
use FatesGlobals , only : endrun => fates_endrun
use FatesInterfaceTypesMod , only : hlm_days_per_year
use FatesInterfaceTypesMod , only : hlm_use_planthydro
Expand Down Expand Up @@ -1891,7 +1892,7 @@ end subroutine leaf_area_profile

! ======================================================================================

subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_in,bc_out)

! ----------------------------------------------------------------------------------
! The purpose of this routine is to package output boundary conditions related
Expand All @@ -1900,13 +1901,14 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)

use EDTypesMod , only : ed_patch_type, ed_cohort_type, &
ed_site_type, AREA
use FatesInterfaceTypesMod , only : bc_out_type
use FatesInterfaceTypesMod , only : bc_in_type, bc_out_type

!
! !ARGUMENTS
integer, intent(in) :: nsites
type(ed_site_type), intent(inout), target :: sites(nsites)
integer, intent(in) :: fcolumn(nsites)
type(bc_in_type), intent(inout) :: bc_in(nsites)
type(bc_out_type), intent(inout) :: bc_out(nsites)

! Locals
Expand Down Expand Up @@ -2110,6 +2112,9 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
call UpdateH2OVeg(sites(s),bc_out(s),bc_out(s)%plant_stored_h2o_si,1)
end if

! Pass FATES Harvested C to bc_out.
call UpdateHarvestC(sites(s),bc_in(s),bc_out(s))

end do

! This call to RecruitWaterStorage() makes an accounting of
Expand All @@ -2123,7 +2128,6 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
call RecruitWaterStorage(nsites,sites,bc_out)
end if


end subroutine update_hlm_dynamics

! =====================================================================================
Expand Down
412 changes: 386 additions & 26 deletions biogeochem/EDLoggingMortalityMod.F90

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ end subroutine mortality_rates

! ============================================================================

subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, frac_site_primary)
subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, frac_site_primary, &
harvestable_forest_c, available_forest_c, harvest_tag)

!
! !DESCRIPTION:
Expand All @@ -215,14 +216,17 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, frac_site_pr
! elsewhere).
!
! !USES:

use FatesInterfaceTypesMod, only : hlm_freq_day
!
! !ARGUMENTS
type(ed_site_type), intent(inout), target :: currentSite
type(ed_cohort_type),intent(inout), target :: currentCohort
type(bc_in_type), intent(in) :: bc_in
real(r8), intent(in) :: frac_site_primary
real(r8), intent(in) :: harvestable_forest_c(:)
real(r8), intent(in) :: available_forest_c(:)
integer, intent(inout) :: harvest_tag(:)

!
! !LOCAL VARIABLES:
real(r8) :: cmort ! starvation mortality rate (fraction per year)
Expand All @@ -233,6 +237,7 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, frac_site_pr
real(r8) :: asmort ! age dependent senescence mortality rate (fraction per year)
real(r8) :: dndt_logging ! Mortality rate (per day) associated with the a logging event
integer :: ipft ! local copy of the pft index

!----------------------------------------------------------------------

ipft = currentCohort%pft
Expand All @@ -250,10 +255,11 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, frac_site_pr
bc_in%hlm_harvest_units, &
currentCohort%patchptr%anthro_disturbance_label, &
currentCohort%patchptr%age_since_anthro_disturbance, &
frac_site_primary)
frac_site_primary, &
harvestable_forest_c, &
available_forest_c, &
harvest_tag)




if (currentCohort%canopy_layer > 1)then
! Include understory logging mortality rates not associated with disturbance
Expand Down
Loading