pyforestry.sweden.volume package#
Submodules#
pyforestry.sweden.volume.andersson_1954 module#
Small-tree volume functions, Andersson (1954).
- Source:
Andersson, S.-O. (1954). Funktioner och tabeller för kubering av småträd. Meddelanden från Statens skogsforskningsinstitut 44(12), 29 s.
- 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#
Brandel (1990) stem-volume equations and coefficient selection helpers.
Coefficients are transcribed from Brandel, G. (1990) “Volymfunktioner för enskilda träd”, Report 26, Dept. of Forest Yield Research, SLU. The default sets come from Appendix B (pp. 104-115) and are all of the V1 series – volume above stump – using function type 01, whose independent variables are D, (D+20.0), H and (H-1.3):
lg V1 = a + b*lg(D) + c*lg(D+20.0) + d*lg(H) + e*lg(H-1.3)
The 10-logarithm is used, the constant (a) already carries Brandel’s correction for logarithmic bias, and the additive constant 20.0 was fixed for every species and both regions (Report 26, p. 69).
Appendix B tables are numbered with four digits (Report 26, p. 103): volume above
stump (1) or above ground (2); South (1) or North (2) Sweden; pine (1), spruce (2) or
birch (3); then the function group. Each coefficient set below is tagged with its
table, e.g. T1211 is Appendix B Table 1211, function 100-01.
Function groups differ in which bark convention the volume and the D.B.H. are expressed in (Report 26, p. 103):
group 100 volume o.b. D.B.H. o.b.
group 200 volume u.b. D.B.H. u.b.
group 300 volume u.b. D.B.H. o.b.
Group 400 (volume u.b., D.B.H. u.b., upper diameter o.b.) has no function 01 and so is unreachable without an upper diameter. Since volume o.b. is never published against a D.B.H. u.b., that combination is rejected rather than approximated.
- class pyforestry.sweden.volume.brandel_1990.BrandelVolume[source]#
Bases:
objectCoefficient tables and helper methods for Brandel (1990) volume equations.
- BirchSouthWithLatitudeCoeff: List[float] = [0.0, 2.23818, -1.0693, 6.02015, -4.51472]#
- BirchSouthWithLatitudeConstant: List[float] = [-0.89363, -0.8548, -0.84627]#
- FIELDLAYER_TYPE_TO_INDEX: List[int] = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 5]#
- MIN_DIAMETER_CM: float = 4.5#
- NORTH_SOUTH_LATITUDE_LIMIT: float = 60.0#
- 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]#
- NorthBirchUbFromObCoeff: List[float] = [-0.35394, 2.52141, -1.54257, 4.88165, -3.47422]#
- 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]#
- NorthPineUbFromObCoeff: List[float] = [-1.25246, 1.98244, -0.13118, 1.03781, -0.03482]#
- NorthSpruceCoeff: List[float] = [-0.79783, 2.07157, -0.73882, 3.16332, -1.82622]#
- NorthSpruceUbCoeff: List[float] = [-0.77561, 2.06126, -0.77713, 3.2758, -1.90707]#
- NorthSpruceUbFromObCoeff: List[float] = [-0.82249, 2.11094, -0.89626, 3.51812, -2.05567]#
- 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]#
- SouthBirchUbFromObCoeff: List[float] = [-0.93631, 2.30212, -1.40378, 8.01817, -6.18825]#
- 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]#
- SouthPineUbFromObCoeff: List[float] = [-1.52761, 1.82928, 0.07454, 1.43792, -0.35559]#
- 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]#
- SouthSpruceUbFromObCoeff: List[float] = [-1.06019, 2.04239, -0.54292, 2.80843, -1.5211]#
- 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.99915, -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 | None, latitude: float, altitude: float | None, fieldlayer_type: int | object | None, over_bark: bool = True, diameter_over_bark: bool = True) Dict[str, List[float]][source]#
Pick the coefficient set for a site.
The indicator-variable functions (Appendix C) are used when altitude and fieldlayer_type are both given and volume over bark is wanted; they are not published under bark, so any under-bark request falls back to Appendix B.
- Parameters:
part_of_sweden – “north”/”south” to force the region; otherwise latitude decides on the 60th parallel.
latitude – Site latitude in degrees.
altitude – Site altitude in metres, or None to skip the detailed functions.
fieldlayer_type – Vegetation type code, or None to skip the detailed functions.
over_bark – Whether the returned volume is over bark.
diameter_over_bark – Whether the diameter fed to the equation is measured over bark. Selects between Brandel’s function groups 200 and 300.
- static get_default_coefficients(is_north: bool, over_bark: bool = True, diameter_over_bark: bool = True) Dict[str, List[float]][source]#
Select an Appendix B function-01 set for the requested bark conventions.
- Raises:
ValueError – for volume o.b. from a D.B.H. u.b., which Brandel does not publish.
- 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, diameter_over_bark: bool = True) float[source]#
Main entry point. Computes the stem volume above stump (V1), in m³, for a given species.
Brandel’s material covers D.B.H. o.b. from 4.5 cm and heights from 4.0 m for pine and spruce, 6.0 m for birch; results outside that range are extrapolations.
- Parameters:
species – Species name or Latin binomial.
diameter_cm – Diameter at breast height, in centimetres.
height_m – Tree height above ground, in metres.
latitude – Site latitude in degrees; the region splits on the 60th parallel.
altitude – Site altitude in metres, or None to skip the detailed functions.
field_layer – Vegetation type, as an int or an object with a ‘code’ attribute, or None to skip the detailed functions.
over_bark – Whether the returned volume is over bark.
diameter_over_bark – Whether diameter_cm is measured over bark. Leave True for an ordinary field measurement; set False only when passing a diameter already reduced by bark thickness.
- Returns:
Stem volume above stump in m³.
- static get_volume_log(coeff: List[float], diameter_cm: float, height_m: float) float[source]#
Evaluate a Brandel log-volume equation and return volume in dm3.
- static is_north(part_of_sweden: str | None, latitude: float) bool[source]#
Return True when the site belongs to Brandel’s northern region.
Brandel’s boundary follows administrative borders – Norrland, Dalarna and northern Värmland – with the 60th parallel as its stated proxy, so an explicit
part_of_swedenof “north” or “south” wins over the latitude test. Any other value (including None or “middle”) defers to latitude.
pyforestry.sweden.volume.carbonnier_1954 module#
Larch volume functions, Carbonnier (1954).
- Source:
Carbonnier, C. (1954). Funktioner för kubering av europeisk, sibirisk och japansk lärk. Manuscript; no formal publication. Reproduced in the Heureka PM of 2004-01-20 by Björn Elfving.
- 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#
Tree volume functions from Eriksson (1973).
- 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#
Volume equation for hybrid aspen from Johnsson (1953).
- 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#
Tree volume functions for oak and beech, Hagberg & Matérn (1975).
- Source:
Hagberg, E. & Matérn, B. (1975). Tabeller för kubering av ek och bok. Skogshögskolan, institutionen för skoglig matematisk statistik, Rapporter och uppsatser nr 14, Stockholm, 118 s.
- 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#
Volume and form factor equations from Näslund (1947).
- class pyforestry.sweden.volume.naslund_1947.NaslundFormFactor[source]#
Bases:
objectForm factor equations paired with
NaslundVolume.
pyforestry.sweden.volume.soderberg_1986_form_height module#
Soderberg (1986) form height and volume for Swedish trees.
Implements the form height model used by Söderberg (1986) for individual trees. Form height is returned in metres, and volume follows from V = basal area x form height. With basal area in cm^2 and form height in m:
volume_m3 = form_height_m * basal_area_cm2 / 10000
The volume is over bark. The basal area it multiplies is the one implied by
diameter_cm, and that is diameter at breast height over bark – which is what
the equation’s own diameter_cm/max_diameter_cm ratio term is fitted on, and
what Swedish stand data records. There is no under-bark form height here and none
in the source: an under-bark volume comes from a volume function evaluated on an
under-bark diameter (Brandel, Näslund), not from rescaling a form height.
That matters wherever this is compared with, or substituted for, another volume:
pyforestry.base.timber_bucking and the Swedish price lists are under bark
(m3to for timber, m³fub for pulpwood), so a volume from here is not on their
basis and must not be priced with them.
- Source:
Söderberg, U. (1986). Funktioner för skogliga produktionsprognoser - Tillväxt och formhöjd för enskilda träd av inhemska trädslag i Sverige. Report 14, SLU, Umeå.
- pyforestry.sweden.volume.soderberg_1986_form_height.soderberg_1986_form_height_m(*, species: TreeName | str, diameter_cm: float, age_bh_years: float, max_diameter_cm: float, stand_basal_area_m2_ha: float, dominant_species: TreeName | str, site_index_dominant_m: float | SiteIndexValue, latitude_deg: float, altitude_m: float, part_of_sweden: str, distance_to_coast_lt_50km: bool = False, split_plot: bool = False, crowberry: bool = False, south_slope: bool = False, wet_soil: bool = False, fertilized: bool = False, herbs: bool = False, maritime: bool = False, region5: bool = False, continental: bool = False, north_slope: bool = False, dry_soil: bool = False, south_east: bool = False, groundwater_never: bool = False, prop_pine: float = 0.0, prop_spruce: float = 0.0, prop_birch: float = 0.0, prop_beech: float = 0.0, prop_oak: float = 0.0, gotland: bool = False) float[source]#
Form height (m) from Söderberg (1986).
Returns the form height (m) for a single tree, with site and stand context.
site_index_dominant_mmay be numeric orSiteIndexValue. Site-index objects are validated as Hagglund (1970) H100 and must match the dominant conifer selector (pine or spruce).
Module contents#
Lazy-loading interface for Swedish volume models.
Public names resolve to their submodule on first access via PEP 562
__getattr__ (see _name_to_module). Loading is deferred deliberately:
the volume submodules are independent published models and some are large
(e.g. soderberg_1986_form_height), so a flat eager re-export would import
every model whenever any single one is requested. TYPE_CHECKING imports
below keep the names visible to static checkers.