Model configuration for the plants model#

This page documents the model configuration of the plants model:

The plants model_config module#

Configuration for the plants model.

Classes:

PlantsConfiguration(*[, static, ...])

Root configuration class for the plants model.

PlantsConstants(*[, ...])

Constants for the plants model.

PlantsExportConfig(*[, required_data, ...])

Configuration class for plant export options.

class virtual_ecosystem.models.plants.model_config.PlantsConfiguration(*, static: bool = False, pft_definitions_path: Annotated[Path, PathType(path_type=file), BeforeValidator(func=placeholder_validator, json_schema_input_type=PydanticUndefined)] = PosixPath('<FILEPATH_PLACEHOLDER>'), cohort_data_path: Annotated[Path, PathType(path_type=file), BeforeValidator(func=placeholder_validator, json_schema_input_type=PydanticUndefined)] = PosixPath('<FILEPATH_PLACEHOLDER>'), community_data_export: PlantsExportConfig = PlantsExportConfig(required_data=(), cohort_attributes=(), community_canopy_attributes=(), stem_canopy_attributes=(), float_format='%0.5f'), constants: PlantsConstants = PlantsConstants(per_stem_annual_mortality_probability=0.1, per_propagule_annual_recruitment_probability=0.2, dsr_to_ppfd=2.04, stem_lignin=0.545, senesced_leaf_lignin=0.05, plant_reproductive_tissue_lignin=0.01, root_lignin=0.2, subcanopy_extinction_coef=0.5, subcanopy_specific_leaf_area=14, subcanopy_respiration_fraction=0.1, subcanopy_yield=0.6, subcanopy_reproductive_allocation=0.1, subcanopy_sprout_rate=0.1, subcanopy_sprout_yield=0.5, subcanopy_vegetation_turnover=1.0, subcanopy_seedbank_turnover=0.25, subcanopy_seedbank_c_n_ratio=20, subcanopy_seedbank_c_p_ratio=50, subcanopy_vegetation_c_n_ratio=20, subcanopy_vegetation_c_p_ratio=50, subcanopy_vegetation_lignin=0.2, subcanopy_seedbank_lignin=0.2, root_exudates=0.5, propagule_mass_portion=0.5, carbon_mass_per_propagule=1))[source]#

Root configuration class for the plants model.

Attributes:

cohort_data_path

A file path to a file of initial cohort data

community_data_export

Configuration of plant community data export

constants

Constants for the plants model

pft_definitions_path

A file path to a data file of plant functional type definitions

cohort_data_path: Annotated[Path, PathType(path_type=file), FieldInfo(annotation=NoneType, required=False, default=PosixPath('<FILEPATH_PLACEHOLDER>')), BeforeValidator(func=placeholder_validator, json_schema_input_type=PydanticUndefined)]#

A file path to a file of initial cohort data

community_data_export: PlantsExportConfig#

Configuration of plant community data export

constants: PlantsConstants#

Constants for the plants model

pft_definitions_path: Annotated[Path, PathType(path_type=file), FieldInfo(annotation=NoneType, required=False, default=PosixPath('<FILEPATH_PLACEHOLDER>')), BeforeValidator(func=placeholder_validator, json_schema_input_type=PydanticUndefined)]#

A file path to a data file of plant functional type definitions

static: bool#

The model static mode setting.

class virtual_ecosystem.models.plants.model_config.PlantsConstants(*, per_stem_annual_mortality_probability: float = 0.1, per_propagule_annual_recruitment_probability: float = 0.2, dsr_to_ppfd: float = 2.04, stem_lignin: float = 0.545, senesced_leaf_lignin: float = 0.05, plant_reproductive_tissue_lignin: float = 0.01, root_lignin: float = 0.2, subcanopy_extinction_coef: float = 0.5, subcanopy_specific_leaf_area: float = 14, subcanopy_respiration_fraction: float = 0.1, subcanopy_yield: float = 0.6, subcanopy_reproductive_allocation: float = 0.1, subcanopy_sprout_rate: float = 0.1, subcanopy_sprout_yield: float = 0.5, subcanopy_vegetation_turnover: float = 1.0, subcanopy_seedbank_turnover: float = 0.25, subcanopy_seedbank_c_n_ratio: float = 20, subcanopy_seedbank_c_p_ratio: float = 50, subcanopy_vegetation_c_n_ratio: float = 20, subcanopy_vegetation_c_p_ratio: float = 50, subcanopy_vegetation_lignin: float = 0.2, subcanopy_seedbank_lignin: float = 0.2, root_exudates: float = 0.5, propagule_mass_portion: float = 0.5, carbon_mass_per_propagule: float = 1)[source]#

