pyforestry.sweden.siteindex.sis package#

Submodules#

pyforestry.sweden.siteindex.sis.eko_2008 module#

Ekö et al. (2008) regional growth-difference site index adjustment.

Source:

Ekö, P.-M., Johansson, U., Petersson, N., Bergqvist, J., Elfving, B. & Frisk, J. (2008). Current growth differences of Norway spruce (Picea abies), Scots pine (Pinus sylvestris) and birch (Betula pendula and Betula pubescens) in different regions in Sweden. Scandinavian Journal of Forest Research 23(4):307-318. doi:10.1080/02827580802249126

pyforestry.sweden.siteindex.sis.eko_2008.eko_pm_2008_estimate_si_birch(altitude: float, latitude: float, vegetation: SwedenFieldLayer, ground_layer: SwedenBottomLayer, lateral_water: SwedenSoilWater, soil_moisture: SwedenSoilMoisture) → SiteIndexValue[source]#

Estimate SIH50 (Site Index for Birch H50) with stand factors based on Ekö et al. (2008).

This function calculates the Site Index for Birch based on altitude, latitude, vegetation, ground layer, lateral water presence, and soil moisture type. The model is derived from empirical relationships provided in Ekö et al. (2008).

Parameters:
  • altitude (float) – Altitude in meters above sea level.

  • latitude (float) – Latitude in degrees.

  • vegetation (SwedenFieldLayer) – Vegetation type.

  • ground_layer (SwedenBottomLayer) – Ground layer type.

  • lateral_water (SwedenSoilWater) – Degree of lateral water flow.

  • soil_moisture (SwedenSoilMoisture) – Soil moisture class.

Returns:

Site index (H50) for Birch.

Return type:

SiteIndexValue

Raises:

ValueError – If the soil moisture type is not “mesic” (2) or “moist” (4).

References

Ekö, P.-M., Johansson, U., Petersson, N., Bergqvist, J., Elfving, B., Frisk, J. (2008). Current growth differences of Norway spruce (Picea abies), Scots Pine (Pinus sylvestris) and birch (Betula pendula and Betula pubescens) in different regions in Sweden. Scandinavian Journal of Forest Research, Vol. 23:4, pp. 307-318. DOI: https://doi.org/10.1080/02827580802249126

pyforestry.sweden.siteindex.sis.generated_site_category_trees module#

County-tree site-category predictor backed by fitted decision-tree tables.

The fitted decision trees (one per categorical SIS target) are stored in the sibling site_category_trees.json data asset and loaded at import via importlib.resources. This module exposes them under their historical names (CAT_TARGETS, SPECIES_CATEGORIES, SPECIES_FILL_VALUE, NUMERIC_DEFAULTS, TARGET_MODELS) and provides predict_site_categories_county_tree().

The JSON tables are generated, not hand-edited: re-fit them in docs/source/notebooks/_archive/SIS_test.ipynb and re-export the data file.

pyforestry.sweden.siteindex.sis.generated_site_category_trees.predict_site_categories_county_tree(*, sis_hagglund_1979: Any, species: Any, Direktlan: Any) → dict[str, Any][source]#

Predict Sweden site-category enums from SIS, species, and county (Direktlän) inputs.

pyforestry.sweden.siteindex.sis.hagglund_lundmark_1977 module#

Hägglund & Lundmark (1977) site index estimation models.

This module implements routines for estimating H100 (height at age 100) for Norway spruce and Scots pine stands in Sweden using the stand factor models described by Hägglund and Lundmark (1977), taken from the corrected Appendix II functions reprinted in Hägglund (1979).

The original equations are reproduced together with various corrections used in the Swedish National Forest Inventory (NFI). The public entry point is Hagglund_Lundmark_1977_SIS which dispatches to species specific helper functions.

pyforestry.sweden.siteindex.sis.hagglund_lundmark_1977.Hagglund_Lundmark_1977_SIS(latitude: float, altitude: float, soil_moisture: int | Sweden.SoilMoistureEnum, ground_layer: int | Sweden.BottomLayer, vegetation: int | Sweden.FieldLayer, soil_texture: int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment, climate_code: float | str | Sweden.ClimateZone, lateral_water: int | Sweden.SoilWater, soil_depth: int | Sweden.SoilDepth, incline_percent: float, aspect: float, ditched: bool = False, peat: bool = False, gotland: bool = False, coast: bool = False, limes_norrlandicus: bool = False, nfi_adjustments: bool = True, species: str = 'Picea abies', dlan: int | Sweden.County | None = None) → float[source]#

Estimate Site Index H100 for Scots Pine or Norway Spruce in Sweden by stand factors.

