pyforestry.sweden.siteindex package#

Subpackages#

Submodules#

pyforestry.sweden.siteindex.carbonnier_1971 module#

Carbonnier (1971) beech height development and site index helpers.

The height-development model is Appendix IV of Carbonnier (1971): a stand’s height at age j is h_j = a_j + tau * b_j, where {a_j} and {b_j} are species-wide constants tabulated per five-year total age and tau characterises the individual stand. Fixing the site index at total age 100 pins tau = (h100 - a100) / b100.

Source:

Carbonnier, C. (1971). Bokens produktion i södra Sverige = Yield of beech in southern Sweden. Studia Forestalia Suecica nr 91. Institutionen för skogsproduktion, Skogshögskolan (Royal College of Forestry), Stockholm. Height-development curves: Appendix IV, derived by Susanne Kallstenius after a method of Bertil Matérn.

pyforestry.sweden.siteindex.carbonnier_1971.CARBONNIER_1971_MAX_TOTAL_AGE = 135.0#

Highest total age the published curves may be evaluated at (Appendix IV).

class pyforestry.sweden.siteindex.carbonnier_1971.CarbonnierHeightModel(ages: ~typing.Sequence[float | int | ~pyforestry.base.helpers.primitives.age.AgeMeasurement], a_vals: ~typing.Sequence[float], b_vals: ~typing.Sequence[float], species: set[~pyforestry.base.helpers.tree_species.TreeName] = <factory>)[source]#

Bases: object

Carbonnier (1971) height development model for European beech.

The original model uses age-indexed a and b coefficient tables with the linear relationship h_j = a_j + τ * b_j where τ is derived from the site index at a reference age (typically H100). τ is Matérn’s t in Appendix IV: τ = 0 is the average height development, positive values grow faster and negative values slower.

Parameters:
height_from_SI(age: float | int | AgeMeasurement, site_index: float | int | SiteIndexValue, si_age: float | int | AgeMeasurement = AgeMeasurement(100.0, code=1[TOTAL]), interpolate: bool = True) → SiteIndexValue[source]#

Compute height at age for a stand with given site index (H100).

site_index_from_height(height: float, measurement_age: float | int | AgeMeasurement, si_age: float | int | AgeMeasurement = AgeMeasurement(100.0, code=1[TOTAL]), interpolate: bool = True) → SiteIndexValue[source]#

Estimate site index at si_age from a measured top height.

pyforestry.sweden.siteindex.carbonnier_1971.carbonnier_1971_beech_height_model() → CarbonnierHeightModel[source]#

Return the published beech height model of Carbonnier (1971).

The coefficients are Table IV.1 of Appendix IV; the returned model is valid for total ages 10-135 years and is keyed on H100 (top height at 100 years total age).

Returns:

A CarbonnierHeightModel carrying the published {a_j} and {b_j} sequences for Fagus sylvatica.

pyforestry.sweden.siteindex.elfving_kiviste_1997 module#

Site index functions from Elfving & Kiviste (1997).

