dycove.sim.vegetation_data.VegetationAttributes

class dycove.sim.vegetation_data.VegetationAttributes(age_max: int, nls: int, fraction_0: float, stemht_0: float, rootlength_0: float, stemdiam_0: float, drag: float, start_growth_ets: int, end_growth_ets: int, winter_ets: int, start_col_ets: int, end_col_ets: int, col_method: int, stemht_max: list[float], rootlength_max: list[float], stemdiam_max: list[float], years_max: list[int], stemdens: list[float], desic_no_mort: list[float], desic_all_mort: list[float], flood_no_mort: list[float], flood_all_mort: list[float], uproot_no_mort: list[float], uproot_all_mort: list[float], stemht_winter_max: list[float])[source]

Container for vegetation trait parameters and life-cycle settings.

This class stores all vegetation input attributes and computes linear growth rates for height, stem diameter, and root length across life stages. Values are read from a vegetation configuration JSON file (e.g., veg1.json). The JSON file must have a number of dictionaries of life-stage attributes equal to the number of life stages indicated by nls in the general parameters. Note that the type hints for life-stage attributes are lists, because load_vegetation_attributes() converts them from a series of dictionaries to one list for each attribute.

Parameters (General)

age_maxint

Maximum plant age (in years).

nlsint

Number of life stages.

fraction_0float

Initial colonization fraction (0–1).

stemht_0float

Initial stem height (m).

rootlength_0float

Initial root length (m).

stemdiam_0float

Initial stem diameter (m).

dragfloat

Drag coefficient C_d.

start_growth_etsint

Ecological timestep at which shoot growth starts.

end_growth_etsint

Ecological timestep at which shoot growth ends.

winter_etsint

Ecological timestep marking the start of the winter period.

start_col_etsint

Ecological timestep at which colonization starts.

end_col_etsint

Ecological timestep at which colonization ends (for the year; currently non-inclusive).

col_methodint

Colonization method (1, 2, 3, or 4, see Documentation for details)

Parameters (Life Stage)

stemht_maxlist[float]

Maximum stem height per life stage (m).

rootlength_maxlist[float]

Maximum root length per life stage (m).

stemdiam_maxlist[float]

Maximum stem diameter per life stage (m).

years_maxlist[int]

Maximum number of years spent in each life stage.

stemdenslist[float]

Stem density per life stage (number of stems per m²).

desic_no_mortlist[float]

Dry fraction below which there is no desiccation mortality. (Zero disables desiccation mortality.)

desic_all_mortlist[float]

Dry fraction above which there is total desiccation mortality.

flood_no_mortlist[float]

Flood fraction below which there is no flooding mortality. (Zero disables flooding mortality.)

flood_all_mortlist[float]

Flood fraction above which there is total flooding mortality.

uproot_no_mortlist[float]

Flow velocity below which there is no uprooting mortality. (Zero disables uprooting mortality.)

uproot_all_mortlist[float]

Flow velocity above which there is total uprooting mortality.

stemht_winter_maxlist[float]

Maximum stem height during winter for each life stage.

Attributes (Computed)

ht_growth_rateslist[float]

Linear growth rate of plant height per life stage (computed in __post_init__()).

diam_growth_rateslist[float]

Linear growth rate of stem diameter per life stage (computed in __post_init__()).

root_growth_rateslist[float]

Linear growth rate of root length per life stage (computed in __post_init__()).

__init__(age_max: int, nls: int, fraction_0: float, stemht_0: float, rootlength_0: float, stemdiam_0: float, drag: float, start_growth_ets: int, end_growth_ets: int, winter_ets: int, start_col_ets: int, end_col_ets: int, col_method: int, stemht_max: list[float], rootlength_max: list[float], stemdiam_max: list[float], years_max: list[int], stemdens: list[float], desic_no_mort: list[float], desic_all_mort: list[float], flood_no_mort: list[float], flood_all_mort: list[float], uproot_no_mort: list[float], uproot_all_mort: list[float], stemht_winter_max: list[float]) None

Methods

__init__(age_max, nls, fraction_0, stemht_0, ...)

compute_growth_rates()

Compute seasonal linear growth rates for each life stage.

validate_input_list_lengths()

Check all list fields have length == nls

validate_mortality_limits()

Check <stressor>_no_mort < <stressor>_all_mort for each stressor

Attributes

age_max

nls

fraction_0

stemht_0

rootlength_0

stemdiam_0

drag

start_growth_ets

end_growth_ets

winter_ets

start_col_ets

end_col_ets

col_method

stemht_max

rootlength_max

stemdiam_max

years_max

stemdens

desic_no_mort

desic_all_mort

flood_no_mort

flood_all_mort

uproot_no_mort

uproot_all_mort

stemht_winter_max

ht_growth_rates

diam_growth_rates

root_growth_rates

compute_growth_rates()[source]

Compute seasonal linear growth rates for each life stage.

Stage 0 grows from initial colonization values. Later stages grow from previous winter values.

validate_input_list_lengths()[source]

Check all list fields have length == nls

validate_mortality_limits()[source]

Check <stressor>_no_mort < <stressor>_all_mort for each stressor