Skip to content

Update disturbance handling for harvest intensity classes#19

Open
erin-glen wants to merge 3 commits intodevelop_harvest_severityfrom
codex/assess-run_batch_communities-script-dependencies
Open

Update disturbance handling for harvest intensity classes#19
erin-glen wants to merge 3 commits intodevelop_harvest_severityfrom
codex/assess-run_batch_communities-script-dependencies

Conversation

@erin-glen
Copy link
Owner

Motivation

  • Disturbance raster coding changed to split harvest into four intensity bins (1–4) while keeping 5=insect/disease and 10=fire, so the processing and emissions logic must reflect that disaggregation.
  • Emission factor lookup table now includes per-bin harvest factors and outputs must report area and flux per harvest intensity class.

Description

  • Updated disturbanceLookup in lookups.py to map codes 1–4 to harvest_0_25_HA, harvest_25_50_HA, harvest_50_75_HA, and harvest_75_100_HA and kept 5/10 for insects/fire.
  • In funcs.py adjusted disturbance tabulation to ensure the new harvest columns exist, refactored NA filling to generically handle all disturbance columns, and updated undisturbed_HA calculation to subtract the four harvest buckets.
  • Extended merge_age_factors to read four harvest emission factor columns and updated calculate_forest_removals_and_emissions to compute annual emissions for each harvest intensity bucket (Annual_Emissions_Harvest_*_CO2).
  • Propagated the new harvest buckets through area/flux mappings and summaries (calculate_area, calculate_ghg_flux, summarize_ghg), and included the new columns in the rounding/output logic in save_results.
  • Adjusted recategorization cleanup in analysis_core.py to zero out the four harvest columns when recategorizing fire records.

Testing

  • No automated tests were run for this change; recommend running the project's unit and integration tests and a full analysis run to validate outputs and CSV reports include the new harvest buckets.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant