ModvegeParameters {growR}R Documentation

Parameter Data Object

Description

Data structure that contains site and vegetation parameters necessary for the configuration of an growR simulation run.

Parameter description

The following is a list and description of model parameters, including the vegetation parameters, which are defined through the functional group composition.

Site and model parameters

Initial conditions

Vegetation parameters

Public fields

required_parameter_names

Names of parameters that do not have a default value and are therefore strictly required.

parameter_names

Names of all required and optional parameters and state variables.

n_parameters

Number of total parameters.

functional_group

The FunctionalGroup instance holding the vegetation parameters.

fg_parameter_names

Names of vegetation parameters defined by the functional group composition.

initial_condition_names

Names of initial conditions.

param_file

Name of the parameter file from which initial parameter values were read.

Methods

Public methods


Method new()

Constructor

Usage
ModvegeParameters$new(param_file = NULL)
Arguments
param_file

Name of file containing the site and vegetation parameters.


Method read_parameters()

Read parameters from parameter file

Reads in parameters from the supplied param_file and stores them in internal fields.

This function carries out some basic sanity checks of the supplied param_file and reports on unidentified and missing parameter names.

Usage
ModvegeParameters$read_parameters(param_file)
Arguments
param_file

Path or name of file to read parameters from.

Returns

P List with field names as in the class variable parameter_names.


Method set_parameters()

Savely update the given parameters

This is the preferred method for changing the internal parameter values, because special care is taken to account for potential changes to functional group weights.

Usage
ModvegeParameters$set_parameters(params)
Arguments
params

List of name-value pairs of the parameters to update.


Method update_functional_group()

Update functional group parameters

Should be run whenever the functional group composition is changed in order to reflect the changes in the parameter list self$P.

Usage
ModvegeParameters$update_functional_group()

Method check_parameters()

Parameter Sanity Check Ensure that the supplied params are valid ModVege parameters and, if requested, check that all required parameters are present. Issues a warning for any invalid parameters and throws an error if completeness is not satisfied (only when check_for_completeness = TRUE).

Usage
ModvegeParameters$check_parameters(param_names, check_for_completeness = TRUE)
Arguments
param_names

A list of parameter names to be checked.

check_for_completeness

Boolean Toggle whether only the validity of supplied param_names is checked or whether we want to check that all required parameters to be present (default). In the latter case, if any required parameter is missing, an error is thrown.

Returns

not_known The list of unrecognized parameter names.


Method clone()

The objects of this class are cloneable with this method.

Usage
ModvegeParameters$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Note

Programmatically speaking, all parameters described under Parameter description are also fields of this R6Class.


[Package growR version 1.3.0 Index]