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

Add two bioenergy crops (switchgrass and Miscanthus) #884

Merged
merged 68 commits into from
May 25, 2020
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ca9c1ab
add switchgrass and miscanthus
yanyanchengHydro Jan 11, 2020
cf476b4
add a parameter for cutting a certain fraction of crop leaf biomass a…
yanyanchengHydro Feb 24, 2020
da3b1a0
add a new biofuelc_harvest flux to store the cut fraction of crop car…
yanyanchengHydro Feb 24, 2020
32db241
add calculation for the new biofuelc_harvest flux
yanyanchengHydro Feb 24, 2020
526b28d
add a new biofueln_harvest flux to store the cut fraction of crop nit…
yanyanchengHydro Feb 24, 2020
c719862
cut a certain fraction of crop leaf biomass during offset period
yanyanchengHydro Feb 24, 2020
e30e87b
cut a certain fraction of crop leaf biomass during offset period
yanyanchengHydro Feb 24, 2020
7c3d10b
Delete CNPhenologyMod_cut_newFlux_newCutParam_N.F90
yanyanchengHydro Feb 24, 2020
bbe7037
add a new biofuelc_harvest flux to store the cut fraction of crop car…
yanyanchengHydro Mar 16, 2020
515ffe3
add a new biofueln_harvest flux to store the cut fraction of crop nit…
yanyanchengHydro Mar 16, 2020
0845638
cut a certain fraction of crop aboveground biomass during offset period
yanyanchengHydro Mar 16, 2020
6b75fcb
add calculation for the new biofuelc_to_cropprodc flux
yanyanchengHydro Mar 16, 2020
dbad63f
add calculation for biofuel product
yanyanchengHydro Mar 16, 2020
6582a3e
add calculation for biofuel product
yanyanchengHydro Mar 16, 2020
c499644
active pft ID for swithchgrass and miscanthus
yanyanchengHydro Mar 16, 2020
6ab1738
update leaf N and livestem N
yanyanchengHydro Mar 16, 2020
8e91a25
update leaf N and livestem N
yanyanchengHydro Mar 16, 2020
9825116
update CN balance check to include biofuel product pool
yanyanchengHydro Mar 16, 2020
dfd55db
Merge branch 'bioenergy_ctsm1.0.dev080' of github.com:yanyanchengHydr…
yanyanchengHydro Mar 16, 2020
39bdf9b
cut a certain fraction of crop aboveground biomass during offset period
yanyanchengHydro Mar 16, 2020
d2aad1f
add a parameter for cutting a certain fraction of crop aboveground bi…
yanyanchengHydro Mar 16, 2020
ce983ba
Fix restart routine for new bioenergy pool
billsacks Mar 16, 2020
3b3a330
Whitespace cleanup
billsacks Mar 16, 2020
c45206a
Remove unnecessary variable from associate
billsacks Mar 16, 2020
78da215
Bioenergy fluxes to product pools apply regardless of use_grainproduct
billsacks Mar 16, 2020
5beb9b1
Fix some indentation
billsacks Mar 17, 2020
e3e668c
Merge pull request #1 from billsacks/bioenergy_billsacks_fixes
yanyanchengHydro Mar 17, 2020
613e459
Merge branch 'bioenergy_ctsm1.0.dev080' of github.com:yanyanchengHydr…
yanyanchengHydro Mar 17, 2020
cefdaaa
fix indentation and remove unnecessary restart variables
yanyanchengHydro Mar 23, 2020
cd591c2
fix indentation
yanyanchengHydro Mar 23, 2020
c6f037a
move calculation of leafc_to_biofuelc to only for prognostic crops, c…
yanyanchengHydro Mar 23, 2020
39fcf07
remove unnecessary lines
yanyanchengHydro Mar 23, 2020
38ca1b3
fix indentation
yanyanchengHydro Mar 23, 2020
8e141ad
fix indentation
yanyanchengHydro Mar 23, 2020
0ec0288
fix indentation
yanyanchengHydro Mar 23, 2020
6e05416
add the biofuel_harvfrac parameter for cutting a certain fraction of …
yanyanchengHydro Mar 29, 2020
0bdea51
add leafc_to_biofuelc and livestemc_to_biofuelc fluxes
yanyanchengHydro Mar 29, 2020
69b0f94
add leafn_to_biofueln and livestemn_to_biofueln fluxes
yanyanchengHydro Mar 29, 2020
0e7aac4
cut a certain fraction of crop aboveground biomass during offset peri…
yanyanchengHydro Mar 29, 2020
e8aa3d6
move the harvested amounts into grain_to_cropprod pool at the radiati…
yanyanchengHydro Mar 29, 2020
93d88d3
remove variables for biofuel product
yanyanchengHydro Mar 29, 2020
0e31832
rm calculation for biofuel product
yanyanchengHydro Mar 29, 2020
4bc6598
rm CN balance check for biofuel_to_cropprod
yanyanchengHydro Mar 29, 2020
baa7066
add more document for biofuel_harvfrac
yanyanchengHydro Mar 30, 2020
5bf020b
fix identical
yanyanchengHydro Mar 30, 2020
9307d60
remove unrelevant comment
yanyanchengHydro Apr 1, 2020
e82d3f3
Merge branch 'master' into bioenergy_ctsm1.0.dev080
billsacks Apr 7, 2020
05cefc8
Merge pull request #2 from billsacks/bioenergy_ctsm1.0.dev080
yanyanchengHydro Apr 7, 2020
1bd02ba
Merge branch 'bioenergy_ctsm1.0.dev080' of github.com:yanyanchengHydr…
yanyanchengHydro Apr 7, 2020
03bf03d
add documents for changes relevant to bioenergy crops
yanyanchengHydro Apr 16, 2020
e5591e8
add documents for changes relevant to bioenergy crops
yanyanchengHydro Apr 16, 2020
52bd548
add documents for changes relevant to bioenergy crops
yanyanchengHydro Apr 16, 2020
9cc3609
update tech note
yanyanchengHydro Apr 25, 2020
d666d83
update tech note
yanyanchengHydro Apr 25, 2020
1ebabc4
Update doc/source/tech_note/Vegetation_Phenology_Turnover/CLM50_Tech_…
yanyanchengHydro May 9, 2020
9f73dfb
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
4f40771
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
7e31b64
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
9977b0a
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
5d2106f
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
26293d1
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
ed0489c
Update doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irri…
yanyanchengHydro May 9, 2020
d30cb5d
Update doc/source/tech_note/Introduction/CLM50_Tech_Note_Introduction…
yanyanchengHydro May 9, 2020
7c315ad
modify Vegetation_Phenology_Turnover
yanyanchengHydro May 9, 2020
f5f81e0
Merge branch 'bioenergy_ctsm1.0.dev080' of github.com:yanyanchengHydr…
yanyanchengHydro May 9, 2020
1df2dd5
update tech note
yanyanchengHydro May 10, 2020
6100ac1
update tech note
yanyanchengHydro May 11, 2020
99f1b6e
update tech note
yanyanchengHydro May 14, 2020
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
89 changes: 41 additions & 48 deletions src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2415,7 +2415,11 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
associate( &
ivt => patch%itype , & ! Input: [integer (:) ] patch vegetation type

leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)

