pyforestry.sweden.volume package

Submodules

pyforestry.sweden.volume.andersson_1954 module

pyforestry.sweden.volume.andersson_1954.andersson_1954_volume_small_trees_birch_height_above_4_m(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Birch.

Description:

Suitable for trees taller than 4 m.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954.andersson_1954_volume_small_trees_birch_under_diameter_5_cm(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Birch.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954.andersson_1954_volume_small_trees_pine(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Pine.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954.andersson_1954_volume_small_trees_spruce(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Spruce.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.brandel_1990 module

class pyforestry.sweden.volume.brandel_1990.BrandelVolume[source]

Bases: object

BirchSouthWithLatitudeCoeff: List[float] = [0.0, 2.23818, -1.0693, 6.02015, -4.51472]
BirchSouthWithLatitudeConstant: List[float] = [-0.89363, -0.8548, -0.84627]
NorthBirchCoeff: List[float] = [-0.44224, 2.4758, -1.40854, 5.16863, -3.77147]
NorthBirchUbCoeff: List[float] = [-0.72541, 2.36594, -1.10578, 4.76151, -3.40177]
NorthPineCoeff: List[float] = [-1.20914, 1.9474, -0.05947, 1.40958, -0.4581]
NorthPineUbCoeff: List[float] = [-1.23242, 1.95242, -0.05839, 1.1344, -0.13476]
NorthSpruceCoeff: List[float] = [-0.79783, 2.07157, -0.73882, 3.16332, -1.82622]
NorthSpruceUbCoeff: List[float] = [-0.77561, 2.06126, -0.77313, 3.2758, -1.90707]
PineNorthWithLatitudeCoeff: List[float] = [0.0, 1.93867, -0.04966, 1.81528, -0.8091]
PineNorthWithLatitudeConstant: List[float] = [-1.30052, -1.29068, -1.28297, -1.28213]
PineSouthWithLatitudeCoeff: List[float] = [0.0, 1.83182, 0.07275, 2.12777, -1.09439]
PineSouthWithLatitudeConstant: List[float] = [-1.40718, -1.41955, -1.41472]
SouthBirchCoeff: List[float] = [-0.89359, 2.27954, -1.18672, 7.07362, -5.45175]
SouthBirchUbCoeff: List[float] = [-1.09667, 2.20855, -0.85821, 5.81764, -4.34685]
SouthPineCoeff: List[float] = [-1.38903, 1.84493, 0.06563, 2.02122, -1.01095]
SouthPineUbCoeff: List[float] = [-1.23602, 1.94126, -0.11924, 1.80842, -0.74261]
SouthSpruceCoeff: List[float] = [-1.02039, 2.00128, -0.47473, 2.87138, -1.61803]
SouthSpruceUbCoeff: List[float] = [-1.07676, 1.97159, -0.42776, 2.84877, -1.5863]
SpruceNorthWithLatitudeAndAltitudeCoeff: List[float] = [0.0, 2.11123, -0.76342, 3.07608, -1.78237]
SpruceNorthWithLatitudeAndAltitudeConstant: List[List[float]] = [[-0.7491, -0.75384, -0.75549, -0.7664], [-0.75208, -0.75682, -0.75847, -0.76938], [-0.76488, -0.76962, -0.77127, -0.78218]]
SpruceSouthWithfieldlayerTypeCoeff: List[float] = [0.0, 1.99515, -0.46351, 2.84571, -1.59871]
SpruceSouthWithfieldlayerTypeConstant: List[float] = [-1.01862, -1.02745, -1.02651, -1.03775, -1.03775, -1.03775]
fieldlayerTypeToIndex: List[int] = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 5]
static get_coefficients(part_of_sweden: str, latitude: float, altitude: float | None, fieldlayer_type: int | object | None, over_bark: bool = True) Dict[str, List[float]][source]

If both altitude and fieldlayer_type are provided, the most detailed remapping is used. Otherwise, fallback to a simpler default based solely on latitude:

  • if latitude > 60: use North coefficients;

  • else: use South coefficients.

static get_volume(species: str, diameter_cm: float, height_m: float, latitude: float, altitude: float | None, field_layer: int | object | None, over_bark: bool = True) float[source]

Main entry point. Computes the tree volume (in dm³) for a given species based on:

  • diameter_cm: tree diameter in centimeters,

  • height_m: tree height in meters,

  • latitude: site latitude,

  • altitude: site altitude,

  • fieldlayer: fieldlayer type (as int or an object with a ‘code’ attribute),

  • over_bark: over bark flag.

The part_of_sweden is determined from latitude:

‘south’ if lat < 57, ‘middle’ if lat < 59, else ‘north’.

static get_volume_log(coeff: List[float], diameter_cm: float, height_m: float) float[source]

pyforestry.sweden.volume.carbonnier_1954 module

pyforestry.sweden.volume.carbonnier_1954.carbonnier_1954_volume_larch(diameter_cm, height_m)[source]

Volume of Larch trees, from Carbonnier 1954.

Source:

Carbonnier, C. 1954. Funktioner för kubering av europeisk, sibirisk och japansk lärk. MS. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf

Parameters:
  • diameter_cm (float) – Diameter at breast height in cm.

  • height_m (float) – Height of the tree in meters.

Returns:

Volume of the tree in m³.

Return type:

float

pyforestry.sweden.volume.eriksson_1973 module

pyforestry.sweden.volume.eriksson_1973.Eriksson_1973_volume_aspen_Sweden(diameter_cm: float, height_m: float) float[source]

Calculates the volume of a Ash, Aspen, Alnus glutinosa tree in m³ according to Eriksson (1973).

Parameters:
  • height (float) – Tree height in dm.

  • diameter (float) – Tree diameter in cm.

Returns:

Calculated volume in m³.

Return type:

float

Reference:

Eriksson, H. (1973). Volymfunktioner för stående träd av ask, asp, klibbal och contortatall. Skogshögskolan, institutionen för skogsproduktion. Rapp. o. Upps. nr 26.

pyforestry.sweden.volume.eriksson_1973.Eriksson_1973_volume_lodgepole_pine_Sweden(diameter_cm: float, height_m: float) float[source]

Calculates the volume of a Lodgepole Pine tree in m³ according to Eriksson (1973).

Parameters:
  • height (float) – Tree height in dm.

  • diameter (float) – Tree diameter in cm.

Returns:

Calculated volume in m³.

Return type:

float

Reference:

Eriksson, H. (1973). Volymfunktioner för stående träd av ask, asp, klibbal och contortatall. Skogshögskolan, institutionen för skogsproduktion. Rapp. o. Upps. nr 26.

pyforestry.sweden.volume.johnsson_1953 module

pyforestry.sweden.volume.johnsson_1953.johnsson_1953_volume_hybrid_aspen(diameter_cm, height_m)[source]

Calculate stem volume for Hybrid Aspen based on Johnsson (1953).

This function estimates the stem volume over bark for Hybrid Aspen trees in cubic meters using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Stem volume over bark (m³).

Return type:

float

References

Johnsson, H. (1953). “Hybridaspens ungdomsutveckling och ett försök till framtidsprognos.” Svenska skogsvårdsföreningens tidsskrift. 51:73-96.

Rytter, L., Stener, L.-G. (2014). “Growth and thinning effects during a rotation period of hybrid aspen in southern Sweden.” Scandinavian Journal of Forest Research, Vol. 29, Issue 8, pp. 747-756. DOI: https://doi.org/10.1080/02827581.2014.968202

pyforestry.sweden.volume.matern_1975 module

pyforestry.sweden.volume.matern_1975.matern_1975_volume_sweden_beech(diameter_cm, height_m)[source]

Calculate the volume of Beech trees based on Matérn (1975).

This function estimates the volume of standing Beech trees in Sweden using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Volume of the tree (m³).

Return type:

float

References

Matérn, B. (1975). “Volymfunktioner för stående träd av ek och bok.” Skogshögskolan, institutionen för skoglig matematisk statistik. Rapp. o. Upps. nr 15. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf

pyforestry.sweden.volume.matern_1975.matern_1975_volume_sweden_oak(diameter_cm, height_m)[source]

Calculate the volume of Oak trees based on Matérn (1975).

This function estimates the volume of standing Oak trees in Sweden using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Volume of the tree (m³).

Return type:

float

References

Matérn, B. (1975). “Volymfunktioner för stående träd av ek och bok.” Skogshögskolan, institutionen för skoglig matematisk statistik. Rapp. o. Upps. nr 15. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf

pyforestry.sweden.volume.naslund_1947 module

class pyforestry.sweden.volume.naslund_1947.NaslundFormFactor[source]

Bases: object

static calculate(species: str, height_m: float, diameter_cm: float, double_bark_mm: float | None = None, crown_base_height_m: float | None = None, over_bark: bool = True, region: str = 'southern') float[source]
class pyforestry.sweden.volume.naslund_1947.NaslundVolume[source]

Bases: object

static calculate(timber: SweTimber) float[source]

Module contents

Lazy-loading interface for Swedish volume models.

class pyforestry.sweden.volume.BrandelVolume[source]

Bases: object

BirchSouthWithLatitudeCoeff: List[float] = [0.0, 2.23818, -1.0693, 6.02015, -4.51472]
BirchSouthWithLatitudeConstant: List[float] = [-0.89363, -0.8548, -0.84627]
NorthBirchCoeff: List[float] = [-0.44224, 2.4758, -1.40854, 5.16863, -3.77147]
NorthBirchUbCoeff: List[float] = [-0.72541, 2.36594, -1.10578, 4.76151, -3.40177]
NorthPineCoeff: List[float] = [-1.20914, 1.9474, -0.05947, 1.40958, -0.4581]
NorthPineUbCoeff: List[float] = [-1.23242, 1.95242, -0.05839, 1.1344, -0.13476]
NorthSpruceCoeff: List[float] = [-0.79783, 2.07157, -0.73882, 3.16332, -1.82622]
NorthSpruceUbCoeff: List[float] = [-0.77561, 2.06126, -0.77313, 3.2758, -1.90707]
PineNorthWithLatitudeCoeff: List[float] = [0.0, 1.93867, -0.04966, 1.81528, -0.8091]
PineNorthWithLatitudeConstant: List[float] = [-1.30052, -1.29068, -1.28297, -1.28213]
PineSouthWithLatitudeCoeff: List[float] = [0.0, 1.83182, 0.07275, 2.12777, -1.09439]
PineSouthWithLatitudeConstant: List[float] = [-1.40718, -1.41955, -1.41472]
SouthBirchCoeff: List[float] = [-0.89359, 2.27954, -1.18672, 7.07362, -5.45175]
SouthBirchUbCoeff: List[float] = [-1.09667, 2.20855, -0.85821, 5.81764, -4.34685]
SouthPineCoeff: List[float] = [-1.38903, 1.84493, 0.06563, 2.02122, -1.01095]
SouthPineUbCoeff: List[float] = [-1.23602, 1.94126, -0.11924, 1.80842, -0.74261]
SouthSpruceCoeff: List[float] = [-1.02039, 2.00128, -0.47473, 2.87138, -1.61803]
SouthSpruceUbCoeff: List[float] = [-1.07676, 1.97159, -0.42776, 2.84877, -1.5863]
SpruceNorthWithLatitudeAndAltitudeCoeff: List[float] = [0.0, 2.11123, -0.76342, 3.07608, -1.78237]
SpruceNorthWithLatitudeAndAltitudeConstant: List[List[float]] = [[-0.7491, -0.75384, -0.75549, -0.7664], [-0.75208, -0.75682, -0.75847, -0.76938], [-0.76488, -0.76962, -0.77127, -0.78218]]
SpruceSouthWithfieldlayerTypeCoeff: List[float] = [0.0, 1.99515, -0.46351, 2.84571, -1.59871]
SpruceSouthWithfieldlayerTypeConstant: List[float] = [-1.01862, -1.02745, -1.02651, -1.03775, -1.03775, -1.03775]
fieldlayerTypeToIndex: List[int] = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 5]
static get_coefficients(part_of_sweden: str, latitude: float, altitude: float | None, fieldlayer_type: int | object | None, over_bark: bool = True) Dict[str, List[float]][source]

If both altitude and fieldlayer_type are provided, the most detailed remapping is used. Otherwise, fallback to a simpler default based solely on latitude:

  • if latitude > 60: use North coefficients;

  • else: use South coefficients.

static get_volume(species: str, diameter_cm: float, height_m: float, latitude: float, altitude: float | None, field_layer: int | object | None, over_bark: bool = True) float[source]

Main entry point. Computes the tree volume (in dm³) for a given species based on:

  • diameter_cm: tree diameter in centimeters,

  • height_m: tree height in meters,

  • latitude: site latitude,

  • altitude: site altitude,

  • fieldlayer: fieldlayer type (as int or an object with a ‘code’ attribute),

  • over_bark: over bark flag.

The part_of_sweden is determined from latitude:

‘south’ if lat < 57, ‘middle’ if lat < 59, else ‘north’.

static get_volume_log(coeff: List[float], diameter_cm: float, height_m: float) float[source]
pyforestry.sweden.volume.Eriksson_1973_volume_aspen_Sweden(diameter_cm: float, height_m: float) float[source]

Calculates the volume of a Ash, Aspen, Alnus glutinosa tree in m³ according to Eriksson (1973).

Parameters:
  • height (float) – Tree height in dm.

  • diameter (float) – Tree diameter in cm.

Returns:

Calculated volume in m³.

Return type:

float

Reference:

Eriksson, H. (1973). Volymfunktioner för stående träd av ask, asp, klibbal och contortatall. Skogshögskolan, institutionen för skogsproduktion. Rapp. o. Upps. nr 26.

pyforestry.sweden.volume.Eriksson_1973_volume_lodgepole_pine_Sweden(diameter_cm: float, height_m: float) float[source]

Calculates the volume of a Lodgepole Pine tree in m³ according to Eriksson (1973).

Parameters:
  • height (float) – Tree height in dm.

  • diameter (float) – Tree diameter in cm.

Returns:

Calculated volume in m³.

Return type:

float

Reference:

Eriksson, H. (1973). Volymfunktioner för stående träd av ask, asp, klibbal och contortatall. Skogshögskolan, institutionen för skogsproduktion. Rapp. o. Upps. nr 26.

class pyforestry.sweden.volume.NaslundFormFactor[source]

Bases: object

static calculate(species: str, height_m: float, diameter_cm: float, double_bark_mm: float | None = None, crown_base_height_m: float | None = None, over_bark: bool = True, region: str = 'southern') float[source]
class pyforestry.sweden.volume.NaslundVolume[source]

Bases: object

static calculate(timber: SweTimber) float[source]
pyforestry.sweden.volume.andersson_1954_volume_small_trees_birch_height_above_4_m(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Birch.

Description:

Suitable for trees taller than 4 m.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954_volume_small_trees_birch_under_diameter_5_cm(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Birch.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954_volume_small_trees_pine(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Pine.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.andersson_1954_volume_small_trees_spruce(diameter_cm, height_m)[source]

Andersson 1954 volume for small trees, Spruce.

Description:

Suitable for diameters < 5 cm.

Source:

Andersson, S.-O. 1954. Funktioner och tabeller för kubering av småträd. Meddelanden från Statens Skogsforskningsinstitut 44:12, 29 s. Available: https://www.skogskunskap.se/rakna-med-verktyg/mata-skogen/volymberakning/volymfunktioner/

Parameters:
  • diameter_cm (float) – Diameter in cm.

  • height_m (float) – Height in m.

Returns:

Volume in m³.

Return type:

float

pyforestry.sweden.volume.carbonnier_1954_volume_larch(diameter_cm, height_m)[source]

Volume of Larch trees, from Carbonnier 1954.

Source:

Carbonnier, C. 1954. Funktioner för kubering av europeisk, sibirisk och japansk lärk. MS. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf

Parameters:
  • diameter_cm (float) – Diameter at breast height in cm.

  • height_m (float) – Height of the tree in meters.

Returns:

Volume of the tree in m³.

Return type:

float

pyforestry.sweden.volume.johnsson_1953_volume_hybrid_aspen(diameter_cm, height_m)[source]

Calculate stem volume for Hybrid Aspen based on Johnsson (1953).

This function estimates the stem volume over bark for Hybrid Aspen trees in cubic meters using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Stem volume over bark (m³).

Return type:

float

References

Johnsson, H. (1953). “Hybridaspens ungdomsutveckling och ett försök till framtidsprognos.” Svenska skogsvårdsföreningens tidsskrift. 51:73-96.

Rytter, L., Stener, L.-G. (2014). “Growth and thinning effects during a rotation period of hybrid aspen in southern Sweden.” Scandinavian Journal of Forest Research, Vol. 29, Issue 8, pp. 747-756. DOI: https://doi.org/10.1080/02827581.2014.968202

pyforestry.sweden.volume.matern_1975_volume_sweden_beech(diameter_cm, height_m)[source]

Calculate the volume of Beech trees based on Matérn (1975).

This function estimates the volume of standing Beech trees in Sweden using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Volume of the tree (m³).

Return type:

float

References

Matérn, B. (1975). “Volymfunktioner för stående träd av ek och bok.” Skogshögskolan, institutionen för skoglig matematisk statistik. Rapp. o. Upps. nr 15. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf

pyforestry.sweden.volume.matern_1975_volume_sweden_oak(diameter_cm, height_m)[source]

Calculate the volume of Oak trees based on Matérn (1975).

This function estimates the volume of standing Oak trees in Sweden using diameter at breast height and tree height.

Parameters:
  • diameter_cm (float) – Diameter at breast height (cm).

  • height_m (float) – Height of the tree (meters).

Returns:

Volume of the tree (m³).

Return type:

float

References

Matérn, B. (1975). “Volymfunktioner för stående träd av ek och bok.” Skogshögskolan, institutionen för skoglig matematisk statistik. Rapp. o. Upps. nr 15. PM for Heureka 2004-01-20 Björn Elfving. Available: https://www.heurekaslu.org/w/images/9/93/Heureka_prognossystem_(Elfving_rapportutkast).pdf