pyforestry.sweden.misc package#
Submodules#
pyforestry.sweden.misc.nfi_age_to_bh module#
Age-to-breast-height and dominant mean diameter helpers for Sweden.
These helpers reproduce the Elfving (2009) NFI smoothing for time-to-breast-height (T13) and the dominant mean diameter (Dm) regression.
- pyforestry.sweden.misc.nfi_age_to_bh.age_to_breast_height_elfving_years(*, site_index_m: float | SiteIndexValue, latitude_deg: float, species: TreeName) float[source]#
Estimate time to reach breast height (T13) in years.
- Source:
Elfving (2009) NFI smoothing: T13 = 37 – 0.605*LAT – 1121/SIS + 21.92*LAT/SIS + 29.5*ISSPRUCE/SIS
- Parameters:
site_index_m (float | SiteIndexValue) – Site index (m), typically SIS.
SiteIndexValueinputs must be Hagglund (1970) pine/spruce H100.latitude_deg (float) – Latitude in degrees (N).
species (TreeName) – Tree species.
- Returns:
Years to reach breast height (T13).
- Return type:
float
- Raises:
ValueError – If
site_index_mis non-positive.
- pyforestry.sweden.misc.nfi_age_to_bh.dominant_mean_diameter_cm(*, mean_age_total_years: float, field_estimated_basal_area_m2_ha: float, site_index_m: float) float[source]#
Compute dominant mean diameter (Dm) in centimeters.
- Source:
Dominant mean-diameter regression (Lind 2003 / Elfving 2003).
- Parameters:
mean_age_total_years (float) – Basal-area weighted mean total age (years).
field_estimated_basal_area_m2_ha (float) – Field-estimated basal area (m2/ha).
site_index_m (float) – Site index (m).
- Returns:
Dominant mean diameter (cm). Returns 0.0 when inputs are invalid.
- Return type:
float
Module contents#
Miscellaneous Sweden helper utilities.