Constants for the plants model.

Todo

The subcanopy seedbank and vegetation constants have the same structure. This is probably worth bringing together into a dataclass and external file, particularly as and when we add shrub or liana layers, which likely mirror this.

Attributes:

carbon_mass_per_propagule

Mass of carbon per propagule in g.

dsr_to_ppfd

Convert from downward shortwave radiation to photosynthetic photon flux density.

per_propagule_annual_recruitment_probability

Basic annual recruitment rate from plant propagules.

per_stem_annual_mortality_probability

Basic annual mortality rate for plants.

plant_reproductive_tissue_lignin

Fraction of plant reproductive tissue biomass that is lignin.

propagule_mass_portion

Fraction of reprodutive tissue allocated to propagules.

root_exudates

Fraction of GPP topslice allocated to root exudates.

root_lignin

Fraction of root biomass that is lignin.

senesced_leaf_lignin

Fraction of senesced leaf biomass that is lignin.

stem_lignin

Fraction of stem biomass that is lignin.

subcanopy_extinction_coef

The extinction coefficient of subcanopy vegetation (unitless).

subcanopy_reproductive_allocation

The fraction of subcanopy net primary productivity that is allocated to subcanopy seedbank mass (unitless).

subcanopy_respiration_fraction

The fraction of gross primary productivity used in respiration (unitless).

subcanopy_seedbank_c_n_ratio

The ideal mass ratio of nitrogen in subcanopy seedbank biomass (-).

subcanopy_seedbank_c_p_ratio

The ideal mass ratio of phosphorous in subcanopy seedbank biomass (-).

subcanopy_seedbank_lignin

The proportion of lignin in subcanopy seedbank.

subcanopy_seedbank_turnover

The annual fraction of subcanopy seedbank biomass turnover (kg kg-1 m-2 y-1).

subcanopy_specific_leaf_area

The specific leaf area of subcanopy vegetation (m2 kg-1).

subcanopy_sprout_rate

The rate at which new subcanopy biomass sprouts from the subcanopy seedbank mass (kg kg-1 m-2 y-1).

subcanopy_sprout_yield

The fraction of subcanopy seedbank mass that is realised as subcanopy vegetation mass (kg kg-1).

subcanopy_vegetation_c_n_ratio

The ideal mass ratio of nitrogen in subcanopy vegetation biomass (-).

subcanopy_vegetation_c_p_ratio

The ideal mass ratio of phosphorous in subcanopy vegetation biomass (-).

subcanopy_vegetation_lignin

The proportion of lignin in subcanopy vegetation.

subcanopy_vegetation_turnover

The annual fraaction of subcanopy vegetative biomass turnover (kg kg-1 m-2 y-1).

subcanopy_yield

The yield fraction of net primary productivity in subcanopy vegetation (unitless).

carbon_mass_per_propagule: float#

Mass of carbon per propagule in g.

dsr_to_ppfd: float#

Convert from downward shortwave radiation to photosynthetic photon flux density.

Converting DSR in W m-2 to PPFD in µmol m-2 s-1. 1 W m-2 of sunlight is roughly 4.57 µmol m-2 s-1 of full spectrum sunlight, of which about 4.57 * 46% = 2.04 µmol m-2 s-1 is PPFD.

per_propagule_annual_recruitment_probability: float#

Basic annual recruitment rate from plant propagules.

per_stem_annual_mortality_probability: float#

Basic annual mortality rate for plants.

plant_reproductive_tissue_lignin: float#

Fraction of plant reproductive tissue biomass that is lignin.

propagule_mass_portion: float#

Fraction of reprodutive tissue allocated to propagules.

root_exudates: float#

Fraction of GPP topslice allocated to root exudates.

root_lignin: float#

Fraction of root biomass that is lignin.

senesced_leaf_lignin: float#

Fraction of senesced leaf biomass that is lignin.

stem_lignin: float#

Fraction of stem biomass that is lignin.

subcanopy_extinction_coef: float#

