Plant Functional Types and Traits

Run this notebook

Warning

This area of pyrealm is in active development and this notebook currently contains notes and initial demonstration code.

This page introduces the main components of the demography module that describe plant functional types (PFTs) and their traits.

from matplotlib import pyplot as plt
import numpy as np
import pandas as pd

from pyrealm.demography.flora import PlantFunctionalType, Flora, StemTraits

Plant traits

The table below shows the traits used to define the behaviour of different PFTs in demographic simulations. These traits mostly consist of the parameters defined in the T Model (Li et al., 2014) to govern the allometric scaling and carbon allocation of trees, but also include parameters for crown shape that follow the implementation developed in the PlantFATE model (Joshi et al., 2022).

Trait name

Description

a_hd

Initial slope of height-diameter relationship (\(a\), -)

ca_ratio

Initial ratio of crown area to stem cross-sectional area (\(c\), -)

h_max

Maximum tree height (\(H_m\), m)

rho_s

Sapwood density (\(\rho_s\), kg Cm-3)

lai

Leaf area index within the crown (\(L\), -)

sla

Specific leaf area (\(\sigma\), m2 kg-1 C)

tau_f

Foliage turnover time (\(\tau_f\),years)

tau_r

Fine-root turnover time (\(\tau_r\), years)

par_ext

Extinction coefficient of photosynthetically active radiation (PAR) (\(k\), -)

yld

Yield factor (\(y\), -)

zeta

Ratio of fine-root mass to foliage area (\(\zeta\), kg C m-2)

resp_r

Fine-root specific respiration rate (\(r_r\), year-1)

resp_s

Sapwood-specific respiration rate (\(r_s\), year-1)

resp_f

Foliage maintenance respiration fraction (\(r_f\), -)

m

Crown shape parameter (\(m\), -)

n

Crown shape parameter (\(n\), -)

f_g

Crown gap fraction (\(f_g\), -)

q_m

Scaling factor to derive maximum crown radius from crown area.

z_max_prop

Proportion of stem height at which maximum crown radius is found.

Plant Functional Types

The PlantFunctionalType class is used define a PFT with a given name, along with the trait values associated with the PFT. By default, values for each trait are taken from Table 1 of Li et al. (2014), but these can be adjusted for different PFTs. The code below contains three examples that just differ in their maximum height.

Note that the q_m and z_max_prop traits are calculated from the m and n traits and cannot be set directly.

short_pft = PlantFunctionalType(name="short", h_max=10)
medium_pft = PlantFunctionalType(name="medium", h_max=20)
tall_pft = PlantFunctionalType(name="tall", h_max=30)

The traits values set for a PFT instance can then be shown:

short_pft
PlantFunctionalType(name='short', a_hd=116.0, ca_ratio=390.43, h_max=10, rho_s=200.0, lai=1.8, sla=14.0, tau_f=4.0, tau_rt=1.0, tau_r=1.04, par_ext=0.5, yld=0.6, zeta=0.17, resp_r=0.913, resp_rt=0.0, resp_s=0.044, resp_f=0.1, m=2, n=5, f_g=0.05, q_m=2.9038988210485766, z_max_prop=0.8502830004171938, p_foliage_for_reproductive_tissue=0.0, gpp_topslice=0.0)

Info

In addition, pyrealm also defines the PlantFunctionalTypeStrict class. This version of the class requires that all trait values be provided when creating an instance, rather than falling back to the default values as above. This is mostly used within the pyrealm code for loading PFT data from files.

The Flora class

The Flora class is used to collect a list of PFTs that will be used in a demographic simulation. It can be created directly by providing the list of PlantFunctionalType instances. The only requirement is that each PFT instance uses a different name.

flora = Flora([short_pft, medium_pft, tall_pft])

flora
Flora with 3 functional types: short, medium, tall

The to_pandas() method of the StemTraits() class exports the trait data as a pandas.DataFrame, making it easier to use for plotting or calculations outside of pyrealm.

flora.to_pandas()
name a_hd ca_ratio h_max rho_s lai sla tau_f tau_rt tau_r ... resp_rt resp_s resp_f m n f_g q_m z_max_prop p_foliage_for_reproductive_tissue gpp_topslice
0 short 116.0 390.43 10 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
1 medium 116.0 390.43 20 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
2 tall 116.0 390.43 30 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0

3 rows × 24 columns

You can also create Flora instances using PFT data stored TOML, JSON and CSV file formats.

The StemTraits class

The StemTraits class is used to hold arrays of the same PFT traits across any number of stems. Unlike the Flora class, the name attribute does not need to be unique. It is mostly used within pyrealm to represent the stem traits of plant cohorts within Community objects.

A StemTraits instance can be created directly by providing arrays for each trait, but is more easily created from a Flora object by providing a list of PFT names:

# Get stem traits for a range of stems
stem_pfts = ["short", "short", "short", "medium", "medium", "tall"]
stem_traits = flora.get_stem_traits(pft_names=stem_pfts)

Again, the to_pandas() method of the StemTraits() class can be use to extract the data:

stem_traits.to_pandas()
name a_hd ca_ratio h_max rho_s lai sla tau_f tau_rt tau_r ... resp_rt resp_s resp_f m n f_g q_m z_max_prop p_foliage_for_reproductive_tissue gpp_topslice
0 short 116.0 390.43 10 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
1 short 116.0 390.43 10 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
2 short 116.0 390.43 10 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
3 medium 116.0 390.43 20 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
4 medium 116.0 390.43 20 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0
5 tall 116.0 390.43 30 200.0 1.8 14.0 4.0 1.0 1.04 ... 0.0 0.044 0.1 2 5 0.05 2.903899 0.850283 0.0 0.0

6 rows × 24 columns