initialize_landscape {medfateland}R Documentation

Initialization of model inputs for spatially-distributed forest stands

Description

Initializes state for local models spwb or growth.

Usage

initialize_landscape(
  x,
  SpParams,
  local_control,
  model = "spwb",
  simplify = FALSE,
  replace = FALSE,
  progress = TRUE
)

Arguments

x

An object of class sf with the following columns:

  • geometry: Spatial geometry.

  • forest: Objects of class forest.

  • soil: Objects of class soil or data frames of physical properties.

  • land_cover_type: Land cover type of each grid cell (values should be 'wildland' or 'agriculture').

  • crop_factor: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.

  • local_control: A list of control parameters (optional). Used to override function parameter local_control for specific cells (values can be NULL for the remaining ones).

SpParams

A data frame with species parameters (see SpParamsMED).

local_control

A list of control parameters (see defaultControl).

model

A string to indicate the model, either "spwb" or "growth".

simplify

Boolean flag to simplify forest to the tree and shrub cohorts with largest leaf area index. The leaf area index of the whole tree (respectively, shrub) layer will be attributed to the selected cohort. See function forest_reduceToDominant.

replace

Boolean flag to replace existing initialized states

progress

Boolean flag to display progress information.

Details

Initialization is dealt automatically when calling simulation functions spwb_spatial, growth_spatial, spwb_spatial_day or growth_spatial_day. However, function initialize_landscape allows separating initialization from model simulations.

Option simplify has been implemented to allow simplification of forests to tree/shrub dominant cohorts during watershed simulations where focus is on runoff (e.g. calibration of watershed parameters or burnin periods). Elements identified as result_cell will not be simplified.

Value

Replaces or adds column 'state' whose elements are spwbInput or growthInput objects and returns the modified object of class 'sf'.

Author(s)

Miquel De Cáceres Ainsa, CREAF

See Also

spwb_spatial, spwb_spatial_day, update_landscape

Examples

# Load example landscape data
data("example_ifn")
  
# Load example meteo data frame from package meteoland
data("examplemeteo")
  
# Load default medfate parameters
data("SpParamsMED")

# Define local control parameters using function in medfate
local_control <- defaultControl()

# If necessary, change defaults

# Initialize state for 'spwb' simulations
example_ifn_init <- initialize_landscape(example_ifn, SpParamsMED, 
                                         local_control = local_control, 
                                         model = "spwb")


[Package medfateland version 2.4.5 Index]