! Y. Cheng, add a new cut fraction for harvest parameter for bioenergy crops (miscanthus and switchgrass)
harvfrac => pftcon%harvfrac , & ! Input: cut fraction for harvest (-)

lflitcn => pftcon%lflitcn , & ! Input: leaf litter C:N (gC/gN)
frootcn => pftcon%frootcn , & ! Input: fine root C:N (gC/gN)
graincn => pftcon%graincn , & ! Input: grain C:N (gC/gN)
Expand All @@ -2442,14 +2446,19 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
leafc_to_litter => cnveg_carbonflux_inst%leafc_to_litter_patch , & ! Output: [real(r8) (:) ] leaf C litterfall (gC/m2/s)
frootc_to_litter => cnveg_carbonflux_inst%frootc_to_litter_patch , & ! Output: [real(r8) (:) ] fine root C litterfall (gC/m2/s)
livestemc_to_litter => cnveg_carbonflux_inst%livestemc_to_litter_patch , & ! Output: [real(r8) (:) ] live stem C litterfall (gC/m2/s)
grainc_to_food => cnveg_carbonflux_inst%grainc_to_food_patch , & ! Output: [real(r8) (:) ] grain C to food (gC/m2/s)
grainc_to_food => cnveg_carbonflux_inst%grainc_to_food_patch , & ! Output: [real(r8) (:) ] grain C to food (gC/m2/s)

