Fix 2024 Interconnection Queue - #16
Conversation
ReEDS moved the county_name/state lookup from inputs/county2zone.csv to inputs/zones/county_state.csv, so the script could no longer be run against a current ReEDS checkout. Fall back to the new location, and allow the ReEDS repo to be pointed at with REEDS_PATH instead of only the hardcoded default. Co-Authored-By: Claude Opus 5 <[email protected]>
Same input file (lbnl_ix_queue_data_file_thru2024.xlsx) as before; only the script changed. National 2030 cumulative queue moves 2,050 GW -> 1,976 GW (-3.6%) and the county count rises as parishes and other counties whose LBNL spelling did not match ReEDS are no longer silently dropped. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
atpham88
left a comment
There was a problem hiding this comment.
Thanks for fixing this Yunzhi. Just a few minor comments to clean up things and I think it's ready to merge. Can you also delete the 2023 file https://github.com/ReEDS-Model/ReEDS_Input_Processing/blob/main/interconnection_queues/inputs/queues_2023_clean_data_r1.xlsx? We don't need to keep it. It has different structure than versions 2024 and 2025 and we only need 2024 for the fix.
There are other things that I need clean up (handling of csp queues here and also I want to overhaul the plotting section to use matplotlib instead of altair but that's on me and I will open a clean up PR after both of your PRs are merged in).
| queue_data = queue_data[1:] | ||
|
|
||
| county2zone = pd.read_csv(os.path.join(reeds_path,'inputs','county2zone.csv')) | ||
| county2zone_path = os.path.join(reeds_path,'inputs','county2zone.csv') |
There was a problem hiding this comment.
I think we can just remove this and use county_state.csv in the zones folder.
| active_queue_county = active_queue_county.dropna(subset=['FIPS']) | ||
| # Sum up the queue capacities by county, tech, and online year | ||
| if 'FIPS' in active_queue.columns: | ||
| fips_reported = 'p' + pd.to_numeric(active_queue['FIPS'], errors='coerce').map( |
There was a problem hiding this comment.
Can just keep line 100-106 since it worked for both 2024 (2025 release year) and 2025 (2026 release year) versions and we only need 2024 version for the fix. I believe the count_name method was only needed for the 2023 version since there was no FIPS column in that version, but we can drop the 2023 version from this processing script anyway.
| active_queue_county = active_queue_county.groupby(['FIPS','tech'])[year_range_str].sum().reset_index() | ||
|
|
||
| # Filter out tech to match with tg set in ReEDS | ||
| active_queue_county_filtered = active_queue_county[(active_queue_county['tech']=="battery") | (active_queue_county['tech']=="coal") |
There was a problem hiding this comment.
this is not on you sorry but can you put all the techs in a list (`reeds_techset = ['battery','coal',....] then active_queue_county_filtered = active_queue_county[(active_queue_county['tech'].isin(reeds_techset)]' to avoid this long statement?
Summary
Fix two bugs in
process_interconnection_queues.pythat corrupted the county-level queue limits ReEDS consumes ascap_limit— one that silently dropped queues, one that double-counted capacity — and regenerateinterconnection_queues_2024.csvaccordingly. Also repoints the county mapping, which was broken against current ReEDS main.Technical details
The two bugs
1 — counties matched on name instead of FIPS . Queues were matched to ReEDS counties on lowercased county name + state, with
.str.lower()as the only normalisation. LBNL does not always use the ReEDS spelling — Louisiana is writtenAcadia Parishwhere ReEDS hasacadia— so unmatched rows were dropped at the merge and their capacity vanished. Louisiana lost essentially its entire queue. Matching on LBNL's FIPS code fixes that, but that code is sometimes stale (Oglala Lakota SD reports46113, current46102) or several codes concatenated for multi-county projects (5301353023= 53013 + 53023) — pure FIPS matching loses 99 rows / 20.2 GW that name matching had caught. So the fix is FIPS first, county name as fallback; the two methods' blind spots are complementary. Unmatched active capacity drops from 4.4% to 1.9%, the remainder being out of ReEDS scope (e.g.MX).2 —
t_2double-counted the IA Executed queue. The final-year column was built asmax(cap_t1, cap_t2) + cap_t1rather thancap_t1 + cap_t2. The two live on separate rows andmax()was being used to broadcast one onto the other, which only works whencap_t2 > cap_t1; otherwise the IA-Executed capacity was counted twice andcap_t2disappeared (cap_t1=300, cap_t2=100gave 600 instead of 400). Thet_1column was never affected.How the fixes were verified
Plot 2024 before bug fix:

Plot 2024 after bug fix:

Plot 2024 after - before bug fix:

LLM usage: Claude Code