Skip to content

Commit bdd65f9

Browse files
author
kerim aydin
committed
biomass index was off by 1 on R side
1 parent 51d8a35 commit bdd65f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

R/ecosim.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ rsim.run <- function(Rsim.scenario, method = 'RK4', years = 1:100, spname = NULL
183183
"FoodLoss", "UnAssimLoss", "ActiveRespLoss",
184184
"MzeroLoss", "FishingLoss", "DetritalLoss", "MigrateLoss")
185185
# Divide rates by biomass, with offset of 1 for beginning of timestep biomass not end of timestep
186-
StartBio <- c(as.numeric(scene$start_state$Biomass[sp.num]), head(rout$out_Biomass[,sp.num],-1))
186+
StartBio <- c(as.numeric(scene$start_state$Biomass[sp.num+1]), head(rout$out_Biomass[,sp.num+1],-1))
187187
rout$out_species_rates <- cbind(StartBio, rout$out_species_rates[,1:10]/StartBio)
188188
#rout$out_species_rates[,1:10] <- rout$out_species_rates[,1:10]/rout$out_species_rates$biomass
189189

0 commit comments

Comments
 (0)