Topology Module

class topology.Tree_Grid(x_max, y_max, patch_area, I0, k, delta_h, phi_act, lday, ndim=5, dim_names=['GroundLight', 'LianaCoverage', 'Temperature', 'WindSpeed', 'Humidity'])[source]

Represent space as a grid.

Args:
x_maxint

Number of horizontal cells

y_maxint

Number of vertical cells

patch_areafloat

Area of each patch (cell) in squared meters

I0float

Incoming irradiance on top of canopy [umol photon / m^2s]

kfloat

Light extinction coefficient.

delta_h :float

Height of each vertical layer.

phi_actfloat

Photosynthetic active period.

ldayint

Mean day length during the vegetation period phi_act.

ndimint

Number of dimensions. One per environmental variable.

dim_nameslist

A list of ‘ndim’ strings representing the names of dimensions.

Attributes:
LAIsdict

Dictionary with patches as keys and a list of averaged Leaf Area Indices (one for each vertical layer) as values.

CCAsdict

Dictionary with patches as keys a a list of Cummulative Crown Areas (one for each vertical layer) as values.

trees_per_patchlist

Dictionary with patches (‘(x,y)’) as keys and a list of tree ids as values

total_area :float

Area of all simulated patches in ha

calculate_liana_biomass()[source]

Calculate the biomass of lianas in one patch based on the coverage.

calculate_liana_coverage()[source]

Calculate the coverage (%) os lianas in on patch based on the previous coverage, temperature, humidity and wind speed

Returns:

None

check_CCA(h0, h1, patch)[source]

Check if the there is enough space forthe new plants to be established

Note: Cummulative Crown Area is homogeneized at the patch level

Args:
h0float

Allometric paramenter used to calculate initial height

h1float

Allometric paramenter used to calculate initial height

patchtuple

(x,y), patch that will have the light conditions assessed.

Returns: bool.

True if there is enough space.

check_light(min_light, patch)[source]

Check if the light intensity at ground level meets the needs for seed germination.

Note: Ligth intensity is homogeneized at the patch level.

Args:
min_lightfloat

Minimum light intensity at ground for seeds to germinate.

patchtuple

(x,y), patch that will have the light conditions assessed.

Returns: bool.

True if light level is above minimum.

cohorts(patches)[source]

Assemble cohorts based on tree type and age.

Uses the trees_per_type() and trees_by_age_groups() methods to organize a dictionary of dictionaries containing the indices of trees in each age group within each type

Args:
Patches :list

A list of tuples representing patch coordinatas

[(x1,y1),(x2,y2)…]

Returns: dict
cohorsts: a dictionary with trees organized by type and age:

{FunctionalType1:{AgeGroup1:[tree1,tree2,tree3…]}}

exeeding_CCA()[source]

Finds which patches have the cummulative crown area bigger than the patch area in at least one layer.

Returns: list

Alist of patchs ([(x,y),(x,y),…,(x,y)])

ground_level_light()[source]

Calculate the amount of light that reaches the ground.

The value per patch is stored in the “GroundLight” dimension. Values are homogeneized at the patch level.

Returns:

None.

patch_based_CCA(trees_per_patch)[source]

Calculate the Leaf Area Index for each patch in the grid.

Args:

trees_per_patch : dict Dictionary in which keys are patches (‘(x,y)’)’ and values are lists of the trees ids in that patch.

Returns: dict

L_per_layer: dictionary in which the keys are the same as the ones in trees_per_patch and values are a list of the CCA per vertical layer

patch_based_LAI(trees_per_patch)[source]

Calculate the Leaf Area Index for each patch in the grid.

Args:
trees_per_patch :dict

Dictionary in which keys are patch coordinates (x,y) and values are a list of the tree ids in that patch.

Returns: dict

L_per_layer: dictionary in which the keys are patch coordinates(‘(x,y)’)-the same as the ones in trees_per_patch- and values are a list of the LAI per vertical layer

seed_establishment(seedbank)[source]

Check if the seeds in the seedbank have the light and space conditions to germinate.

Note: All seeds in the given seedbank are assumed to have the same conditions. Multiple calls to this method passing different seedbanks allow the representation of different requirements.

All established individuals are initiated with a predefined DBH (the same for all individuals), but initial height is calculated based on functional relationships and only if there is enough space in that layer a new individual will be stablished.

Args:

seedbankdict

Dictionary with Functional Type (FT) and list of seed positions as values.

lminfloat

Minimum light intensity at ground level for seed to germinate.

h0float

Allometric paramenter used to calculate initial height.

h1float

Allometric paramenter used to calculate initial height.

Returns: dict

est_seeds: a dictionary with patches as keys (‘(x,y)’) and number of established seeds as values.

trees_in_patches(patches)[source]

Make a list of tree ids and their respective positions.

Args:
patchlist

A list of tuples representing the patch coordinates ‘(x,y)’.

Returns: list

id_pos: a list tuples with tree ids and positions ‘(id,(x_pos,y_pos))’

trees_per_age_groups(list_of_trees)[source]

Return a dictionary in which keys are a age group and values are lists containing the id of the respective trees.

Args:
list_of_trees: list

A list with the id of trees.

Returns: dict

A dictionary age as keys and a list of tree ids as values.

trees_per_type(list_of_trees)[source]

Organize trees by functional type.

Args:
list_of_trees :list

A list of tree ids.

Returns: dict

type_groups: a dictionary in which keys are a Functional Types and values are lists containing the id of the respective trees.

update()[source]

Execute the methods that calculate values for each dimension of the grid.

Returns:

None.