pyforestry.sweden.siteindex.elfving_kiviste_1997.elfving_kiviste_1997_height_trajectory_sweden_pine(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Scots Pine in Sweden based on Elfving & Kiviste (1997).

This function calculates the height of Scots Pine stands in Sweden for a given target age based on the dominant height at the initial age, using site index equations.

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (float) – Total age of the stand (years).

  • age2 (float) – Total age at the target output age (years).

Returns:

Height (meters) a stand will reach at age2.

Return type:

float

Raises:

Warning – If the input ages are outside the range of suitability (10 to 80 years).

References

Elfving, B., Kiviste, A. (1997). “Construction of site index equations for Pinus sylvestris L. using permanent plot data in Sweden.” Forest Ecology and Management, Vol. 98, Issue 2, pp. 125-134. DOI: https://doi.org/10.1016/S0378-1127(97)00077-7

Notes

  • Suitable for Scots Pine stands of cultivated origin between ages 10 and 80 years.

  • RMSE: 0.401.

pyforestry.sweden.siteindex.eriksson_1997 module#

Site index function for birch from Eriksson et al. (1997).

pyforestry.sweden.siteindex.eriksson_1997.eriksson_1997_height_trajectory_sweden_birch(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Birch in Sweden based on Eriksson et al. (1997).

This function estimates the dominant height of Birch stands in Sweden at a given target age, based on the dominant height at the initial age. The model is derived from the Hossfeld IV growth equation.

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Age of the stand at breast height (years). Must be float/int or Age.DBH.

  • age2 (Union[float, AgeMeasurement]) – Target age at breast height (years). Must be float/int or Age.DBH.

Returns:

Estimated dominant height (meters) at age2

wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If the input ages are outside the range of suitability (10 to 90 years).

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.DBH code.

References

Eriksson, H., Johansson, U., Kiviste, A. (1997). “A site-index model for pure and mixed stands of Betula pendula and Betula pubescens in Sweden.” Scandinavian Journal of Forest Research, 12:2, pp. 149-156. DOI: https://doi.org/10.1080/02827589709355396

Notes

  • Suitable for Birch stands of cultivated origin between ages 10 and 90 years (age at

    breast height).

  • Requires breast height age (Age.DBH).

pyforestry.sweden.siteindex.hagglund_1970 module#

Hägglund site index models for Swedish Norway spruce and Scots pine.

Three separate publications, one per model. The Hagglund_1970 class name is a legacy identifier: there is no Hägglund (1970) site-index publication.

Sources:

Hägglund, B. (1972). Om övre höjdens utveckling för gran i norra Sverige. Skogshögskolan, institutionen för skogsproduktion, Rapporter och uppsatser nr 21.

Hägglund, B. (1973). Om övre höjdens utveckling för gran i södra Sverige. Skogshögskolan, institutionen för skogsproduktion, Rapporter och uppsatser nr 24.

Hägglund, B. (1974). Övre höjdens utveckling i tallbestånd. Skogshögskolan, institutionen för skogsproduktion, Rapporter och uppsatser nr 31.

class pyforestry.sweden.siteindex.hagglund_1970.HagglundPineModel[source]#

Bases: object

Height trajectory model for Scots pine.

static sweden(dominant_height_m: float, age: float | AgeMeasurement, age2: float | AgeMeasurement, regeneration: HagglundPineRegeneration) → tuple[SiteIndexValue, float][source]#

Hägglund 1974: Height growth of Scots Pine in Sweden. The forward-only solver is used.

  • For age: if provided as Age.TOTAL, we solve using Newton–Raphson for the effective DBH age.

  • For age2: if Age.DBH is provided, T13 is added.

class pyforestry.sweden.siteindex.hagglund_1970.HagglundPineRegeneration(*values)[source]#

Bases: Enum

Regeneration method categories for the pine model.

CULTURE = 'culture'#
NATURAL = 'natural'#
UNKNOWN = 'unknown'#
class pyforestry.sweden.siteindex.hagglund_1970.HagglundSpruceModel[source]#

Bases: object

Height trajectory models for Norway spruce.

static northern_sweden(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement, latitude: float, culture: bool = True) → tuple[SiteIndexValue, float][source]#

Calculates the height trajectory of Norway Spruce in northern Sweden based on Hägglund (1972).

In this version, we allow the input parameter ‘age’ to be provided either as Age.DBH (the effective DBH age for the stand) or as Age.TOTAL. In the latter case we use Newton–Raphson to solve for the effective DBH age x that satisfies x + T13(x) = age_total.

For the prediction age ‘age2’:
  • If provided as Age.DBH, we add the computed T13 to obtain the total age.

  • Otherwise (if Age.TOTAL) it is used directly.

static southern_sweden(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → tuple[SiteIndexValue, float][source]#

Calculates the height trajectory of Norway Spruce in southern Sweden based on Hägglund (1973).

As in the northern function, the input ‘age’ can be provided either as DBH or TOTAL. If provided as TOTAL, we solve using Newton–Raphson for the effective DBH age. For the prediction age ‘age2’, if provided as DBH then T13 is added.

class pyforestry.sweden.siteindex.hagglund_1970.Hagglund_1970[source]#

Bases: object

Provides a class-based interface to Hägglund’s site index functions. Callers can choose to obtain either the height trajectory (site index) or the time to breast height (T13).

height_trajectory: HeightTrajectoryContainer = <pyforestry.sweden.siteindex.hagglund_1970.HeightTrajectoryContainer object>#
regeneration#

alias of HagglundPineRegeneration

time_to_breast_height: TimeToBreastHeightContainer = <pyforestry.sweden.siteindex.hagglund_1970.TimeToBreastHeightContainer object>#
class pyforestry.sweden.siteindex.hagglund_1970.HeightTrajectoryContainer[source]#

Bases: object

Expose height trajectory functions by species.

class pyforestry.sweden.siteindex.hagglund_1970.HeightTrajectoryWrapper(model)[source]#

Bases: object

Wrapper that calls the underlying model function and returns only the SiteIndexValue.

class pyforestry.sweden.siteindex.hagglund_1970.TimeToBreastHeightContainer[source]#

Bases: object

Expose T13 functions by species.

class pyforestry.sweden.siteindex.hagglund_1970.TimeToBreastHeightWrapper(model)[source]#

Bases: object

Wrapper that calls the underlying model function and returns only the T13 value.

pyforestry.sweden.siteindex.hagglund_remrod_1977 module#

Height trajectory models for lodgepole pine from Hägglund and Remröd (1977).

pyforestry.sweden.siteindex.hagglund_remrod_1977.hagglund_remrod_1977_height_trajectories_lodgepole_pine(dominant_height_m: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Hägglund and Remröd (1977): Height growth of Lodgepole Pine (Pinus contorta) in Northern Sweden.

This function computes the height of Lodgepole Pine at a specific age based on dominant height and initial age. The calculations are adapted from the original Chapman-Richards function.

Parameters:
  • dominant_height_m (float) – Dominant height of the stand or tree (meters).

  • age (float) – Age of the stand or tree at breast height (1.3 m).

  • age2 (float) – Age (DBH) for which the height is to be computed.

Returns:

Height at age2 in meters.

Return type:

float

Raises:

Warning – If the input values are outside the material range.

References

Hägglund, B., & Remröd, J. (1977). Övre höjdens utveckling i bestånd med Pinus contorta. HUGIN rapport nr. 4.

pyforestry.sweden.siteindex.johansson_1996 module#

Height growth model for European aspen based on Johansson (1996).

pyforestry.sweden.siteindex.johansson_1996.johansson_1996_height_trajectory_sweden_aspen(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement, model1: bool = False) → SiteIndexValue[source]#

Height trajectory for European Aspen in Sweden based on Johansson (1996).

This function calculates the height trajectory of European Aspen (Populus tremula L.) stands in Sweden, either based on the recommended site index model or an alternative model (Model 1).

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

  • model1 (bool) – If True, uses Model 1 from Johansson (1996); otherwise, uses the default model. Defaults to False.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If age or age2 exceed 60 years, as the model is suitable for stands under 60 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, T. (1996). “Site Index Curves for European Aspen (Populus tremula L.) Growing on Forest Land of Different Soils in Sweden.” Silva Fennica 30(4): 437-458. DOI: https://doi.org/10.14214/sf.a8503

Notes

  • The function is suitable for stands of Aspen under 60 years of age.

  • If Model 1 is selected, the formula uses a simpler exponential model.

  • Requires total age (Age.TOTAL).

pyforestry.sweden.siteindex.johansson_1999 module#

Site index functions for alder based on Johansson (1999).

pyforestry.sweden.siteindex.johansson_1999.johansson_1999_height_trajectory_sweden_alnus_glutinosa(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Common Alder (Alnus glutinosa) in Sweden based on Johansson (1999).

This function calculates the height trajectory for Common Alder stands in Sweden, suitable for stands under 100 years of age.

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If the input ages exceed 100 years, as the model is suitable for stands under 100 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, T. (1999). “Site Index Curves for Common Alder and Grey Alder Growing on Different Types of Forest Soil in Sweden.” Scandinavian Journal of Forest Research, Vol. 14:5, pp. 441-453. DOI: https://doi.org/10.1080/02827589950154140

Notes

  • Suitable for Common Alder stands under 100 years of age.

  • Requires total age (Age.TOTAL).

pyforestry.sweden.siteindex.johansson_1999.johansson_1999_height_trajectory_sweden_alnus_incana(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Grey Alder (Alnus incana) in Sweden based on Johansson (1999).

This function calculates the height trajectory for Grey Alder stands in Sweden, suitable for stands under 70 years of age.

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If the input ages exceed 70 years, as the model is suitable for stands under 70 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, T. (1999). “Site Index Curves for Common Alder and Grey Alder Growing on Different Types of Forest Soil in Sweden.” Scandinavian Journal of Forest Research, Vol. 14:5, pp. 441-453. DOI: https://doi.org/10.1080/02827589950154140

Notes

  • Suitable for Grey Alder stands under 70 years of age.

  • Requires total age (Age.TOTAL).

pyforestry.sweden.siteindex.johansson_2011 module#

Site index model for poplar on farmland from Johansson (2011).

pyforestry.sweden.siteindex.johansson_2011.johansson_2011_height_trajectory_sweden_poplar(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Poplar on former farmland in Sweden based on Johansson (2011).

This function calculates the height trajectory for Poplar stands in Sweden using a generalized algebraic difference approach (ADA) model.

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – Indicates the model is suitable for stands under 50-60 years of age.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, T. (2011). “Site index curves for Poplar growing on former farmland in Sweden.” Scandinavian Journal of Forest Research, Vol. 26(2), pp. 161-170. DOI: https://doi.org/10.1080/02827581.2010.543428

Notes

  • Suitable for Poplar stands growing on former farmland in Sweden.

  • Model is most accurate for stands under 50 to 60 years of age.

  • Requires total age (Age.TOTAL).

  • Assumes Poplar refers to Populus tremula for species assignment.

pyforestry.sweden.siteindex.johansson_2013 module#

Height growth models from FAKTA SKOG (Johansson et al., 2013).

pyforestry.sweden.siteindex.johansson_2013.johansson_2013_height_trajectory_sweden_beech(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Beech in Sweden based on Johansson et al. (2013).

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If age or age2 is outside the range of 20 to 150 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, U., Ekö, P.-M., Elfving, B., Johansson, T., Nilsson, U. (2013). “Nya höjdutvecklingskurvor för bonitering.” FAKTA SKOG nr. 14. https://www.slu.se/globalassets/ew/ew-centrala/forskn/popvet-dok/faktaskog/faktaskog13/faktaskog_14_2013.pdf

Notes

  • Requires total age (Age.TOTAL).

pyforestry.sweden.siteindex.johansson_2013.johansson_2013_height_trajectory_sweden_hybrid_aspen(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Hybrid Aspen in Sweden based on Johansson (2013).

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If age or age2 is above 50 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, T. (2013). “A site dependent top height growth model for hybrid aspen.” Journal of Forestry Research, Vol. 24, pp. 691-698. https://doi.org/10.1007/s11676-013-0365-6

Notes

  • Requires total age (Age.TOTAL).

pyforestry.sweden.siteindex.johansson_2013.johansson_2013_height_trajectory_sweden_larch(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Larch in Sweden based on Johansson et al. (2013).

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If age or age2 is outside the range of 10 to 100 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, U., Ekö, P.-M., Elfving, B., Johansson, T., Nilsson, U. (2013). “Nya höjdutvecklingskurvor för bonitering.” FAKTA SKOG nr. 14. https://www.slu.se/globalassets/ew/ew-centrala/forskn/popvet-dok/faktaskog/faktaskog13/faktaskog_14_2013.pdf

Notes

  • Requires total age (Age.TOTAL).

  • Assigns TreeSpecies.Sweden.larix_sibirica as the species.

pyforestry.sweden.siteindex.johansson_2013.johansson_2013_height_trajectory_sweden_oak(dominant_height: float, age: float | AgeMeasurement, age2: float | AgeMeasurement) → SiteIndexValue[source]#

Height trajectory for Oak in Sweden based on Johansson et al. (2013).

Parameters:
  • dominant_height (float) – Dominant height of the stand (meters).

  • age (Union[float, AgeMeasurement]) – Total age of the stand (years). Must be float/int or Age.TOTAL.

  • age2 (Union[float, AgeMeasurement]) – Target age for output height (years). Must be float/int or Age.TOTAL.

Returns:

Dominant height at age2 (meters) wrapped in a SiteIndexValue object.

Return type:

SiteIndexValue

Raises:
  • Warning – If age or age2 is outside the range of 20 to 150 years.

  • TypeError – If age or age2 are not float/int or AgeMeasurement with Age.TOTAL code.

References

Johansson, U., Ekö, P.-M., Elfving, B., Johansson, T., Nilsson, U. (2013). “Nya höjdutvecklingskurvor för bonitering.” FAKTA SKOG nr. 14. https://www.slu.se/globalassets/ew/ew-centrala/forskn/popvet-dok/faktaskog/faktaskog13/faktaskog_14_2013.pdf

Notes

  • Requires total age (Age.TOTAL).

  • Assigns TreeSpecies.Sweden.quercus_robur as the species.

pyforestry.sweden.siteindex.validation module#

Validation helpers for H100 site-index metadata.

These checks enforce that model-facing SiteIndexValue inputs are: - H100 values (reference age 100), - tagged with exactly one expected species, - derived from the Hagglund (1970) height trajectory family.

pyforestry.sweden.siteindex.validation.validate_hagglund_1970_h100_site_index(site_index_value: SiteIndexValue, *, param_name: str = 'site_index_value', expected_species: TreeName | None = None, allowed_species: Set[TreeName] | None = None) → TreeName[source]#

Validate that a site-index value is a Hagglund (1970) H100 input.

Parameters:
  • site_index_value (SiteIndexValue) – Site-index value to validate.

  • param_name (str) – Input name used in error messages.

  • expected_species (TreeName | None) – Require an exact species match when set.

  • allowed_species (set[TreeName] | None) – Require species membership when set.

Returns:

The validated single species encoded in site_index_value.

Return type:

TreeName

Module contents#

Convenience re-exports for Swedish site index functions.