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

no carbon storage across years for annual grasses in BioCro #2496

Merged
merged 7 commits into from
Jun 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ For more information about this file see also [Keep a Changelog](http://keepacha
## [Unreleased]

### Fixed
- Use initial biomass pools for Sorghum and Setaria #2495, #2496
- Invalid .zenodo.json that broke automatic archiving on Zenodo ([b56ef53](https://github.com/PecanProject/pecan/commit/b56ef53888d73904c893b9e8c8cfaeedd7b1edbe))
- Fixed a filehandle leak in multi-year runs of PEcAn.BIOCRO::met2model.BIOCRO: It was only closing the last input file it processed (#2485).
- Fix issue with cruncep download: use netcdf subset (ncss) method instead of opendap (#2424).
Expand Down
21 changes: 9 additions & 12 deletions models/biocro/R/call_biocro.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ call_biocro_0.9 <- function(WetDat, genus, year_in_run,
coppice.interval = 1 # i.e. harvest every year
}

if (genus == "Saccharum") {
if (genus == "Saccharum") {
#probably should be handled like coppice shrubs or perennial grasses
tmp.result <- BioCro::caneGro(
WetDat = WetDat,
lat = lat,
soilControl = l2n(config$pft$soilControl))
# Addin Rhizome an Grain to avoid error in subsequent script processing results
# Addin Rhizome and Grain to avoid error in subsequent script processing results
tmp.result$Rhizome <- 0
tmp.result$Grain <- 0
} else if (genus %in% c("Salix", "Populus")) {
} else if (genus %in% c("Salix", "Populus")) {#coppice trees / shrubs
if (year_in_run == 1) {
iplant <- config$pft$iPlantControl
} else {
Expand Down Expand Up @@ -87,7 +88,7 @@ call_biocro_0.9 <- function(WetDat, genus, year_in_run,
seneControl = l2n(config$pft$seneControl),
photoControl = l2n(config$pft$photoParms))

} else if (genus %in% c("Miscanthus", "Panicum")) {
} else if (genus %in% c("Miscanthus", "Panicum")) {#perennial grasses
if (year_in_run == 1) {
iRhizome <- config$pft$iPlantControl$iRhizome
} else {
Expand All @@ -106,14 +107,10 @@ call_biocro_0.9 <- function(WetDat, genus, year_in_run,
iRhizome = as.numeric(iRhizome),
photoControl = config$pft$photoParms)

} else if (genus %in% c("Sorghum", "Setaria")) {
if (year_in_run == 1) {
iplant <- config$pft$iPlantControl
} else {
iplant$iRhizome <- data.table::last(tmp.result$Rhizome)
iplant$iRoot <- data.table::last(tmp.result$Root)
iplant$iStem <- data.table::last(tmp.result$Stem)
}
} else if (genus %in% c("Sorghum", "Setaria")) { #annual grasses
# Perennial Sorghum exists but is not a major crop
# https://landinstitute.org/our-work/perennial-crops/perennial-sorghum/
dlebauer marked this conversation as resolved.
Show resolved Hide resolved
iplant <- config$pft$iPlantControl
## run BioGro
tmp.result <- BioCro::BioGro(
WetDat = WetDat,
Expand Down