Source: Corrected functions from Appendix II for estimation of site index by site factors according to Hägglund and Lundmark (1977), in Hägglund, B. (1979) Ett system för bonitering av skogsmark - analys, kontroll och diskussion inför praktisk tillämpning. Rapport 14, Projekt HUGIN. Skogsvetenskapliga fakulteten, Sveriges Lantbruksuniversitet. Umeå. Sweden.

Hägglund, B., Lundmark, J-E. (1977) Skattning av höjdboniteten med ståndortsfaktorer: Tall och gran i Sverige. Research Notes nr. 28. Dept. Forest Ecology & Forest Soils. Royal College of Forestry. Stockholm. Sweden.

Details: Uses corrected functions from appendix II in Hägglund & Lundmark 1979, except for when used on peat soils, in which case functions f. 8.1 & f. 8.2. pages 138-139 from Hägglund & Lundmark (1977) is used.

Parameters:
  • species (str) – One of “Picea abies” (default) or “Pinus sylvestris”.

  • vegetation (int | Sweden.FieldLayer) – Integer 1-18 or enum member.

  • ground_layer (int | Sweden.BottomLayer) – Integer 1-6 or enum member.

  • latitude (float) – Decimal WGS84.

  • altitude (float) – Meters above sea level.

  • aspect (int) – Main aspect of the site. int 0-360.

  • incline_percent (float) – Incline of slope, in percent. Default == 0.

  • soil_moisture (int | Sweden.SoilMoistureEnum) – Integer 1-5 or enum member. 1: Dry, 2: Mesic, 3: Mesic-Moist, 4: Moist, 5: Wet

  • soil_texture (int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment) – Integer 1-9 or enum member.

  • soil_depth (int | Sweden.SoilDepth) – Integer 1-5 or enum member. 1: Deep >70 cm, 2: Rather shallow 20-70 cm, 3: Shallow < 20 cm, 4: Varying. 5: New nfi designation ‘häll’, en: ‘outcrop’.

  • lateral_water (int | Sweden.SoilWater) – Integer 1-3 or enum member. 1: Seldom/never, 2: Shorter periods, 3: Longer periods.

  • ditched (bool) – FALSE (default) if plot affected by ditching.

  • climate_code (str | Sweden.ClimateZone) – One of: NA (default), ‘M1’, ‘M2’, ‘K1’, ‘K2’, ‘K3’ or enum member.

  • coast (bool) – FALSE (default) if plot is closer to coast than 50km.

  • limes_norrlandicus (bool) – FALSE (default) if plot is north of Sernanders Limes Norrlandicus (used for Peat soils only.)

  • gotland (bool) – FALSE (default) if plot is located in Gotland.

  • nfi_adjustments (bool) – TRUE (default) if adjustments based on NFI should be applied. N.B. This applies coastal correction n. of Limes norrlandicus always.

  • dlan (int | Sweden.County) – Optional. None (default). 1-31 according to NFI ID.

Returns:

Site Index H100 (meters). Will return NA & issue a warning message if no method was found.

Return type:

float

pyforestry.sweden.siteindex.sis.hagglund_lundmark_1977.nfi_sis_pine(**kwargs) → float[source]#

Estimate Site Index H100 for Pine in Sweden by stand factors.

Source: Corrected functions from Appendix II for estimation of site index by site factors according to Hägglund and Lundmark (1977), in Hägglund, B. (1979) Ett system för bonitering av skogsmark - analys, kontroll och diskussion inför praktisk tillämpning. Rapport 14, Projekt HUGIN. Skogsvetenskapliga fakulteten, Sveriges Lantbruksuniversitet. Umeå. Sweden.

Hägglund, B., Lundmark, J-E. (1977) Skattning av höjdboniteten med ståndortsfaktorer: Tall och gran i Sverige. Research Notes nr. 28. Dept. Forest Ecology & Forest Soils. Royal College of Forestry. Stockholm. Sweden.

Details: Uses corrected functions from appendix II in Hägglund & Lundmark 1979, except for when used on peat soils, in which case functions f. 8.1 & f. 8.2. pages 138-139 from Hägglund & Lundmark (1977) is used.

