pyforestry.norway.adapters package#
Submodules#
pyforestry.norway.adapters.allen_2020 module#
Simulation-facing facade for the Allen et al. (2020) Norway spruce model.
- class pyforestry.norway.adapters.allen_2020.Allen2020Config(h40_m: float = 17.0, dominant_height_m: float = 12.0, start_total_age_years: float = 40.0)[source]#
Bases:
objectConfiguration for the simulation-facing Allen (2020) growth adapter.
- dominant_height_m: float = 12.0#
- h40_m: float = 17.0#
- start_total_age_years: float = 40.0#
- class pyforestry.norway.adapters.allen_2020.Allen2020GrowthModel(config: Allen2020Config | None = None)[source]#
Bases:
GrowthModelAggregate-inventory growth adapter using Allen et al. (2020).
Projects an even-aged Norway spruce stand one step at a time (unthinned): dominant height, then surviving stems, then basal area, then volume.
- build_context(stand: Stand, *, config: Allen2020Config | None = None, **kwargs) SimulationContext[source]#
Build and seed a simulation context for Allen projections.
- property component_id: str#
Stable identifier for the Allen 2020 model.
- requirements() Requirements[source]#
Declare aggregate inventory requirement for the adapter.
- property source: SourceReference#
Bibliographic provenance.
- update_step(ctx: SimulationContext, dt: float) None[source]#
Advance one step using Allen dominant-height, survival, BA and volume.
- class pyforestry.norway.adapters.allen_2020.Allen2020Model[source]#
Bases:
objectCallable facade over the Allen (2020) Norway spruce kernels.
- static dominant_height(dominant_height_m: float, age1: AgeMeasurement, age2: AgeMeasurement) float[source]#
Project dominant height (m).
- static site_index(dominant_height_m: float, age: AgeMeasurement) SiteIndexValue[source]#
Return site index (dominant height at base age 40 yr).
- static stand_volume(basal_area2: StandBasalArea | float, dominant_height2: float, age2: AgeMeasurement) StandVolume[source]#
Return stand volume (m3/ha).
- static stem_survival(stems1: Stems | float, age1: AgeMeasurement, age2: AgeMeasurement, si_h40: SiteIndexValue | float, *, thinning_quotient: float = 1.0) Stems[source]#
Project surviving stems per hectare.
pyforestry.norway.adapters.bollandsas_2008 module#
Thin API facade and runtime adapter for Bollandsas et al. (2008).
- class pyforestry.norway.adapters.bollandsas_2008.Bollandsas2008AdapterConfig(site_index_by_species: Mapping[str, float], latitude_deg: float, n_classes: int = 15, class_width_mm: float = 50.0)[source]#
Bases:
objectConfiguration for the Bollandsas simulation adapter.
- class_width_mm: float = 50.0#
- n_classes: int = 15#
- class pyforestry.norway.adapters.bollandsas_2008.Bollandsas2008GrowthModel(config: Bollandsas2008AdapterConfig)[source]#
Bases:
GrowthModelTree-list adapter around the Bollandsas diameter-class model.
- build_context(stand: Stand, *, config: Bollandsas2008AdapterConfig | None = None, **kwargs) SimulationContext[source]#
Build context and seed class-state payload for simulation updates.
- property component_id: str#
Stable identifier for the Bollandsas 2008 model.
- requirements() Requirements[source]#
Declare the diameter-class representation this matrix model steps.
Bollandsås 2008 is a transition-matrix model over fixed diameter classes: its state is a per-species class vector, so the context should hold that representation rather than a tree list it never reads back. Publishing class vectors through
set_aggregate_metricswhile the context stood intree_listmode meant every refresh rebuilt the metrics from the untouched plots and discarded the step entirely.
- property source: SourceReference#
Bibliographic provenance.
- update_step(ctx: SimulationContext, dt: float) None[source]#
Advance one or more 5-year Bollandsas transitions.
pyforestry.norway.adapters.kuehne_2022 module#
Thin API facade for Kuehne (2022) Norway pine trajectories.
- class pyforestry.norway.adapters.kuehne_2022.KuehnePineAdapterConfig(dominant_height_m: float, start_total_age_years: float)[source]#
Bases:
objectConfiguration for the Kuehne pine trajectory adapter.
- class pyforestry.norway.adapters.kuehne_2022.KuehnePineGrowthModel(config: KuehnePineAdapterConfig)[source]#
Bases:
GrowthModelAggregate-safe adapter that updates dominant height trajectories.
- build_context(stand: Stand, *, config: KuehnePineAdapterConfig | None = None, **kwargs) SimulationContext[source]#
Build context and seed Kuehne trajectory state.
- property component_id: str#
Stable identifier for the Kuehne 2022 pine model.
- requirements() Requirements[source]#
Declare aggregate-mode compatibility.
- property source: SourceReference#
Bibliographic provenance.
- update_step(ctx: SimulationContext, dt: float) None[source]#
Advance the stand: dominant height, then stem density, basal area and volume.
Projects one unthinned period using the Kuehne (2022) component equations. Site index at base age 40 (SI40, required by the stem-density and volume equations) is derived from the dominant-height trajectory.
pyforestry.norway.adapters.maleki_2022 module#
Thin model facade for Maleki et al. (2022) Norway stand equations.
- class pyforestry.norway.adapters.maleki_2022.Maleki2022Config(species: Maleki2022Species = Maleki2022Species.NORWAY_SPRUCE, h40_m: float = 14.0, dominant_height_m: float = 14.0, start_total_age_years: float = 40.0)[source]#
Bases:
objectConfiguration for the simulation-facing Maleki growth adapter.
- dominant_height_m: float = 14.0#
- h40_m: float = 14.0#
- start_total_age_years: float = 40.0#
- class pyforestry.norway.adapters.maleki_2022.Maleki2022GrowthModel(config: Maleki2022Config | None = None)[source]#
Bases:
GrowthModelAggregate-inventory growth adapter using Maleki et al. (2022).
- build_context(stand: Stand, *, config: Maleki2022Config | None = None, **kwargs) SimulationContext[source]#
Build and seed simulation context for Maleki projections.
- property component_id: str#
Stable identifier for the Maleki 2022 model.
- requirements() Requirements[source]#
Declare aggregate inventory requirement for the adapter.
- property source: SourceReference#
Bibliographic provenance.
- update_step(ctx: SimulationContext, dt: float) None[source]#
Advance one step using Maleki stem, basal-area, and height equations.
- class pyforestry.norway.adapters.maleki_2022.Maleki2022ModelNorway[source]#
Bases:
objectCompatibility model facade matching the Norway asset shape.
- broadleaves = _MalekiSpeciesFacade(species=<Maleki2022Species.BROADLEAVES: 'broadleaves'>)#
- norway_spruce = _MalekiSpeciesFacade(species=<Maleki2022Species.NORWAY_SPRUCE: 'norway_spruce'>)#
- picea_abies = _MalekiSpeciesFacade(species=<Maleki2022Species.NORWAY_SPRUCE: 'norway_spruce'>)#
- pinus_sylvestris = _MalekiSpeciesFacade(species=<Maleki2022Species.SCOTS_PINE: 'scots_pine'>)#
- scots_pine = _MalekiSpeciesFacade(species=<Maleki2022Species.SCOTS_PINE: 'scots_pine'>)#
Module contents#
Runtime bindings for Norwegian equations — glue, not science.
Same contract as pyforestry.sweden.adapters: each module binds equation
kernels from a domain package to the simulation runtime and carries no
scientific coefficient literals of its own. Norway ships no whole growth-and-
yield system yet, so there is no norway/systems package beside this one;
when one arrives it goes there, not here.