pyfia.estimation.estimators.mortality
Mortality estimation for FIA data using GRM tables.
Implements FIA’s Growth-Removal-Mortality methodology for calculating
annual tree mortality using TREE_GRM_COMPONENT and TREE_GRM_MIDPT tables.
Functions
mortality
-
db: Database connection or path to FIA database. -
grp_by: Column name(s) to group results by. -
by_species: If True, group results by species code (SPCD). -
by_size_class: If True, group results by diameter size classes. -
size_class_type: Type of size class grouping to use (only applies when by_size_class=True): - “standard”: FIA numeric ranges (1.0-4.9, 5.0-9.9, etc.)
- “descriptive”: Text labels (Saplings, Small, Medium, Large)
- “market”: Timber market categories (Pre-merchantable, Pulpwood, Chip-n-Saw, Sawtimber)
-
land_type: Land type to include in estimation. -
tree_type: Tree population to include (GRM tables): - ‘gs’: growing stock
- ‘al’ or ‘live’: all live trees at least 1 inch d.b.h., saplings on the microplot included (EVALIDator’s “trees at least 1 inch”)
- ‘sl’ or ‘sawtimber’: sawtimber-size trees
-
measure: What to measure in the mortality estimation. -
tree_domain: SQL-like filter expression for tree-level filtering. -
area_domain: SQL-like filter expression for area/condition-level filtering. -
as_rate: If True, return mortality as a rate (mortality/live). -
totals: If True, include population-level total estimates. -
variance: If True, also return variance columns (*_VARIANCE) alongside the standard errors (*_SE, always returned). Variance = SE squared. -
most_recent: If True, automatically filter to the most recent evaluation.
- Mortality estimates with columns:
- MORT_ACRE: Annual mortality per acre
- MORT_TOTAL: Total annual mortality (if totals=True)
- MORT_ACRE_SE: Standard error of per-acre estimate
- MORT_TOTAL_SE: Standard error of total estimate (if totals=True)
- MORT_ACRE_VARIANCE, MORT_TOTAL_VARIANCE: Variance of the estimates, equal to the matching _SE squared (if variance=True)
- Additional grouping columns if specified
results = mortality(db, measure=“volume”, land_type=“forest”) Mortality by species (tree count): results = mortality(db, by_species=True, measure=“tpa”) Pre-merchantable tree mortality (trees < 5” DBH): >>> results = mortality( … db, … tree_type=“live”, # Include all live trees, not just growing stock … by_size_class=True, … size_class_type=“market”, # Returns Pre-merchantable, Pulpwood, etc. … measure=“tpa”, # TPA recommended for small trees (no volume calculated) … )Filter to pre-merchantable only:
premerch = results.filter(pl.col(“SIZE_CLASS”) == “Pre-merchantable”)
Classes
MortalityEstimator
Mortality estimator for FIA data using GRM methodology.
Estimates annual tree mortality in terms of volume, biomass, or trees per acre
using the TREE_GRM_COMPONENT and TREE_GRM_MIDPT tables.
Methods:
component_type
get_component_filter
load_data
apply_filters
calculate_values
aggregate_results
- Bundle containing results, plot_tree_data, and group_cols for explicit variance calculation.
calculate_variance
agg_result: Bundle containing results, plot_tree_data, and group_cols from aggregate_results().
- Results with variance columns added.