Skip to content

[ClimateHydro] Apply Climate Adjustment Factors to Hydropower CF in Input Processing#129

Open
jvcarag wants to merge 8 commits into
mainfrom
vc/ClimateHydroAdj
Open

[ClimateHydro] Apply Climate Adjustment Factors to Hydropower CF in Input Processing#129
jvcarag wants to merge 8 commits into
mainfrom
vc/ClimateHydroAdj

Conversation

@jvcarag

@jvcarag jvcarag commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR moves the procedure for applying climate adjustment factors to hydropower capacity factors (CF) up to the hydcf.py input processing script instead of doing so in 2_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 0 for 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 in hydcf.py, and the resulting hydcf.csv input file (used by PRAS) is the precursor to the cf_hyd.csv data that the adjustment factors are originally applied to.

Implementation notes

  • In runreeds.py, climateprep.py is moved up in the input processing script order to occur right before hydcf.py: this is necessary to have the adjustment factors processed before they are applied in hydcf.py
  • hydcf.py has new procedures for applying annual/seasonal climate adjustment factors to the corresponding dispatchable/non-dispatchable hydropower techs
  • climateprep.py no longer creates the temp_hydadjsea.csv file, as it is no longer necessary to process seasonal adjustment factors in hourly_writetimeseries.py – as a result, the latter script no longer has procedures for processing the data from monthly to rep/stress-period resolution
  • b_inputs.gms and 2_temporal_params.gms no longer read in or apply climate adjustment factors for hydropower CF, as they have already been applied to the CF data in hydcf.py

Additional changes

  • runfiles.csv: added entries for the annual/seasonal hydropower CF climate adjustment factors, hydadjann.csv and hydadjsea.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 0 for 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

  • Climate adjustments to hydropower CF functionality (controlled by GSw_ClimateHydro) does not work out-of-the-box, as the required hydadjann.csv/hydadjsea.csv files are not currently stored in the ReEDS repo: users will need to provide their own data until updated adjustment factors are available.
  • Additional work is required to apply climate adjustment factors to cooling water availability and seasonal distribution factors (details are outlined in an upcoming Issue).

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_ClimateHydro turned "ON" and use adjustment factors from the HadGEM2-ES_rcp45_AT scenario:
bokeh_plot (33)bokeh_plot (34) Screenshot 2026-07-10 at 1 27 24 PM

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 in hydcf.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:

Screenshot 2026-07-10 at 1 26 30 PMScreenshot 2026-07-10 at 1 30 10 PM

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

  • Charge code provided to reviewers
  • Included comparison reports for appropriate test cases
  • Code formatting standardized
  • Reusable functions used where possible instead of copy/pasted code

General information to guide review

  • Zero impact on results of default case
  • No substantive impact on runtime for full-US reference case
  • No substantive impact on folder size for full-US reference case
  • No change to process flow (runreeds.py, reeds/core/solve/solve.py)
  • No change to code organization
  • No change to package requirements (environment.yml or Project.toml)

jvcarag added 3 commits June 23, 2026 13:56
 - 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
@jvcarag
jvcarag requested a review from stuartcohen8 July 10, 2026 19:53
@jvcarag
jvcarag marked this pull request as ready for review July 10, 2026 19:54
@jvcarag

jvcarag commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

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

@stuartcohen8

Copy link
Copy Markdown

@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 stuartcohen8 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you intend to clean this up?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

# #%% Settings for testing
# reeds_path = os.path.expanduser('~/github/ReEDS')
# inputs_case = os.path.join(reeds_path,'runs','v20220411_prmM0_USA2060','inputs_case')

Comment thread reeds/input_processing/hydcf.py Outdated
@jvcarag

jvcarag commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

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.

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 HadGEM2-ES_rcp45_AT climate scenario, which is available for use in testing/developing new ReEDS climate features but not stored in the model repository.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants