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
nlsin the general parameters. Note that the type hints for life-stage attributes are lists, becauseload_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 seasonal linear growth rates for each life stage.
Check all list fields have length == nls
Check <stressor>_no_mort < <stressor>_all_mort for each stressor
Attributes
age_maxnlsfraction_0stemht_0rootlength_0stemdiam_0dragstart_growth_etsend_growth_etswinter_etsstart_col_etsend_col_etscol_methodstemht_maxrootlength_maxstemdiam_maxyears_maxstemdensdesic_no_mortdesic_all_mortflood_no_mortflood_all_mortuproot_no_mortuproot_all_mortstemht_winter_maxht_growth_ratesdiam_growth_ratesroot_growth_rates