Clean up input plant database - #164
Conversation
|
Nice! One minor thought - what would you think about removing the four alternative nuclear retirement columns (NukeRefRetireYear, Nuke60RetireYear, Nuke80RetireYear, NukeEarlyRetireYear) and instead adding a simple modification to |
There was a problem hiding this comment.
A few other notes if you're thinking of downsizing more:
-
battery_durationis justenergy_capacity_MWh/summer_power_capacity_MWso could also be removed and determined inprocess_unitdata.py -
countyandT_STATEshould both be able to be determined fromFIPSinprocess_unitdata.pyusinginputs/zones/county_state.csv - the nuclear retirement columns noted above
There was a problem hiding this comment.
Thanks for the suggestions, Patrick. I removed battery_duration since we don't use it in the model. I can add back if people like to have it but as you said it's just energy cap/power cap. county and state are now added in process_unitdata.py. And I keep only one RetireYear column now, which is updated for nuclear retirement based on nukeretscen (formerly retscen), which is now just number of years after startyear (default = 80).
I can rerun comparison report but this shouldn't change anything.
There was a problem hiding this comment.
Looks great, thank you! You can actually see all the columns on one screen now, which is nice for inspection.
There are a few that could be rounded to fewer decimals upstream (T_VOM, T_FOM, T_CC*) to cut down file size further, but not a big deal.
There was a problem hiding this comment.
Good point. They are rounded to 2 decimals upstream now.
There was a problem hiding this comment.
Thanks for doing this! A couple minor cleanups but otherwise looks good from my end. It'd still be good to get Wesley's quick look though.
Actually, one important check: Could you run input_plots.plot_units_existing() before and after (on the main branch and on this one) and add that to the compare report, just to make sure everything looks right?
There was a problem hiding this comment.
Looks great, thank you! You can actually see all the columns on one screen now, which is nice for inspection.
There are a few that could be rounded to fewer decimals upstream (T_VOM, T_FOM, T_CC*) to cut down file size further, but not a big deal.
| unitdata = unitdata.merge(county_state, on='FIPS', how='left').rename(columns={'county_name':'county'}) | ||
| # Rearrange column orders | ||
| cols = df_rev.columns.to_list() | ||
| cols[cols.index('FIPS') + 1:cols.index('FIPS') + 1] = ['county', 'state'] |
There was a problem hiding this comment.
Unclear what's happening here - if it's a renaming, can you do it in a single dictionary above (part of .rename(columns={'county_name':'county'}))? Explicit dictionary renaming seems safer than order-based renaming.
I don't think the column order should matter; if it does, it'd be safer to rework the code downstream that depends on a particular order to avoid that.
There was a problem hiding this comment.
I just put county and state right next to FIPS column here for easy reading/checking location (so basically reorder county and state to the FIPS.index + 1 position)
Co-authored-by: Patrick Brown <25125211+patrickbrown4@users.noreply.github.com>
I added the two existing tech maps to the comparison report. Confirmed that they look identical. |
wesleyjcole
left a comment
There was a problem hiding this comment.
Why is there a difference in capacity in the 2020 solve year?
Also, it looks like the "cleanedNEMS" existing capacity map has an additional hydropower unit in Western Washington, so I don't think they are exactly the same. It looks like there are also some solar changes in New York between the two maps. There is also a PV plant north of New York (in both maps, so doesn't need fixed here, but should looked at for your plant database update PR that will come later).
| h2combustionfuelscen,H2-CT/CC Fuel Price Scenarios (only used if endogenous H2 production is turned off),10; reference; 30,reference, | ||
| upgradescen,Exogenous upgrade capital cost specification (see inputs\upgrades). 'default' calculates cost using diff between from- and to- tech,N/A,default, | ||
| retscen,Retirement Scenario,Nuke60RetireYear; Nuke80RetireYear; NukeEarlyRetireYear; NukeRefRetireYear,Nuke80RetireYear, | ||
| nukeretscen,Nuclear retirement scenario (years from startyear),int,80, |
There was a problem hiding this comment.
| nukeretscen,Nuclear retirement scenario (years from startyear),int,80, | |
| nukeretscen,Nuclear retirement scenario (years from plant online year),int,80, |
Right?
Summary
This PR cleans up NEMS input plant database to remove most columns from the existing database to reduce its size and make it easier to track.
Implementation notes
process_unitdata.pybased onnukeretscenswitch.reeds_bafrom the process of adjusting VOM and FOM for certain units and replacing it withFIPS.Switches added/removed/changed
retscen->nukeretscenValidation, testing, and comparison report(s)
~0 changes in unit capacity and online/retirement dates:
Comparison report (full here)
Checklist for author
Details to double-check
d_objective.gms, they are included inobjective_function_params.yamlfor completeness checkinghourlize/resource.pywas rerun to regenerate the existing/prescribed VRE capacity dataGeneral information to guide review
Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how
No
Tag points of contact here if you would like additional review of the relevant parts of the model