pyforestry.sweden.models package¶
Submodules¶
pyforestry.sweden.models.elfving_hagglund_1975 module¶
- class pyforestry.sweden.models.elfving_hagglund_1975.ElfvingHagglundInitialStand[source]¶
Bases:
object
Provides methods to estimate initial stand density (stems/ha) and basal area (m²/ha) for young Spruce and Pine stands in Sweden, based on the models published by Elfving & Hägglund (1975).
Estimates are generally for stems thicker than 2.5 cm at breast height.
References
Elfving, B., Hägglund, B. (1975). Utgångslägen för produktionsprognoser: Tall och gran i Sverige. Skogshögskolan, Inst. f. skogsproduktion. Rapp. o. Upps. Nr 38. Stockholm. 75 pp.
- static estimate_basal_area_young_pine_north(latitude: float, altitude: float, site_index: SiteIndexValue, dominant_height: float, stems: Stems | None = None, stand_density_factor: float = 0.65, broadleaves_percent_ba: float = 0.0, pct: bool = False, even_or_somewhat_uneven_aged: bool = True) StandBasalArea [source]¶
Estimates initial basal area (m²/ha) for young Pine in Northern Sweden. Based on Function 6.1, Elfving & Hägglund (1975), p. 53.
- Parameters:
latitude – Latitude, degrees N.
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
dominant_height – Dominant height (m).
stems – Stems per hectare. If None, estimated internally.
stand_density_factor – Stand density factor (0.1-1.0).
broadleaves_percent_ba – Percentage of broadleaves in BA (0-100).
pct – True if pre-commercial thinning has occurred.
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
- Returns:
Estimated basal area (m²/ha).
- static estimate_basal_area_young_pine_south(latitude: float, altitude: float, site_index: SiteIndexValue, dominant_height: float, stems: Stems | None = None, age_at_breast_height: AgeMeasurement | None = None, stand_density_factor: float = 0.65, uneven_aged: bool = False, pct: bool = False, regeneration: str = 'culture') StandBasalArea [source]¶
Estimates initial basal area (m²/ha) for young Pine in Southern Sweden. Based on Function 6.2, Elfving & Hägglund (1975), p. 53.
- Parameters:
latitude – Latitude, degrees N.
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
dominant_height – Dominant height (m).
stems – Stems per hectare. If None, estimated internally.
age_at_breast_height – Age at breast height. Required if stems is None.
stand_density_factor – Stand density factor (0.1-1.0).
uneven_aged – True if the stand is uneven-aged.
pct – True if pre-commercial thinning has occurred.
regeneration – Method of establishment (“culture”, “natural regeneration”, “unknown”).
- Returns:
Estimated basal area (m²/ha).
- static estimate_basal_area_young_spruce_north(altitude: float, site_index: SiteIndexValue, dominant_height: float, stems: Stems | None = None, stand_density_factor: float = 0.65, broadleaves_percent_ba: float = 0.0, spatial_distribution: int = 1, pct: bool = False, even_or_somewhat_uneven_aged: bool = True) StandBasalArea [source]¶
Estimates initial basal area (m²/ha) for young Spruce in Northern Sweden. Based on Function 6.3, Elfving & Hägglund (1975), p. 53.
- Parameters:
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
dominant_height – Dominant height (m).
stems – Stems per hectare. If None, estimated internally.
stand_density_factor – Stand density factor (0.1-1.0).
broadleaves_percent_ba – Percentage of broadleaves in BA (0-100).
spatial_distribution – Code for spatial distribution (1, 2, or 3).
pct – True if pre-commercial thinning has occurred.
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
- Returns:
Estimated basal area (m²/ha).
- static estimate_basal_area_young_spruce_south(altitude: float, site_index: SiteIndexValue, dominant_height: float, age_at_breast_height: AgeMeasurement, stems: Stems | None = None, stand_density_factor: float = 0.65, broadleaves_percent_ba: float = 0.0, spatial_distribution: int = 1, even_or_somewhat_uneven_aged: bool = True, pct: bool = False) StandBasalArea [source]¶
Estimates initial basal area (m²/ha) for young Spruce in Southern Sweden. Based on Function 6.4, Elfving & Hägglund (1975), p. 53.
- Parameters:
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
dominant_height – Dominant height (m).
age_at_breast_height – Age at breast height (years). Required if stems is None.
stems – Stems per hectare. If None, estimated internally.
stand_density_factor – Stand density factor (0.1-1.0).
broadleaves_percent_ba – Percentage of broadleaves in BA (0-100).
spatial_distribution – Code for spatial distribution (1, 2, or 3).
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
pct – Pre-commercial thinning flag (used only if stems need estimation).
- Returns:
Estimated basal area (m²/ha).
- static estimate_initial_spruce_stand(dominant_height: float, age_bh: AgeMeasurement, site_index: SiteIndexValue, altitude: float, northern_sweden: bool = True, broadleaves_percent_ba: float = 0, even_aged: bool = True, stand_density_factor: float = 0.65, pct: bool = False, spatial_distribution: int = 1) Tuple[Stems, StandBasalArea] [source]¶
Estimates initial stems/ha and basal area/ha for Spruce stands. (Combined function calling specific estimators based on region).
- Parameters:
dominant_height – Dominant height of the stand (m).
age_bh – Age at breast height (years).
site_index – Site index object (e.g., H100). The numeric value is used.
altitude – Altitude (meters above sea level).
northern_sweden – True if the site is in Northern Sweden, False otherwise.
broadleaves_percent_ba – Percentage of broadleaves in the basal area (0-100).
even_aged – True if the stand is considered even-aged or somewhat uneven-aged.
stand_density_factor – A factor related to target density (0.1 to 1.0).
pct – True if pre-commercial thinning has occurred.
spatial_distribution – Code indicating spatial distribution (1=even, 2=somewhat uneven, 3=grouped).
- Returns:
Stems: Estimated number of stems per hectare.
StandBasalArea: Estimated basal area (m²/ha).
- Return type:
A tuple containing
- static estimate_stems_young_pine_north(latitude: float, altitude: float, dominant_height: float, stand_density_factor: float = 0.65, pct: bool = False, even_or_somewhat_uneven_aged: bool = True) Stems [source]¶
Estimates initial stems/ha (>2.5cm DBH) for young Pine in Northern Sweden. Based on Function 5.1, Elfving & Hägglund (1975), p. 53.
- Parameters:
latitude – Latitude, degrees N.
altitude – Altitude, meters above sea level.
dominant_height – Dominant height, meters.
stand_density_factor – Stand density factor (0.1-1.0).
pct – True if pre-commercial thinning has occurred.
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
- Returns:
Estimated number of stems per hectare (>2.5cm DBH).
- static estimate_stems_young_pine_south(latitude: float, site_index: SiteIndexValue, dominant_height: float, age_at_breast_height: AgeMeasurement | None = None, stand_density_factor: float = 0.65, pct: bool = False, regeneration: str = 'culture') Stems [source]¶
Estimates initial stems/ha (>2.5cm DBH) for young Pine in Southern Sweden. Based on Function 5.2, Elfving & Hägglund (1975), p. 53.
- Parameters:
latitude – Latitude (used if age needs calculation).
site_index – Site index H100 (m).
dominant_height – Dominant height (m).
age_at_breast_height – Age at breast height. If None, it attempts calculation (Not Implemented Yet).
stand_density_factor – Stand density factor (0.1-1.0).
pct – True if pre-commercial thinning has occurred.
regeneration – Method of establishment (“culture”, “natural regeneration”, “unknown”). Used if age needs calculation.
- Returns:
Estimated number of stems per hectare (>2.5cm DBH).
- static estimate_stems_young_spruce_north(altitude: float, site_index: SiteIndexValue, stand_density_factor: float = 0.65, broadleaves_percent_ba: float = 0.0, pct: bool = False, even_or_somewhat_uneven_aged: bool = True) Stems [source]¶
Estimates initial stems/ha (>2.5cm DBH) for young Spruce in Northern Sweden. Based on Function 5.3, Elfving & Hägglund (1975), p. 53.
- Parameters:
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
stand_density_factor – Stand density factor (0.1-1.0).
broadleaves_percent_ba – Percentage of broadleaves in BA (0-100).
pct – True if pre-commercial thinning has occurred.
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
- Returns:
Estimated number of stems per hectare (>2.5cm DBH).
- static estimate_stems_young_spruce_south(altitude: float, site_index: SiteIndexValue, age_at_breast_height: AgeMeasurement, stand_density_factor: float = 0.65, broadleaves_percent_ba: float = 0.0, even_or_somewhat_uneven_aged: bool = True) Stems [source]¶
Estimates initial stems/ha (>2.5cm DBH) for young Spruce in Southern Sweden. Based on Function 5.4, Elfving & Hägglund (1975), p. 53.
- Parameters:
altitude – Altitude, meters above sea level.
site_index – Site index H100 (m).
age_at_breast_height – Age at breast height (years).
stand_density_factor – Stand density factor (0.1-1.0).
broadleaves_percent_ba – Percentage of broadleaves in BA (0-100).
even_or_somewhat_uneven_aged – True if stand is even or somewhat uneven-aged.
- Returns:
Estimated number of stems per hectare (>2.5cm DBH).
pyforestry.sweden.models.elfving_ibm module¶
- class pyforestry.sweden.models.elfving_ibm.ElfvingIBM[source]¶
Bases:
object
Container class for Elfving (2003-2010) growth & mortality equations.
Individual tree growth models predict the 5-year increment in squared diameter (cm²), which is then used to derive diameter increment or basal area increment. Stand-level models predict mortality or BA development.
- static basal_area_mortality_percent_spruce_pine(*, dominant_height: float, H100: float, stems: float, ThinningProportionBAStart: float, ThinningForm: bool = True, fertilised: bool = False) float [source]¶
Annual mortality (% of BA start) for Pine & Spruce stands. Elfving (2010).
- classmethod calculate_five_year_diameter_increment_cm(species: str | TreeName, *, diameter_cm: float, **kwargs) float [source]¶
Calculate 5-year diameter increment (cm) for a specific tree species.
This method first calculates the 5-year increment in squared diameter (cm²) using species-specific Elfving equations, and then derives the diameter increment.
- Parameters:
species (Union[str, TreeName]) – The tree species.
diameter_cm (float) – Initial diameter at breast-height (1.3m) of the subject tree, in centimeters (cm).
**kwargs – Additional keyword arguments required by the specific underlying growth function. Refer to the docstrings of the _calculate_squared_diameter_increment_<species_group>_cm2() methods for details.
- Returns:
- Predicted 5-year diameter increment for the subject tree (cm).
Can be negative if the tree shrinks. Minimum increment is -diameter_cm (tree diameter becomes 0).
- Return type:
float
- Raises:
NotImplementedError – If no equation is implemented for the species.
ValueError – If incompatible arguments are provided in underlying functions.
- static gmax_spruce_pine(*, dominant_height: float, H100: float, stems: float, latitude: float) float [source]¶
Maximum potential basal-area (Gmax) for Spruce & Pine stands. Elfving (2010).
- static stand_basal_area_bey2(*, vegetation: int | SwedenFieldLayer, stand_age: float, Basal_area_Conifer_m2_ha: float, Basal_area_Pine_m2_ha: float, Basal_area_Birch_m2_ha: float, Basal_area_after_thinning: float, Basal_area_before_thinning: float, Basal_area_stand: float, stems_after_thinning: float, peatland: bool, soil_moisture: int, SIS100: float, latitude: float, altitude: float, ditched: bool, thinned: bool, last_thinned: int, spruce_ba_proportion: float = 0.0) float [source]¶
5-year stand-level basal area increment after thinning (Elfving 2009, BEY2).