The extinction coefficient of subcanopy vegetation (unitless).

subcanopy_reproductive_allocation: float#

The fraction of subcanopy net primary productivity that is allocated to subcanopy seedbank mass (unitless).

subcanopy_respiration_fraction: float#

The fraction of gross primary productivity used in respiration (unitless).

subcanopy_seedbank_c_n_ratio: float#

The ideal mass ratio of nitrogen in subcanopy seedbank biomass (-).

subcanopy_seedbank_c_p_ratio: float#

The ideal mass ratio of phosphorous in subcanopy seedbank biomass (-).

subcanopy_seedbank_lignin: float#

The proportion of lignin in subcanopy seedbank.

subcanopy_seedbank_turnover: float#

The annual fraction of subcanopy seedbank biomass turnover (kg kg-1 m-2 y-1).

subcanopy_specific_leaf_area: float#

The specific leaf area of subcanopy vegetation (m2 kg-1).

subcanopy_sprout_rate: float#

The rate at which new subcanopy biomass sprouts from the subcanopy seedbank mass (kg kg-1 m-2 y-1).

subcanopy_sprout_yield: float#

The fraction of subcanopy seedbank mass that is realised as subcanopy vegetation mass (kg kg-1).

subcanopy_vegetation_c_n_ratio: float#

The ideal mass ratio of nitrogen in subcanopy vegetation biomass (-).

subcanopy_vegetation_c_p_ratio: float#

The ideal mass ratio of phosphorous in subcanopy vegetation biomass (-).

subcanopy_vegetation_lignin: float#

The proportion of lignin in subcanopy vegetation.

subcanopy_vegetation_turnover: float#

The annual fraaction of subcanopy vegetative biomass turnover (kg kg-1 m-2 y-1).

subcanopy_yield: float#

The yield fraction of net primary productivity in subcanopy vegetation (unitless).

class virtual_ecosystem.models.plants.model_config.PlantsExportConfig(*, required_data: tuple[Literal['cohorts', 'community_canopy', 'stem_canopy'], ...] = (), cohort_attributes: tuple[str, ...] = (), community_canopy_attributes: tuple[str, ...] = (), stem_canopy_attributes: tuple[str, ...] = (), float_format: str = '%0.5f')[source]#

Configuration class for plant export options.

The plants model only writes a relatively small amount of data to the central data store. These variables are typically about the light environment within vertical layers and plant biomasses and stoichiometry within grid cells.

However, the model also contains a great deal of demographic and allometric data about the plant communities within grid cells. If you want to look in detail at the plant communities in a simulation, then you can use this configuration section to output a wider range of plant model data at each model update.

There are three possible output files:

  • Cohort data: details about the stems in each cohort, including the stem allometry and the GPP allocation of the stem. The stem GPP allocation is not defined during the model setup, so these attributes are set to np.nan for the initial output. This data is exported to the file plants_cohort_data.csv.

  • Community canopy data: community wide data on the canopy structure, such as the heights of the canopy layers and the light transmission profile. This data is exported to the file plants_community_canopy_data.csv.

  • Stem canopy data: details of contribution in leaf area and fAPAR from each stem to the community canopy model. This data is exported to the file plants_stem_canopy_data.csv.

By default, the exporter does not export any data, but you can configure which of these files to export. You can also configure which attributes to export for each data file. For each of the three files, the default is to not specify a subset of attributes, but you may not require all of this data and so can set specific attribute names to include in the file..

Attributes:

cohort_attributes

A list of the cohort attributes that should be exported.

community_canopy_attributes

The community canopy attributes that should be exported.

float_format

A float format string to control data precision in export files.

required_data

A list of the strings giving the required plant data types to be exported.

stem_canopy_attributes

The stem canopy attributes that should be exported.

cohort_attributes: tuple[str, ...]#

A list of the cohort attributes that should be exported.

community_canopy_attributes: tuple[str, ...]#

The community canopy attributes that should be exported.

float_format: str#

A float format string to control data precision in export files.

required_data: tuple[Literal['cohorts', 'community_canopy', 'stem_canopy'], ...]#

A list of the strings giving the required plant data types to be exported. The accepted values are “cohorts”, “community_canopy” and “stem_canopy”.

stem_canopy_attributes: tuple[str, ...]#

The stem canopy attributes that should be exported.