Adjust LPJ-GUESS state variables based on input parameters.

update_state_LPJGUESS(
  model.state,
  pft.params,
  dens.initial,
  dens.target,
  AbvGrndWood.initial,
  AbvGrndWood.target,
  AbvGrndWood.epsilon,
  trace,
  min.diam,
  HEIGHT_MAX = 150
)

Arguments

model.state

A large multiply-nested list containing the entire LPJ-GUESS state as read by function readStateBinary.LPJGUESS

pft.params

A data.frame containing the parameters for each PFT. Each row represents one PFT (ordering must be consistent with the vectors below. The names of the columns describe the per-PFT parameter and must include: wooddens, crownarea_max, lifeform (1 = tree, 2 = grass), k_latosa, k_rp, k_allom1, k_allom2, k_allom3, crownarea_max and sla. wooddens, crownarea_max, lifeform (1 = tree, 2 = grass), k_latosa, k_rp, k_allom1, k_allom2, k_allom3, crownarea_max and sla.

dens.initial

A numeric vector of the initial stand-level stem densities (indiv/m^2) as named numeric vector with one entry per PFT/species, with the names being the PFT/species codes. These values should be produced using state data assimilation from function XXXXXX.

dens.target

A numeric vector of the target stand-level stem densities (indiv/m^2) as named numeric vector with one entry per PFT/species, with the names being the PFT/species codes. These values should be produced using state data assimilation from function XXXXXX

AbvGrndWood.initial

A numeric vector of the target stand-level above ground wood (kgC/m^2) as named numeric vector with one entry per PFT/species, with the names being the PFT/species codes. These values should be produced using state data assimilation from function XXXXXX

AbvGrndWood.target

A numeric vector of the target stand-level above ground wood (kgC/m^2) as named numeric vector with one entry per PFT/species, with the names being the PFT/species codes. These values should be produced using state data assimilation from function XXXXXX

AbvGrndWood.epsilon

A single numeric specifying how close the final above ground wood needs to be to the target above ground stem biomass for each individual. eg. 0.05 requires that the final above ground wood is within 5 of the target above ground wood

trace

Logical; if TRUE, prints detailed adjustment process information.

min.diam

Minimum tree diameter (in cm) for inclusion in adjustments.

HEIGHT_MAX

Maximum allowed height of an individual. This is the maximum height that a tree can have. This is hard-coded in LPJ-GUESS to 150 m, but for SDA that might be unrealistically big, so this argument allows adjustment.

Value

And updated model state (as a big old list o' lists)

Details

Adjust LPJ-GUESS state

Author

Matthew Forrest