PyPSA / PyPSA/pypsa-usa

Imports priced at EIA retail rate despite 'wholesale' label

Open
#807 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
148
Forks
55
Avg merge
2d 11h
Merged PRs (30d)
18

Description

Problem

electricity.imports.costs: wholesale (the default) prices import links using EIA's electricity/retail-sales endpoint (eia.py, _ElectricityCosts) — the monthly average retail price per state, all sectors blended. For CA 2019 that is roughly $165–170/MWh, several times a typical wholesale clearing price (~$30–50/MWh at SP15/NP15 in 2019).

Retail rates include T&D, fixed-cost recovery, and utility margins — components unrelated to the avoided cost of importing a marginal MWh. Priced this way, imports behave as a near-last-resort resource, biasing capacity-expansion results toward in-state build. Combined with a volume cap (e.g. 25% of load), imports are doubly penalized.

Additional wrinkles in the same code path (add_extra_components.py, load_import_export_costs / format_import_export_costs):

  • The price year is the weather year, not the planning horizon (year = weather_year[0]).
  • If the year is >= 2024, the code routes to the AEO national projection with state='USA', which format_import_export_costs fails to match against state codes and silently drops.
  • All import interfaces receive the same statewide monthly series, forward-filled hourly (12 steps/year).

Suggested direction

  • Rename or re-source the wholesale mode to an actual wholesale proxy (e.g. EIA wholesale/hub data, or an hourly LMP series such as CAISO SP15 DA for the weather year).
  • In the interim, document that costs: <float> or costs: <carrier> (e.g. CCGT) are better proxies for marginal import cost.

Found while building the California (CPUC SERVM) configuration, where imports are enabled with a 25% annual volume limit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in eia.py at _ElectricityCosts, then trace load_import_export_costs and format_import_export_costs in add_extra_components.py. Compare how the weather year, USA state, and statewide monthly series are handled for the California configuration. Done means the wholesale mode uses an appropriate import-cost source or is clearly documented with its limitations, without silently dropping projected data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.