Skip to content

[Bug] Stress period climate adjustment factors are not ingested/applied to data #116

Description

@jvcarag

Summary

When running ReEDS with climate impacts to hydropower or cooling water turned ON (i.e. GSw_ClimateHydro == 1 and/or GSwClimateWater == 1), climate adjustment factors for hydropower capacity factors and unappropriated freshwater seasonal distribution factors are not being read and applied for the stress periods.

Details:

The files not being read in and applied are the versions of climate_hydadjsea.csv and climate_UnappWaterSeaAnnDistr.csv found in the stress period folders of a ReEDS run (inputs_case/stress{model_year}i{iteration}). These files contain the stress-period values of the respective data they represent, and thus, should be read in alongside the representative period versions of the file, similar to cf_hyd and other similar parameters in 2_temporal_params.gms

* Written by reeds/input_processing/hourly_writetimeseries.py
$onempty
parameter cf_hyd(i,allszn,r,allt) "--fraction-- hydro capacity factors by season and year"
/
$offlisting
$ondelim
$include inputs_case%ds%%temporal_inputs%%ds%cf_hyd.csv
$include inputs_case%ds%stress%stress_year%%ds%cf_hyd.csv
$offdelim
$onlisting
/ ;
$offempty
$ifthen.climatehydro %GSw_ClimateHydro% == 1
* Written by climateprep.py
table climate_hydro_seasonal(r,allszn,allt) "annual/seasonal nondispatchable hydropower availability"
$offlisting
$ondelim
$include inputs_case%ds%%temporal_inputs%%ds%climate_hydadjsea.csv
$offdelim
$onlisting
;
* adjust cf_hyd based on annual/seasonal climate multipliers
* non-dispatchable hydro gets new seasonal profiles as well as annually-varying CF
* dispatchable hydro keeps the original seasonal profiles; only annual CF changes. Reflects the assumption
* that reservoirs will be utilized in the same seasonal pattern even if seasonal inflows change.
cf_hyd(i,szn,r,t)$[hydro_nd(i)$(yeart(t)>=Sw_ClimateStartYear)] =
sum{allt$att(allt,t), cf_hyd(i,szn,r,t) * climate_hydro_seasonal(r,szn,allt) } ;
cf_hyd(i,szn,r,t)$[hydro_d(i)$(yeart(t)>=Sw_ClimateStartYear)] =
sum{allt$att(allt,t), cf_hyd(i,szn,r,t) * climate_hydro_annual(r,allt) } ;

In the above example, without stress period data in the climate_hydro_seasonal parameter, Lines 490-491 calculates the non-dispatchable stress period data in cf_hyd as 0 for all years after the GSw_ClimateStartYear designation (see screenshot of inputs.gdx below):

Image

Solution (ToDo):

  • Adjust 2_temporal_params.gms to read in both versions of the climate_{hydadjsea|UnappWaterSeaAnnDistr}.csv from the inputs/{temporal_inputs|stress}/ folders.
    • Change climate_hydro_seasonal and watsa_climate from a GAMS table to parameter (required for multi-source parameter definition)
    • Fix reeds/input_processing/hourly_writetimeseries.py to output climate_hydadjsea.csv and climate_UnappWaterSeaAnnDistr.csv in long format with * appended to front of first column name

Metadata

Metadata

Assignees

No one assigned

    Labels

    TODOKnown tasks identified in code or review that haven't been scheduled yetbugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions