OpBioGro: Optimization of dry biomass partitioning coefficients.

Description Usage Arguments Details Value Warning References See Also Examples

Description

Optimizes dry biomass partitioning coefficients using constrained optimization (see below).

Usage

1
2
3
4
5
6
7
  OpBioGro(phen = 1, iCoef = NULL, WetDat, data,
    day1 = NULL, dayn = NULL, timestep = 1, lat = 40,
    iRhizome = 7, irtl = 1e-04, canopyControl = list(),
    seneControl = list(), photoControl = list(),
    phenoControl = list(), soilControl = list(),
    nitroControl = list(), centuryControl = list(),
    op.method = c("optim", "nlminb"), verbose = FALSE, ...)

Arguments

phen

integer taking values 1 through 6 which indicate the phenological stage being optimized. If all of the phenological stages need to be optimized then use zero (0).

iCoef

initial vector of size 24 for the dry biomass partitioning coefficients.

WetDat

Weather data.

data

observed data.

day1

first day of the growing season.

dayn

last day of the growing season.

timestep

see BioGro

lat

see BioGro

iRhizome

see BioGro

irtl

see BioGro

canopyControl

see BioGro

seneControl

see BioGro

photoControl

see BioGro

phenoControl

see BioGro

soilControl

see BioGro

nitroControl

see BioGro

centuryControl

see BioGro

op.method

Optimization method. Whether to use optim or nlminb

verbose

Displays additional information, originally used for debugging.

...

additional arguments passed to optim or constrOptim.

Details

The optimization is done over the BioGro function. The OpBioGro function is a wrapper for optim and the constrOpBioGro is a wrapper for constrOptim.

Value

list of class OpBioGro with components

Warning

This function has not had enough testing.

References

no references yet.

See Also

BioGro constrOptim optim c4photo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 

data(weather05)

## Some coefficients
pheno.ll <- phenoParms(kLeaf1=0.48,kStem1=0.47,kRoot1=0.05,kRhizome1=-1e-4,
                       kLeaf2=0.14,kStem2=0.65,kRoot2=0.21, kRhizome2=-1e-4,
                       kLeaf3=0.01, kStem3=0.56, kRoot3=0.13, kRhizome3=0.3,
                       kLeaf4=0.01, kStem4=0.56, kRoot4=0.13, kRhizome4=0.3,
                       kLeaf5=0.01, kStem5=0.56, kRoot5=0.13, kRhizome5=0.3,
                       kLeaf6=0.01, kStem6=0.56, kRoot6=0.13, kRhizome6=0.3)

system.time(ans <- BioGro(weather05, phenoControl = pheno.ll))

ans.dat <- as.data.frame(unclass(ans)[1:11])
sel.rows <- seq(1,nrow(ans.dat),length.out=8)
simDat <- ans.dat[sel.rows,c('ThermalT','Stem','Leaf','Root','Rhizome','Grain','LAI')]
plot(ans,simDat)

## Residual sum of squares before the optimization

ans0 <- BioGro(weather05)
RssBioGro(simDat,ans0)

## This will optimize only the first phenological stage
idb <- valid_dbp(idbp(simDat))
op1 <- OpBioGro(phen=0, WetDat=weather05, data = simDat, iCoef=idb)
## or
cop1 <- constrOpBioGro(phen=0, WetDat=weather05, data = simDat)


## End(Not run)

serbinsh/biocro documentation built on May 29, 2019, 6:57 p.m.