NZB: scenario_config CSV + setScenario single-run launcher - #5
Merged
Conversation
Add an FSEC-style base+delta scenario registry and a one-run launcher so the NZB families can be driven from a CSV instead of R branching: - config/scenario_config_nzb.csv: nzb_base + 7 family columns (gC_wdpa, gC_30by30, gC_half, gA_RoW2C, gB_price, gF_freeze, g0_npi), deltas only. - scripts/start/nzb_launch.R: resolves nocc + nzb_base + one family via gms::setScenario (list-valued forcesuff21 collapsed back to a string after each overlay), and enables the parametric cap from either a reported-AFOLU target (cap = target + 63, the reported<->cap offset) or a raw cap value. Same family definitions as nzb_export_grid.R; verified field-equivalent across all seven.
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.
Follow-up to #4 (merged). Adds a CSV-driven way to launch the NZB policy families, so scenario selection doesn't require editing R — the basis for the automated platform.
Added
config/scenario_config_nzb.csv— FSEC-style base+delta registry: anzb_basecolumn of common settings + 7 family columns (gC_wdpa,gC_30by30,gC_half,gA_RoW2C,gB_price,gF_freeze,g0_npi), each holding only its deltas (MACC profile, conservation, CO₂ price, bioenergy split, export-freeze list).scripts/start/nzb_launch.R— launches one family viagms::setScenario(base+delta overlay, the FSEC idiom), then enables the parametric cap from either:NZB_TARGET— a reported-AFOLU 2050 target →cap = target + 63(the reported↔cap offset), orNZB_CAP— a raws56_emis_cap_targetvalue.Notes
nzb_export_grid.R; verified field-equivalent across all seven families.setScenariosplits comma cells into vectors, so columns are overlaid one at a time and the list-valuedforcesuff21switch is collapsed back to a single string after each overlay (a vector serialises fine to the GAMS set too; the collapse just avoidssetScenario's scalar re-comparison error on the second column).start.R's renv update prompt: