Breakthrough-Energy / SwitchWrapper

Wrapper for Switch
MIT License
1 stars 2 forks source link

Convert Timepoints back to Full Timescale for Output #46

Closed ahurli closed 3 years ago

ahurli commented 3 years ago

The temporal reduction performed for SWITCH needs to be undone to have data in the expected UTC timestamps. Both issues #40 and #41 require converting from timepoints back to UTC timestamps.

These data are contained in the pickle file output, specifically in data.solution._list[0].Variable dictionary as defined in #39. This dictionary contains keys with the variable name as the prefix, followed by some parameters contained in brackets (e.g. 'DispatchGen[g14010,12]', 'DispatchGen[g14010,13]', 'DispatchGen[g14010,14]'). The user will also need to provide a mapping file as input (for an example of the mapping, see here).

For data with a timeseries component (e.g. DispatchGen), the timeseries component will be one of the timepoints listed in the second column of the hours-to-timepoints mapping that must be expanded into the various UTC timestamps that are in that timepoint. For each UTC timestamp in the timepoint, a new data point should be constructed with the same, duplicated values as the values for the timepoint.