[ClimateHydro] Apply Climate Adjustment Factors to Hydropower CF in Input Processing#129
[ClimateHydro] Apply Climate Adjustment Factors to Hydropower CF in Input Processing#129jvcarag wants to merge 8 commits into
Conversation
- Add procedure for applying climate adjustments in hydcf.py - Modify climateprep.py to output hydadjsea.csv as climate_hydadjsea.csv in long format (deletes temp_hydadjsea.csv) - Remove procedures for temp_hydadjsea.csv from hourly_writetimeseries.py - Remove instances of climate_hydadjsea.csv and climate_hydro_* parameters from b_inputs.gms and 2_temporal_params.gms - Add entries for hydadjann.csv and hydadjsea.csv back into runfiles.csv
|
Tagging @sriharisundar for visibility: this PR addresses Issue #116 where hydropower climate adjustments were not being applied to PRAS inputs by moving up application of said adjustments to ReEDS input processing |
|
@jvcarag can you clarify if the validation test turned on the climate impacts switch? If so, what data was used? If not, what drives the changes? While small, there are clear trends. A difference plot of the stress period dispatch would also be good to add for clarity. When possible, I also think it would be nice to include some same adjustment factor files in the repo or linked on zenodo. |
stuartcohen8
left a comment
There was a problem hiding this comment.
No major issues with the code. Just perhaps some cleanup. Following from my other comment, it would be good to document the format of the climate adjustment input files in this PR, perhaps with some sample images showing the file structure. That would help others use this feature while there are not sample files available.
| reeds_path = args.reeds_path | ||
| inputs_case = args.inputs_case | ||
|
|
||
| # #%% Settings for testing |
There was a problem hiding this comment.
These lines were intentionally left in the script for future developers to uncomment for testing/debugging. Below is an example of similar lines of code in forecast.py:
ReEDS/reeds/input_processing/forecast.py
Lines 169 to 171 in 75903d1
Thanks for the review @stuartcohen8! I've updated the PR summary to specify that the validation runs both apply the same climate adjustment factors from the I will further update the PR summary to include stress period dispatch diff plots for clarity as well as a section explaining file format and directory structure to guide users interested in using this model feature with their own data. |
Summary
This PR moves the procedure for applying climate adjustment factors to hydropower capacity factors (CF) up to the
hydcf.pyinput processing script instead of doing so in2_temporal_params.gms.Technical details
Climate adjustment factors are not being read in or applied to stress-period-indexed hydropower CF data, causing certain non-dispatchable hydro techs to have CFs of
0for these timeslices (details are outlined in Issue #116).Additionally, hydropower CF data used by PRAS do not include these climate adjustments, because the adjustments are not applied to the hydropower CF file ingested by the resource adequacy tool (details outlined in Issue #131).
To resolve both issues, this PR applies the climate adjustment factors to hydropower CFs when the latter are first being processed in
reeds/input_processing/hydcf.py- this works because the adjustment factors and hydropower CFs are both at monthly resolution inhydcf.py, and the resultinghydcf.csvinput file (used by PRAS) is the precursor to thecf_hyd.csvdata that the adjustment factors are originally applied to.Implementation notes
runreeds.py,climateprep.pyis moved up in the input processing script order to occur right beforehydcf.py: this is necessary to have the adjustment factors processed before they are applied inhydcf.pyhydcf.pyhas new procedures for applying annual/seasonal climate adjustment factors to the corresponding dispatchable/non-dispatchable hydropower techsclimateprep.pyno longer creates thetemp_hydadjsea.csvfile, as it is no longer necessary to process seasonal adjustment factors inhourly_writetimeseries.py– as a result, the latter script no longer has procedures for processing the data from monthly to rep/stress-period resolutionb_inputs.gmsand2_temporal_params.gmsno longer read in or apply climate adjustment factors for hydropower CF, as they have already been applied to the CF data inhydcf.pyAdditional changes
runfiles.csv: added entries for the annual/seasonal hydropower CF climate adjustment factors,hydadjann.csvandhydadjsea.csv.Switches added/removed/changed
Issues resolved
#116: Resolves issue where climate adjustments were not being applied to stress-period data, causing hydropower CFs to equal
0for some hydro techs during stress-periods.#131: Resolves issue where climate adjustments were not reflected in the hydropower CF data used by PRAS.
Known incompatibilities
GSw_ClimateHydro) does not work out-of-the-box, as the requiredhydadjann.csv/hydadjsea.csvfiles are not currently stored in the ReEDS repo: users will need to provide their own data until updated adjustment factors are available.Relevant sources or documentation
Validation, testing, and comparison report(s)
Below are plots comparing capacity (GW, left) and generation (TWh, right) differences before and after these PR changes. The runs shown both have the climate impacts switch


GSw_ClimateHydroturned "ON" and use adjustment factors from theHadGEM2-ES_rcp45_ATscenario:Differences reflect the fact that climate adjustment factors are no longer dynamically weighted when converting from monthly to rep/stress-period resolution for each solve year/iteration in
hourly_writetimeseries.py, as they are now "baked into" the data upstream inhydcf.py. These changes to model results are fairly negligible, resulting in a <1% change to both overall capacity and generation results.Fixing Issue #116 also greatly increases the amount of hydropower available during stress-period dispatch, reducing the need for firm capacity technologies such as Gas-CT. Below are stress-period dispatch plots before (top) and after (bottom) PR changes:
Full bokeh compare report of USA_defaults case before/after PR changes:
report.html
Corresponding compare report slide deck:
results-Main,Branch.pptx
Checklist for author
Details to double-check
General information to guide review