Parse ReEDS with r2x-cli
Use a parser-only pipeline to check the Pacific fixture tutorial run before adding target translation packages. Install the CLI plugin first. These commands follow r2x-cli 0.1.15; inspect your installed CLI’s help when using another version.
Define the pipeline
Section titled “Define the pipeline”Use a working copy of the ReEDS run because parser upgrades can modify its files.
After extracting the fixture as shown in the tutorial, save
reeds-parser-pipeline.yaml in the tutorial workspace. For your own run, replace the
path and years with selections present in its data:
pipelines: parse: - reeds-parserconfig: reeds-parser: path: tutorial-inputs/test_Pacific solve_year: 2032 weather_year: 2012 case_name: examplepath supplies the CLI data-store root. It is not a ReEDSConfig field in Python;
Python callers pass it to DataStore.from_plugin_config.
Use one solve year and one weather year for this pipeline. The Python config
accepts lists; downstream packages can impose narrower limits.
Inspect and run
Section titled “Inspect and run”r2x list r2x-reedsr2x run reeds-parser-pipeline.yaml --listr2x run reeds-parser-pipeline.yaml parse --dry-runExpect a parse pipeline containing reeds-parser. Dry run verifies pipeline
resolution, not the contents of the input data. Create a separate output directory, then execute and save a portable artifact:
mkdir -p outputsr2x run reeds-parser-pipeline.yaml parse --zip -o outputs/reeds-system.zipVerify the artifact exists, then inspect it with the CLI:
ls -lh outputs/reeds-system.zipr2x read outputs/reeds-system.zip --zipThe reader opens a Python session with the system bound to sys. For example:
>>> from r2x_reeds import ReEDSRegion>>> assert len(list(sys.get_components(ReEDSRegion))) == 11The assertion verifies the Pacific fixture region count. For your own run, compare it with the input regions. Exit the session when finished.
Add modifiers or a translation target
Section titled “Add modifiers or a translation target”Insert a transform after reeds-parser and give it a configuration block. For example:
pipelines: parse-and-split: - reeds-parser - break-gensconfig: reeds-parser: path: tutorial-inputs/test_Pacific solve_year: 2032 weather_year: 2012 break-gens: drop_capacity_threshold: 5break-gens uses packaged reference-unit defaults when reference_units is omitted.
See transforms for the supported entry points and
Python composition for explicit error handling.
For complete exports, follow the maintained ReEDS to PLEXOS or ReEDS to Sienna guide. Install the target packages those guides specify and verify their own configuration help; the parser package does not supply a target exporter.