Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/configtables/run.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ disable_progrssbar,bool,"{true, false}",Switch to select whether progressbar sho
shared_resources,bool,"{true, false}",Switch to select whether resources should be shared across runs.
shared_cutouts,bool,"{true, false}",Switch to select whether cutouts should be shared across runs.
validation,bool,"{true, false}",Switch to enable back-casting validation plotting
benchmark_cpuc,bool,"{true, false}",Switch to enable the CPUC Baseline Generator List capacity benchmark (California runs)
23 changes: 23 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,36 @@ def validation_figures(wildcards):
return []


BENCHMARK_CPUC_OUTPUTS = [
"cpuc_capacity_benchmark.csv",
"cpuc_capacity_deviation.pdf",
]


def benchmark_figures(wildcards):
"""CPUC Baseline Generator List capacity benchmark, opt-in via run.benchmark_cpuc.

Gated on its own flag rather than on the demand profile: the fleet
benchmark is useful for any California run, whatever drives its load.
"""
if not config["run"].get("benchmark_cpuc", False):
return []
return expand(
RESULTS
+ "{interconnect}/figures/s{simpl}_cluster_{clusters}/l{ll}_{opts}_{sector}/benchmark/{figure}",
**config["scenario"],
figure=BENCHMARK_CPUC_OUTPUTS,
)


rule all:
input:
#"repo_data/dag.jpg",
electricity_statistics,
electricity_figures,
sector_figures,
validation_figures,
benchmark_figures,


rule data_model:
Expand Down
8 changes: 8 additions & 0 deletions workflow/repo_data/CPUC/servm_benchmark_regions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
servm_region,eia_ba_code,benchmark_region,note
PGE,CISO,CAISO,EIA reports every CAISO plant under the single BA code CISO; PGE/SCE/SDGE cannot be split without geography
SCE,CISO,CAISO,rolled into CAISO for the same reason
SDGE,CISO,CAISO,rolled into CAISO for the same reason
LADWP,LDWP,LADWP,
IID,IID,IID,
NCNC,BANC,NCNC,Balancing Authority of Northern California
NCNC,TIDC,NCNC,Turlock Irrigation District
52 changes: 52 additions & 0 deletions workflow/repo_data/CPUC/servm_tech_map.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
side,source_category,compare_category,note
cpuc,CC,Gas CC,
cpuc,CT,Gas CT/ICE/Steam,
cpuc,ICE,Gas CT/ICE/Steam,
cpuc,Steam,Gas CT/ICE/Steam,CA gas steam boilers; EIA maps 'Natural Gas Steam Turbine' to OCGT so it cannot be split out on the model side
cpuc,Cogen,Gas Cogen/CHP,CPUC-only bucket; EIA/PyPSA carriers have no CHP concept so these units land in CCGT/OCGT on the model side
cpuc,Coal,Coal,
cpuc,Nuclear,Nuclear,
cpuc,Geothermal,Geothermal,
cpuc,Biomass/Wood,Biomass,
cpuc,Biogas,Biomass,
cpuc,Hydro,Hydro,
cpuc,PSH,PSH,
cpuc,Wind,Wind,
cpuc,OOS_Wind,Wind,out-of-state wind contracted to a CA region; absent from the CA subset of the 2026 baseline
cpuc,Solar_1Axis,Solar,
cpuc,Solar_Fixed,Solar,
cpuc,Solar_2Axis,Solar,
cpuc,Solar_Thermal,Solar,
cpuc,Paired_Solar_1Axis,Solar,
cpuc,Paired_Solar_Fixed,Solar,
cpuc,Hybrid_Solar_1Axis,Solar,
cpuc,Hybrid_Solar_Fixed,Solar,
cpuc,Battery_4h,Battery,
cpuc,Paired_BattStorage,Battery,
cpuc,Hybrid_BattStorage,Battery,
cpuc,DR,Demand Response,CPUC-only; PyPSA-USA has no demand-response resource
cpuc,Pumping_Load,Pumping Load,CPUC-only; modelled as load rather than as a resource in PyPSA-USA
pypsa,CCGT,Gas CC,
pypsa,CCGT-95CCS,Gas CC,
pypsa,OCGT,Gas CT/ICE/Steam,EIA 'Natural Gas Steam Turbine' / 'Combustion Turbine' / 'Internal Combustion Engine' all map here
pypsa,hydrogen_ct,Gas CT/ICE/Steam,
pypsa,coal,Coal,
pypsa,nuclear,Nuclear,
pypsa,geothermal,Geothermal,
pypsa,EGS,Geothermal,
pypsa,biomass,Biomass,
pypsa,waste,Biomass,municipal solid waste; CPUC folds it into Biogas
pypsa,hydro,Hydro,pumped storage is split off before mapping via prime_mover_code == PS
pypsa,PHS,PSH,
pypsa,onwind,Wind,
pypsa,offwind,Wind,
pypsa,offwind_floating,Wind,
pypsa,solar,Solar,
pypsa,battery,Battery,
pypsa,2hr_battery_storage,Battery,
pypsa,4hr_battery_storage,Battery,
pypsa,6hr_battery_storage,Battery,
pypsa,8hr_battery_storage,Battery,
pypsa,10hr_battery_storage,Battery,
pypsa,oil,Oil,model-only; CPUC has no oil bucket for CA
pypsa,other,Other,"model-only catch-all (flywheels, other gases, compressed air)"
1 change: 1 addition & 0 deletions workflow/repo_data/config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ run:
shared_resources: false # true = reuse resources/ across all runs (DAG-keyed); false = isolate per run.name
shared_cutouts: true # true = share atlite cutouts across runs (recommended; cutouts are large and slow)
validation: false # true = wire in back-casting validation plots (historical-only)
benchmark_cpuc: false # true = compare installed capacity against the CPUC Baseline Generator List (California runs)

# ====================================================================
# RENEWABLE DATASET — capacity-factor source for wind & solar
Expand Down
29 changes: 29 additions & 0 deletions workflow/rules/validate.smk
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,32 @@ rule plot_validation_figures:
mem_mb=5000,
script:
"../scripts/plot_validation_production.py"


# Compares installed capacity against the CPUC Baseline Generator List,
# aggregated by SERVM benchmark region and technology, per planning horizon.
# Gated by run.benchmark_cpuc (see benchmark_figures in the Snakefile).
rule benchmark_cpuc_baseline:
params:
planning_horizons=config_provider("scenario", "planning_horizons"),
input:
network=NETWORKS
+ "{interconnect}/elec_s{simpl}_c{clusters}_ec_l{ll}_{opts}_{sector}.nc",
powerplants="resources/powerplants/powerplants.csv",
cpuc_baseline=DATA + "cpuc/BaselineGeneratorList_CAISO.xlsx",
region_map="repo_data/CPUC/servm_benchmark_regions.csv",
tech_map="repo_data/CPUC/servm_tech_map.csv",
output:
comparison=RESULTS
+ "{interconnect}/figures/s{simpl}_cluster_{clusters}/l{ll}_{opts}_{sector}/benchmark/cpuc_capacity_benchmark.csv",
heatmap=RESULTS
+ "{interconnect}/figures/s{simpl}_cluster_{clusters}/l{ll}_{opts}_{sector}/benchmark/cpuc_capacity_deviation.pdf",
log:
LOGS
+ "benchmark_cpuc_baseline/{interconnect}/elec_s{simpl}_c{clusters}_l{ll}_{opts}_{sector}.log",
threads: 1
resources:
walltime="00:20:00",
mem_mb=5000,
script:
"../scripts/benchmark_cpuc_baseline.py"
Loading