pyforestry.sweden.growth.elfving_2010 package#
Submodules#
pyforestry.sweden.growth.elfving_2010.features module#
Feature transforms and context resolution for Elfving (2010) growth kernels.
- Source:
Elfving, B. (2010). Growth modelling in the Heureka system. Sveriges lantbruksuniversitet, Faculty of Forestry, Umeå. Appendix 3.
- pyforestry.sweden.growth.elfving_2010.features.collect_trees(ctx: SimulationContext) list[Tree][source]#
Return all trees from tree-list compatible simulation contexts.
- pyforestry.sweden.growth.elfving_2010.features.compute_bal_by_tree(trees: Sequence[Tree], expansions: Sequence[float]) dict[int, float][source]#
Compute basal area of larger trees (BAL) in m²/ha per tree.
- pyforestry.sweden.growth.elfving_2010.features.compute_bawad_cm(trees: Sequence[Tree], expansions: Sequence[float]) float[source]#
Compute BA-weighted diameter (D3/D2) in cm.
- pyforestry.sweden.growth.elfving_2010.features.distance_to_coast_km(site: SwedishSite | None, ctx: SimulationContext) float[source]#
Resolve distance to coast in km, with a default when unavailable.
- pyforestry.sweden.growth.elfving_2010.features.fertilization_flag(ctx: SimulationContext) int[source]#
Return fertilization indicator expected by Elfving equations.
- pyforestry.sweden.growth.elfving_2010.features.field_estimated_basal_area_m2_ha(ctx: SimulationContext) float | None[source]#
Resolve field-estimated surrounding basal area in m²/ha.
- pyforestry.sweden.growth.elfving_2010.features.mean_age_total(trees: Sequence[Tree], expansions: Sequence[float], site_index_m: float, latitude_deg: float) float[source]#
Compute basal-area weighted mean total age.
- pyforestry.sweden.growth.elfving_2010.features.plot_expansion_factor(plot_area_ha: float, occlusion: float) float[source]#
Convert plot area/occlusion into expansion factor.
- pyforestry.sweden.growth.elfving_2010.features.resolve_latitude_altitude(site: SwedishSite | None, ctx: SimulationContext) tuple[float, float][source]#
Resolve latitude (deg) and altitude (m).
- pyforestry.sweden.growth.elfving_2010.features.resolve_site_index_m(*, site: SwedishSite | None, ctx: SimulationContext, pine_ba: float | None = None, spruce_ba: float | None = None) float[source]#
Resolve stand-level site index (m).
- pyforestry.sweden.growth.elfving_2010.features.resolve_temperature_sum(site: SwedishSite | None, ctx: SimulationContext) float[source]#
Resolve annual temperature sum (degree-days).
- pyforestry.sweden.growth.elfving_2010.features.species_group(species: TreeName | None) str[source]#
Classify tree species into Elfving coefficient groups.
- pyforestry.sweden.growth.elfving_2010.features.split_edge_flags(ctx: SimulationContext) tuple[int, int][source]#
Return (split, edge) plot indicators.
- pyforestry.sweden.growth.elfving_2010.features.thinning_flags(ctx: SimulationContext, include_thinning_effect: bool) tuple[int, int][source]#
Return (thinned_0_10_years_flag, thinned_10_30_years_flag) thinning indicators.
- pyforestry.sweden.growth.elfving_2010.features.tree_age_bh_years(*, tree: Tree, site_index_m: float, latitude_deg: float, default_species: TreeName) float[source]#
Resolve age at breast height in years.
- pyforestry.sweden.growth.elfving_2010.features.tree_age_total_years(*, tree: Tree, site_index_m: float, latitude_deg: float, default_species: TreeName) float[source]#
Resolve total age in years for stand-level averages.
- pyforestry.sweden.growth.elfving_2010.features.vegetation_flags(field_layer: SwedenFieldLayer | None) tuple[int, int][source]#
Return (rich, herb) indicator flags from field layer.
pyforestry.sweden.growth.elfving_2010.kernels module#
Scientific kernel equations for Elfving (2010) growth.
The single-tree diameter-growth coefficients live here. They are transcribed from
Appendix 3 of the source below; the surrounding feature transforms are in
pyforestry.sweden.growth.elfving_2010.features.
- Source:
Elfving, B. (2010). Growth modelling in the Heureka system. Sveriges lantbruksuniversitet, Faculty of Forestry, Umeå. Appendix 3.
- pyforestry.sweden.growth.elfving_2010.kernels.aspen_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, age_bh_years: float, basal_area_m2_ha: float, basal_area_aspen_m2_ha: float, temperature_sum_dd: float, rich: int, thinned_0_10_years_flag: int, field_ba_m2_ha: float) float[source]#
Log D² growth for aspen-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.beech_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, age_bh_years: float, basal_area_m2_ha: float, basal_area_beech_m2_ha: float, latitude_deg: float, site_index_m: float, thinned_0_10_years_flag: int, split: int, field_ba_m2_ha: float) float[source]#
Log D² growth for beech-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.birch_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, age_bh_years: float, overstorey: int, basal_area_m2_ha: float, basal_area_birch_m2_ha: float, temperature_sum_dd: float, distance_to_coast_km: float, rich: int, fertilized: int, thinned_0_10_years_flag: int, edge: int, field_ba_m2_ha: float) float[source]#
Log D² growth for birch-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.oak_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, basal_area_m2_ha: float, basal_area_oak_m2_ha: float, gotland: int, altitude_m: float, rich: int, thinned_0_10_years_flag: int, edge: int, field_ba_m2_ha: float) float[source]#
Log D² growth for oak-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.pine_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, age_bh_years: float, overstorey: int, mean_dgv_cm: float, basal_area_m2_ha: float, basal_area_pines_m2_ha: float, gotland: int, temperature_sum_dd: float, site_index_m: float, rich: int, fertilized: int, thinned_0_10_years_flag: int, thinned_11_25_years_flag: int, split: int, edge: int, field_ba_m2_ha: float) float[source]#
Log D² growth for pine-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.precious_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, basal_area_m2_ha: float, gotland: int, herb: int, thinned_0_10_years_flag: int, field_ba_m2_ha: float) float[source]#
Log D² growth for precious broadleaves.
- pyforestry.sweden.growth.elfving_2010.kernels.spruce_ln_d2_growth(*, diameter_cm: float, bal_over_dbh: float, age_bh_years: float, overstorey: int, mean_dgv_cm: float, mean_dg_cm: float, basal_area_m2_ha: float, basal_area_spruce_m2_ha: float, gotland: int, temperature_sum_dd: float, site_index_m: float, rich: int, fertilized: int, thinned_0_10_years_flag: int, split: int, edge: int, field_ba_m2_ha: float) float[source]#
Log D² growth for spruce-group trees.
- pyforestry.sweden.growth.elfving_2010.kernels.stand_basal_area_growth_elfving_2009(*, ln_mean_age: float, conifer_share_per_age: float, pine_share_times_veg: float, birch_share_sq: float, birch_share_cold: float, basal_area_survived_m2_ha: float, basal_area_all_m2_ha: float, stem_number_factor: float, veg: float, peat: int, moist: int, wet: int, site_index_m: float, ditch: int, fertilized: int, edge: int, split: int, thinned_0_10_years_flag: int, thinned_10_30_years_flag: int, ln_relative_basal_area: float, pine_share: float, spruce_share: float, use_edge_effects: bool) float[source]#
Compute stand basal-area growth (m²/ha) over 5 years.
Elfving (2009) stand-level basal-area growth function. Parameter names below map to Elfving’s original symbols as follows:
ln_mean_age-> ln of mean stand age.conifer_share_per_age-> (pine share + spruce share) / mean age.pine_share_times_veg-> pine share * vegetation index.birch_share_sq-> (birch basal-area share) squared.birch_share_cold-> birch basal-area share * cold-climate term.stem_number_factor-> stems / (stems + 80).ln_relative_basal_area-> ln(BA / surrounding BA).pine_share/spruce_share-> pine / spruce basal-area shares.
pyforestry.sweden.growth.elfving_2010.thinning_response module#
Elfving (2009) continuous thinning-response function for Sweden.
The thinning response is a multiplier applied to the stand basal-area growth that
would be expected under unmanaged conditions. It replaces the discrete
thinned_0_10 / thinned_10_30 indicator variables of the stand growth
function when a thinning has actually been simulated.
- Reference:
Elfving, B. (2009). Thinning response function, based on the Swedish thinning-fertilisation (“GG”) trials; documented as an appendix of Elfving, B. (2010) “Growth modelling in the Heureka system”, SLU, Faculty of Forestry.
The response
THRESP = ln(iG_thinned) - ln(iG_unthinned)is modelled from the proportion of basal area removed at the last thinning (THPROP), the time from that thinning to the mid-point of the growth period (TATH), the residual release effect of earlier thinnings (RRE), a newly-thinned indicator (NEWTH, TATH < 4 yr) and a thinning-from-above indicator (THFA). Separate coefficients apply to pine- and spruce-dominated stands.
- class pyforestry.sweden.growth.elfving_2010.thinning_response.ThinningEvent(years_since_thinning: float, proportion_basal_area_removed: float, thinned_from_above: float = 0.0)[source]#
Bases:
objectA single past thinning used by the Elfving (2009) thinning-response model.
- Variables:
years_since_thinning (float) – Whole years from the thinning to the start of the current 5-year growth period.
TATHis this value plus the 2.5-year mid-period offset.proportion_basal_area_removed (float) –
THPROP– the proportion (0-1) of stand basal area removed at this thinning.thinned_from_above (float) –
THFAindicator in [0, 1]; 0 = thinning from below, 1 = thinning from above. Only used for pine-dominated stands and only whenignore_thinning_formisFalse.
- thinned_from_above: float = 0.0#
- property years_to_mid_period: float#
Return
TATH– years from the thinning to the growth-period mid-point.
- pyforestry.sweden.growth.elfving_2010.thinning_response.elfving_2009_thinning_response_factor(*, last_thinning: ThinningEvent | None, earlier_thinnings: Sequence[ThinningEvent] = (), spruce_basal_area_share: float, ignore_thinning_form: bool = True) float[source]#
Return the multiplicative thinning-response factor on stand basal-area growth.
- Parameters:
last_thinning – The most recent thinning, or
Noneif the stand has never been thinned (in which case the factor is 1.0).earlier_thinnings – Thinnings before
last_thinning(most-recent first), used for the residual release effect.spruce_basal_area_share – Spruce proportion of stand basal area; the spruce-dominated function is used when this is >= 0.5.
ignore_thinning_form – When
True(the default), the thinning-from-above term is disabled. It is off by default because the high-thinning indicator can be misleading in stands with abundant understorey.
- Returns:
exp(max(0, effect))– a factor >= 1.0 applied to unmanaged stand basal-area growth. Returns 1.0 whenlast_thinningisNone.
- pyforestry.sweden.growth.elfving_2010.thinning_response.residual_release_effect(*, last_thinning: ThinningEvent, earlier_thinnings: Sequence[ThinningEvent]) float[source]#
Return
RRE– the residual release effect of thinnings before the last.Each earlier thinning contributes
THPROP * (1 - 0.0333 * TATH). Following Elfving (2009), the walk back through history stops once a reference thinning is older than 30 years (its own contribution having been counted).- Parameters:
last_thinning – The most recent thinning (its
THPROPis applied directly by the response function, not here).earlier_thinnings – Thinnings performed before
last_thinning, ordered most-recent first.
- Returns:
The residual release effect (dimensionless).
Module contents#
Elfving 2010 growth equations (kernels and feature transforms).