prepare_input {r3PG}R Documentation

Check and prepare input for running 3-PG model

Description

Checks and prepares all input tables to be used in run_3PG. For detailed descriptions see Forrester (2020).

Usage

prepare_input(site, species, climate, thinning = NULL, parameters = NULL,
  size_dist = NULL, settings = NULL)

Arguments

site

table containing the information about site conditions.

  • latitude: site latitude in the WGS84 coordinate system.

  • altitude: site altitude, m a.s.l.

  • soil_class: 1 - Sandy; 2 - Sandy loam; 3 - Clay loam; 4 - Clay; 0 - No effect of asw on production.

  • asw_i: initial available soil water (mm).

  • asw_min: minimum available soil water (mm).

  • asw_max: maximum available soil water (mm).

  • from: year and month indicating the start of simulation. Provided in form of year-month. E.g. "2000-01".

  • to: year and month indicating the end of simulation. Provided in form of year-month. E.g. "2009-12", will include December 2009 as last simulation month

species

table containing the information about species level data. Each row corresponds to one species/cohort.

  • species: species or cohort id/name. It must be consistent with species names in thinning, parameters and sizeDist tables.

  • planted: year and month indicating when species was planted. Provided in form of year-month. E.g. "2000-01".

  • fertility: soil fertility for a given species. Range from 0 to 1.

  • stems_n: number of trees per ha.

  • biom_stem: stem biomass for a given species (Mg/ha).

  • biom_root: root biomass for a given species (Mg/ha).

  • biom_foliage: initial foliage biomass (Mg/ha). If this is a leafless period, provide the spring foliage biomass.

climate

table containing the information about monthly values for climatic data. If the climate table has exactly 12 rows it will be replicated for the number of years and months specified by from - to. Otherwise, it will be subsetted to the selected time period. More details about preparing climate data are at prepare_climate.

  • year: year of observation (only required for subsetting) (optional).

  • month: months of observation (only required for subsetting) (optional).

  • tmp_min: monthly mean daily minimum temperature (C).

  • tmp_max: monthly mean daily maximum temperature (C).

  • tmp_ave: monthly mean daily average temperature (C) (optional).

  • prcp: monthly rainfall (mm month-1).

  • srad: monthly mean daily solar radiation (MJ m-2 d-1).

  • frost_days: frost days per month (d month-1).

  • vpd_day: water pressure deficit (mbar) (optional).

  • co2: monthly mean atmospheric co2 (ppm), required if calculate_d13c=1 (optional)

  • d13catm: monthly mean isotopic composition of air (‰), required if calculate_d13c=1 (optional)

thinning

table containing the information about thinnings. If there is no thinning, it must be NULL.

  • species: species or cohort id/name. It must be consistent with species names in species, parameters and sizeDist tables.

  • age: age when thinning is performed.

  • stems_n: number of trees remaining after thinning

  • foliage: type of thinning (above/below). Default is 1.

  • root: type of thinning (above/below). Default is 1.

  • stem: type of thinning (above/below). Default is 1.

parameters

table containing the information about parameters to be modified. Values that are not provided are replaced by defaults.

  • parameter: name of the parameter, must be consistent in naming with i_parameters

  • species: each column must correspond to species/cohort id/name, as defined in species table

size_dist

table containing the information about size distribution to be modified. Values that are not provided are replaced by defaults.

  • parameter: name of the parameter, must be consistent in naming with i_sizeDist

  • species: each column must correspond to species/cohort id/name, as defined in species table

settings

a list with settings for the model. Values that are not provided are replaced by defaults.

  • light_model: '1' - 3-PGpjs (default); '2' - 3-PGmix

  • transp_model: '1' - 3-PGpjs (default); '2' - 3-PGmix

  • phys_model: '1' - 3-PGpjs (default); '2' - 3-PGmix

  • height_model: '1' - linear (default); '2' - non-linear

  • correct_bias: '0' - no (default); '1' - yes

  • calculate_d13c: '0' - no (default); '1' - yes

Details

This function checks and prepares the input data for the run_3PG. The output is a list with 7 tables. Each of them corresponds to the one from input.

Value

a list with seven tables. Each table corresponds to one of the input tables.

References

Forrester, D. I., 2020. 3-PG User Manual. Swiss Federal Institute for Forest, Snow and Landscape Research WSL, Birmensdorf, Switzerland. 70 p. Available at the following web site: http://sites.google.com/site/davidforresterssite/home/projects/3PGmix/3pgmixdownload

Sands, P. J., 2010. 3PGpjs user manual. Available at the following web site: https://3pg.sites.olt.ubc.ca/files/2014/04/3PGpjs_UserManual.pdf

See Also

run_3PG, prepare_parameters, prepare_sizeDist, prepare_thinning, prepare_climate, prepare_site

Examples

prepare_input( site = d_site, species = d_species, climate = d_climate, d_thinning)

[Package r3PG version 0.1.6 Index]