! Y. Cheng, put the cut fraction during offset period for bioenergy crops to this biofuelc_harvest flux
biofuelc_harvest => cnveg_carbonflux_inst%biofuelc_harvest_patch , & ! Output: [real(r8) (:) ] biofuel C that was cutted at harvest (gC/m2/s)

grainc_to_seed => cnveg_carbonflux_inst%grainc_to_seed_patch , & ! Output: [real(r8) (:) ] grain C to seed (gC/m2/s)
leafn => cnveg_nitrogenstate_inst%leafn_patch , & ! Input: [real(r8) (:) ] (gN/m2) leaf N
frootn => cnveg_nitrogenstate_inst%frootn_patch , & ! Input: [real(r8) (:) ] (gN/m2) fine root N

livestemn_to_litter => cnveg_nitrogenflux_inst%livestemn_to_litter_patch , & ! Output: [real(r8) (:) ] livestem N to litter (gN/m2/s)
grainn_to_food => cnveg_nitrogenflux_inst%grainn_to_food_patch , & ! Output: [real(r8) (:) ] grain N to food (gN/m2/s)
grainn_to_seed => cnveg_nitrogenflux_inst%grainn_to_seed_patch , & ! Output: [real(r8) (:) ] grain N to seed (gN/m2/s)
grainn_to_food => cnveg_nitrogenflux_inst%grainn_to_food_patch , & ! Output: [real(r8) (:) ] grain N to food (gN/m2/s)
biofueln_harvest => cnveg_nitrogenflux_inst%biofueln_harvest_patch , & ! Output: [real(r8) (:) ] biofuel N that was cutted (gC/m2/s)
grainn_to_seed => cnveg_nitrogenflux_inst%grainn_to_seed_patch , & ! Output: [real(r8) (:) ] grain N to seed (gN/m2/s)
leafn_to_litter => cnveg_nitrogenflux_inst%leafn_to_litter_patch , & ! Output: [real(r8) (:) ] leaf N litterfall (gN/m2/s)
leafn_to_retransn => cnveg_nitrogenflux_inst%leafn_to_retransn_patch , & ! Input: [real(r8) (:) ] leaf N to retranslocated N pool (gN/m2/s)
free_retransn_to_npool=> cnveg_nitrogenflux_inst%free_retransn_to_npool_patch , & ! Input: [real(r8) (:) ] free leaf N to retranslocated N pool (gN/m2/s)
Expand All @@ -2470,21 +2479,13 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &

if (offset_counter(p) == dt) then
t1 = 1.0_r8 / dt
!leafc_to_litter(p) = t1 * leafc(p) + cpool_to_leafc(p)
frootc_to_litter(p) = t1 * frootc(p) + cpool_to_frootc(p)

! Y. Cheng, cut 70% AGB for switchgrass and Miscanthus and move to grainc_to_food
if (ivt(p)==nmiscanthus .or. ivt(p)==nirrig_miscanthus .or. ivt(p)==nswitchgrass .or. ivt(p)==nirrig_switchgrass) then
leafc_to_litter(p) = t1 * leafc(p)*0.3 + cpool_to_leafc(p)
grainc_to_food(p) =grainc_to_food(p)+ t1 * leafc(p) * 0.7
grainn_to_food(p) =grainn_to_food(p)+ t1 * leafn(p) * 0.7