Parameters:
  • vegetation (int | Sweden.FieldLayer) – Integer 1-18 or enum member.

  • groundLayer (int | Sweden.BottomLayer) – Integer 1-6 or enum member.

  • latitude (float) – Decimal WGS84.

  • altitude (float) – Meters above sea level.

  • aspect (int) – Main aspect of the site. int 0-360.

  • incline_percent (float) – Incline of slope, in percent. Default == 0.

  • soil_moisture (int | Sweden.SoilMoistureEnum) – Integer 1-5 or enum member. 1: Dry, 2: Mesic, 3: Mesic-Moist, 4: Moist, 5: Wet

  • soil_texture (int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment) – Integer 1-9 or enum member.

  • soil_depth (int | Sweden.SoilDepth) – Integer 1-5 or enum member. 1: Deep >70 cm, 2: Rather shallow 20-70 cm, 3: Shallow < 20 cm, 4: Varying. 5: New nfi designation ‘häll’, en: ‘outcrop’.

  • lateral_water (int | Sweden.SoilWater) – Integer 1-3 or enum member. 1: Seldom/never, 2: Shorter periods, 3: Longer periods.

  • ditched (bool) – FALSE (default) if plot affected by ditching.

  • climate_code (str | Sweden.ClimateZone) – One of: NA (default), ‘M1’, ‘M2’, ‘K1’, ‘K2’, ‘K3’ or enum member.

  • coast (bool) – FALSE (default) if plot is closer to coast than 50km.

  • limes_norrlandicus (bool) – FALSE (default) if plot is north of Sernanders Limes Norrlandicus (used for Peat soils only.)

  • gotland (bool) – FALSE (default) if plot is located in Gotland.

  • nfi_adjustments (bool) – TRUE (default) if adjustments based on NFI should be applied. N.B. This applies coastal correction n. of Limes norrlandicus always.

Returns:

Site Index H100 (meters). Will return NA & issue a warning message if no method was found.

Return type:

float

pyforestry.sweden.siteindex.sis.hagglund_lundmark_1977.nfi_sis_spruce(**kwargs) → float[source]#

Estimate Site Index H100 for Spruce in Sweden by stand factors.

Source: Corrected functions from Appendix II for estimation of site index by site factors according to Hägglund and Lundmark (1977), in Hägglund, B. (1979) Ett system för bonitering av skogsmark - analys, kontroll och diskussion inför praktisk tillämpning. Rapport 14, Projekt HUGIN. Skogsvetenskapliga fakulteten, Sveriges Lantbruksuniversitet. Umeå. Sweden.

Hägglund, B., Lundmark, J-E. (1977) Skattning av höjdboniteten med ståndortsfaktorer: Tall och gran i Sverige. Research Notes nr. 28. Dept. Forest Ecology & Forest Soils. Royal College of Forestry. Stockholm. Sweden.

Details: Uses corrected functions from appendix II in Hägglund & Lundmark 1979, except for when used on peat soils, in which case functions f. 8.1 & f. 8.2. pages 138-139 from Hägglund & Lundmark (1977) is used.

Parameters:
  • vegetation (int | Sweden.FieldLayer) – Integer 1-18 or enum member.

  • groundLayer (int | Sweden.BottomLayer) – Integer 1-6 or enum member.

  • latitude (float) – Decimal WGS84.

  • altitude (float) – Meters above sea level.

  • aspect (int) – Main aspect of the site. int 0-360.

  • incline_percent (float) – Incline of slope, in percent. Default == 0.

  • soil_moisture (int | Sweden.SoilMoistureEnum) – Integer 1-5 or enum member. 1: Dry, 2: Mesic, 3: Mesic-Moist, 4: Moist, 5: Wet

  • soil_texture (int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment) – Integer 1-9 or enum member.

  • soil_depth (int | Sweden.SoilDepth) – Integer 1-5 or enum member. 1: Deep >70 cm, 2: Rather shallow 20-70 cm, 3: Shallow < 20 cm, 4: Varying. 5: New nfi designation ‘häll’, en: ‘outcrop’.

  • lateral_water (int | Sweden.SoilWater) – Integer 1-3 or enum member. 1: Seldom/never, 2: Shorter periods, 3: Longer periods.

  • ditched (bool) – FALSE (default) if plot affected by ditching.

  • climate_code (str | Sweden.ClimateZone) – One of: NA (default), ‘M1’, ‘M2’, ‘K1’, ‘K2’, ‘K3’ or enum member.

  • coast (bool) – FALSE (default) if plot is closer to coast than 50km.

  • limes_norrlandicus (bool) – FALSE (default) if plot is north of Sernanders Limes Norrlandicus (used for Peat soils only.)

  • gotland (bool) – FALSE (default) if plot is located in Gotland.

  • nfi_adjustments (bool) – TRUE (default) if adjustments based on NFI should be applied. N.B. This applies coastal correction n. of Limes norrlandicus always.

  • dlan (int | Sweden.County) – Optional. None (default). 1-31 according to NFI ID.

Returns:

