Scenario specification schema and validation for CARB HSP scenarios - #4
Open
divine7022 wants to merge 6 commits into
Open
Scenario specification schema and validation for CARB HSP scenarios#4divine7022 wants to merge 6 commits into
divine7022 wants to merge 6 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability for CARB staff to define management scenarios as YAML configuration files. This is the front-end specification layer that sits between policy decisions and model inputs.
A scenario file lets you say things like "Fresno County will have 5000 acres of compost by 2030, growing to 15000 by 2045" - and the system handles the rest.
scenario_schema.yaml- Formal definition of what goes in a scenario file. Includes all 31 HSP practices from the 2026 Practice Guidelines.validate_scenario.R- Checks that scenario files are valid before we try to use them. Catches mistakes like using the wrong practice for a crop type.scenario_to_boolean.R- Converts county-level targets into field-level assignments (which specific fields get which practices)scenario_to_events.R- Generates the events.json files that SIPNET actually consumesExamples and docs (
examples/scenario_bau.yaml,examples/scenario_hsp_high.yamlanddocs/scenario_specification.md)Details
Practices covered: All 31 from HSP 2026 Guidelines including the new ones (biochar, delta rice). Complete list with eligibility rules and NRCS codes.
Validation checks:
county:alias: Added support for usingcounty: Fresnoinstead ofarea: Fresnowhen working with the california_counties domain. Minor convenience that matches how people naturally think about it.TODO
Implements: ccmmf/organization#171