! leafc_to_litter(p) = (t1 * leafc(p) + cpool_to_leafc(p))*0.3
! grainc_to_food(p) =grainc_to_food(p)+ (t1 * leafc(p) + cpool_to_leafc(p))*0.7
! grainn_to_food(p) =grainn_to_food(p)+ t1 * leafn(p) * 0.7
else
leafc_to_litter(p) = t1 * leafc(p) + cpool_to_leafc(p)
end if
! Cut a certain fraction (i.e., harvfrac(ivt(p))) (e.g., harvfrac(ivt(p)=70% for bioenergy crops) of leafc for harvest
! and move this cut fration to the biofuelc_harvest flux, rather than move it to litter
leafc_to_litter(p) = t1 * leafc(p)*(1._r8-harvfrac(ivt(p))) + cpool_to_leafc(p)
biofuelc_harvest(p) = t1 * leafc(p) * harvfrac(ivt(p))
biofueln_harvest(p) = t1 * leafn(p) * harvfrac(ivt(p))
billsacks marked this conversation as resolved.
Show resolved Hide resolved
billsacks marked this conversation as resolved.
Show resolved Hide resolved

! this assumes that offset_counter == dt for crops
! if this were ever changed, we'd need to add code to the "else"
Expand All @@ -2496,17 +2497,10 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
grainc_to_seed(p) = t1 * min(-cropseedc_deficit(p), grainc(p))
grainn_to_seed(p) = t1 * min(-cropseedn_deficit(p), grainn(p))
! Send the remaining grain to the food product pool

! Y. Cheng, because I calculated grainc_to_food and grainn_to_food earlier
if (ivt(p)==nmiscanthus .or. ivt(p)==nirrig_miscanthus .or. ivt(p)==nswitchgrass .or. ivt(p)==nirrig_switchgrass) then
grainc_to_food(p) = grainc_to_food(p) + t1 * grainc(p) + cpool_to_grainc(p) - grainc_to_seed(p)
grainn_to_food(p) = grainn_to_food(p) + t1 * grainn(p) + npool_to_grainn(p) - grainn_to_seed(p)
else
grainc_to_food(p) = t1 * grainc(p) + cpool_to_grainc(p) - grainc_to_seed(p)
grainn_to_food(p) = t1 * grainn(p) + npool_to_grainn(p) - grainn_to_seed(p)
end if

livestemc_to_litter(p) = t1 * livestemc(p) + cpool_to_livestemc(p)
grainc_to_food(p) = t1 * grainc(p) + cpool_to_grainc(p) - grainc_to_seed(p)
grainn_to_food(p) = t1 * grainn(p) + npool_to_grainn(p) - grainn_to_seed(p)

livestemc_to_litter(p) = t1 * livestemc(p) + cpool_to_livestemc(p)
billsacks marked this conversation as resolved.
Show resolved Hide resolved
end if
else
t1 = dt * 2.0_r8 / (offset_counter(p) * offset_counter(p))
Expand Down Expand Up @@ -2594,18 +2588,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
! save the current litterfall fluxes
prev_leafc_to_litter(p) = leafc_to_litter(p)
prev_frootc_to_litter(p) = frootc_to_litter(p)


! Y. Cheng, cut 70% AGB for switchgrass and Miscanthus
if (offset_counter(p) == dt) then
if (ivt(p)==nmiscanthus .or. ivt(p)==nirrig_miscanthus .or. ivt(p)==nswitchgrass .or. ivt(p)==nirrig_switchgrass) then
grainc(p) = grainc(p) + leafc(p)*0.7
leafc(p) = leafc(p) * 0.3
grainn(p) = grainn(p) + leafn(p)*0.7
leafn(p) = leafn(p) * 0.3
end if
end if


end if ! end if offset period

end do ! end patch loop
Expand Down Expand Up @@ -2955,13 +2938,17 @@ subroutine CNLitterToColumn (bounds, num_soilc, filter_soilc, &
leafc_to_litter => cnveg_carbonflux_inst%leafc_to_litter_patch , & ! Input: [real(r8) (:) ] leaf C litterfall (gC/m2/s)
frootc_to_litter => cnveg_carbonflux_inst%frootc_to_litter_patch , & ! Input: [real(r8) (:) ] fine root N litterfall (gN/m2/s)
livestemc_to_litter => cnveg_carbonflux_inst%livestemc_to_litter_patch , & ! Input: [real(r8) (:) ] live stem C litterfall (gC/m2/s)
grainc_to_food => cnveg_carbonflux_inst%grainc_to_food_patch , & ! Input: [real(r8) (:) ] grain C to food (gC/m2/s)
grainc_to_food => cnveg_carbonflux_inst%grainc_to_food_patch , & ! Input: [real(r8) (:) ] grain C to food (gC/m2/s)

biofuelc_harvest => cnveg_carbonflux_inst%biofuelc_harvest_patch , & ! Input: [real(r8) (:) ] biofuel C (gC/m2/s)

phenology_c_to_litr_met_c => cnveg_carbonflux_inst%phenology_c_to_litr_met_c_col , & ! Output: [real(r8) (:,:) ] C fluxes associated with phenology (litterfall and crop) to litter metabolic pool (gC/m3/s)
phenology_c_to_litr_cel_c => cnveg_carbonflux_inst%phenology_c_to_litr_cel_c_col , & ! Output: [real(r8) (:,:) ] C fluxes associated with phenology (litterfall and crop) to litter cellulose pool (gC/m3/s)
phenology_c_to_litr_lig_c => cnveg_carbonflux_inst%phenology_c_to_litr_lig_c_col , & ! Output: [real(r8) (:,:) ] C fluxes associated with phenology (litterfall and crop) to litter lignin pool (gC/m3/s)

livestemn_to_litter => cnveg_nitrogenflux_inst%livestemn_to_litter_patch , & ! Input: [real(r8) (:) ] livestem N to litter (gN/m2/s)
grainn_to_food => cnveg_nitrogenflux_inst%grainn_to_food_patch , & ! Input: [real(r8) (:) ] grain N to food (gN/m2/s)
grainn_to_food => cnveg_nitrogenflux_inst%grainn_to_food_patch , & ! Input: [real(r8) (:) ] grain N to food (gN/m2/s)
biofueln_harvest => cnveg_nitrogenflux_inst%biofueln_harvest_patch , & ! Input: [real(r8) (:) ] biofuel N (gN/m2/s)
leafn_to_litter => cnveg_nitrogenflux_inst%leafn_to_litter_patch , & ! Input: [real(r8) (:) ] leaf N litterfall (gN/m2/s)
frootn_to_litter => cnveg_nitrogenflux_inst%frootn_to_litter_patch , & ! Input: [real(r8) (:) ] fine root N litterfall (gN/m2/s)
phenology_n_to_litr_met_n => cnveg_nitrogenflux_inst%phenology_n_to_litr_met_n_col , & ! Output: [real(r8) (:,:) ] N fluxes associated with phenology (litterfall and crop) to litter metabolic pool (gN/m3/s)
Expand Down Expand Up @@ -3035,19 +3022,25 @@ subroutine CNLitterToColumn (bounds, num_soilc, filter_soilc, &
if (.not. use_grainproduct) then
! grain litter carbon fluxes
phenology_c_to_litr_met_c(c,j) = phenology_c_to_litr_met_c(c,j) &
+ grainc_to_food(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainc_to_food(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofuelc_harvest(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel
phenology_c_to_litr_cel_c(c,j) = phenology_c_to_litr_cel_c(c,j) &
+ grainc_to_food(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainc_to_food(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofuelc_harvest(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel
phenology_c_to_litr_lig_c(c,j) = phenology_c_to_litr_lig_c(c,j) &
+ grainc_to_food(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainc_to_food(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofuelc_harvest(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel

! grain litter nitrogen fluxes
phenology_n_to_litr_met_n(c,j) = phenology_n_to_litr_met_n(c,j) &
+ grainn_to_food(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainn_to_food(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofueln_harvest(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel
phenology_n_to_litr_cel_n(c,j) = phenology_n_to_litr_cel_n(c,j) &
+ grainn_to_food(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainn_to_food(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofueln_harvest(p) * lf_fcel(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel
phenology_n_to_litr_lig_n(c,j) = phenology_n_to_litr_lig_n(c,j) &
+ grainn_to_food(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j)
+ grainn_to_food(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j) &
+ biofueln_harvest(p) * lf_flig(ivt(p)) * wtcol(p) * leaf_prof(p,j) ! biofuel
end if
billsacks marked this conversation as resolved.
Show resolved Hide resolved


Expand Down