-
Notifications
You must be signed in to change notification settings - Fork 92
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sshu88 for this, I think it is a great addition! I have a bunch of comments and questions, mostly I am trying to wrap my head around these changes.
biogeochem/EDLoggingMortalityMod.F90
Outdated
! ! transfer factor from kg biomass (dry matter) to kg carbon | ||
! ! now we applied a simple fraction of 50% based on the IPCC | ||
! ! guideline | ||
! real(r8), parameter :: carbon_per_kg_biomass = 0.5_r8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this lines since they are no longer used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove.
biogeochem/EDLoggingMortalityMod.F90
Outdated
harvestable_forest_c, available_forest_c | ||
end if | ||
!write(fates_log(),*) 'HLM harvest carbon data not implemented yet. Exiting.' | ||
!call endrun(msg=errMsg(sourcefile, __LINE__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete above two lines since it is now working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
biogeochem/EDLoggingMortalityMod.F90
Outdated
harvest_rate = 0._r8 | ||
harvest_rate_c = 0._r8 | ||
harvest_rate_supply = 0._r8 | ||
harvest_tag = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
harvest_tag = 2 | |
harvest_tag(:) = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial value for this tag shall be 1 since we removed the logics to account for available_forest_c. Will change.
biogeochem/EDLoggingMortalityMod.F90
Outdated
real(r8) :: harvest_rate_c ! Temporary variable | ||
real(r8) :: harvest_rate_supply ! Temporary variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the units of the above two variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kgC site-1. Will add.
biogeochem/EDLoggingMortalityMod.F90
Outdated
real(r8), intent(in) :: harvestable_forest_c(:) ! site level forest c matching criteria available for harvest | ||
real(r8), intent(out) :: harvest_rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are units for these two variables? one is a carbon stock and one is an areal rate of harvest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Will add.
biogeochem/EDLoggingMortalityMod.F90
Outdated
do h_index = 1,hlm_num_lu_harvest_cats | ||
if (patch_anthro_disturbance_label .eq. primaryforest) then | ||
if(hlm_harvest_catnames(h_index) .eq. "HARVEST_VH1") then! .or. & | ||
! hlm_harvest_catnames(h_index) .eq. "HARVEST_VH2") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again curious why not using HARVEST_VH2
here?
biogeochem/EDLoggingMortalityMod.F90
Outdated
do h_index = 1,hlm_num_lu_harvest_cats | ||
if (patch_anthro_disturbance_label .eq. primaryforest) then | ||
if(hlm_harvest_catnames(h_index) .eq. "HARVEST_VH1") then! .or. & | ||
! hlm_harvest_catnames(h_index) .eq. "HARVEST_VH2") then | ||
harvest_rate_c = harvest_rate_c + hlm_harvest_rates(h_index) | ||
! Determine the total supply of available C for harvest | ||
if(harvestable_forest_c(h_index) >= harvest_rate_c) then | ||
harvest_rate_supply = harvest_rate_supply + harvestable_forest_c(h_index) | ||
harvest_tag(h_index) = 0 | ||
else | ||
harvest_tag(h_index) = 1 | ||
end if | ||
endif | ||
else if (patch_anthro_disturbance_label .eq. secondaryforest .and. & | ||
secondary_age >= secondary_age_threshold) then | ||
if(hlm_harvest_catnames(h_index) .eq. "HARVEST_SH1") then | ||
harvest_rate_c = harvest_rate_c + hlm_harvest_rates(h_index) | ||
if(harvestable_forest_c(h_index) >= harvest_rate_c) then | ||
harvest_rate_supply = harvest_rate_supply + harvestable_forest_c(h_index) | ||
harvest_tag(h_index) = 0 | ||
else | ||
harvest_tag(h_index) = 1 | ||
end if | ||
endif | ||
else if (patch_anthro_disturbance_label .eq. secondaryforest .and. & | ||
secondary_age < secondary_age_threshold) then | ||
if(hlm_harvest_catnames(h_index) .eq. "HARVEST_SH2") then! .or. & | ||
! hlm_harvest_catnames(h_index) .eq. "HARVEST_SH3") then | ||
harvest_rate_c = harvest_rate_c + hlm_harvest_rates(h_index) | ||
if(harvestable_forest_c(h_index) >= harvest_rate_c) then | ||
harvest_rate_supply = harvest_rate_supply + harvestable_forest_c(h_index) | ||
harvest_tag(h_index) = 0 | ||
else | ||
harvest_tag(h_index) = 1 | ||
end if | ||
endif | ||
endif | ||
end do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the logic here of adding each category ofhlm_harvest_rates(:)
to the harvest_rate_c
as you go through the loop, it seems like it should be only using the hlm_harvest_rates(:)
indexed for each category within each patch type comparison? I'm also unclear about the time normalization between hlm_harvest_rates(:)
which is a rate and harvestable_forest_c(:)
which is a stock? Is there meant to be an implicit annualization in that comparison? If so, should it be made explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for now. But since I will include non-forest harvest into the harvest rate, we now need these 3 categories to be separated.
hlm_harvest_rates
is in the unit of kgC site-1 yr-1 and harvestable_forest_c
is in the unit of kgC site -1. Thus the calculation here will get an annual harvest_rate
in the unit of area fraction yr-1, by assuming the carbon fraction to be equivalent to the area fraction. I will add comments on these variables.
biogeochem/EDLoggingMortalityMod.F90
Outdated
! under two different scenarios: | ||
! harvestable carbon: aggregate all cohorts matching the dbhmin harvest criteria | ||
! available carbon: aggregate all cohorts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this 'available' vs 'harvestable' carbon logic still used? I think it isn't so suggest changing the description.
! under two different scenarios: | |
! harvestable carbon: aggregate all cohorts matching the dbhmin harvest criteria | |
! available carbon: aggregate all cohorts | |
! according to the the dbhmin harvest criteria |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I forgot changing some of the comment here. Thank you for double checking.
Hi @glemieux, I found a lot of differences in |
Thanks for checking @sshu88. I haven't merged in the latest fates master commits into this branch. Please feel free to push the merge with deconflicts to your branch or let me know if you'd like support with deconflicting the merge. |
Hi @glemieux. I did a manual |
Apologies for the delayed response @sshu88. Just to clarify: would it be helpful for me to help deconflict your branch? |
@sshu88 is EDLoggingMortalityMod.F90 still an appropriate name for this file in your opinion? Is this file handling a broader number of things than identifying mortality rates and mass fluxes from logging? |
New subroutines transferred the harvest rate from carbon amount to disturbance rate, so I think the file name is still appropriate. |
deallocate(this%variables(i_var)%burned) | ||
deallocate(this%variables(i_var)%damaged) | ||
end do | ||
if(allocated(this%variables)) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sshu88 , did you encounter problems without this check? All cohorts should have a PRT allocation, if there is not, than there is a bigger problem in our logic flow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only once on Cori when running global version. I added this check and model passed. But the model branch I used on other machine (e.g., lawrencium) does not have this check and no issue is found.
I ran the ctsm-based fates suite of tests with the current version of the code against the |
Thanks for doing this testing, @glemieux. What do we need to do on the CTSM side to support this PR? Is there a parallel issue / PR than needs to be made for CTSM? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change needed to bring get_harvestable_carbon
up to date with API25.
all_carbon to carbon12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few minor questions.
I tested this against |
This pull request contains modification in E3SM corresponding to another FATES NGEET/fates#888. In detail, the necessary input to enable FATES C-based harvest from ELM is passed to FATES through bc_in. Output from FATES used to calculate land use emission and net biosphere productivity is passed to ELM through bc_out. [non-B4B] (FATES tests only)
This pull request contains modification in E3SM corresponding to another FATES NGEET/fates#888. In detail, the necessary input to enable FATES C-based harvest from ELM is passed to FATES through bc_in. Output from FATES used to calculate land use emission and net biosphere productivity is passed to ELM through bc_out. [non-B4B] (FATES tests only)
Added C-based harvest as another option (wood_harvest_units = 2) in FATES.
Description:
See issue #869
Corresponding E3SM PR: E3SM-Project/E3SM#5106
Collaborators:
@jenniferholm @aldivi @ckoven @rgknox @glemieux
Expectation of Answer Changes:
Checklist:
Test Results:
CTSM (or) E3SM (specify which) test hash-tag: E3SM - 4f9ce69d2
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag: FATES - aaa1062
Test Output:
See issue #869