H100 site index estimate. Will return NA & issue a warning message if no method was found.

Return type:

SiteIndexValue

pyforestry.sweden.siteindex.sis.tegnhammar_1992 module#

Tegnhammar (1992) site index estimation for Norway spruce.

Source:

Tegnhammar, L. (1992). Om skattningen av ståndortsindex för gran. Sveriges lantbruksuniversitet, institutionen för skogstaxering, Rapport nr 53, Umeå, 259 s.

pyforestry.sweden.siteindex.sis.tegnhammar_1992.tegnhammar_1992_adjusted_si_spruce(sih, dominant_age, latitude)[source]#

Tegnhammar’s correction for SI 1992.

Parameters:
  • sih (float) – Site index in metres.

  • dominant_age (float) – Arithmetic mean of the age at breast height of the dominant trees.

  • latitude (float) – Latitude in degrees.

Returns:

Adjusted SIH in metres.

Return type:

float

pyforestry.sweden.siteindex.sis.tegnhammar_1992.tegnhammar_1992_adjusted_spruce_si_by_stand_variables(latitude: float, longitude: float, altitude: float, vegetation: int | SwedenFieldLayer, ground_layer: int | SwedenBottomLayer, aspect_main: int, soil_moisture: int | SwedenSoilMoisture, soil_depth: int | SwedenSoilDepth, soil_texture: int | SwedenSoilTextureTill | SwedenSoilTextureSediment, humidity: float | None = None, ditched: bool = False, lateral_water: int | SwedenSoilWater = 1, peat_humification: int | SwedenPeatHumification = SwedenPeatHumification.MEDIUM, epsg: str = 'EPSG:4326') → SiteIndexValue[source]#

Calculate Tegnhammar’s adjusted Site Index from stand variables.

Source: Tegnhammar, L. (1992). “Om skattningen av ståndortsindex för gran”. Report 53. Dept. of Forest Survey. Swedish University of Agricultural Sciences. Umeå.

Parameters:
  • latitude (float) – Decimal degrees. Default WGS84, see parameter epsg.

  • longitude (float) – Decimal degrees. Default WGS84, see parameter epsg.

  • altitude (float) – Metres above sea level.

  • vegetation (int | Sweden.FieldLayer) – Vegetation type.

  • ground_layer (int | Sweden.BottomLayer) – Ground layer type.

  • aspect_main (int) – Aspect code. Use 0 if slope is below 5%.

  • soil_moisture (int | Sweden.SoilMoistureEnum) – Soil moisture 1-5.

  • soil_depth (int | Sweden.SoilDepth) – Soil depth class.

  • ( (soil_texture) – int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment

  • ) – Soil texture code.

  • humidity (float | None, optional) – Humidity during the vegetation period in mm. If None it will be calculated.

  • ditched (bool) – True if affected by ditching.

  • lateral_water (int | Sweden.SoilWater) – Water availability code.

  • peat_humification (int | Sweden.PeatHumification) – Peat decomposition level.

  • epsg (str) – Coordinate system (default is WGS84: "EPSG:4326").

Returns:

Tegnhammar’s adjusted SI in metres.

Return type:

SiteIndexValue

pyforestry.sweden.siteindex.sis.tegnhammar_1992_adjusted_spruce_si_by_stand_variables module#

Tegnhammar (1992) adjusted spruce site index from stand variables.

Source:

Tegnhammar, L. (1992). Om skattningen av ståndortsindex för gran. Sveriges lantbruksuniversitet, institutionen för skogstaxering, Rapport nr 53, Umeå, 259 s.

pyforestry.sweden.siteindex.sis.tegnhammar_1992_adjusted_spruce_si_by_stand_variables.tegnhammar_1992_adjusted_spruce_si_by_stand_variables(latitude: float, longitude: float, altitude: float, vegetation: int | Sweden.FieldLayer, ground_layer: int | Sweden.BottomLayer, aspect_main: int, soil_moisture: int | Sweden.SoilMoistureEnum, soil_depth: int | Sweden.SoilDepth, soil_texture: int | Sweden.SoilTextureTill | Sweden.SoilTextureSediment, humidity: float | None = None, ditched: bool = False, lateral_water: int | Sweden.SoilWater = 1, peat_humification: int | Sweden.PeatHumification = SwedenPeatHumification.MEDIUM, epsg: str = 'EPSG:4326') → SiteIndexValue[source]#

Wrapper for pyforestry.sweden.siteindex.sis.tegnhammar_1992() using explicit Sweden enums.

Module contents#

Init utilities and interfaces.

Source: Swedish forestry domain models and helper implementations curated in pyforestry.